Closed ojf closed 6 years ago
The log points out that the Precessed RA is 10.924 degrees. Looking through the code I see that this catches on this error handle in TCC_server.cpp. RAtarget_degrees is 10.924 in this case. So it looks like RAmove_2_deg is being calculated as 22 hours as opposed to 2 hours and is catching the warning. We should change this to be more robust on a 24 hour cycle.
RAtarget_hrs = RAtarget_degrees/15.0;
RAmove_2_deg = (RAtarget_hrs - LST)*15.0;
if(fabs(RAmove_2_deg) > (8.0*15.0)) //maxHourAngle
{
const char *out= "Target RA exceeds max Hour Angle";
return out;
}
Doug was correct in his diagnosis of this issue. I made the following changes to TCCserver.cpp
double RAtarget_hrs, RAmove_2_deg, RAmove_test, DECmove_2_deg;
double RAvel, DECvel;
RAtarget_hrs = RAtarget_degrees/15.0;
RAmove_test = (RAtarget_hrs - LST)*15.0;
if (RAmove_test < -180.0)
{
RAmove_2_deg = 360.0 + RAmove_test;
}
else
{
RAmove_2_deg = RAmove_test;
}
//RAmove_2_deg = (RAtarget_hrs - LST)*15.0;
DECmove_2_deg = DECtarget_degrees - 46.951166666667; //mrola
Then followed the Makefile to produce a compiled binary. I edited tccv3.py to point to this new binary and tested the fix by pointing at an object with RA = 00h from LST = 22h.
Created a new copy of the TelescopeServer (used to be TCCServer) in TelescopeServer/ with this fix
We noticed a number of targets that generated an "RA exceeds max hour angle" error even though hour angle was, in pictured case, ~2 hours. Possibly it's calculating the hour angle as a negative number in that situation? Two bugs in one here--not only should it not generate that error, but this one only displays in the "log" window in the bottom half of each tab while other limit errors display in a dialog box.