CoordinateSystem.BuildCoordinateSystem(Variable, Vector, Variable, Vector) Method |
Top |
DescriptionUses the specified Vectors vector1 and vector2 and Variables vector1Axis and vector2Axis to build a custom 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);
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.
Example 2: CoordinateSystem1.BuildCoordinateSystem(2, ForwardVector, 1, EastVector);
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.
Example 3: CoordinateSystem1.BuildCoordinateSystem(3, ZenithVector, 1, EastVector);
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.
Timing Precision Mode This page describes functionality in nanosecond timing precision mode. Click here to see the documentation for this object in millisecond 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
|