Minor issue with parking Mach1GTO

I’m trying to track down a minor issue with parking (Mach1GTO). What happens is that at the end of the sequence the mount is properly parked, but the AP ascom driver reports that the mount is “unparked” while at the same time it is “stopped.”

From the SGP side I believe everything is functioning properly, but I did want to check that the following reported in the log is what should in fact be happening:

[07/25/17 03:16:38.973][DEBUG] [Sequence Thread] Parking telescope…
[07/25/17 03:16:38.979][DEBUG] [Sequence Thread] ASCOM Telescope: Park message received.
[07/25/17 03:16:39.004][DEBUG] [Sequence Thread] ASCOM Telescope: Sending park…
[07/25/17 03:17:16.494][DEBUG] [Sequence Thread] ASCOM Telescope: Parked
[07/25/17 03:17:16.494][DEBUG] [Sequence Thread] ASCOM Telescope: Sending post-park stop tracking…
[07/25/17 03:17:16.494][DEBUG] [Sequence Thread] ASCOM Telescope: Setting tracking state to False

In particular, is it correct that SGP would send a “Stop tracking” command to the ascom driver, even after the mount is already parked?

Link to full log.

This is the what Ray Gralak said about this:

“Immediately after the park had completed, it looks like SGPro (or some other ASCOM application) read that the park completed but then sent an ASCOM command to disable tracking. Part of disabling tracking is to stop any slews in progress, which requires sending a “Q” command. Unfortunately the “Q” command does double duty in that it will unpark the mount. This takes the mount out of the parked state into the “not tracking” state. If SGPro had stopped after having parked the mount and just disconnected, I think you would have the behavior you are looking for.”

And a further follow up from Roland:

“Just to clarify, whenever a Park command is sent to the mount (Park 0 to Park4) the mount will automatically slew to that commanded position and then shut down all motion and de-energize the motors. The CP controller is now in a quiescent state. Any subsequent command such a a Q (quit) command re-energizes the mount and it is automatically unparked and awaiting further instruction. So, if you want to park the mount and keep the power on, do not have any program send any instructions to re-energize the motors.”

So it appears to me that SGP should not be sending a “Stop tracking” command after the mount has been parked, or it could result in motor movement.

i saw the thread on ap-gto…

i guess the question is, is this behavior ASCOM-compliant? in the past jared and ken have been loathe to add mount-specific code to SGP.

rob

ASCOM requires that any command which causes mount movement when it is parked throws an exception. Strictly speaking turning tracking off could be said not to cause movement so need not throw an exception. It shouldn’t unpark the mount.

The only command that takes the mount out of the parked state should be Unpark. The whole point is that once the mount is parked it stays parked.

What makes this fuzzy is that the mount could be unparked independently of ASCOM. Some mounts can be parked but not unparked, and manually restarting the mount may unpark it.

The AtPark property must return the current state of the mount.

it sounds to me that “Quit”, (which i guess means “Quit Tracking”) unparking the mount is counter to ASCOM compliance then, sinct it unparks the mount. and actually Roland said “any subsequent command” “re-energizes the mount and automatically unparks” which would imply that the driver is kind of far outside ascom compliance.

roland sometimes says things that are not 100% accurate though and really only ray can address this point definitively.

rob

It seems to me that on both sides of the fence there are things to be corrected:

On the SGP side:
SGP is sending an unnecessary “Stop Tracking” command after parking the mount. If I remember this right, it was added to correct an error on the ASCOM Driver of another mount, where the mount keeps tracking after the park command.

On the Mach1 side:
The driver misinterprets the ASCOM requirements and unparks the mount as a side effect of a command. Per ASCOM, the only command to unpark should be “Unpark” (see Chris’ explanation)

I think that Astro-Physics should first correct the driver implementation as this is clearly at fault. On the other side, given that SGP is sending the “Stop Tracking” command just to compensate the error in another ASCOM driver, this should be sent only if the mount is that “other” mount.

That is a very good policy.

Rolands description of the driver behavior seems to me 100% accurate. This does not mean that the implementation is 100% OK.

Kind regards,
Horia

One of the latest Beta release notes mentioned the following:

“Any park command issued through SGPro will now be followed by a stop tracking command.”

What prompted SGP developer to implement this in the first place? All A-P mounts automatically stops tracking after the mount is parked.

Thanks,
Peter