| Earth Observation Mission CFI Software Pointing Software User Manual for JAVA |

Public Member Functions

# EECFI.Attitude Class Reference

Attitude data and configuration. More...

Inheritance diagram for EECFI.Attitude:

List of all members.

## Public Member Functions
| Attitude () throws CfiError
| Empty Class constructor.
| Attitude (final TimeCorrelation timeId, final SatNomTransId satNomTrId, final SatTransId satTrId, final InstrTransId instTrId) throws CfiError
| Constructor with satellite frame ids.
void | close () throws CfiError
| Release all resources managed by this object.
void | setTransformations (final TimeCorrelation timeId, final SatNomTransId satNomTrId, final SatTransId satTrId, final InstrTransId instTrId) throws CfiError
| Set the transformations in the attitutde Id.
native void | compute (final ModelId modelId, final StateVector stateVector, long targetFrame) throws CfiError
| Compute attitude matrix.
native void | userSet (final ModelId modelId, final StateVector stateVector, long targetFrame, final double[][] matrix, final double[][] matrixRate, final double[][] matrixRateRate, final double[] offset) throws CfiError
| Assign user-defined attitude frame.
native AttRec | getAttitudeData (long dataType, long sourceRefType, long sourceRef) throws CfiError
| Compute quaternions/angles equivalent to the transformation from sourceRef to the attitude target frame.
native AttitudeData | getData () throws CfiError
| Get attitude id data.
native void | setData (final AttitudeData attitudeData) throws CfiError
| Set attitude id data.
native Coord | changeFrame (final SatId satId, final ModelId modelId, long modeFlag, long frameFlagIn, long frameIdIn, long frameFlagOut, long frameIdOut, final StateVector satStateVec, final Coord statVecIn) throws CfiError
| Change the input vector/direction from a coordinate system to another ( including attitude frames ).

## Detailed Description

Attitude data and configuration.

## Constructor & Destructor Documentation

EECFI.Attitude.Attitude | ( |  | ) | throws CfiError

Empty Class constructor.

EECFI.Attitude::Attitude | ( | final TimeCorrelation | timeId,
|  | final SatNomTransId | satNomTrId,
|  | final SatTransId | satTrId,
|  | final InstrTransId | instTrId |
| ) |  |  | throws CfiError

Constructor with satellite frame ids.

Parameters:

  | timeId | Time correlations.
  | satNomTrId | Satellite nominal attitude.
  | satTrId | Satellite attitude.
  | instTrId | Instrument attitude.

## Member Function Documentation

Coord EECFI.Attitude::changeFrame | ( | final SatId | satId,
|  | final ModelId | modelId,
|  | long | modeFlag,
|  | long | frameFlagIn,
|  | long | frameIdIn,
|  | long | frameFlagOut,
|  | long | frameIdOut,
|  | final StateVector | satStateVec,
|  | final Coord | statVecIn |
| ) |  |  | throws CfiError

Change the input vector/direction from a coordinate system to another ( including attitude frames ).

This method changes the coordinate or attitude frame of a location or direction by keeping the location or direction in inertial space identical.

Both all coordinate frames and all attitude frames are supported. When changing the frame for a location, the difference in origin of the frames is taken into account. While when changing the frame for a direction, the target is assumed to be at infinity.

Parameters:

  | satId | Satellite id.
  | modelId | Model id.
  | modeFlag | Selection of location or direction calculus (ModeFlagPointingEnum).
  | frameFlagIn | Selection of coordinate or Attitude frame on input (FrameFlagEnum).
  | frameIdIn | Coordinate frame id or attitude frame id on input (AttFrEnum or CsRlEnum).
  | frameFlagOut | Selection of coordinate or Attitude frame on output (FrameFlagEnum).
  | frameIdOut | Coordinate frame id or attitude frame id on output (AttFrEnum or CsRlEnum).
  | satStateVec | State vector with time, time reference, position, velocity and acceleration of satellite (Earth fixed CS).
  | statVecIn | Coordinates to be transformed in input frame (deriv indicates if pos, pos and vel or pos, vel and acc is to be calculated).

Returns:
  Tranformed coordinates in ouput frame.

void EECFI.Attitude.close | ( |  | ) | throws CfiError

Release all resources managed by this object.

IMPORTANT: The life time of the EOCFI Java objects must be explicitly managed by the program work flow. Failure to perform this release will lead to resource leakage and might have a significant impact in performance.

void EECFI.Attitude::compute | ( | final ModelId | modelId,
|  | final StateVector | stateVector,
|  | long | targetFrame |
| ) |  |  | throws CfiError

Compute attitude matrix.

This method calculates the Attitude Frame for a given S/C state vector.

Note: it can be internally applied a correction to computations in order to compensate for the travel time of light from the Sun to the Earth and the satellites orbiting it. To activate this compensation, the Sun model in xl_model_id must be initialized with the enum XL_MODEL_SUN_TRAVEL_TIME using the function xl_model_init (see [LIBSUM]).

Parameters:

  | modelId | Model Id.
  | stateVector | State vector which contains time reference, time, position, velocity and acceleration needed for computation. Coordinates must be in Earth Fixed reference frame.
  | targetFrame | Attitude frame (AttFrEnum).

AttRec EECFI.Attitude::getAttitudeData | ( | long | dataType,
|  | long | sourceRefType,
|  | long | sourceRef |
| ) |  |  | throws CfiError

Compute quaternions/angles equivalent to the transformation from sourceRef to the attitude target frame.

This method computes the quaternions or Euler angles that returns the transformation between the sourceRef frame and the target frame defined in the attitude object.

Parameters:

  | dataType,: | requested data type: quaternions or angles
  | sourceRefType | Source reference frame type: external or satellite
  | sourceRef,: | Source reference frame

Returns:
  Attitude record with the time and quaternions or angles.

AttitudeData EECFI.Attitude::getData | ( |  | ) | throws CfiError

Get attitude id data.

Returns:
  Attitude data.

void EECFI.Attitude::setData | ( | final AttitudeData | attitudeData | ) | throws CfiError

Set attitude id data.

Parameters:

  | attitudeData | Attitude data.

void EECFI.Attitude::setTransformations | ( | final TimeCorrelation | timeId,
|  | final SatNomTransId | satNomTrId,
|  | final SatTransId | satTrId,
|  | final InstrTransId | instTrId |
| ) |  |  | throws CfiError

Set the transformations in the attitutde Id.

Parameters:

  | timeId | Time correlations.
  | satNomTrId | Satellite nominal attitude.
  | satTrId | Satellite attitude.
  | instTrId | Instrument attitude.

void EECFI.Attitude::userSet | ( | final ModelId | modelId,
|  | final StateVector | stateVector,
|  | long | targetFrame,
|  | final double | matrix[][],
|  | final double | matrixRate[][],
|  | final double | matrixRateRate[][],
|  | final double[] | offset |
| ) |  |  | throws CfiError

Assign user-defined attitude frame.

Parameters:

  | modelId | Model Id.
  | stateVector | State vector with time, time reference, position, velocity and acceleration needed for computation.
  | targetFrame | Attitude frame ID (AttFrEnum).
  | matrix | Matrix represeting the transformation from ToD to targetFrame.
  | matrixRate | Matrix represeting the transformation rate from ToD to targetFrame.
  | matrixRateRate | Matrix represeting the transformation rate rate from ToD to targetFrame.
  | offset | Offset in the reference frame origin.