Page 1 of 1

Pointing Quaternion and Reference Frame

Posted: 30.07.2021, 11:01
by mertert97
I want to test different star tracking algorithms using a Celestia screenshot as input.
I want to compare the pointing quaternion of those algorithms with the orientation quaternion read out by Celestia.
As those algorithms use Equatorial J2000 l as reference frame, I tried to transform the Celestia quaternion which I found in another thread, to be n w.r.t Eclipcitc J2000.
Unfortunately, this does net work. Maybe my little script is not correct or does not always use the earth centered frame.

Here is the script I use for the rotation and the quaternion read-out:

vec = celestia:newvector( 1, 0, 0 )
angle = math.rad(23.45)
rot = celestia:newrotation(vec, angle)
obs = celestia:getobserver()

obs = celestia:getobserver()
actual_refframe = obs:getframe()
actual_obsrot = obs:getorientation()
celestia:print("Orientation:" .. "\nw: " .. actual_obsrot.w .. "\nx: " .. actual_obsrot.x .. "\ny: " .. actual_obsrot.y.. "\nz: " .. actual_obsrot.z , 10.0, -1, -1, 2, 8)

Maybe someone could give me some advice on the coordinate frames and Celestias quaternion output.