Pointing Quaternion and Reference Frame

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
mertert97
Posts: 1
Joined: 30.07.2021
With us: 2 years 10 months

Pointing Quaternion and Reference Frame

Post #1by mertert97 » 30.07.2021, 11:01

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:setorientation(rot)

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)
wait(10.0)

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

Return to “Help Central”