def test_omm_export(): line0, line1, line2 = VANGUARD_TLE.splitlines() sat = Satrec.twoline2rv(line1, line2) fields = export_omm(sat, 'VANGUARD 1') assertEqual(fields, { 'ARG_OF_PERICENTER': 162.2516, 'BSTAR': -2.2483e-05, 'CENTER_NAME': 'EARTH', 'CLASSIFICATION_TYPE': 'U', 'ECCENTRICITY': 0.1845686, 'ELEMENT_SET_NO': 999, 'EPHEMERIS_TYPE': 0, 'EPOCH': '2020-10-13T04:52:48.472320', 'INCLINATION': 34.2443, 'MEAN_ANOMALY': 205.2356, 'MEAN_ELEMENT_THEORY': 'SGP4', 'MEAN_MOTION': 10.84869164, 'MEAN_MOTION_DDOT': 0.0, 'MEAN_MOTION_DOT': -1.6e-07, 'NORAD_CAT_ID': 5, 'OBJECT_ID': '1958-002B', 'OBJECT_NAME': 'VANGUARD 1', 'RA_OF_ASC_NODE': 225.5254, 'REF_FRAME': 'TEME', 'REV_AT_EPOCH': 21814, 'TIME_SYSTEM': 'UTC', })
def print_sat(sat, name): """Prints Satrec object in convenient form.""" print(json.dumps(exporter.export_omm(sat, name), indent=2))