SgGetTelescopePosition API call - Add "time to pier flip" field/value


#1

Hi guys,
I know you have a lot more things on your plate at the moment but I have a “simple” request. I notice that there is a call to return the meridian flip delay (SgGetFlipDelay) but I wondered if it would be possible to return the actual time to the meridian flip in the SgGetTelescopePosition API call. It is shown already in the telescope module in the GUI -

So extending the API call to return the “Time to Pier Flip” in seconds (http://localhost:59590/telescopepos?format=json) similar to below would be useful -

{“Success”:true,“Message”:“Success”,“Ra”:0.107498187764033,“Dec”:90,“TimeToFlip”:19178 }

Edit - If mount has flipped then make value negative so it is known how long ago the pier flipped.

Best wishes for the new year and thank you for all your hard work.

Gingergeek


#2

One issue I could see with the negative time: if you set (in SGP) your mount to flip 0 minutes after the meridian, but the mount doesn’t want to flip because it is afraid of gear hitting something, the timer will go negative in SGP and after each image capture SGP will try the flip again until it succeeds. There should be a different indicator besides a negative value because a negative value (based on your suggestion) could either represent the mount having flipped or the mount not having flipped. We would only know that the mount was supposed to have flipped. Perhaps another value would be better (such as 86400 (24 hours) or null; something obviously not a real time).

Then we would know positive = “it will flip in X seconds”, negative = “it should have flipped -X seconds ago”, null = “flip complete”


#3

Yes, you are correct.

I allowed EQMOD to drift to the meridian and not flip and the indeed the negative time did not indicate that the flip had succeeded or failed so either a null value that would indicate success or an additional boolean field of true/false to indicate if it the flip had succeeded as intended.

As long as the remaining time is available and some method of if the flip had occurred successfully then I will leave how to convey the information to the devs.

Regards

GG


#4

@gingergeek: Why not query the ASCOM pier side value to determine if a flip had occurred?

-Ray


#5

Ray,
Well, since SGP has the data and provides info via the GUI and the API it would make no sense for me to write a windows application for ASCOM just query one value and add more complication to a workflow. It does however makes sense to add one field to an existing call from an application that already has access to that information :slight_smile:

Mark


#6

We hope to expand the api significantly in the future…but that is likely a year or two in the future.

Thanks,
Jared


#7

:frowning: Thank you Jared for taking the time to reply.


#8

Hi Mark,

Well, since SGP has the data and provides info via the GUI and the API it would make no sense for me to write a windows application for ASCOM just query one value and add more complication to a workflow. It does however makes sense to add one field to an existing call from an application that already has access to that information :slight_smile:

You are requesting an API call change, correct? API calls are used by applications that communicate with and automate SGPro. So, if you have an application using SGPro API calls then there is no need for creating another application.

I would guess that the application would likely have to be modified anyway to use the extra information in the extended version of that SGPro API call. But, without extending the API call, that same application could be modified to connect to the ASCOM driver and read the pier-side property. Doesn’t that make sense?

-Ray


#9

Nope, the application runs externally and calls the API via http.


#10

Of course the application runs externally. That’s the way one would usually use the API (from an external application). The external application can also connect to the ASCOM telescope driver and read the side of pier.

Perhaps you didn’t realize that two software applications can connect to an ASCOM telescope driver either directly, or by using POTH?

-Ray


www.mainsequencesoftware.com