]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/flight_control/FGAccelerometer.h
sync with JSB JSBSim CVS
[flightgear.git] / src / FDM / JSBSim / models / flight_control / FGAccelerometer.h
index bf3a58c6e666b8f461071b580706f52a05a78b04..44194bb6f0ec16dacbfe881f84842e4934324b45 100755 (executable)
@@ -38,18 +38,16 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGSensor.h"
-#include <input_output/FGXMLElement.h>
-#include "models/FGPropagate.h"
-#include "models/FGMassBalance.h"
-#include "models/FGInertial.h"
+#include "input_output/FGXMLElement.h"
 #include "math/FGColumnVector3.h"
 #include "math/FGMatrix33.h"
+#include "FGSensorOrientation.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_ACCELEROMETER "$Id$"
+#define ID_ACCELEROMETER "$Id: FGAccelerometer.h,v 1.6 2012/01/08 12:39:14 bcoconni Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -58,6 +56,10 @@ FORWARD DECLARATIONS
 namespace JSBSim {
 
 class FGFCS;
+class FGPropagate;
+class FGAccelerations;
+class FGInertial;
+class FGMassBalance;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
@@ -69,7 +71,17 @@ Syntax:
 
 @code
 <accelerometer name="name">
-  <input> property </input>
+  <location unit="{IN | M}">
+    <x> number </x>
+    <y> number </y>
+    <z> number </z>
+  </location>
+  <orientation unit="{RAD | DEG}">
+    <pitch> {number} </pitch>
+    <roll> {number} </roll>
+    <yaw> {number} </yaw>
+  </orientation>
+  <axis> {X | Y | Z} </axis>
   <lag> number </lag>
   <noise variation="PERCENT|ABSOLUTE"> number </noise>
   <quantization name="name">
@@ -78,6 +90,7 @@ Syntax:
     <max> number </max>
   </quantization>
   <drift_rate> number </drift_rate>
+  <gain> number </gain>
   <bias> number </bias>
 </accelerometer>
 @endcode
@@ -85,11 +98,16 @@ Syntax:
 Example:
 
 @code
-<accelerometer name="aero/accelerometer/qbar">
-  <input> aero/qbar </input>
+<accelerometer name="aero/accelerometer/right_tip_wing">
+  <location unit="IN">
+    <x> 43.2 </x>
+    <y> 214. </y>
+    <z> 59.4 </z>
+  </location>
+  <axis> Z </axis>
   <lag> 0.5 </lag>
   <noise variation="PERCENT"> 2 </noise>
-  <quantization name="aero/accelerometer/quantized/qbar">
+  <quantization name="aero/accelerometer/quantized/right_tip_wing">
     <bits> 12 </bits>
     <min> 0 </min>
     <max> 400 </max>
@@ -109,14 +127,14 @@ even varying all the way from 0.95 to 1.05 in adjacent frames - whatever the del
 time.
 
 @author Jon S. Berndt
-@version $Revision$
+@version $Revision: 1.6 $
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-class FGAccelerometer  : public FGSensor
+class FGAccelerometer  : public FGSensor, public FGSensorOrientation
 {
 public:
   FGAccelerometer(FGFCS* fcs, Element* element);
@@ -126,15 +144,12 @@ public:
 
 private:
   FGPropagate* Propagate;
+  FGAccelerations* Accelerations;
   FGMassBalance* MassBalance;
   FGInertial* Inertial;
   FGColumnVector3 vLocation;
-  FGColumnVector3 vOrient;
   FGColumnVector3 vRadius;
   FGColumnVector3 vAccel;
-  FGMatrix33 mT;
-  void CalculateTransformMatrix(void);
-  int axis;
   
   void Debug(int from);
 };