Skip to content

Commit

Permalink
Fixing the reporting of lat/long for proper units.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed Nov 10, 2023
1 parent 94d5fca commit 69dea92
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/panoptes/pocs/mount/ioptron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ def _update_status(self):
status['state'] = self.state
status['parked_software'] = self.is_parked

status['longitude'] = float(status_dict['longitude']) * u.milliarcsecond
# Longitude has +90° so no negatives. Subtract for original.
status['latitude'] = (float(status_dict['latitude']) - 90) * u.milliarcsecond
coords_unit = getattr(u, self._coords_unit)
status['longitude'] = float(status_dict['longitude']) * coords_unit
# Longitude adds +90° to avoid negative numbers, so subtract for original.
status['latitude'] = (float(status_dict['latitude']) * coords_unit) - (90 * u.degree)

status['gps'] = MountGPS(int(status_dict['gps']))
status['tracking'] = MountTrackingState(int(status_dict['tracking']))
Expand Down

0 comments on commit 69dea92

Please sign in to comment.