satellogic / orbit-predictor

Python library to propagate satellite orbits.
MIT License
139 stars 43 forks source link

Review Julian date/day algorithms #83

Open astrojuanlu opened 4 years ago

astrojuanlu commented 4 years ago

Module orbit_predictor.predictors.accurate replaces the function jday from sgp4, which uses an algorithm similar to this one:

https://en.wikipedia.org/wiki/Julian_day#Converting_Julian_calendar_date_to_Julian_Day_Number

which in fact comes from Vallado:

https://github.com/brandon-rhodes/python-sgp4/blob/e4ede3c1dc31ba1673a2c3457c5f97dc892f28b2/sgp4/functions.py#L8-L23

And then orbit_predictor.utils contains this alternative, undocumented implementation:

https://github.com/satellogic/orbit-predictor/blob/2feced5590c4f970ac0d2fe472b9cab5005137fb/orbit_predictor/utils.py#L366-L374