Skip to content

Commit

Permalink
Support for Orbit-predictor's Position objects
Browse files Browse the repository at this point in the history
  • Loading branch information
fisadev committed Oct 6, 2024
1 parent 72afaa4 commit 54243e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simplestmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def to_points(source, inverted_tuples=False):
# a few known classes that have latitude_deg longitude_deg attributes, like the
# locations from the orbit-predictor lib
lat, lon = source.latitude_deg, source.longitude_deg
elif source.__class__.__name__ == "Position" and hasattr(source, "position_llh"):
# a known class from the orbit-predictor lib, which has ECEF coordinates but can easily
# produce lat, lon, height coords
lat, lon, _ = source.position_llh
elif isinstance(source, (tuple, list)):
if len(source) == 1:
# a sequence with a single object inside, so extract a point from it as if we just got
Expand Down

0 comments on commit 54243e1

Please sign in to comment.