Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

COENaaszController Class Reference

#include <COENaaszController.h>

Inheritance diagram for COENaaszController:

Inheritance graph
[legend]
Collaboration diagram for COENaaszController:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 COENaaszController ()
 Constructors.
 COENaaszController (Whorl *ptr_whorl)
virtual ~COENaaszController ()
 Destructor.
int Run ()
int Initialize ()
Vector Gains (Vector ECI, Vector VECI, Vector eHAT, double dt)
 Determination of Feedback Control Gains based on Naasz and Hall.
Vector COENaasz (Vector ECI, Vector VECI, Vector de, Vector eHAT, Vector gains, double tru)
 Classical Orbit Element Controller using mean orbit elements Based on Naasz and Hall [Current State - Desired State] = de = [d(a) de di dOmega domega dM0).
CAMdoubleMatrix DirectionCosMatrix1Axis (double _angle)
 Direction Cosine Matrix about the 1 axis.
CAMdoubleMatrix DirectionCosMatrix2Axis (double _angle)
 Direction Cosine Matrix about the 2 axis.
CAMdoubleMatrix DirectionCosMatrix3Axis (double _angle)
 Direction Cosine Matrix about the 3 axis.
CAMdoubleVector WGS2ECEFPosition (double _latitude, double _longitude, double _altitude)
 Convert from WGS84 ( latitude (rad), longitude (rad), altitude (m) ) to ECEF poisiton (m) ).
CAMdoubleVector NED2ECEFVelocity (double _latitude, double _longitude, double _altitude, double _velocityNorth, double _velocityEast, double _velocityDown)
 Convert from NED velocity (m/s) to ECEF velocity (m/s).
CAMdoubleVector WGS842ECEF (double _latitude, double _longitude, double _altitude, double _velocityNorth, double _velocityEast, double _velocityDown)
 Convert from WGS84 ( latitude (rad), longitude (rad), altitude (m) ) to ECEF poisiton (m) and velocity (m/s).
CAMdoubleVector ECEFPosition2WGS84 (double _x, double _y, double _z)
 Convert from ECEF position (m) to WGS84 ( latitude (rad), longitude (rad), altitude (m) ).
CAMdoubleVector ECEF2NEDVelocity (double _latitude, double _longitude, double _altitude, double _Vx, double _Vy, double _Vz)
 Convert from ECEF velocity (m/s) to NED velocity (m/s).
CAMdoubleVector ECEF2WGS84 (double _x, double _y, double _z, double _Vx, double _Vy, double _Vz)
 Convert from ECEF position (m) and velocity (m/s) to WGS84 ( latitude (rad), longitude (rad), altitude (m) ).
CAMdoubleVector ECEF2ECI (CAMdoubleVector _ECEFVector, double _jDay)
 Convert from ECEF position (m) and velocity (m/s) to ECI position (m) and velocity (m/s).
CAMdoubleVector ECI2ECEF (CAMdoubleVector _ECIVector, double _jDay)
 Convert from ECI position (m) and velocity (m/s) to ECEF position (m) and velocity (m/s).
double lat_lon (double latlon, char sector)
 Convert Latitude and Longitude in the form of DEG 'N/S' 'E/W' to +/-RAD.
void TangentPlaneState (AshtechG12_GPS_PhysicalDevice::Position recPos, CAMdoubleVector &_WGS84Vector)
 Determine Tangent Plane Velocities (North, East, Down) (m/s).
Vector thruster (Vector udesired)
 Thruster Logic Routine.
void cals (Vector ECI, Vector VECI, double a, double &H, double &p, double &b, double &r)
 Calculate h, p, b, and r.
void ECI2COE (Vector ECI, Vector VECI, Keplerian &myCOE, double &a, double &e, double &i, double &Lon, double &Arg, double &tru)

Protected Attributes

Vector m_Gains
ssfTime m_initialTime
AccelerationMessageaccelerationVector
Whorlm_whorl
 Member object in Controller Class.
int m_vehicleID
double m_duration
double m_mass
ssfTime m_vehicleTime
AccelerationMessagem_accelerationVector

Constructor & Destructor Documentation

COENaaszController::COENaaszController  ) 
 

Constructors.

Definition at line 15 of file COENaaszController.cpp.

COENaaszController::COENaaszController Whorl ptr_whorl  ) 
 

Definition at line 19 of file COENaaszController.cpp.

References Initialize().

COENaaszController::~COENaaszController  )  [virtual]
 

Destructor.

Definition at line 27 of file COENaaszController.cpp.


Member Function Documentation

void OrbitController::cals Vector  ECI,
Vector  VECI,
double  a,
double &  H,
double &  p,
double &  b,
double &  r
[inherited]
 

Calculate h, p, b, and r.

Parameters:
ECI is the position vector [km]
VECI is the velocity vector [km/s]
a is the semi-major axis [km]
Returns:
H is the angular momentum [km/s^2]

p is the semi-latus rectum [km]

b is the semi-minor axis [km]

r is the orbit radius [km]

Definition at line 385 of file OrbitController.cpp.

References O_SESSAME::crossP(), O_SESSAME::norm2(), and O_SESSAME::Vector.

Referenced by COENaasz(), and Gains().

Vector COENaaszController::COENaasz Vector  ECI,
Vector  VECI,
Vector  de,
Vector  eHAT,
Vector  gains,
double  tru
 

Classical Orbit Element Controller using mean orbit elements Based on Naasz and Hall [Current State - Desired State] = de = [d(a) de di dOmega domega dM0).

Parameters:
ECI is position x, y, z
VECI is the velocity Vx, Vy, Vz
de 
eHAT = [a e i Omega omega M0)
gains 

Definition at line 196 of file COENaaszController.cpp.

References OrbitController::cals(), OrbitController::thruster(), and O_SESSAME::Vector.

Referenced by Run().

CAMdoubleMatrix OrbitController::DirectionCosMatrix1Axis double  _angle  )  [inherited]
 

Direction Cosine Matrix about the 1 axis.

Parameters:
_angle the single axis rotation angle
Returns:
_DCM 3x3 matrix

Definition at line 27 of file OrbitController.cpp.

Referenced by OrbitController::ECEF2NEDVelocity(), and OrbitController::NED2ECEFVelocity().

CAMdoubleMatrix OrbitController::DirectionCosMatrix2Axis double  _angle  )  [inherited]
 

Direction Cosine Matrix about the 2 axis.

Parameters:
_angle the single axis rotation angle
Returns:
_DCM 3x3 matrix

Definition at line 43 of file OrbitController.cpp.

Referenced by OrbitController::ECEF2NEDVelocity(), and OrbitController::NED2ECEFVelocity().

CAMdoubleMatrix OrbitController::DirectionCosMatrix3Axis double  _angle  )  [inherited]
 

Direction Cosine Matrix about the 3 axis.

Parameters:
_angle the single axis rotation angle
Returns:
_DCM 3x3 matrix

Definition at line 59 of file OrbitController.cpp.

Referenced by OrbitController::ECEF2ECI(), OrbitController::ECEF2NEDVelocity(), OrbitController::ECI2ECEF(), and OrbitController::NED2ECEFVelocity().

CAMdoubleVector OrbitController::ECEF2ECI CAMdoubleVector  _ECEFVector,
double  _jDay
[inherited]
 

Convert from ECEF position (m) and velocity (m/s) to ECI position (m) and velocity (m/s).

_ECEFVector [x, y, z, Vx, Vy, Vz] (m & m/s)

Returns:
_ECIVector [x, y, z, Vx, Vy, Vz] (m & m/s)

Determine thetaGMST

Derivative of rotation matrix (R3)

Definition at line 257 of file OrbitController.cpp.

References _, OrbitController::DirectionCosMatrix3Axis(), and PI.

CAMdoubleVector OrbitController::ECEF2NEDVelocity double  _latitude,
double  _longitude,
double  _altitude,
double  _Vx,
double  _Vy,
double  _Vz
[inherited]
 

Convert from ECEF velocity (m/s) to NED velocity (m/s).

Equation:

\[ V_{NED} = DCM_{321}(\phi, \phi+\frac{\pi}{2}, 0 )V_{ECEF} \]

Parameters:
_latitude (rad)
_longitude (rad)
_altitude (m)
_Vx (m/s)
_Vy (m/s)
_Vz (m/s)
Returns:
_NEDVector (3x1) [ Vx, Vy, Vz ] (m/s)

Definition at line 216 of file OrbitController.cpp.

References _, OrbitController::DirectionCosMatrix1Axis(), OrbitController::DirectionCosMatrix2Axis(), OrbitController::DirectionCosMatrix3Axis(), and PI.

Referenced by OrbitController::ECEF2WGS84().

CAMdoubleVector OrbitController::ECEF2WGS84 double  _x,
double  _y,
double  _z,
double  _Vx,
double  _Vy,
double  _Vz
[inherited]
 

Convert from ECEF position (m) and velocity (m/s) to WGS84 ( latitude (rad), longitude (rad), altitude (m) ).

Parameters:
_x (m)
_y (m)
_z (m)
_Vx (m/s)
_Vy (m/s)
_Vz (m/s)
Returns:
_WGS84Vector (6x1) [ latitude, longitude, altitude, velocity North, velocity East, velocity Down ] (rad, rad, m, m/s, m/s, m/s)

Definition at line 242 of file OrbitController.cpp.

References _, OrbitController::ECEF2NEDVelocity(), and OrbitController::ECEFPosition2WGS84().

CAMdoubleVector OrbitController::ECEFPosition2WGS84 double  _x,
double  _y,
double  _z
[inherited]
 

Convert from ECEF position (m) to WGS84 ( latitude (rad), longitude (rad), altitude (m) ).

Equation: ( www.colorado.edu/geographyy/gcraft/notes/datum/datum_f.html )

\[ \phi = atan{ \left( \frac{ z+e^{'2}b\sin^2{\theta} }{ p-e^2 acos^2{\theta} } \right) } \]

\[ \lambda = atan{ \frac{y}{x} } \]

\[ h = \frac{p}{\cos{\phi}} - N(\phi) \]

where: $\phi, \lambda, h $ are the geodetic latitude, longitude, and height above ellipsoid

\[ p = \sqrt{x^2+y^2} \]

\[ \theta = atan \frac{ za }{ pb } \]

\[ e^{'2} = \frac{a^2-b^2}{b^2} \]

\[ N = \frac{a}{ \sqrt{ 1-e^2\sin^2{ \phi } } } \]

\[ e^2 = 2f-f^2 \]

Parameters:
_x (m)
_y (m)
_z (m)
Returns:
_WGS84Vector (3x1) [ latitude, longitude, altitude ] (rad, rad, m)

Definition at line 164 of file OrbitController.cpp.

References f().

Referenced by OrbitController::ECEF2WGS84().

void OrbitController::ECI2COE Vector  ECI,
Vector  VECI,
Keplerian myCOE,
double &  a,
double &  e,
double &  i,
double &  Lon,
double &  Arg,
double &  tru
[inherited]
 

CAMdoubleVector OrbitController::ECI2ECEF CAMdoubleVector  _ECIVector,
double  _jDay
[inherited]
 

Convert from ECI position (m) and velocity (m/s) to ECEF position (m) and velocity (m/s).

_ECIVector [x, y, z, Vx, Vy, Vz] (m & m/s)

Returns:
_ECEFVector [x, y, z, Vx, Vy, Vz] (m & m/s)

Determine thetaGMST

Derivative of rotation matrix (R3)

Definition at line 288 of file OrbitController.cpp.

References _, and OrbitController::DirectionCosMatrix3Axis().

Vector COENaaszController::Gains Vector  ECI,
Vector  VECI,
Vector  eHAT,
double  dt
 

Determination of Feedback Control Gains based on Naasz and Hall.

Parameters:
ECI is position x, y, z
VECI is the velocity Vx, Vy, Vz
eHAT is the mean orbit eletments - a, e, i, Lon, Arg, Mo

Definition at line 157 of file COENaaszController.cpp.

References OrbitController::cals(), and O_SESSAME::Vector.

Referenced by Initialize().

int COENaaszController::Initialize  )  [virtual]
 

Initializes the default controller

Implements OrbitController.

Definition at line 30 of file COENaaszController.cpp.

References _, Gains(), Whorl::GetCOE(), Whorl::GetECI(), CAMdoubleVector::initialize(), m_Gains, m_initialTime, AccelerationMessage::ResetValues(), and O_SESSAME::Vector.

Referenced by COENaaszController().

double OrbitController::lat_lon double  latlon,
char  sector
[inherited]
 

Convert Latitude and Longitude in the form of DEG 'N/S' 'E/W' to +/-RAD.

Parameters:
latlon 
sector return value (+/-rad) of conversion.

Definition at line 321 of file OrbitController.cpp.

References O_SESSAME::Deg2Rad().

Referenced by OrbitController::TangentPlaneState().

CAMdoubleVector OrbitController::NED2ECEFVelocity double  _latitude,
double  _longitude,
double  _altitude,
double  _velocityNorth,
double  _velocityEast,
double  _velocityDown
[inherited]
 

Convert from NED velocity (m/s) to ECEF velocity (m/s).

Equation:

\[ V_{ECEF} = DCM_{321}(\phi, -\phi-\frac{\pi}{2}, 0 )^{-1}V_{NED} \]

Parameters:
_latitude (rad)
_longitude (rad)
_altitude (m)
_velocityNorth (m/s)
_velocityEast (m/s)
_velocityDown (m/s)
Returns:
_ECEFVector (3x1) [ Vx, Vy, Vz ] (m/s)

Definition at line 108 of file OrbitController.cpp.

References _, OrbitController::DirectionCosMatrix1Axis(), OrbitController::DirectionCosMatrix2Axis(), OrbitController::DirectionCosMatrix3Axis(), and PI.

Referenced by OrbitController::WGS842ECEF().

int COENaaszController::Run  )  [virtual]
 

Runs the default controller

Implements OrbitController.

Definition at line 98 of file COENaaszController.cpp.

References _, COENaasz(), Whorl::GetCOE(), Whorl::GetECI(), O_SESSAME::ssfTime::GetSeconds(), m_Gains, m_initialTime, AccelerationMessage::SendAccelerationMessage(), Whorl::SetOrbitControl(), and O_SESSAME::Vector.

void OrbitController::TangentPlaneState AshtechG12_GPS_PhysicalDevice::Position  recPos,
CAMdoubleVector _WGS84Vector
[inherited]
 

Determine Tangent Plane Velocities (North, East, Down) (m/s).

Parameters:
recPos 
Returns:
_WGS84Vector

Definition at line 334 of file OrbitController.cpp.

References O_SESSAME::Deg2Rad(), OrbitController::lat_lon(), AshtechG12_GPS_PhysicalDevice::Position::m_altitude, AshtechG12_GPS_PhysicalDevice::Position::m_groundSpeed, AshtechG12_GPS_PhysicalDevice::Position::m_groundTrack, AshtechG12_GPS_PhysicalDevice::Position::m_latitude, AshtechG12_GPS_PhysicalDevice::Position::m_latitudeSector, AshtechG12_GPS_PhysicalDevice::Position::m_longitude, AshtechG12_GPS_PhysicalDevice::Position::m_longitudeSector, and AshtechG12_GPS_PhysicalDevice::Position::m_verticalVelocity.

Vector OrbitController::thruster Vector  udesired  )  [inherited]
 

Thruster Logic Routine.

Parameters:
udesired control vector [m/s^2]
Returns:
thrust vector in the radial, in-track, and cross-track directions [N]

Definition at line 353 of file OrbitController.cpp.

References A, O_SESSAME::norm2(), and O_SESSAME::Vector.

Referenced by COENaasz().

CAMdoubleVector OrbitController::WGS2ECEFPosition double  _latitude,
double  _longitude,
double  _altitude
[inherited]
 

Convert from WGS84 ( latitude (rad), longitude (rad), altitude (m) ) to ECEF poisiton (m) ).

Parameters:
_latitude (rad)
_longitude (rad)
_altitude (m)

Definition at line 77 of file OrbitController.cpp.

References f().

Referenced by OrbitController::WGS842ECEF().

CAMdoubleVector OrbitController::WGS842ECEF double  _latitude,
double  _longitude,
double  _altitude,
double  _velocityNorth,
double  _velocityEast,
double  _velocityDown
[inherited]
 

Convert from WGS84 ( latitude (rad), longitude (rad), altitude (m) ) to ECEF poisiton (m) and velocity (m/s).

Parameters:
_latitude (rad)
_longitude (rad)
_altitude (m)
_velocityNorth (m/s)
_velocityEast (m/s)
_velocityDown (m/s)
Returns:
_ECEFVector (6x1) [ x, y, z, Vx, Vy, Vz ] (m & m/s)

Definition at line 133 of file OrbitController.cpp.

References _, OrbitController::NED2ECEFVelocity(), and OrbitController::WGS2ECEFPosition().


Member Data Documentation

AccelerationMessage* COENaaszController::accelerationVector [protected]
 

Definition at line 52 of file COENaaszController.h.

AccelerationMessage* OrbitController::m_accelerationVector [protected, inherited]
 

Definition at line 117 of file OrbitController.h.

double OrbitController::m_duration [protected, inherited]
 

Definition at line 108 of file OrbitController.h.

Vector COENaaszController::m_Gains [protected]
 

Definition at line 46 of file COENaaszController.h.

Referenced by Initialize(), and Run().

ssfTime COENaaszController::m_initialTime [protected]
 

Definition at line 49 of file COENaaszController.h.

Referenced by Initialize(), and Run().

double OrbitController::m_mass [protected, inherited]
 

Definition at line 111 of file OrbitController.h.

int OrbitController::m_vehicleID [protected, inherited]
 

Definition at line 105 of file OrbitController.h.

ssfTime OrbitController::m_vehicleTime [protected, inherited]
 

Definition at line 114 of file OrbitController.h.

Whorl* OrbitController::m_whorl [protected, inherited]
 

Member object in Controller Class.

Definition at line 102 of file OrbitController.h.


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 12:54:38 2007 for DSACSS Operational Code by  doxygen 1.3.9.1