Skip to content

Commit

Permalink
Merge pull request #22 from arf20/graphics
Browse files Browse the repository at this point in the history
Graphics
  • Loading branch information
arf20 authored Oct 10, 2022
2 parents 727e0f0 + 380f12b commit 91cc2c7
Show file tree
Hide file tree
Showing 39 changed files with 488,804 additions and 367 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: CMake

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [ push, pull_request ]

jobs:
build:
Expand All @@ -18,7 +14,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt install nlohmann-json3-dev libcurl4-openssl-dev libcurlpp-dev
run: sudo apt install nlohmann-json3-dev libcurl4-openssl-dev libcurlpp-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libglm-dev

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down
46 changes: 42 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.16.0)
project(arftracksat VERSION 0.1.0)

#include(CTest)
#enable_testing()
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(src)
include_directories(common/sgdp4/)

file (GLOB SGPD4_SRC
"common/sgdp4/sigutils/*.c"
"common/sgdp4/*.c"
)

file (GLOB CORE_SRC
"core/*.cpp"
)

file (GLOB REPRESENTATION_SRC
"representation/*.cpp"
)

file (GLOB LEGACY_UI_SRC
"representation/legacy_gl_ui/*.cpp"
)

file (GLOB MAIN_SRC
"src/*.cpp"
)

set(CONFJSON "config.json")
set(ASSETS
"assets/map.json"
"assets/earth.obj"
"assets/earth.mtl"
)

set(SOURCE_FILES ${SGPD4_SRC} ${COMMON_SRC} ${COMMON_SRC} ${CORE_SRC} ${LEGACY_UI_SRC} ${REPRESENTATION_SRC} ${MAIN_SRC})
set(CMAKE_DEFAULT_PROJECT_FILE main.cpp)

add_executable(arftracksat ${SOURCE_FILES})

target_link_libraries(arftracksat pthread curl curlpp dl GL GLU glut)

install(TARGETS arftracksat RUNTIME DESTINATION bin)
install(FILES ${CONFJSON} DESTINATION etc/arftracksat/)
install(FILES ${ASSETS} DESTINATION share/arftracksat/)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
Expand Down
45 changes: 26 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,69 @@
# arftracksat: A CLI satellite tracking software for linux
SGDP4 adaptation shamelessly copied from BatchDrake's suscan.
# arftracksat: A (no longer CLI only) satellite tracking software for linux
SGDP-4 adaptation shamelessly copied from BatchDrake's suscan.

![arftracksat](https://user-images.githubusercontent.com/35542215/187993716-356f1ce6-88f8-4734-b260-4ac9b984f914.PNG)

## Building
Install dependencies
```
sudo apt update
sudo apt install nlohmann-json3-dev libcurl4-openssl-dev libcurlpp-dev
sudo apt install nlohmann-json3-dev libcurl4-openssl-dev libcurlpp-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
```
Build
```
git clone https://github.com/arf20/arftracksat
cd arftracksat/src
cd arftracksat/
mkdir build
cd build
cmake ..
make
sudo make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```
You may add the last line to .bashrc to make it persistant. It makes linux search in /usr/local/lib for libraries
You may add -j<CPUs> to the make command to build faster.

## Configuring
The default config.json should work out of the box
The default config.json located at /usr/local/etc/arftracksat/ after install should work out of the box
```
Value Description
sgp4libroot: Location of SGP4 shared libraries (no modification encouraged)
licpath: License of SGP4 path (space-track(NORAD)'s library requires it)
tleroot: Location to get and load TLE files, must be writable by the user,
note: this default will delete TLEs after reboot. Modification advised
tlefile: TLE file to load from tleroot
tlefile: TLE filename to load from tleroot
tlesources: A array of URLs to curl get into tleroot
updatePerdiod: Screen update period in milliseconds
station: Station data
name: Name
lat: Geodetic latitude
lon: East longitude
hgt: Altitude (height) over sea level in meters
show: Array to show sats by name
show: Array to only show sats by name. Leave empty to show all (possibly not good performing)
columns: Sat data to show in columns in order
name, azel, dis, geo, tab, pos, vel
satidnames: A table to convert from 5 digit International Designators to human readable common name
You may need to add entries for new TLEs and sats, or else they will show as unknown
The SGP4 library that reads TLEs, ignores the title line in the TLE
```

## Launching
Currently config.json must be in the current working directory, by default /usr/local/etc/arftracksat/
## Troubleshooting
If arftracksat fails with "No sats", the TLE file contains no TLEs. Likely the TLE server (i.e. celestrack) returned a redirect or something.

## Controls
```
cd /usr/local/etc/arftracksat/
arftracksat
General
1-9: Select satelite by number
Z: Change view to 2D (mercator projection)
X: Change view to 3D (perspective earth)
C: Exit
3D view
A-D: Rotate earth along poles
W-S: Rotate earth along an axis through the equator, parallel to the camera
Q-E: Scale up/down
```

## Troubleshooting
If no sats are found in the TLE, celestrack (or similar) probably returned no TLEs but rather a redirect or something like that instead.

# Where Windows?
I just broke support lol

Old VS project in my personal repos: https://arf20.com/source/arftracksat (it sucks)

# Support
# Support & help
https://discord.gg/GpgrnDQqtr
38 changes: 38 additions & 0 deletions assets/earth.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 30.07.2018 22:28:15

newmtl Globe
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.0196 0.0000 0.4196
Kd 0.0196 0.0000 0.4196
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000

newmtl Land
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.1451 0.4706 0.1137
Kd 0.1451 0.4706 0.1137
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000

newmtl Grid
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
Loading

0 comments on commit 91cc2c7

Please sign in to comment.