Open pmneo opened 3 years ago
From Indilib driver (https://github.com/indilib/indi/blob/master/drivers/telescope/lx200driver.cpp#L1020) // Meade defines longitude as 0 to 360 WESTWARD int setSiteLongitude(int fd, double Long)
So the driver sends 10°44E as :Sg349:16# which will be interpreted from OAT as 10°44W ...
My suggested fix is to negate the dt.getTotalSeconds():
`Longitude Longitude::ParseFromMeade(String s) { Longitude result(0.0); LOGV2(DEBUG_GENERAL, F("Longitude.Parse(%s)"), s.c_str());
// Use the DayTime code to parse it. DayTime dt = DayTime::ParseFromMeade(s);
result.totalSeconds = 0 - dt.getTotalSeconds(); result.checkHours();
LOGV4(DEBUG_GENERAL, F("Longitude.Parse(%s) -> %s = %ls"), s.c_str(), result.ToString(), result.getTotalSeconds()); return result; }`
From Indilib driver (https://github.com/indilib/indi/blob/master/drivers/telescope/lx200driver.cpp#L1020) // Meade defines longitude as 0 to 360 WESTWARD int setSiteLongitude(int fd, double Long)
So the driver sends 10°44E as :Sg349:16# which will be interpreted from OAT as 10°44W ...
My suggested fix is to negate the dt.getTotalSeconds():
`Longitude Longitude::ParseFromMeade(String s) { Longitude result(0.0); LOGV2(DEBUG_GENERAL, F("Longitude.Parse(%s)"), s.c_str());
// Use the DayTime code to parse it. DayTime dt = DayTime::ParseFromMeade(s);
result.totalSeconds = 0 - dt.getTotalSeconds(); result.checkHours();
LOGV4(DEBUG_GENERAL, F("Longitude.Parse(%s) -> %s = %ls"), s.c_str(), result.ToString(), result.getTotalSeconds()); return result; }`