Skip to content

[OATControl] MeadeCommandProcessor wrong Longitude Interpretation #130

@pmneo

Description

@pmneo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions