CoordinateSystem.BuildCoordinateSystem(Variable, Vector, Variable, Vector, Vector) Method |
Top |
DescriptionUses the specified Vectors vector1 and vector2 and Variables vector1Axis and vector2Axis to build a custom Coordinate System, using vectorPosition to specify the offset of the origin of the Coordinate System.
vector1Axis specifies which axis of the coordinate system (X, Y, or Z) will be defined by vector1. vector1 will always be colinear with the axis specified by the vector1Axis property. The next axis is computed using the cross product of the two vectors. A third vector is computed using the cross product of the first two axes, and vector2Axis specifies which axis of the new coordinate system (X, Y, or Z) will be defined by this new vector. If vector1 and vector2 are orthogonal, then vector2 will be colinear with the axis specified by the vector2Axis property.
Example 1: CoordinateSystem1.BuildCoordinateSystem(1, EastVector, 3, ZenithVector, PositionVector);
The X-axis of the new coordinate system is defined by EastVector. The Y-axis is defined by Y = CrossProduct(ZenithVector, EastVector). The Z-axis is defined by Z = CrossProduct(EastVector, Y). In this configuration, the Y-axis points roughly in the ForwardVector direction and the Z-axis points roughly in the ZenithVector direction. Note that Z does not necessarily equal ZenithVector, unless ZenithVector is orthogonal to EastVector. The offset of the origin of the coordinate system is specified by PositionVector.
Example 2: CoordinateSystem1.BuildCoordinateSystem(2, ForwardVector, 1, EastVector, PositionVector);
The Y-axis of the new coordinate system is defined by ForwardVector. The Z-axis is defined by Z = CrossProduct(EastVector, ForwardVector). The X-axis is defined by X = CrossProduct(ForwardVector, Z). In this configuration, the Z-axis points roughly in the ZenithVector direction and the X-axis points roughly in the EastVector direction. Note that X does not necessarily equal EastVector, unless EastVector is orthogonal to ForwardVector. The offset of the origin of the coordinate system is specified by PositionVector.
Example 3: CoordinateSystem1.BuildCoordinateSystem(3, ZenithVector, 1, EastVector, PositionVector);
The Z-axis of the new coordinate system is defined by ZenithVector. The Y-axis is defined by Y = CrossProduct(ZenithVector, EastVector). The X-axis is defined by X = CrossProduct(Y, ZenithVector). In this configuration, the Y-axis points roughly in the ForwardVector direction and the X-axis points roughly in the EastVector direction. Note that X does not necessarily equal EastVector, unless EastVector is orthogonal to ZenithVector. The offset of the origin of the coordinate system is specified by PositionVector.
Timing Precision Mode This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode. Click here to see the documentation for this object in nanosecond timing precision mode.
Method Signature
Arguments
Return Value
Returns a 1 if the Coordinate System was built successfully. Returns a 0 if there was an error with the build.
Syntax
See also CoordinateSystem.BuildCoordinateSystem Vectors and Coordinate Systems Guide Attitude Reference Frames Guide Matrix, Array, and Variable Math Guide
|