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

Whorl Class Reference

#include <Whorl.h>

Collaboration diagram for Whorl:

Collaboration graph
[legend]
List of all members.

Public Types

enum  StringValue {
  OFF, ON, molpe, hierax,
  sphigx
}
 Value-Definitions of the different string values. More...

Public Member Functions

 Whorl ()
virtual ~Whorl ()
void Initialize (TiXmlHandle tempHandle)
 Whorl object initialization.
Vector GetParameter ()
 Get the recent parameter estimate, a Vector w = [I11, I12, I13, I22, I23, I33, mg r1, mg r2, mg r3, c1, c2, c3].
Matrix GetMOI ()
 Get the recent Moment of Inertia matrix in body design axes.
Vector GetCGVector ()
 Get the recent center of gravity vector, mg*r.
Vector GetState ()
 Get the recent state estimate, a Vector of qbl and $\omega_{bl}$.
Vector GetQuaternion ()
 Get the recent attitude estimate, qbl.
Vector GetMRP ()
 Get the recent attitude estimate, mrp.
Vector GetOmegaBL ()
 Get the recent angular velocity estimate, $\omega_{bl}$.
Vector GetReferenceQuaternion ()
 Get the recent Reference attitude estimate, qbl.
Vector GetReferenceMRP ()
 Get the recent Reference attitude estimate, mrp.
Vector GetReferenceOmegaBL ()
 Get the recent Reference angular velocity estimate, $\omega_{r}$.
Vector GetControl ()
 Get the recent control Vector.
Vector GetControlError ()
 Get the recent control error Vector.
timeval GetTimeOfEstimate ()
 Get the time of the current estimate.
void SetState (Vector &_updatedState)
 Update the recent state Vector.
void SetParameter (Vector &_updatedParameter)
 Update the recent parameter Vector.
void SetControl (Vector &_updatedControl)
 Update the recent control Vector.
void SetMRPError (Vector _mrpError)
void SetAngularRateError (Vector _rateError)
void SetReferenceQuaternion (Vector _quaternion)
void SetReferenceOmegaBL (Vector _rate)
void SetTimeOfEstimate (timeval _t)
 Sets the time of the current estimate.
RateGyroGetRateGyro (string rgName)
 Hardware accessor functions.
AccelerometerGetAccelerometer (string accName)
MomentumWheelGetMomentumWheel (string mwName)
MagnetometerGetMagnetometer ()
char * GetSimulatorName ()
 Get Simulator Name.
string GetHardwareFlag ()
 Get the hardware flag that informs the user whether the hardware is activated.
void SetECI (Vector _ECI)
void SetCOE (Keplerian _COE)
void SetOscCOE (Keplerian _OscCOE)
Vector GetECI ()
Keplerian GetCOE ()
Keplerian GetOscCOE ()
void SetOrbitControl (Vector _control)
Vector GetOrbitControl ()

Public Attributes

map< string, StringValues_mapStringValues
 Map to associate the strings with the enum values.

Private Attributes

char * m_SimulatorName
string m_HardwareONOFF
stringstream m_WheelOptionString
Vector m_recentState
 The most recently estimated state Vector, stored as quaternions (qbl) and angular velocities ($f$f).
Vector m_referenceState
Vector m_recentParameter
 The most recently estimated parameter Vector in the body-design frame, w = [I11, I12, I13, I22, I23, I33, mg r1, mg r2, mg r3, c1, c2, c3].
Vector m_recentControl
 The most recently applied control Vector.
timeval m_estimateTime
 The time of the current estimate.
Vector m_controlError
map< string, RateGyro * > m_rateGyros
 Hardware maps.
map< string, Accelerometer * > m_accelerometers
map< string, MomentumWheel * > m_momentumWheels
Magnetometerm_magnetometer
Vector m_ECI
Keplerian m_COE
Keplerian m_OscCOE
Vector m_OrbitControl

Member Enumeration Documentation

enum Whorl::StringValue
 

Value-Definitions of the different string values.

Enumeration values:
OFF 
ON 
molpe 
hierax 
sphigx 

Definition at line 127 of file Whorl.h.


Constructor & Destructor Documentation

Whorl::Whorl  ) 
 

Definition at line 14 of file Whorl.cpp.

Whorl::~Whorl  )  [virtual]
 

Definition at line 17 of file Whorl.cpp.

References m_accelerometers, m_momentumWheels, m_rateGyros, m_WheelOptionString, OFF, ON, and s_mapStringValues.


Member Function Documentation

Accelerometer* Whorl::GetAccelerometer string  accName  )  [inline]
 

Gets a pointer to a specific rate gyro

Definition at line 118 of file Whorl.h.

Referenced by QuaternionEKFObserver::GetCurrentMeasurements(), main(), triadObserver::Run(), and atterrbiasObserver::Run().

Vector Whorl::GetCGVector  ) 
 

Get the recent center of gravity vector, mg*r.

This function extracts the 3-term center of gravity Vector from the parameter Vector and returns it. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 257 of file Whorl.cpp.

References m_recentParameter, and O_SESSAME::Vector.

Keplerian Whorl::GetCOE  ) 
 

Definition at line 415 of file Whorl.cpp.

Referenced by COENaaszController::Initialize(), testOrbitController::Run(), and COENaaszController::Run().

Vector Whorl::GetControl  )  [inline]
 

Get the recent control Vector.

Definition at line 84 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by main(), DefaultObserver::Run(), and AttitudeObserver::Run().

Vector Whorl::GetControlError  ) 
 

Get the recent control error Vector.

Definition at line 370 of file Whorl.cpp.

References O_SESSAME::Vector.

Referenced by main().

Vector Whorl::GetECI  ) 
 

Definition at line 410 of file Whorl.cpp.

References O_SESSAME::Vector.

Referenced by COENaaszController::Initialize(), and COENaaszController::Run().

string Whorl::GetHardwareFlag  ) 
 

Get the hardware flag that informs the user whether the hardware is activated.

Definition at line 225 of file Whorl.cpp.

Referenced by WhorlSim::Initialize(), and WhorlSim::~WhorlSim().

Magnetometer* Whorl::GetMagnetometer  )  [inline]
 

Gets a pointer to the magnetometer

Definition at line 124 of file Whorl.h.

Referenced by QuaternionEKFObserver::GetCurrentMeasurements(), main(), and triadObserver::Run().

Matrix Whorl::GetMOI  ) 
 

Get the recent Moment of Inertia matrix in body design axes.

This function extracts the 6 moment of inertia elements from the parameter Vector, then builds and returns that matrix. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 238 of file Whorl.cpp.

References m_recentParameter, and O_SESSAME::Matrix.

Referenced by slidingModeControlMRPMW::Initialize(), MRPTracking::Initialize(), DefaultController::Initialize(), AngularRateController::Initialize(), Controller::ReferenceModelSC(), Controller::ReferenceTrajectory(), slidingModeControlMRPMW::Run(), MWCMGController::Run(), MRPTracking::Run(), and AngularRateController::Run().

MomentumWheel* Whorl::GetMomentumWheel string  mwName  )  [inline]
 

Gets a pointer to a specific momentum wheel

Definition at line 121 of file Whorl.h.

Referenced by Controller::FindA(), Controller::FindMOI_sw(), main(), testController::Run(), slidingModeControlMRPMW::Run(), MWCMGController::Run(), MRPTracking::Run(), DefaultController::Run(), AngularRateController::Run(), and Controller::SetWheelTorque().

Vector Whorl::GetMRP  ) 
 

Get the recent attitude estimate, mrp.

This function pulls the MRP vector out of the most recent state Vector by calling the GetQuaternion function and converting to MRP vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 291 of file Whorl.cpp.

References _, m_recentState, O_SESSAME::ModifiedRodriguezParameters::Switch(), and O_SESSAME::Vector.

Referenced by main(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), and AngularRateController::Run().

Vector Whorl::GetOmegaBL  ) 
 

Get the recent angular velocity estimate, $\omega_{bl}$.

This function pulls the angular velocity out of the most recent state Vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 308 of file Whorl.cpp.

References _, m_recentState, and O_SESSAME::Vector.

Referenced by slidingModeControlMRPMW::Run(), MWCMGController::Run(), MRPTracking::Run(), DefaultObserver::Run(), DefaultController::Run(), AttitudeObserver::Run(), and AngularRateController::Run().

Vector Whorl::GetOrbitControl  ) 
 

Definition at line 430 of file Whorl.cpp.

References O_SESSAME::Vector.

Keplerian Whorl::GetOscCOE  ) 
 

Definition at line 420 of file Whorl.cpp.

Vector Whorl::GetParameter  )  [inline]
 

Get the recent parameter estimate, a Vector w = [I11, I12, I13, I22, I23, I33, mg r1, mg r2, mg r3, c1, c2, c3].

Definition at line 54 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by DefaultObserver::Run(), and AttitudeObserver::Run().

Vector Whorl::GetQuaternion  ) 
 

Get the recent attitude estimate, qbl.

This function pulls the quaternion out of the most recent state Vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 275 of file Whorl.cpp.

References _, m_recentState, and O_SESSAME::Vector.

Referenced by MWCMGController::Run(), and AttitudeObserver::Run().

RateGyro* Whorl::GetRateGyro string  rgName  )  [inline]
 

Hardware accessor functions.

Gets a pointer to a specific rate gyro

Definition at line 115 of file Whorl.h.

Referenced by QuaternionEKFObserver::GetCurrentMeasurements(), AttitudeObserver::Initialize(), main(), triadObserver::Run(), DefaultObserver::Run(), AttitudeObserver::Run(), and atterrbiasObserver::Run().

Vector Whorl::GetReferenceMRP  ) 
 

Get the recent Reference attitude estimate, mrp.

This function pulls the MRP vector out of the most recent reference state Vector by calling the GetQuaternion function and converting to MRP vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 345 of file Whorl.cpp.

References GetReferenceQuaternion(), O_SESSAME::ModifiedRodriguezParameters::Switch(), and O_SESSAME::Vector.

Referenced by main().

Vector Whorl::GetReferenceOmegaBL  ) 
 

Get the recent Reference angular velocity estimate, $\omega_{r}$.

This function pulls the angular velocity out of the most recent Reference state Vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 362 of file Whorl.cpp.

References _, m_referenceState, and O_SESSAME::Vector.

Referenced by main().

Vector Whorl::GetReferenceQuaternion  ) 
 

Get the recent Reference attitude estimate, qbl.

This function pulls the quaternion out of the most recent reference state Vector. This information is returned in whatever reference frame the data is initially provided in (in the config file). Generally, this will be the body-design reference frame.

Definition at line 329 of file Whorl.cpp.

References _, m_referenceState, and O_SESSAME::Vector.

Referenced by GetReferenceMRP(), and main().

char * Whorl::GetSimulatorName  ) 
 

Get Simulator Name.

Definition at line 316 of file Whorl.cpp.

Referenced by triadObserver::Parse(), QuaternionEKFObserver::Parse(), WhorlSim::SetController(), WhorlSim::SetObserver(), WhorlSim::SetOrbitController(), and WhorlSim::SetOrbitObserver().

Vector Whorl::GetState  )  [inline]
 

Get the recent state estimate, a Vector of qbl and $\omega_{bl}$.

Definition at line 63 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by main(), SingleAxisController::Run(), and atterrbiasObserver::Run().

struct timeval Whorl::GetTimeOfEstimate  )  [inline]
 

Get the time of the current estimate.

Definition at line 90 of file Whorl.h.

Referenced by DefaultObserver::Run(), AttitudeObserver::Run(), and atterrbiasObserver::Run().

void Whorl::Initialize TiXmlHandle  tempHandle  ) 
 

Whorl object initialization.

Parameters:
tempHandle XML config handle

Definition at line 79 of file Whorl.cpp.

References _, checkResponse(), TiXmlHandle::Child(), TiXmlHandle::Element(), TiXmlHandle::FirstChild(), hierax, CAMdoubleVector::initialize(), m_accelerometers, m_controlError, m_ECI, m_HardwareONOFF, m_magnetometer, m_momentumWheels, m_rateGyros, m_recentControl, m_recentParameter, m_recentState, m_referenceState, m_SimulatorName, m_WheelOptionString, O_SESSAME::Matrix, molpe, OFF, ON, s_mapStringValues, simulatorInertia(), O_SESSAME::Vector, and O_SESSAME::VectorIndexBase.

Referenced by main().

void Whorl::SetAngularRateError Vector  _rateError  ) 
 

Definition at line 380 of file Whorl.cpp.

References _, m_controlError, and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

void Whorl::SetCOE Keplerian  _COE  ) 
 

Definition at line 400 of file Whorl.cpp.

References m_COE.

Referenced by OrbitPropObserver::Run(), and GPSObserver::Run().

void Whorl::SetControl Vector _updatedControl  )  [inline]
 

Update the recent control Vector.

Definition at line 99 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by main(), testController::Run(), slidingModeControlMRPMW::Run(), SingleAxisController::Run(), OpenLoopMWController::Run(), MWCMGController::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

void Whorl::SetECI Vector  _ECI  ) 
 

Definition at line 395 of file Whorl.cpp.

References m_ECI, and O_SESSAME::Vector.

Referenced by OrbitPropObserver::Run(), and GPSObserver::Run().

void Whorl::SetMRPError Vector  _mrpError  ) 
 

Definition at line 375 of file Whorl.cpp.

References _, m_controlError, and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

void Whorl::SetOrbitControl Vector  _control  ) 
 

Definition at line 425 of file Whorl.cpp.

References m_OrbitControl, and O_SESSAME::Vector.

Referenced by testOrbitController::Run(), and COENaaszController::Run().

void Whorl::SetOscCOE Keplerian  _OscCOE  ) 
 

Definition at line 405 of file Whorl.cpp.

References m_OscCOE.

Referenced by OrbitPropObserver::Run(), and GPSObserver::Run().

void Whorl::SetParameter Vector _updatedParameter  )  [inline]
 

Update the recent parameter Vector.

Definition at line 96 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by main().

void Whorl::SetReferenceOmegaBL Vector  _rate  ) 
 

Definition at line 390 of file Whorl.cpp.

References _, m_referenceState, and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

void Whorl::SetReferenceQuaternion Vector  _quaternion  ) 
 

Definition at line 385 of file Whorl.cpp.

References _, m_referenceState, and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

void Whorl::SetState Vector _updatedState  )  [inline]
 

Update the recent state Vector.

Definition at line 93 of file Whorl.h.

References O_SESSAME::Vector.

Referenced by main(), triadObserver::Run(), QuaternionEKFObserver::Run(), DefaultObserver::Run(), AttitudeObserver::Run(), and atterrbiasObserver::Run().

void Whorl::SetTimeOfEstimate timeval  _t  )  [inline]
 

Sets the time of the current estimate.

Definition at line 110 of file Whorl.h.

Referenced by main(), DefaultObserver::Run(), AttitudeObserver::Run(), and atterrbiasObserver::Run().


Member Data Documentation

map<string, Accelerometer*> Whorl::m_accelerometers [private]
 

Definition at line 188 of file Whorl.h.

Referenced by Initialize(), and ~Whorl().

Keplerian Whorl::m_COE [private]
 

Definition at line 195 of file Whorl.h.

Referenced by SetCOE().

Vector Whorl::m_controlError [private]
 

Definition at line 184 of file Whorl.h.

Referenced by Initialize(), SetAngularRateError(), and SetMRPError().

Vector Whorl::m_ECI [private]
 

Definition at line 194 of file Whorl.h.

Referenced by Initialize(), and SetECI().

timeval Whorl::m_estimateTime [private]
 

The time of the current estimate.

Definition at line 182 of file Whorl.h.

string Whorl::m_HardwareONOFF [private]
 

Definition at line 172 of file Whorl.h.

Referenced by Initialize().

Magnetometer* Whorl::m_magnetometer [private]
 

Definition at line 191 of file Whorl.h.

Referenced by Initialize().

map<string, MomentumWheel*> Whorl::m_momentumWheels [private]
 

Definition at line 189 of file Whorl.h.

Referenced by Initialize(), and ~Whorl().

Vector Whorl::m_OrbitControl [private]
 

Definition at line 199 of file Whorl.h.

Referenced by SetOrbitControl().

Keplerian Whorl::m_OscCOE [private]
 

Definition at line 196 of file Whorl.h.

Referenced by SetOscCOE().

map<string, RateGyro*> Whorl::m_rateGyros [private]
 

Hardware maps.

Definition at line 187 of file Whorl.h.

Referenced by Initialize(), and ~Whorl().

Vector Whorl::m_recentControl [private]
 

The most recently applied control Vector.

Definition at line 181 of file Whorl.h.

Referenced by Initialize().

Vector Whorl::m_recentParameter [private]
 

The most recently estimated parameter Vector in the body-design frame, w = [I11, I12, I13, I22, I23, I33, mg r1, mg r2, mg r3, c1, c2, c3].

Definition at line 180 of file Whorl.h.

Referenced by GetCGVector(), GetMOI(), and Initialize().

Vector Whorl::m_recentState [private]
 

The most recently estimated state Vector, stored as quaternions (qbl) and angular velocities ($f$f).

Definition at line 178 of file Whorl.h.

Referenced by GetMRP(), GetOmegaBL(), GetQuaternion(), and Initialize().

Vector Whorl::m_referenceState [private]
 

Definition at line 179 of file Whorl.h.

Referenced by GetReferenceOmegaBL(), GetReferenceQuaternion(), Initialize(), SetReferenceOmegaBL(), and SetReferenceQuaternion().

char* Whorl::m_SimulatorName [private]
 

Definition at line 170 of file Whorl.h.

Referenced by Initialize().

stringstream Whorl::m_WheelOptionString [private]
 

Definition at line 175 of file Whorl.h.

Referenced by Initialize(), and ~Whorl().

map<string, StringValue> Whorl::s_mapStringValues
 

Map to associate the strings with the enum values.

Definition at line 134 of file Whorl.h.

Referenced by Initialize(), and ~Whorl().


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