×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Meridian Flip - EKOS/Onstep Slews to last star

  • Posts: 148
  • Thank you received: 19
The whole block with a correction so that ALL states are covered that are relevant when unparked - yeah I know I just set TrackState above inthe parsing of GU but this holds with the existing pattern and is easy to read - thoughts

// ============= Parkstatus
if (strstr(OSStat, "P"))
{
SetParked(true); //defaults to TrackState=SCOPE_PARKED
TrackState = SCOPE_PARKED;
IUSaveText(&OnstepStat[3], "Parked");
}
if (strstr(OSStat, "F"))
{
SetParked(false); // defaults to TrackState=SCOPE_IDLE
TrackState=SCOPE_IDLE;
IUSaveText(&OnstepStat[3], "Parking Failed");
}
if (strstr(OSStat, "I"))
{
SetParked(false); //defaults to TrackState=SCOPE_IDLE but we want
TrackState = SCOPE_PARKING;
IUSaveText(&OnstepStat[3], "Park in Progress");
}
if (strstr(OSStat, "p")) //jamie - this means unparked so why only idle and tracking when above we could be slewing
{
SetParked(false); //defaults to TrackState=SCOPE_IDLE but we want
if (strstr(OSStat, "nN")) // azwing need to detect if unparked idle or tracking
{
IUSaveText(&OnstepStat[1], "Idle");
TrackState = SCOPE_IDLE;
}
else if TrackState == SCOPE_SLEWING)
{
//set from state above
TrackState = SCOPE_SLEWING;
IUSaveText(&OnstepStat[3], "UnParked");
}
else
{

TrackState = SCOPE_TRACKING;
IUSaveText(&OnstepStat[3], "UnParked");
}
}
// ============= End Parkstatus
1 year 3 months ago #74915

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

  • Posts: 148
  • Thank you received: 19
btw missing ( on the if (TrackState................. I have built and will be testing now
1 year 3 months ago #74916

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

  • Posts: 148
  • Thank you received: 19
Fail - no change - this did nothing so it is elsewhere - dang!
1 year 3 months ago #74917

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

  • Posts: 148
  • Thank you received: 19
Success - I got it - Khalids earlier ! and ! on the n and N somehow was not right - putting back to prior and coupled with my check in the parking code did it - the stars are also reporting OK now as "target" - 10 slews so far and no issue to both stars and objects
This
if (strcmp(OSStat, OldOSStat) != 0) //if status changed
{
// ============= Telescope Status
strcpy(OldOSStat, OSStat);

IUSaveText(&OnstepStat[0], OSStat);
if (strstr(OSStat, "n") && strstr(OSStat, "N"))
{
IUSaveText(&OnstepStat[1], "Idle");
TrackState = SCOPE_IDLE;
}
if (strstr(OSStat, "n") && !strstr(OSStat, "N"))
{
IUSaveText(&OnstepStat[1], "Slewing");
TrackState = SCOPE_SLEWING;
}
if (strstr(OSStat, "N") && !strstr(OSStat, "n"))
{
IUSaveText(&OnstepStat[1], "Tracking");
TrackState = SCOPE_TRACKING;
}


and THIS

// ============= Parkstatus
if (strstr(OSStat, "P"))
{
SetParked(true); //defaults to TrackState=SCOPE_PARKED
TrackState = SCOPE_PARKED;
IUSaveText(&OnstepStat[3], "Parked");
}
if (strstr(OSStat, "F"))
{
SetParked(false); // defaults to TrackState=SCOPE_IDLE
TrackState=SCOPE_IDLE;
IUSaveText(&OnstepStat[3], "Parking Failed");
}
if (strstr(OSStat, "I"))
{
SetParked(false); //defaults to TrackState=SCOPE_IDLE but we want
TrackState = SCOPE_PARKING;
IUSaveText(&OnstepStat[3], "Park in Progress");
}
if (strstr(OSStat, "p")) //jamie - this means unparked so why only idle and tracking when above we could be slewing
{
SetParked(false); //defaults to TrackState=SCOPE_IDLE but we want
if (strstr(OSStat, "nN")) // azwing need to detect if unparked idle or tracking
{
IUSaveText(&OnstepStat[1], "Idle");
TrackState = SCOPE_IDLE;
}
else if (strstr(OSStat, "n") && !strstr(OSStat, "N"))
{
//set from state above
TrackState = SCOPE_SLEWING;
IUSaveText(&OnstepStat[1], "Slewing");
}
else
{

TrackState = SCOPE_TRACKING;
IUSaveText(&OnstepStat[3], "UnParked");
}
}
// ============= End Parkstatus
1 year 3 months ago #74918

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

  • Posts: 304
  • Thank you received: 24
Thanks Jamie for getting to the bottom of this.

Can you make a pull request for Jasem so this is fixed soon in the PPAs?
1 year 3 months ago #74919

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

  • Posts: 148
  • Thank you received: 19
need some help in the hows of GIT....I normally download the zip and work locally...have never gone the other way and I do not have repository on git - may be easier for me to send the snippet?
1 year 3 months ago #74920

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

  • Posts: 304
  • Thank you received: 24
It is easier for Jasem to commit from a pull request.

If you want, I can walk you through it on Saturday afternoon (over the phone and chat, if you are close to my time zone [EDT]).

That way, your name is on the commit too ...

Or I can do the pull request for you, if you attach the .cpp file that you changed here. I can do that tomorrow around lunch time.

James Lan or Azwing can do that too, if they have time.
1 year 3 months ago #74922

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

  • Posts: 1014
  • Thank you received: 302
Does the proposed solution also cover the situation that neither 'n' nor 'N' is contained in the answer to :GU#? In the log file, I find plenty of entries with 'peza/EW260' as a result to :GU# while the mount is slewing.
TSA-120 + FSQ-85 + ONTC 10"F4 Newton (+ epsilon-160 on Japan trip) | Avalon Linear + M-zero | ASI 1600mm pro + 6200mm pro | KStars/INDI on Raspberry Pi 4/Intel NUC
1 year 3 months ago #74924

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

  • Posts: 148
  • Thank you received: 19
that is simple enough to add - all my runs yesterday were happily caught by
else if (strstr(OSStat, "n") && !strstr(OSStat, "N"))
{
//set from state above
TrackState = SCOPE_SLEWING;
IUSaveText(&OnstepStat[1], "Slewing");
}
but another else if would work if there is a known state of missing n and N........this was the only add I did in the Parkstatus block which was the culprit - I left the earlier checks as-is....
So what I need is a confirmation if the combo of " n !N " and "!n !N " are both valid indicators of slewing - with my rig I am solidy showing slewing now when it is and tracking when it is....

Wolfgang - if you rig is able to reproduce the missing n combo I would need you to build the changes and verify what you see
Kahlid - can you verify the combos available? - the wiki for OnStep does not seem to show full set

BTW I sorted out Github and am happily git-ing and the is been issued a pull request and in under review now
1 year 3 months ago #74944

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

  • Posts: 1014
  • Thank you received: 302
I don't own a OnStep rig, I am a happy Avalon user :-) I was referring the log posted by Vrahesh  earlier in this thread .
TSA-120 + FSQ-85 + ONTC 10"F4 Newton (+ epsilon-160 on Japan trip) | Avalon Linear + M-zero | ASI 1600mm pro + 6200mm pro | KStars/INDI on Raspberry Pi 4/Intel NUC
1 year 3 months ago #74949

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

  • Posts: 148
  • Thank you received: 19
Interesting
[2021-08-23T19:07:35.628 PDT INFO ][ org.kde.kstars.indi] - LX200 OnStep : "[INFO] Slewing to RA: 18:37:41 - DEC: 38:48:24 "
[2021-08-23T19:07:36.232 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] CMD <:GR#> "
[2021-08-23T19:07:36.238 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] RES <22:26:46> "
[2021-08-23T19:07:36.238 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] VAL [22.4461] "
[2021-08-23T19:07:36.238 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] CMD <:GD#> "
[2021-08-23T19:07:36.244 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] RES <+89*48:56> "
[2021-08-23T19:07:36.244 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] VAL [89.8156] "
[2021-08-23T19:07:36.244 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] CMD <:GU#> "
[2021-08-23T19:07:36.249 PDT DEBG ][ org.kde.kstars.indi] - LX200 OnStep : "[SCOPE] RES <pza/EW260> "

That is not what I get but easily handled by one more IF -
KAHLID - can you confirm if this is a normal pattern - I am on 3.16 of OnStep - perhaps 4.x produces different strings?
1 year 3 months ago #74950

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

  • Posts: 304
  • Thank you received: 24
I am on 4.24.

When the mount is at home, it shows nN.
When slewing, there is neither.
When tracking after the slew ends, there is only N.

So this part in my Python API is correct for OnStep 4.x, as I have tested previously.
    if 'n' in s and 'N' in s:
      self.is_slewing = False
      self.is_tracking = False
 
    if not 'n' in s and not 'N' in s:
      self.is_slewing = True
      self.is_tracking = False
 
    if not 'n' in s and 'N' in s:
      self.is_slewing = False
      self.is_tracking = True

And here is OnStep's 4.x code for this, expanded from the terse style that Howard prefers:
if (trackingState != TrackingSidereal &&
          !(trackingState == TrackingMoveTo && lastTrackingState == TrackingSidereal)) 
   {
    reply[i++]='n';       // [n]ot tracking
    }
if (trackingState != TrackingMoveTo && !trackingSyncInProgress())  
    {
     reply[i++]='N';                   // [N]o goto
    }

I don't know if we should check the firmware "Number" attributed and if the first number is 4 or higher, then do what I am doing in Python, otherwise do what Jamie is doing now.

Side note: I've always disliked this aspect of OnStep, that we have to deal with two negatives to know the status of one thing (e.g. tracking or slewing). There should have been one letter for tracking and one letter for slowing (not absence of!), but that is not possible now since it will mess up many client programs.
1 year 3 months ago #74951

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

Time to create page: 0.650 seconds