Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OATControl] MeadeCommandProcessor wrong Longitude Interpretation #130

Open
pmneo opened this issue Dec 4, 2020 · 0 comments
Open

[OATControl] MeadeCommandProcessor wrong Longitude Interpretation #130

pmneo opened this issue Dec 4, 2020 · 0 comments

Comments

@pmneo
Copy link

pmneo commented Dec 4, 2020

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;
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant