CoordinateSystem.BuildCoordinateSystem(Variable, Vector, Variable, Vector, Vector) Method

Top 

Description

Uses 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

CoordinateSystem.BuildCoordinateSystem(

Variable vector1Axis,


Vector vector1,


Variable vector2Axis,


Vector vector2,


Vector vectorPosition)

 

 

Arguments

vector1Axis


Description:

Number or Variable that specifies which axis of the coordinate system (X, Y, or Z) will be defined by vector1.

Valid Values:

Value

Label

1

x-axis

2

y-axis

3

z-axis

 

 

 

vector1


Description:

Vector that defines the axis specified by vector1Axis (X, Y, or Z).

 

 

vector2Axis


Description:

Number or Variable that specifies which axis (X, Y, or Z) will be defined by vector2 in the cross product calculation with vector1.

Valid Values:

Value

Label

1

x-axis

2

y-axis

3

z-axis

 

 

 

vector2


Description:

Vector that is used in a cross product calculation with vector1 to determine one of the axes of the coordinate system. If vector1 and vector2 are orthogonal, then vector2 will define the axis specified by vector2Axis (X, Y, or Z).

 

 

vectorPosition


Description:

Origin offset vector for the coordinate system.

 

 

 

Return Value

Type:

boolean

 

 

Returns a 1 if the Coordinate System was built successfully. Returns a 0 if there was an error with the build.

 

Syntax

myVariable1 = myCoordinateSystem1.BuildCoordinateSystem(myVariable2, myVector1, myVariable3, myVector2, myVector3);

 

 

See also

CoordinateSystem Object

CoordinateSystem.BuildCoordinateSystem

Vectors and Coordinate Systems Guide

Orbit Reference Frames Guide

Attitude Reference Frames Guide

Matrix, Array, and Variable Math Guide