Some missing modulo math in sequences!

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
Post Reply
lowenthalm
Posts: 151
Joined: Mon May 07, 2018 12:27 am

Some missing modulo math in sequences!

#1

Post by lowenthalm »

I was running a sequence a couple of days ago using Version 4.1.1013.0 (9/4/2023) and ran into an interesting issue. I was using the following code in a RA scanning focus test I was running.
SEQUENCE
...
MOUNT OFFSET 4 0
....
END SEQUENCE


The script had worked just fine a while back and suddenly starting to fail during the RA offset the other night. As it turns out, I had started near zenith pointing to the east side of the pier, but my RA was around 20ish hours. SharpCap was quite happily sending the mount ASCOM driver a new RA of 24ish. The ASCOM driver did not like that. I presume something similarly interesting would happen if I was at 3 hours RA and attempted an RA offset of -4.

It looks like the ASCOM driver is being sent an absolute RA coordinate, so my guess is that the onus is on SharpCap to do the modulo math. It seems reasonable to fail if you try to go north of 90 or south of -90 in DEC, but RA seems like it should keep on goin' past 0h in either direction, but maybe limiting RA offsets to above the horizon.

Not sure about the case of an RA slew past zenith. With a alt-az mount this is no big deal and should be allowed, but maybe should not be allowed for a GEM mount that needs to do a meridian flip. Do you have a way of telling the difference between a GEM and a fork mount? I guess fork mounts don't care about this either.

Sorry about the older version of SC. I was traveling to dark sky sites in September and felt that version was stable enough for the moment. I promise to install the new version for testing work this week during full moon!

BTW: A silly little item. I went into the SC about box to copy the version number I was using. It occurred to me as I corrected a typo in the version number at the top of this post that it would be really handy and less error prone if the version number in the about box was editable text so I could just copy and paste it!
User avatar
admin
Site Admin
Posts: 13347
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Some missing modulo math in sequences!

#2

Post by admin »

Hi,

yes, I should definitely fix the RA out of range thing. As you say, Dec is different, and I suspect that the best thing to do there is to fail if the value goes past +/-90. The same applies for a wraparound on azimuth for an AltAz mount, but not altitude.

As to the meridian, probably best to do nothing - some mounts do track past the meridian, so trying to make that 'clever' will not be correct in all cases. It's an advanced use of the sequencer anyway, so best to do what is asked and let the end user work out if they have asked for the right thing or not.

I will have a look at making the version number selectable - not thought of that before.

cheers,

Robin
Post Reply