Index: trunk/Ohana/src/opihi/cmd.astro/coord_systems.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/coord_systems.c	(revision 24002)
+++ trunk/Ohana/src/opihi/cmd.astro/coord_systems.c	(revision 24027)
@@ -123,5 +123,6 @@
   // atan2 returns -pi : +pi
   *x = DEG_RAD * atan2 (sin_x, cos_x) + transform->xo;
-  if ((*x) < 0.0) (*x) += 360;
+  if ((*x) <   0.0) (*x) += 360;
+  if ((*x) > 360.0) (*x) -= 360;
 
   // should be in range -pi/2 : +pi/2
