brandon-rhodes / python-sgp4

Python version of the SGP4 satellite position library
MIT License
376 stars 88 forks source link

Unit inconsistencies for ndot and nddot in documentation for sgp4init() method #110

Closed gavinhofer closed 1 year ago

gavinhofer commented 1 year ago

I was using the Satrec.sgp4init() method, and I noticed that some of the units in the documentation did not match the actual units of the inputs. This is under the "Providing your own elements" section on the pypi documentation page: https://pypi.org/project/sgp4/

>>> satellite2 = Satrec()
>>> satellite2.sgp4init(
...     WGS72,                # gravity model
...     'i',                  # 'a' = old AFSPC mode, 'i' = improved mode
...     25544,                # satnum: Satellite number
...     25545.69339541,       # epoch: days since 1949 December 31 00:00 UT
...     3.8792e-05,           # bstar: drag coefficient (1/earth radii)
...     0.0,                  # ndot: ballistic coefficient (revs/day)  **Should be radians/minute^2**
...     0.0,                  # nddot: mean motion 2nd derivative (revs/day^3)  **Should be radians/minute^3**
...     0.0007417,            # ecco: eccentricity
...     0.3083420829620822,   # argpo: argument of perigee (radians)
...     0.9013560935706996,   # inclo: inclination (radians)
...     1.4946964807494398,   # mo: mean anomaly (radians)
...     0.06763602333248933,  # no_kozai: mean motion (radians/minute)
...     3.686137125541276,    # nodeo: R.A. of ascending node (radians)
... )

This shouldn't affect propagation, since ndot and nddot are not used by the sgp4 propagator, but it does affect the exported TLEs. I'm using sgp4 version 2.21