33 #ifndef FGSENSORORIENTATION_H 34 #define FGSENSORORIENTATION_H 41 #include "input_output/FGXMLElement.h" 42 #include "math/FGColumnVector3.h" 43 #include "math/FGMatrix33.h" 51 #define ID_SensorOrientation "$Id: FGSensorOrientation.h,v 1.6 2015/07/13 21:50:26 bcoconni Exp $" 88 if (sAxis ==
"X" || sAxis ==
"x") {
90 }
else if (sAxis ==
"Y" || sAxis ==
"y") {
92 }
else if (sAxis ==
"Z" || sAxis ==
"z") {
98 std::cerr <<
" Incorrect/no axis specified for this sensor; assuming X axis" << std::endl;
102 CalculateTransformMatrix();
111 void CalculateTransformMatrix(
void)
113 double cp,sp,cr,sr,cy,sy;
115 cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
116 cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
117 cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
123 mT(2,1) = sr*sp*cy - cr*sy;
124 mT(2,2) = sr*sp*sy + cr*cy;
127 mT(3,1) = cr*sp*cy + sr*sy;
128 mT(3,2) = cr*sp*sy - sr*cy;
138 void Debug(
int from);
Element * FindElement(const std::string &el="")
Searches for a specified element.
std::string FindElementValue(const std::string &el="")
Searches for the named element and returns the string data belonging to it.
This class implements a 3 element column vector.
Encapsulates a SensorOrientation capability for a sensor.
Handles matrix math operations.
FGColumnVector3 FindElementTripletConvertTo(const std::string &target_units)
Composes a 3-element column vector for the supplied location or orientation.