×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Ekos sends wrong latitude/longitude to mount

  • Posts: 322
  • Thank you received: 31
Jasem,

I tested with the code that is in the PR, and it works (for my coordinates)

github.com/indilib/indi/pull/546

Here is what is in the log:

"[SCOPE] RES <+04> "
"[SCOPE] VAL [4] "
"[SCOPE] CMD <:St +043*11:57#> "
"[SCOPE] CMD <:St +043*11:57#> successful. "
"[SCOPE] CMD <:Sg 080*22:29#> "
"[SCOPE] CMD <:Sg 080*22:29#> successful. "

I did not test with a longitude that is east of Greenwich.

Also, this change is specific to Sky Sensor 2000, because it requires a space after the :St and :Sg, unlike the standard LX200.
6 years 2 weeks ago #24666

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
I tested my PR with coordinates for Kuwait City.

Seems to be working properly as far as INDI/KStars are concerned.

2018-03-29T17:18:50: [INFO] Site location updated to Latitude: 29:04:00 - Longitude: 47:58:59

Here is the log output.

[2018-03-29T13:18:50.571 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:GG#> "
[2018-03-29T13:18:50.571 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] RES <+04> "
[2018-03-29T13:18:50.571 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] VAL [4] "
[2018-03-29T13:18:50.571 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:SG -03#> "
[2018-03-29T13:18:50.652 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:SG -03#> successful. "
[2018-03-29T13:18:50.654 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:St +029*04:00#> "
[2018-03-29T13:18:50.694 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:St +029*04:00#> successful. "
[2018-03-29T13:18:50.695 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:Sg -47*58:59#> "
[2018-03-29T13:18:50.746 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:Sg -47*58:59#> successful. "
[2018-03-29T13:18:50.748 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[DEBUG] Configuration successfully saved fo
r GEOGRAPHIC_COORD. "

But when I look in the hand controller, I see the longitude as +46:02:00 (Vixen designates east as positive).

When I use a location west of Greenwich, I get proper operation:

2018-03-29T17:34:23: [INFO] Site location updated to Latitude: 43:34:00 - Longitude: 279:48:00

The hand controller has -080:11:00 (Vixen designates west as negative).

And the logs:

[2018-03-29T13:34:23.427 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:GG#> "
[2018-03-29T13:34:23.427 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] RES <+04> "
[2018-03-29T13:34:23.427 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] VAL [4] "
[2018-03-29T13:34:23.430 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:St +043*34:00#> "
[2018-03-29T13:34:23.479 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:St +043*34:00#> successful. "
[2018-03-29T13:34:23.479 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:Sg 080*11:60#> "
[2018-03-29T13:34:23.569 EDT DEBG ][ org.kde.kstars.indi] - SkySensor2000PC : "[SCOPE] CMD <:Sg 080*11:60#> successful. "

So my code is working for west of Greenwich, but not east of it.

Any modifications you suggest that would make it work for both?
Last edit: 6 years 2 weeks ago by Khalid.
6 years 2 weeks ago #24667

Please Log in or Create an account to join the conversation.

Is Vixen following LX200 as basis for their implementation? In LX200, it's 360 - longitude, so in your case it would send positive 080*22:29, so it might be that LX200 convention is the correct way. Try to send .. in that case for Kuwait City, it's 360 - 48 = 312:00:00 so it should send this:
<:Sg 312*00:00#>

If you send that, do you have 48 East in the hand controller??
6 years 2 weeks ago #24668

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
I sent this from a terminal:

:Sg 312*00:00#

And the hand controller is +048:00:00.

So it seems correct east of 0.

West of 0, sending this:

:Sg 080*12#

Works, and sets the hand controller to -80:12:00. So, it is straight coordinates, but with a leading zero.

I am now a bit confused. What change to the code will work for both cases?

Remember that the standard LX200 will not work, since SS2K needs a space after the command for both long and lat, and a leading zero for Longitude.
6 years 2 weeks ago #24670

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
Here is a rewrite for the longitude function that seems to work, mostly.

It is off by one minute in some cases.

For example, when I use -80:12:00 in KStars, it sets it to 080*11 (not 12). If I use -80:12:20, then it uses 080*12 correctly. Don't know why.
// This override is needed, because the Sky Sensor 2000 PC requires a space
// between the command its argument, unlike the 'standard' LX200 mounts, which
// does not work on this mount.
int LX200SS2000PC::setSiteLongitude(double Long)
{
    int d, m, s;
    char temp_string[32];
    double longitude;
 
    if (Long < 0)
    {   
        // Long is negative in KStars, so west of Greenwich
        longitude = abs(Long);
    }
    else
    {   
        // Long is positive, so east of Greenwich
        longitude = 360 - Long;
    }
 
    getSexComponents(longitude, &d, &m, &s);
 
    snprintf(temp_string, sizeof(temp_string), ":Sg %03d*%02d#", d, m);
 
    return setStandardProcedure(PortFD, temp_string);
}
6 years 2 weeks ago #24672

Please Log in or Create an account to join the conversation.

Just use LX200 function and add the space, that's it.
6 years 2 weeks ago #24673

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
That does not work.

For 80:12:34 West, that does this:

"[SCOPE] CMD <:Sg 279:47#> "

And hand controller gets +080:13:00 (which is east of Greenwich!)
6 years 2 weeks ago #24674

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
This PR is now updated with the almost working code.

github.com/indilib/indi/pull/546

It is still off by one minute for longitude if I use xx:yy:00. yy will be yy -1. This is what getSexComponents() returns.

Since I enter the minutes and seconds in KStars, this is no longer an issue.
6 years 2 weeks ago #24676

Please Log in or Create an account to join the conversation.

In LX200, it's 360 - Longitude that is sent. So updateLocation(...) has INDI's longitude which is for your location this --> 279:48:00

279.8, then longitude that is sent is = 360 - 279.8 = 80.2 or 80:12 which is what ends up being sent to mount.
6 years 2 weeks ago #24677

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
That makes sense on paper.

The issue is that the hand controller now has +080:12 (i.e. east of Greenwich), instead of -080:12 (west of Greenwich). Having +080 totally messes up pointing.

My pull request works well on the coordinates I tried, both in KStars/INDI as well as the controller. It is off by one (80:11 instead of 80:12) if I don't put seconds in the longitude in KStars.

I wish Camiel Severijns would test and corroborate the findings, then comment here ... Maybe he moved on to another mount ...
6 years 2 weeks ago #24678

Please Log in or Create an account to join the conversation.

wait I don't understand, if you send this command:
:Sg 080*12:00#

Then the mount controller display +080:12 ?!!
6 years 2 weeks ago #24679

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31
No.

As I said in a previous comment:

Sending

:Sg 080*12#

Works well, and sets the hand controller to -080:12, which is how Vixen says it should be, west of Greenwich.

Sending

:Sg 279*48#

Which is what the default code does in the lx200driver.cpp file, sets the hand controller wrongly to +080:12, which is east of Greenwich.

So, can't use the default code.

The code in the PR works for both cases (east or west of Greenwich)
Last edit: 6 years 2 weeks ago by Khalid.
6 years 2 weeks ago #24681

Please Log in or Create an account to join the conversation.

Time to create page: 0.299 seconds