JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
FGMagnetometer.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 
3  Header: FGMagnetometer.h
4  Author: Matthew Chave
5  Date started: August 2009
6 
7  ------------- Copyright (C) 2009 -------------
8 
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17  details.
18 
19  You should have received a copy of the GNU Lesser General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23  Further information about the GNU Lesser General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25 
26 HISTORY
27 --------------------------------------------------------------------------------
28 
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 SENTRY
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
32 
33 #ifndef FGMAGNETOMETER_H
34 #define FGMAGNETOMETER_H
35 
36 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 INCLUDES
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
39 
40 #include "FGSensor.h"
41 #include "models/FGPropagate.h"
42 #include "models/FGMassBalance.h"
43 #include "models/FGInertial.h"
44 #include "math/FGColumnVector3.h"
45 #include "math/FGMatrix33.h"
46 #include "FGSensorOrientation.h"
47 
48 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 DEFINITIONS
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
51 
52 #define ID_MAGNETOMETER "$Id: FGMagnetometer.h,v 1.5 2013/11/24 11:40:57 bcoconni Exp $"
53 
54 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 FORWARD DECLARATIONS
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
57 
58 namespace JSBSim {
59 
60 class FGFCS;
61 
62 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 CLASS DOCUMENTATION
64 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
65 
123 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
124 CLASS DECLARATION
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
126 
128 {
129 public:
130  FGMagnetometer(FGFCS* fcs, Element* element);
131  ~FGMagnetometer();
132 
133  bool Run (void);
134 
135 private:
136  FGPropagate* Propagate;
137  FGMassBalance* MassBalance;
138  FGInertial* Inertial;
139  FGColumnVector3 vLocation;
140  FGColumnVector3 vRadius;
141  FGColumnVector3 vMag;
142  void updateInertialMag(void);
143  double field[6];
144  double usedLat;
145  double usedLon;
146  double usedAlt;
147  unsigned long int date;
148  int counter;
149  int INERTIAL_UPDATE_RATE;
150 
151  void Debug(int from);
152 };
153 }
154 #endif
Encapsulates a magnetometer component for the flight control system.
Models inertial forces (e.g.
Definition: FGInertial.h:70
Encapsulates a Sensor component for the flight control system.
Definition: FGSensor.h:134
Models the EOM and integration/propagation of state.
Definition: FGPropagate.h:102
This class implements a 3 element column vector.
Encapsulates the Flight Control System (FCS) functionality.
Definition: FGFCS.h:193
Encapsulates a SensorOrientation capability for a sensor.
Models weight, balance and moment of inertia information.