SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
fly_n
Posts: 36
Joined: Wed Oct 02, 2019 7:54 pm

SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

#1

Post by fly_n »

Hello Robin,
I can't figure out how to pass the RA and Dec position to this conversion function.
I was thinking two floats and a separator in between like (15.123;20.456) but that is not it.
Maybe you can help me understand in what form I need to supply the values.

Kind regards,
Norman
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

#2

Post by admin »

Hi,

Code: Select all

>>> clr.AddReference("SharpCap.ImageProcessing")
>>> from SharpCap.ImageProcessing import RADecPosition
>>> RADecPosition(1.2,3.4)
<SharpCap.ImageProcessing.RADecPosition object at 0x000000000000006C [RA=01:11:59,Dec=+03:23:59]>
>>> 
cheers,

Robin
Jean-Francois
Posts: 361
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

#3

Post by Jean-Francois »

Hello Robin,

Why not RA = 01:12:00 and DEC = +03:24:00 ?
0.2 * 60 = 12 and 0.4*60 = 24

Jean-Francois
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

#4

Post by admin »

Hi,

rounding errors in the floating point arithmetic mean that the values end up being things like 3.39999999999999. If you look at the .RightAscension and .Declination fields you will see those are stored with minimal errors, but the way the conversion to printable format works seems to round down the seconds value rather than rounding it to the nearest second. I will adjust that.

Cheers, Robin
Post Reply