calc all values
parent
1034bef133
commit
b64d9e31a9
20
tle2ssc
20
tle2ssc
|
@ -8,11 +8,11 @@
|
|||
# tle2ssc foo-tle.txt
|
||||
|
||||
import os
|
||||
import skyfield
|
||||
import math
|
||||
from math import remainder
|
||||
from datetime import datetime
|
||||
from skyfield.api import EarthSatellite, load, wgs84
|
||||
from sgp4.api import Satrec, WGS72
|
||||
from skyfield.api import EarthSatellite, load, wgs84
|
||||
|
||||
xpdotp = 1440.0 / (2.0 * math.pi)
|
||||
|
||||
|
@ -84,7 +84,7 @@ satellite_eccentricity=satellite.model.ecco
|
|||
satellite_arg_of_pericenter=math.degrees(satellite.model.argpo)
|
||||
|
||||
# Mean anomaly in radians.
|
||||
satellite_mean_anomoly=math.degrees(satellite.model.mo)
|
||||
satellite_mean_anomaly=math.degrees(satellite.model.mo)
|
||||
|
||||
# Mean motion in radians per minute.
|
||||
satellite_no_kozai=satellite.model.no_kozai
|
||||
|
@ -93,12 +93,18 @@ satellite_period=(1 / (satellite.model.no_kozai * xpdotp))
|
|||
# Revolution number at epoch [Revs]
|
||||
satellite_revnum=satellite.model.revnum
|
||||
|
||||
# SemiMajor Axis
|
||||
# Semi-Major Axis
|
||||
satellite_semimajor_axis=pow((pow(satellite_period,2) * 75371000000000),0.33333333)
|
||||
|
||||
# Rotation Offset
|
||||
satellite_rotation_offset=((satellite_arg_of_pericenter)+(satellite_mean_anomaly)+360*
|
||||
((2451545-satellite_epochdays)/satellite_period-
|
||||
round((2451545-satellite_epochdays)/satellite_period)))
|
||||
|
||||
# Output for .ssc file
|
||||
print('"', satellite_name, '-', satellite_number, '" ','"Sol/Earth" {',sep="")
|
||||
print(' Class "spacecraft"')
|
||||
print(' # Mesh "foo.3ds XXX"')
|
||||
print(' # Mesh "foo.3ds" XXX')
|
||||
print(' radius', satellite_radius)
|
||||
print()
|
||||
print(' EllipticalOrbit {')
|
||||
|
@ -109,11 +115,11 @@ print(' Eccentricity', satellite_eccentricity)
|
|||
print(' Inclination', satellite_inclination)
|
||||
print(' AscendingNode', satellite_ascending_node)
|
||||
print(' ArgOfPericenter', satellite_arg_of_pericenter)
|
||||
print(' MeanAnomaly', satellite_mean_anomoly)
|
||||
print(' MeanAnomaly', satellite_mean_anomaly)
|
||||
print(' }')
|
||||
print(' Obliquity', satellite_obliquity)
|
||||
print(' EquatorAscendingNode', satellite_equator_ascending_node)
|
||||
print(' RotationOffset 312.7348 XXX')
|
||||
print(' RotationOffset', satellite_rotation_offset)
|
||||
print(' # Orientation [ ]')
|
||||
print('}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue