Okay, please be patient with me. I'm using the formula picked up in Meeus:
where e = 23.43 etc. is the obliquity in J2000.0, RA right ascension, Dec declination as stated in Orbiter's star marker files (Config\Sol\*.mkr)
If I use these ecliptic angles as Euler angles to point my spacecraft, I consistently end up a dozen degrees' distance away from the Orbiter-indicated position of the marker. What am I doing wrong?
TIA
EDIT: yes, I am using radians throughout
Code:
lon = atan2(sin(RA)*cos(e)+tan(Dec)*sin(e),cos(RA))
lat = asin(sin(Dec)*cos(e)-cos(Dec)*sin(e)*cos(RA))
where e = 23.43 etc. is the obliquity in J2000.0, RA right ascension, Dec declination as stated in Orbiter's star marker files (Config\Sol\*.mkr)
If I use these ecliptic angles as Euler angles to point my spacecraft, I consistently end up a dozen degrees' distance away from the Orbiter-indicated position of the marker. What am I doing wrong?
TIA
EDIT: yes, I am using radians throughout