2022-05-20 22:54:55 -06:00
|
|
|
# Spacecruft Celestia GNSS
|
|
|
|
Celestia is a "real-time space simulation that lets you experience our
|
|
|
|
universe in three dimensions".
|
|
|
|
|
2022-05-23 00:45:31 -06:00
|
|
|
The present repo contains the `tle2ssc` Python script which converts
|
|
|
|
NORAD Two-Line Element sets (TLE) from CelesTrak into into
|
|
|
|
Solar System Catalog (SSC) files that can be read by Celestia.
|
2022-05-20 22:54:55 -06:00
|
|
|
|
2022-05-23 00:45:31 -06:00
|
|
|
The `tle2ssc` script is set by default to retrieve the latest orbits
|
|
|
|
for various GNSS ("GPS") satellite systems.
|
|
|
|
It could be easily updated for any other source of TLEs.
|
|
|
|
|
2022-06-20 16:01:00 -06:00
|
|
|
*Celestia Animated Time Lapse GNSS Orbits*
|
|
|
|
![celestia-gnss-orbits-anim](pics/celestia-gnss-orbits-anim.gif)
|
2022-05-20 22:54:55 -06:00
|
|
|
|
|
|
|
|
2022-05-21 22:36:50 -06:00
|
|
|
# Quick & Dirty Install
|
|
|
|
If you just want to import the pre-generated file into Celestia for
|
2022-05-22 16:38:13 -06:00
|
|
|
a look, just copy these files into your `extras` folder or similar.
|
2022-05-21 22:36:50 -06:00
|
|
|
|
2022-05-22 16:38:13 -06:00
|
|
|
```
|
|
|
|
# crufty below, private dir better
|
|
|
|
sudo mkdir -p /usr/share/celestia/extras-standard/gnss/models/
|
|
|
|
# Whatever user...
|
|
|
|
sudo chown -R debian:debian /usr/share/celestia/extras-standard/gnss
|
|
|
|
|
|
|
|
# Get SSC file
|
|
|
|
wget -O /usr/share/celestia/extras-standard/gnss/gnss.ssc \
|
|
|
|
https://spacecruft.org/spacecruft/celestia-gnss/raw/branch/main/extras/gnss/gnss.ssc
|
2022-05-21 22:36:50 -06:00
|
|
|
|
2022-05-22 16:38:13 -06:00
|
|
|
# Get 3D model
|
|
|
|
wget -O /usr/share/celestia/extras-standard/gnss/models/galileo-gnss.cmod \
|
|
|
|
https://spacecruft.org/spacecruft/celestia-gnss/raw/branch/main/extras/gnss/models/galileo-gnss.cmod
|
|
|
|
|
|
|
|
# Then (re)start Celestia.
|
|
|
|
```
|
2022-05-21 22:36:50 -06:00
|
|
|
|
2022-05-21 20:32:46 -06:00
|
|
|
# Install celestia-gnss
|
2022-05-21 22:36:50 -06:00
|
|
|
Install thusly to generate your own `.ssc` files.
|
2022-05-21 20:32:46 -06:00
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://spacecruft.org/spacecruft/celestia-gnss
|
|
|
|
cd celestia-gnss
|
|
|
|
sudo apt update
|
2023-06-23 13:39:10 -06:00
|
|
|
sudo apt install python3-pip python3-virtualenv
|
2022-05-21 20:32:46 -06:00
|
|
|
# Many ways to do python setup, here is one:
|
2023-06-23 13:39:10 -06:00
|
|
|
virtualenv -p python3 env
|
|
|
|
source env/bin/activate
|
|
|
|
pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
2022-05-21 20:32:46 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
# Run celestia-gnss
|
2022-05-21 22:31:23 -06:00
|
|
|
Example (crufty example, if you have perms):
|
2022-05-21 20:32:46 -06:00
|
|
|
|
|
|
|
```
|
2022-05-21 22:31:23 -06:00
|
|
|
./tle2ssc > /usr/share/celestia/extras-standard/gnss/gnss.ssc
|
2022-05-21 20:32:46 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# Use in Celestia
|
2022-05-23 00:45:31 -06:00
|
|
|
Use thusly, hooman.
|
|
|
|
|
|
|
|
*Celestia Showing GNSS Satellites with Labels*
|
2022-05-22 23:22:25 -06:00
|
|
|
![celestia-gnss-screenshot](pics/celestia-gnss-screenshot.png)
|
|
|
|
|
2022-05-21 20:32:46 -06:00
|
|
|
Then copy the satellites you want into your Celestia extras dir.
|
|
|
|
Crufty bad way to do it, example:
|
|
|
|
|
|
|
|
```
|
2022-05-21 22:31:23 -06:00
|
|
|
sudo cp -a extras/gnss/gnss.ssc /usr/share/celestia/extras-standard/
|
2022-05-21 20:32:46 -06:00
|
|
|
```
|
|
|
|
|
2022-05-23 00:45:31 -06:00
|
|
|
Each system, GPS, Galileo, Glonass, Beidou, can be used,
|
|
|
|
or the GNSS files which include all four, plus more regional systems.
|
2022-05-21 20:32:46 -06:00
|
|
|
|
2022-05-23 00:32:47 -06:00
|
|
|
|
|
|
|
# Screenshots
|
2022-05-23 00:52:48 -06:00
|
|
|
Screenshots of running Celestia with GNSS satellites.
|
2022-05-23 00:32:47 -06:00
|
|
|
|
2022-06-20 16:01:00 -06:00
|
|
|
*GNSS Satellites Orbiting Earth*
|
|
|
|
![celestia-gnss-orbits](pics/celestia-gnss-orbits.png)
|
|
|
|
|
2022-05-23 00:52:48 -06:00
|
|
|
*Celestia with Moon orbit, Earth, and GNSS satellites.*
|
2022-05-23 00:32:47 -06:00
|
|
|
![celestia-moon-gnss](pics/celestia-moon-gnss.png)
|
|
|
|
|
2022-05-23 00:52:48 -06:00
|
|
|
*Celestia MultiView.*
|
2022-05-23 00:32:47 -06:00
|
|
|
![celestia-multiview-gnss](pics/celestia-multiview-gnss.png)
|
|
|
|
|
|
|
|
|
2022-05-20 22:54:55 -06:00
|
|
|
# See Also
|
|
|
|
|
2022-05-21 00:12:07 -06:00
|
|
|
## Spacecruft
|
2022-05-20 22:54:55 -06:00
|
|
|
Spacecruft:
|
|
|
|
|
|
|
|
* https://spacecruft.org/spacecruft/gnss-earth
|
|
|
|
|
|
|
|
* https://spacecruft.org/spacecruft/celestia
|
|
|
|
|
2022-05-21 00:12:07 -06:00
|
|
|
## Celestia
|
2022-05-20 22:54:55 -06:00
|
|
|
Upstream Celestia:
|
|
|
|
|
|
|
|
* https://celestia.space/
|
|
|
|
|
|
|
|
* https://github.com/CelestiaProject/Celestia
|
|
|
|
|
2022-05-22 12:16:00 -06:00
|
|
|
Celestia forum thread about celestia-gnss:
|
|
|
|
|
|
|
|
* https://celestia.space/forum/viewtopic.php?f=6&t=22559
|
|
|
|
|
2022-05-21 00:26:23 -06:00
|
|
|
## TLE Conversion
|
2022-05-21 00:12:07 -06:00
|
|
|
|
2022-05-22 12:16:00 -06:00
|
|
|
TLE Conversion Spreadsheet by Grant Hutchison from July 2003,
|
|
|
|
the basis for the formulas in the `tle2ssc` script.
|
2022-05-20 22:54:55 -06:00
|
|
|
|
|
|
|
* https://www.classe.cornell.edu/~seb/celestia/hutchison/spreadsheets.html
|
|
|
|
|
|
|
|
* https://www.classe.cornell.edu/~seb/celestia/hutchison/tle-xls.zip
|
|
|
|
|
2022-05-22 12:49:52 -06:00
|
|
|
Useful formula from here too:
|
|
|
|
|
|
|
|
* https://kaitlyn.guru/projects/two-line-elements-tle/
|
|
|
|
|
2022-05-22 15:59:10 -06:00
|
|
|
I had this exact printout on my desk (trimmed to size!) when I came across
|
|
|
|
this gem from @fisadev via Poliastro docs:
|
|
|
|
|
2022-05-22 23:39:28 -06:00
|
|
|
***How are satellite orbits disseminated?***
|
|
|
|
|
2022-05-22 16:03:32 -06:00
|
|
|
<img src="pics/wtf-tle.jpg" width="600">
|
2022-05-22 15:59:10 -06:00
|
|
|
|
2022-05-22 16:07:08 -06:00
|
|
|
|
2022-05-22 15:59:10 -06:00
|
|
|
* https://docs.poliastro.space/en/latest/examples/Loading%20OMM%20and%20TLE%20satellite%20data.html
|
|
|
|
|
2022-05-22 16:22:02 -06:00
|
|
|
Perhaps from page 7 of the PDF,
|
|
|
|
*Strategic Center for Networking, Integration, and Communications
|
|
|
|
Orbit Propagation Front-End Software Development*.
|
|
|
|
|
|
|
|
* https://ntrs.nasa.gov/citations/20180008672
|
|
|
|
|
2022-05-22 23:51:33 -06:00
|
|
|
Not used, but perhaps could be useful from Libre Space Foundation:
|
|
|
|
|
|
|
|
* https://gitlab.com/librespacefoundation/python-satellitetle
|
|
|
|
|
2022-05-21 00:12:07 -06:00
|
|
|
## Solar System Catalog
|
|
|
|
*"Solar System Catalog" files are primarily used to define the objects which
|
|
|
|
can be found in a stellar system, such as planets, moons, asteroids, comets,
|
|
|
|
and spacecraft. They also have four other uses: they can define alternative
|
|
|
|
surface textures, locations on or near an object, and orbital reference points.
|
|
|
|
An SSC file can also edit objects which have been defined in other SSC catalog files.*
|
|
|
|
|
|
|
|
Info on `.ssc` files:
|
|
|
|
|
|
|
|
* https://www.classe.cornell.edu/~seb/celestia/creating-ssc-files.html
|
|
|
|
|
|
|
|
* https://en.wikibooks.org/wiki/Celestia/SSC_File
|
|
|
|
|
2022-05-23 01:05:37 -06:00
|
|
|
In Celestia the name "Galileo" is used for the *other* spacecraft, not
|
|
|
|
for the EU GNSS. So the name used in here adds `-gnss`,
|
|
|
|
ala, `galileo-gnss.ssc`, whereas the other GNSS don't have it appended.
|
2022-05-21 00:26:23 -06:00
|
|
|
|
2022-05-21 14:30:57 -06:00
|
|
|
Example `.ssc` file contents:
|
|
|
|
|
|
|
|
```
|
2022-05-23 00:56:20 -06:00
|
|
|
"GSAT0101 (PRN E11)" "Sol/Earth" {
|
|
|
|
Class "spacecraft"
|
|
|
|
Mesh "galileo-gnss.cmod"
|
|
|
|
Radius 0.005
|
2022-05-21 14:30:57 -06:00
|
|
|
|
|
|
|
EllipticalOrbit {
|
2022-05-23 00:56:20 -06:00
|
|
|
Epoch 2459722.35154914
|
|
|
|
Period 0.58659637
|
|
|
|
SemiMajorAxis 29600.176
|
|
|
|
Eccentricity 0.00041090
|
|
|
|
Inclination 56.9865
|
|
|
|
AscendingNode 22.0582
|
|
|
|
ArgOfPericenter 29.0248
|
|
|
|
MeanAnomaly 331.0391
|
2022-05-21 14:30:57 -06:00
|
|
|
}
|
2022-05-23 00:56:20 -06:00
|
|
|
Obliquity 56.9865
|
|
|
|
EquatorAscendingNode 22.0582
|
|
|
|
RotationOffset 296.9294
|
2022-05-21 14:30:57 -06:00
|
|
|
# Orientation [ ]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-05-21 00:26:23 -06:00
|
|
|
## TLE Sources
|
|
|
|
|
2022-05-22 12:16:00 -06:00
|
|
|
GNSS (All)
|
|
|
|
* https://celestrak.com/NORAD/elements/gnss.txt
|
|
|
|
|
2022-05-21 00:26:23 -06:00
|
|
|
Beidou (China)
|
|
|
|
* https://celestrak.com/NORAD/elements/beidou.txt
|
|
|
|
|
|
|
|
Galileo (Europe)
|
|
|
|
* https://celestrak.com/NORAD/elements/galileo.txt
|
|
|
|
|
|
|
|
Glonass (Russia)
|
|
|
|
* https://celestrak.com/NORAD/elements/glo-ops.txt
|
|
|
|
|
|
|
|
GPS (USA)
|
|
|
|
* https://celestrak.com/NORAD/elements/gps-ops.txt
|
|
|
|
|
2022-05-21 00:12:07 -06:00
|
|
|
## Spice
|
|
|
|
Spice TLE:
|
|
|
|
"Evaluate NORAD two-line element data for earth orbiting spacecraft."
|
|
|
|
|
|
|
|
* https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/FORTRAN/spicelib/evsgp4.html
|
|
|
|
|
2022-05-21 19:04:08 -06:00
|
|
|
## SGP4
|
|
|
|
SPG4
|
2022-05-21 00:12:07 -06:00
|
|
|
|
2022-05-21 19:04:08 -06:00
|
|
|
* https://pypi.org/project/sgp4/
|
2022-05-21 00:12:07 -06:00
|
|
|
|
2022-05-21 19:04:08 -06:00
|
|
|
## Skyfield
|
|
|
|
Skyfield
|
|
|
|
|
|
|
|
* https://rhodesmill.org/skyfield/earth-satellites.html
|
2022-05-21 00:12:07 -06:00
|
|
|
|
2022-05-20 22:54:55 -06:00
|
|
|
|
2022-05-21 01:30:30 -06:00
|
|
|
# 3D Models
|
|
|
|
Celestia uses an old 3D proprietary format from an old 3D application in
|
|
|
|
`.3ds` format. It also has it's own format `.cmod`.
|
2022-05-21 01:16:06 -06:00
|
|
|
|
2022-05-21 20:32:46 -06:00
|
|
|
## Galileo
|
|
|
|
Galileo 3D models are from the ESA:
|
|
|
|
|
|
|
|
* https://gssc.esa.int/education/galileo3d/
|
|
|
|
|
2022-05-22 15:42:56 -06:00
|
|
|
![celestia-galileo-screenshot](pics/celestia-galileo-screenshot.png)
|
|
|
|
|
2022-05-21 01:30:30 -06:00
|
|
|
## 3D Model Conversion
|
2022-05-22 14:34:33 -06:00
|
|
|
The `galileo.obj` file from the ESA can be read by `cmodview` in
|
|
|
|
the `celestia-tools` package. The file can be saved in `cmodview`
|
|
|
|
as `galileo-gnss.cmod` and then read by Celestia.
|
2022-05-21 01:16:06 -06:00
|
|
|
|
2022-05-23 00:32:47 -06:00
|
|
|
The ESA supplies textures, but the aren't applied in the Celestia model (yet).
|
|
|
|
|
2022-05-22 15:30:42 -06:00
|
|
|
### Blender
|
|
|
|
`blender-2.79b` didn't work to convert a `.obj` file to `.3ds`
|
|
|
|
that rendered in Celestia.
|
2022-05-21 01:30:30 -06:00
|
|
|
|
|
|
|
|
2022-05-22 15:30:42 -06:00
|
|
|
# TODO
|
|
|
|
Do.
|
2022-05-21 01:16:06 -06:00
|
|
|
|
2022-05-22 15:30:42 -06:00
|
|
|
* All GNSS satellites are using the Galileo 3D model.
|
|
|
|
|
|
|
|
* Textures need to be added to 3D models.
|
|
|
|
|
|
|
|
* Orientation of satellite 3D models is incorrect.
|
|
|
|
|
|
|
|
* Confirm orbits are reasonably correct.
|
2022-05-21 12:39:21 -06:00
|
|
|
|
|
|
|
|
2022-05-21 20:32:46 -06:00
|
|
|
# Status
|
|
|
|
Alpha, under development.
|
2022-05-21 12:39:21 -06:00
|
|
|
|
2022-05-21 22:31:23 -06:00
|
|
|
Output works in Celestia. Orbits are not confirmed correct.
|
|
|
|
|
2022-05-21 01:16:06 -06:00
|
|
|
|
2022-05-20 22:54:55 -06:00
|
|
|
# License / Copyright
|
2022-05-21 01:16:06 -06:00
|
|
|
Upstream sources under their respective copyrights.
|
|
|
|
|
2023-06-23 13:39:10 -06:00
|
|
|
Copyright (C) 2022, 2023 Jeff Moe.
|
2022-05-20 22:54:55 -06:00
|
|
|
|
|
|
|
License: GPLv2 or any later version.
|
2022-05-21 01:16:06 -06:00
|
|
|
|