×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Losmandy G11 fails to park before flats job

  • Posts: 37
  • Thank you received: 5
Hi,


I have ran into an issue since a week or so. I am not sure if it is consecutive to the update 1.6 of indi_lx200gemini but I suspect it.


I can reproduce it with the following steps:
- I create a new schedule which only contains one flat job.
- The flat job has Park Mount checked in Calibration options in the CCD tab.
- Unpark the mount and ensure tracking is on.
- Start the scheduler


What happens is:
- The mount slews to its parking position.
- In the Setup tab Capture status is "In progress" and Mount status is "Parking"
- Once the mount reaches parking position Mount status goes to "Tracking"
- The flat job never starts as it believes mount is not parked.
- Using the hand controller I checked and the mount is actually parked.
- If I click on Park in the mount tab, the job starts immediately.


Going further into logs I noticed:
2020-09-16T05:46:40.730 DEBG org.kde.kstars.indi Losmandy Gemini : "[DEBUG] CMD: <:Gv#> "
2020-09-16T05:46:40.730 DEBG org.kde.kstars.indi Losmandy Gemini : "[DEBUG] RES: <N> "
2020-09-16T05:46:40.731 DEBG org.kde.kstars.indi Losmandy Gemini : "[DEBUG] CMD: <:Gv#> "
2020-09-16T05:46:40.733 DEBG org.kde.kstars.indi Losmandy Gemini : "[DEBUG] RES: <N> "
2020-09-16T05:46:40.734 INFO org.kde.kstars.indi Losmandy Gemini : "[INFO] Slew is complete. Tracking... "

Which shows me the mount reports "NO_MOVEMENT", twice.

Looking into lx200gemini.cpp source.
"Slew is complete. Tracking..." makes me believe either the condition TrackState == SCOPE_SLEWING is not sufficient and should be complemented with a check on ParkingState, or that it just has a wrong value for some reason I haven't figured out yet.


Sorry I am running on RPi and didn't have the time to compile/debug and create a PR.


Has anyone else been having this issue, or am I missing something?


Many thanks,

Cheers,

Carl
3 years 6 months ago #60053

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

  • Posts: 643
  • Thank you received: 62
Hi!
I also have a G11. However, I don't use the park state as you do, so have not been as observant. But I recognize that I can hit Park, the mount moves to park position, but it seems not to be "parked", that is, I need not unpart to slew it.

Magnus
3 years 6 months ago #60072

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

  • Posts: 37
  • Thank you received: 5
Many thanks for your feedback Magnus!
3 years 6 months ago #60125

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

  • Posts: 37
  • Thank you received: 5
Yesterday, I also noticed that when slewing from park to a target the mount control window showed "Parking" during the slew and then switched to "Tracking".
3 years 6 months ago #60126

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

  • Posts: 37
  • Thank you received: 5
Ok, so I came up with a quick and dirty fix. Very dirty.
I only share it for educational purposes or if someone like me is stuck...
I tested it successfully last night, but use it at your own risk ;-)

So basically what I did is write a small Bash script that is cron'd to run every 5min:
  1. It checks if the mount status is parked and not tracking, that could mean it is either truly parked or slewing to its parking position
  2. Then it waits to see if the mount status changes to parked and tracking
  3. If it is, it issues a park "command"
printlog() {
  timestamp=$(date +'[%d.%m.%Y %H:%M:%S]')
  echo "$timestamp $*"
}
 
 
printlog "Waiting 10s checking if mount parks"
 
indi_eval -t 10 -wo '"Losmandy Gemini.TELESCOPE_PARK.PARK"==1 && "Losmandy Gemini.TELESCOPE_TRACK_STATE.TRACK_ON"==0'
 
 
printlog "Mount is parking or parked: Waiting 60s checking if tracking restarts while parked"
 
if indi_eval -t 60 -wo '"Losmandy Gemini.TELESCOPE_PARK.PARK"==1 && "Losmandy Gemini.TELESCOPE_TRACK_STATE.TRACK_ON"==1'; then
  printlog "Tracking restarted while mount parked: Reparking"
 
  indi_setprop "Losmandy Gemini".TELESCOPE_PARK.PARK=On
fi
 
printlog "Mount parked"
 
exit 0

PS: Especially for resource usage, I should be adding an if condition on first indi_eval, but haven't tested it yet...
3 years 6 months ago #60172

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

  • Posts: 33
  • Thank you received: 7
FYSA I submitted a pull request for this today Jasem has merged to master. (github.com/indilib/indi/pull/1239)

If you are feeling brave pull the latest code, build and provide feedback. In those famous words uttered by every developer - it works on my machine now...

J.
3 years 6 months ago #60585

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

  • Posts: 37
  • Thank you received: 5
Thank you so much J.!

I haven't coded C++ in over 20 years, it would have taken me so much time, I am so grateful for your effort!

Yes, I'll pull source on my RPI, compile and test it. It is the least I can do ;-)
3 years 6 months ago #60639

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

  • Posts: 37
  • Thank you received: 5
Hi,

I have successfully tested your PR. There was one issue, the mount status changed to "Slewing" instead of "Parked" after parking completed.
Once I had indi running from source I spent time investigating on how to fix it. Took me long enough, but sleepMount() seems to cause the mount to go back into slewing.
I left you a comment on your PR.

Cheers!

PS: I left the review on the main repo, please let me know if this was the right way to do
Last edit: 3 years 6 months ago by Palmito.
3 years 6 months ago #60699

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

  • Posts: 33
  • Thank you received: 7
I missed that because I always shut down Ekos at the end of sequence.

I'll try to find out what's going on. It's not the call to sleepMount itself that is doing it, but a side effect of that somewhere in the state machine.

J.
Last edit: 3 years 6 months ago by Jeremy Burton.
3 years 6 months ago #60703

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

  • Posts: 33
  • Thank you received: 7
New PR Submitted:

github.com/indilib/indi/pull/1240

The real root cause was the eq coordinates property being left in the busy state.

J.
The following user(s) said Thank You: Palmito
3 years 6 months ago #60734

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

  • Posts: 37
  • Thank you received: 5
Many thanks Jeremy I just tested your code successfully.
Nice one ;-)
The following user(s) said Thank You: Jeremy Burton
3 years 6 months ago #60750

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

Time to create page: 0.563 seconds