Skip to content

Commit

Permalink
RaRate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorgan001 committed Mar 18, 2023
1 parent 521fd7f commit 3349a11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions GS.Server/SkyTelescope/SkyServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2923,11 +2923,11 @@ private static double GetRaRateDirection(double rate)

if (SouthernHemisphere)
{
if (east) { rate = -rate; }
if (!east) { rate = -rate; }
}
else
{
if (!east) { rate = -rate; }
if (east) { rate = -rate; }
}

return rate;
Expand Down
9 changes: 4 additions & 5 deletions GS.SkyWatcher/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,32 +554,31 @@ internal double GetLastGoToTarget(AxisId axis)
}

/// <summary>
/// i or X0007 Get Current "slew" speed
/// i or X0007 Get last "slew" speed
/// </summary>
/// <param name="axis">AxisId.Axis1 or AxisId.Axis2</param>
internal long GetCurrentSlewSpeed(AxisId axis)
internal long GetLastSlewSpeed(AxisId axis)
{
string response;
long iSpeed;
if (SupportAdvancedCommandSet && AllowAdvancedCommandSet)
{
response = CmdToMount(axis, 'X', "0007"); // 0x07(’07’): Current slewing speed in ticks /1024 seconds
iSpeed = String32ToInt(response, true, _resolutionFactor[(int)axis]);
return iSpeed;
}
else
{
response = CmdToMount(axis, 'i', null);
iSpeed = StringToLong(response);
return iSpeed;
}
return iSpeed;
}

/// <summary>
/// j or X0003 Gets radians position of an axis
/// </summary>
/// <param name="axis">AxisId.Axis1 or AxisId.Axis2</param>
/// <returns>Radians of the axis</returns>
/// <returns>Radians of the axis</returns>
internal double GetAxisPosition(AxisId axis)
{
if (SupportAdvancedCommandSet && AllowAdvancedCommandSet)
Expand Down
2 changes: 1 addition & 1 deletion GS.SkyWatcher/SkyWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ internal double GetLastGoToTarget(AxisId axis)

internal long GetLastSlewSpeed(AxisId axis)
{
return _commands.GetCurrentSlewSpeed(axis);
return _commands.GetLastSlewSpeed(axis);
}

internal long? GetHomePosition(AxisId axis)
Expand Down

0 comments on commit 3349a11

Please sign in to comment.