Page 1 of 1

SharpCap.Mounts.SelectedMount.J2000ToJnow(RADecPosition)

Posted: Wed Jan 20, 2021 9:55 pm
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

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

Posted: Thu Jan 21, 2021 10:16 pm
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

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

Posted: Sat Jan 23, 2021 7:09 pm
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

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

Posted: Sun Jan 24, 2021 1:38 pm
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