From 4e3c8e436c05ba2fcf3a781984d109b514034768 Mon Sep 17 00:00:00 2001 From: Jeff Moe Date: Sat, 21 May 2022 14:30:57 -0600 Subject: [PATCH] sample TLE --- README.md | 26 +++++++++++++++++++++++ tle2ssc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 80 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 11c1cdf..ea71993 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,31 @@ In Celestia name "Galileo" is used for the *other* spacecraft, not for the EU GNSS. So the name used in development here adds `-gnss`, ala, `galileo-gnss.ssc`, whereas the other GNSS don't. +Example `.ssc` file contents: + +``` +"1997-035A" "Sol/Earth" { + Class "spacecraft" + # Mesh + Radius 0.005 + + EllipticalOrbit { + Epoch 2459718.94467728 + Period 0.49859567 + SemiMajorAxis 26560.345 + Eccentricity 0.0057297 + Inclination 55.5062 + AscendingNode 156.8049 + ArgOfPericenter 51.2220 + MeanAnomaly 309.3262 + } + Obliquity 55.5062 + EquatorAscendingNode 156.8049 + RotationOffset 80.2289 + # Orientation [ ] +} +``` + ## Galileo Galileo 3D models are from the ESA: @@ -172,6 +197,7 @@ Crufty bad way to do it, example: sudo cp -a extras/galileo-gnss/ /usr/share/celestia/extras-standard/ ``` + # Issues `pyorbital` doesn't support geostationary orbits. It gives the error: diff --git a/tle2ssc b/tle2ssc index 63f5315..9be09fd 100755 --- a/tle2ssc +++ b/tle2ssc @@ -17,7 +17,7 @@ from datetime import datetime now = datetime.utcnow() -tle = tlefile.read('GSAT0206', 'extras/galileo-gnss/galileo.txt') +tle = tlefile.read('GSAT0101', 'extras/galileo-gnss/galileo.txt') #print(pyorbital.tlefile.SATELLITES) #print(orbital.Orbital.get_position) @@ -27,12 +27,58 @@ satline1=tle.line1 satline2=tle.line2 satinclination=tle.inclination -orb = Orbital(satname) +# Fail: +#orb = Orbital(satname) -print('Satellite name: ', satname) -print('Line one of TLE:') -print(satline1) -print('Line two of TLE:') -print(satline2) -print('Inclination: ', satinclination) +#print('Satellite name: ', satname) +#print('Line one of TLE:') +#print(satline1) +#print('Line two of TLE:') +#print(satline2) +#print('Inclination: ', satinclination) + +# Create SSC +# From TLE: +# GSAT0101 (PRN E11) +# 1 37846U 11060A 22140.09549104 -.00000093 00000+0 00000+0 0 9998 +# 2 37846 56.9858 22.1062 0004117 28.0726 331.9949 1.70474933 65739 +# +# Satellite name: GSAT0101 +# Satellite number: 37846U +# Satellite number: 37846 +# International designator: 11060A +# Inclination: 56.9858 +# Epoch year and Julian day fraction: 22140.09549104 +# Right ascension of ascending node: 22.1062 +# Eccentricity: 0004117 +# First derivative of mean motion or ballistic coefficient: -.00000093 +# Argument of perigee: 28.0726 +# Second derivative of mean motion: 00000+0 +# Mean anomaly: 331.9949 +# Drag term or radiation pressure coefficient: 00000+0 +# Mean motion: 1.70474933 +# Ephemeris type: 0 +# Element number and checksum: 9998 +# Revolution number at epoch and checksum: 65739 + +print('"', satname, '" ','"Sol/Earth" {',sep="") +print(' Class "spacecraft"') +print(' # Mesh "foo.3ds"') +print(' radius 0.005') +print() +print(' EllipticalOrbit {') +print(' Epoch 2459718.94467728') +print(' Period 0.49859567') +print(' SemiMajorAxis 26560.345') +print(' Eccentricity 0.0057297') +print(' Inclination', satinclination) +print(' AscendingNode 156.8049') +print(' ArgOfPericenter 51.2220') +print(' MeanAnomaly 309.3262') +print(' }') +print(' Obliquity 55.5062') +print(' EquatorAscendingNode 156.8049') +print(' RotationOffset 80.2289') +print(' # Orientation [ ]') +print('}')