public static class StkAttitudeFile.AttitudeTimeQuaternions extends StkAttitudeFile.Attitude
Constructor and Description |
---|
AttitudeTimeQuaternions() |
public String getName()
getName
in class StkAttitudeFile.Attitude
public List<JulianDate> getTimes()
getTimes
in class StkAttitudeFile.Attitude
public final DateMotionCollection2<UnitQuaternion,Cartesian> getAttitudeData()
CoordinateAxes
(get
/ set
).
Note that the convention here is not the usual convention elsewhere in DME Component Libraries,
and instead represents the convention used in the STK Attitude Files themselves.
See the remarks for more information or use StkAttitudeFile.AttitudeTimeQuaternions.convertToStkAttitudeConvention(agi.foundation.DateMotionCollection2<agi.foundation.coordinates.UnitQuaternion, agi.foundation.coordinates.Cartesian>)
.
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.
Motion2<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.getValue();
Cartesian temp = componentsMotion.getFirstDerivative().rotate(rotation);
Cartesian rotationalVelocity = new Cartesian(Trig.radiansToDegrees(temp.getX()), Trig.radiansToDegrees(temp.getY()), Trig.radiansToDegrees(temp.getZ()));
temp = componentsMotion.getSecondDerivative().rotate(rotation);
Cartesian rotationalAcceleration = new Cartesian(Trig.radiansToDegrees(temp.getX()), Trig.radiansToDegrees(temp.getY()), Trig.radiansToDegrees(temp.getZ()));
Motion2<UnitQuaternion, Cartesian> stkAttitudeFileMotion = new Motion2<>(rotation, rotationalVelocity, rotationalAcceleration);
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.
public final void setAttitudeData(DateMotionCollection2<UnitQuaternion,Cartesian> value)
CoordinateAxes
(get
/ set
).
Note that the convention here is not the usual convention elsewhere in DME Component Libraries,
and instead represents the convention used in the STK Attitude Files themselves.
See the remarks for more information or use StkAttitudeFile.AttitudeTimeQuaternions.convertToStkAttitudeConvention(agi.foundation.DateMotionCollection2<agi.foundation.coordinates.UnitQuaternion, agi.foundation.coordinates.Cartesian>)
.
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.
Motion2<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.getValue();
Cartesian temp = componentsMotion.getFirstDerivative().rotate(rotation);
Cartesian rotationalVelocity = new Cartesian(Trig.radiansToDegrees(temp.getX()), Trig.radiansToDegrees(temp.getY()), Trig.radiansToDegrees(temp.getZ()));
temp = componentsMotion.getSecondDerivative().rotate(rotation);
Cartesian rotationalAcceleration = new Cartesian(Trig.radiansToDegrees(temp.getX()), Trig.radiansToDegrees(temp.getY()), Trig.radiansToDegrees(temp.getZ()));
Motion2<UnitQuaternion, Cartesian> stkAttitudeFileMotion = new Motion2<>(rotation, rotationalVelocity, rotationalAcceleration);
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.
@Nonnull public static DateMotionCollection2<UnitQuaternion,Cartesian> convertToStkAttitudeConvention(@Nonnull DateMotionCollection2<UnitQuaternion,Cartesian> data)
AttitudeData
(get
/ set
), which expresses the derivatives
in the body frame instead of the frame in which the body is defined.data
- The attitude data in the DME Component Libraries convention.ArgumentNullException
- Thrown when data
is null
.@Nonnull public static DateMotionCollection2<UnitQuaternion,Cartesian> convertFromStkAttitudeConvention(@Nonnull DateMotionCollection2<UnitQuaternion,Cartesian> data)
AttitudeData
(get
/ set
)
to use the DME Component Libraries convention for representing attitude, which expresses the derivatives
in the body frame instead of the frame in which the body is defined.data
- The attitude data in the STK Desktop convention.ArgumentNullException
- Thrown when data
is null
.public final Axes getCoordinateAxes()
When reading an attitude file, this property may be null if the "CoordinateAxes"
property did not exist in the file or if it could not be automatically mapped to an
Axes
instance. In the latter case, the original string
representation of the name of the reference frame can be found in the
Properties
(get
) collection.
When writing an attitude file, and this property is non-null, it overrides "CoordinateAxes"
in Properties
(get
). However, if this property is null, the value in
Properties
(get
) is used.
public final void setCoordinateAxes(Axes value)
When reading an attitude file, this property may be null if the "CoordinateAxes"
property did not exist in the file or if it could not be automatically mapped to an
Axes
instance. In the latter case, the original string
representation of the name of the reference frame can be found in the
Properties
(get
) collection.
When writing an attitude file, and this property is non-null, it overrides "CoordinateAxes"
in Properties
(get
). However, if this property is null, the value in
Properties
(get
) is used.
public RotationalMotionInterpolator getInterpolator()
StkAttitudeFile.Attitude
When reading an attitude file, this property may be null if the "InterpolationMethod"
property did not exist in the file or if it could not be automatically mapped to an
RotationalMotionInterpolator
instance.
In the latter case, the original string representation of the name of the interpolation method
can be found in the Properties
(get
) collection.
When writing an attitude file, and this property is non-null, it overrides "InterpolationMethod"
in Properties
(get
). However, if this property is null, the value in
Properties
(get
) is used.
getInterpolator
in class StkAttitudeFile.Attitude
public void setInterpolator(RotationalMotionInterpolator value)
StkAttitudeFile.Attitude
When reading an attitude file, this property may be null if the "InterpolationMethod"
property did not exist in the file or if it could not be automatically mapped to an
RotationalMotionInterpolator
instance.
In the latter case, the original string representation of the name of the interpolation method
can be found in the Properties
(get
) collection.
When writing an attitude file, and this property is non-null, it overrides "InterpolationMethod"
in Properties
(get
). However, if this property is null, the value in
Properties
(get
) is used.
setInterpolator
in class StkAttitudeFile.Attitude
public Axes createAxes()
Axes
whose time-varying orientation is computed by interpolating
over the attitude data held by this instance.createAxes
in class StkAttitudeFile.Attitude