StkAttitudeFileAttitudeTimeQuaternionsAttitudeData Property |
Namespace: AGI.Foundation.Stk
The convention used by STK attitude files for representing rotational motion is different than the convention used in DME Component Libraries. Specifically, the derivative information is expressed in radians in DME Component Libraries and in degrees in the STK attitude file, and is expressed with respect to the originating axes in DME Component Libraries and with respect to the destination axes in the STK attitude file. For example, if the UnitQuaternion represents the transformation from axes "A" to axes "B", then the rotational velocities and accelerations should be expressed with respect to axes "A" for DME Component Libraries and should be expressed with respect to axes "B" for STK attitude files.
The following example indicates how to convert rotational motion using the DME Component Libraries convention to the STK attitude file convention.
// Get some rotational motion which uses the DME Component Libraries convention of rates expressed // with respect to the originating axes and in radians. Motion<UnitQuaternion, Cartesian> componentsMotion = GetMotion(); // Convert the motion to use the STK attitude file convention of rates expressed with respect // to the destination axes and in degrees. UnitQuaternion rotation = componentsMotion.Value; Cartesian temp = componentsMotion.FirstDerivative.Rotate(rotation); Cartesian rotationalVelocity = new Cartesian(Trig.RadiansToDegrees(temp.X), Trig.RadiansToDegrees(temp.Y), Trig.RadiansToDegrees(temp.Z)); temp = componentsMotion.SecondDerivative.Rotate(rotation); Cartesian rotationalAcceleration = new Cartesian(Trig.RadiansToDegrees(temp.X), Trig.RadiansToDegrees(temp.Y), Trig.RadiansToDegrees(temp.Z)); Motion<UnitQuaternion, Cartesian> stkAttitudeFileMotion = new Motion<UnitQuaternion, Cartesian>(rotation, rotationalVelocity, rotationalAcceleration);