vessels attitute relative to velocity vector?

marcl86

New member
Joined
Jul 20, 2008
Messages
1
Reaction score
0
Points
0
Hi folks,

this is my first post here, so please be kind :)

i was wondering if it is possible to somehow retrieve or calculate my vessels current attitude relative to it's velocity vector?
i mean the two angels displayed by the orbital-hud... i need them to implement my own version of the standard nav-ap-modes (prograde, ...)

i'm stuck on this one for too long... it would be nice if someone could point me in the right direction :-)

thanks in advance
marcl86
 
i was wondering if it is possible to somehow retrieve or calculate my vessels current attitude relative to it's velocity vector?
i mean the two angels displayed by the orbital-hud... i need them to implement my own version of the standard nav-ap-modes (prograde, ...)
When you say "retrieve", do you mean through the Orbiter API? If so, get [ame="http://www.orbithangar.com/searchid.php?ID=3165"]AttitudeMFD[/ame] (the source code is included). Have a look at the function AttitudeMFD::CalcVelocity() and the functions it references.
 
You can convert the velocity vector to ship-local coordinates, and calculate the angle from that using basic trig.
 
You can convert the velocity vector to ship-local coordinates, and calculate the angle from that using basic trig.
Easy if you just want to calculate the angle between the velocity vector and one of the vessel axes but not so easy if you want to know the angles of the Tait-Bryan rotations (ie, attitude) from a reference frame to the vessel's current frame. This is what AttitudeMFD does.

BTW, in velocity mode, AttitudeMFD sets the reference frame as +Z parallel to the velocity vector and +Y perpendicular to the plane perpendicular to the orbit plane and containing the velocity vector and on the side of that plane away from the rbody. +X is determined from those two using the left hand rule.
 
Easy if you just want to calculate the angle between the velocity vector and one of the vessel axes but not so easy if you want to know the angles of the Tait-Bryan rotations (ie, attitude) from a reference frame to the vessel's current frame. This is what AttitudeMFD does.

Perhaps, but this is not what he's asking for. A velocity vector can be completely described in only two rotations, because it has no "up."
 
Back
Top