Page 1 of 1

What is the observer frame of reference?

Posted: 18.12.2004, 16:26
by cpotting
I am ever so slowly working my way through to understanding Celestia's frames, orientations, etc. I am currently trying to get a handle on the different frames of reference and how to use them.

The observer frame of reference does not seem to have any distincive purpose. As best as I can tell, it is the same as the ecliptic frame of reference for the selected object. Can anyone enlighten me on any differences between the two?

The following script shows that both frames are identically aligned. (BTW: it also shows that the equatorial frame of reference is not working (at least under v1.3.2 since it also renders the same coordinates as the ecliptic)).

Code: Select all

KM_PER_MLY   = 9466411.842
EARTH = celestia:find("Sol/Earth")
celestia:getobserver():gotolonglat(EARTH, math.rad(45), math.rad(45), 50000, 5); wait(5)
pos = celestia:getobserver():getposition()
u = celestia:newframe("universal"):to(pos)
e = celestia:newframe("ecliptic", EARTH):to(pos)
q = celestia:newframe("equatorial", EARTH):to(pos)
p = celestia:newframe("planetographic", EARTH):to(pos)
o = celestia:newframe("observer", EARTH):to(pos)
celestia:print("uni x="..math.floor(u:getx()*KM_PER_MLY).." y="..math.floor(u:gety()*KM_PER_MLY).." z="..math.floor(u:gety()*KM_PER_MLY).."\n"..
               "ecl x="..math.floor(e:getx()*KM_PER_MLY).." y="..math.floor(e:gety()*KM_PER_MLY).." z="..math.floor(e:gety()*KM_PER_MLY).."\n"..
               "equ x="..math.floor(q:getx()*KM_PER_MLY).." y="..math.floor(q:gety()*KM_PER_MLY).." z="..math.floor(q:gety()*KM_PER_MLY).."\n"..
               "pla x="..math.floor(p:getx()*KM_PER_MLY).." y="..math.floor(p:gety()*KM_PER_MLY).." z="..math.floor(p:gety()*KM_PER_MLY).."\n"..
               "obs x="..math.floor(o:getx()*KM_PER_MLY).." y="..math.floor(o:gety()*KM_PER_MLY).." z="..math.floor(o:gety()*KM_PER_MLY),
               200, -1,1,0,0);wait(200)