diff --git a/tle2ssc b/tle2ssc index f5a6649..4876e8b 100755 --- a/tle2ssc +++ b/tle2ssc @@ -17,7 +17,6 @@ from skyfield.api import EarthSatellite, load, wgs84 xpdotp = 1440.0 / (2.0 * math.pi) # For now dev with just one Galileo satellite -satellite_name='GSAT0101' satellite_number=37846 #satellites_url = 'http://celestrak.com/NORAD/elements/galileo.txt' @@ -29,9 +28,14 @@ t = ts.now() # 2022-05-20 02:17:30 #t = ts.utc(2022, 5, 20, 2, 17, 30) + # Get one satellite by_number = {sat.model.satnum: sat for sat in satellites} satellite = by_number[satellite_number] +satellite_name=satellite.name + + + # Static radius satellite_radius=0.005 @@ -110,7 +114,7 @@ satellite_rotation_offset=((satellite_arg_of_pericenter)+(satellite_mean_anomaly round((2451545-satellite_epochdays)/satellite_period))) # Output for .ssc file -print('"', satellite_name, '-', satellite_number, '" ','"Sol/Earth" {',sep="") +print('"', satellite_name, '" "Sol/Earth" {',sep="") print(' Class "spacecraft"') print(' # Mesh "foo.3ds" XXX') print(' radius', "%.3f" %satellite_radius)