[ACP-841]  Offset Tracking Fails Due to Test With Tracking Off
Type Bug
Priority High
Severity Major
Component AcquireSupport library, Main Program
Fixed In Version [8.08.0
Versions Affected [7.1d7.1d
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 8/26/2012

Description
See this Comm Center post which is extremely detailed and has the solution.

So, the test for availability of offset tracking fails because tracking is off at that point, not because the mount doesn't support it. I don't know if failing the rate set when tracking off is new as of V5.05, or whenever, but I'd assume that all AP mount users would see the same problem, and possibly any others with similar behavior. (I think you fixed a similar problem in the X2 ASCOM driver due to TSX's similar behavior?)

Reopened for sequencing in ACP.exe during script rundown, also for AP driver.

Reopened again Feb 2015 for wind down with TheSky X after using track offsets.

Comments
3/31/2015 2:23:45 PM   Bob Denny
THIS MESS COMPLETELY REMOVED IN FAVOR OF NEW LOGIC IN ACP-1325
3/19/2015 11:58:50 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 791
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/Scripts/AcquireImages.js (Modified)
Check-in comment Another hack, this time for TheSky, for setting the tracking offsets to zero at end of run. GEM:841
2/10/2015 3:36:10 PM   Bob Denny
Reopened: Discovered that with TheSky X the logic in 7.2 leaves "tracking at custom rate" if a plan with #TRACKON is run to track a comet etc. The problem here is that TheSky X reports Tracking = False if any offsets are in effect!

Working with Ron Wodaski, I found that the ridiculous logic in ACP at the end of running a script that was put in for the AP in rev. 747 (9/2/2014 2:30:45 PM) are OK for TheSky though it makes it go through some gyrations. But the logic in AcquireImages at the end of a Plan is definitely failing. The reason is that Telescope.Tracking is returned as False whenever the RARate or DecRate are set to anything including zero!

The simple fix is to Remove the second term from this conditional and always turn tracking off even if we think it is already off:
    if(Telescope.CanSetTracking && Telescope.Tracking)
    {
        Console.PrintLine("  (turning tracking off for safety)");
        Telescope.Tracking = false;
        Util.WaitForMilliseconds(1000);
    }
9/2/2014 2:30:45 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 747
Affected files /trunk/ACP.vbp (Modified)
/trunk/main.frm (Modified)
Check-in comment Turn tracking on for resetting the RA/Dec offsets at the end of a script. GEM:841
9/1/2014 9:28:00 AM   Bob Denny
Reopened -- See this Comm Center thread with Steve Reilly and Ray Gralak. After reflection, in RunScript() (script host wind down) just zero the offsets with the tracking on and then restore tracking state at the end of the script whatever that was, unless it's going to be turned off anyway due to the script being run from the web.
8/26/2012 9:49:25 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 472
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/AcquireSupport.wsc (Modified)
/trunk/Script Components Master/AcquireSupport.wsc (Modified)
Check-in comment Test for offset tracking support by mount now done with tracking enabled! GEM:841
4/12/2012 12:23:03 AM   Bob Denny
His patch to AcquireSupport:

    Dim cur_TrackingState
    cur_TrackingState = Telescope.Tracking
    Telescope.Tracking = True
    Err.Clear
    On Error Resume Next
    Telescope.RightAscensionRate = 0.01                         ' Try offset tracking
    If Err.Number = 0 Then                                      ' Assume if we can change RA rate, we can change Dec rate
        c_haveTrackOffset = True                                ' We have it!
        Telescope.RightAscensionRate = 0.0                      ' But make sure it's turned off
        Telescope.DeclinationRate = 0.0
    Else
        c_haveTrackOffset = False                               ' Cannot apply tracking offsets
    End If
    Telescope.Tracking = cur_TrackingState