Skip to content

Commit

Permalink
Reverse pier sides in southering hemisphere
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Sep 29, 2024
1 parent 8987ca3 commit 417efe0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/telescope/astrotrac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,21 +452,22 @@ void AstroTrac::getRADEFromEncoders(double haEncoder, double deEncoder, double &
pierSide = PIER_WEST;
}
}
// Southern Hemisphere
else
{
// East
// "Normal" Pointing State (West, looking East)
if (MountTypeSP.findOnSwitchIndex() == MOUNT_SINGLE_ARM || deEncoder <= 0)
{
de = std::max(-90 - deEncoder, -90.0);
ha = -6.0 - (haEncoder / 360.0) * 24.0;
pierSide = PIER_EAST;
pierSide = PIER_WEST;
}
// West
// "Reversed" Pointing State (East, looking West)
else
{
de = -90 + deEncoder;
ha = 6.0 - (haEncoder / 360.0) * 24.0;
pierSide = PIER_WEST;
pierSide = PIER_EAST;
}
}

Expand Down

0 comments on commit 417efe0

Please sign in to comment.