Skip to content

Commit

Permalink
Dealing with dumb older RA millisecond values.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed Nov 10, 2023
1 parent b296219 commit ece822b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/panoptes/pocs/mount/ioptron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,12 @@ def _mount_coord_to_skycoord(self, mount_coords):
def _skycoord_to_mount_coord(self, coords):
""" Converts between SkyCoord and a iOptron RA/Dec format. """

ra_coord = coords.ra.to(self._ra_coords_units).value
# Do some special handling of older firmware that had RA coords in a time unit.
if self._ra_coords_units == 'millisecond':
ra_coord = (coords.ra.to(u.hourangle).value * u.hour).to(self._ra_coords_units).value
else:
ra_coord = coords.ra.to(self._ra_coords_units).value

dec_coord = coords.dec.to(self._dec_coords_units).value

ra_mount = self._ra_format.format(ra_coord)
Expand Down

0 comments on commit ece822b

Please sign in to comment.