40
40
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
42
#include <FGJSBBase.h>
43
#include <input_output/FGXMLElement.h>
44
#include <math/FGColumnVector3.h>
45
#include <models/propulsion/FGForce.h>
46
#include <math/FGFunction.h>
42
#include "FGJSBBase.h"
43
#include "math/FGColumnVector3.h"
44
#include "models/propulsion/FGForce.h"
45
#include "math/FGFunction.h"
54
49
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
186
/** Get the index of this gas cell
191
187
@return gas cell index. */
192
int GetIndex(void) {return CellNum;}
194
/** Get the center of gravity location of the gas cell
195
(including any ballonets)
196
@return CoG location in the structural frame. */
197
const FGColumnVector3& GetXYZ(void) {return vXYZ;}
199
/** Get the center of gravity location of the gas cell
200
(including any ballonets)
201
@return CoG location in the structural frame. */
202
double GetXYZ(int idx) {return vXYZ(idx);}
188
int GetIndex(void) const {return CellNum;}
190
/** Get the center of gravity location of the gas cell
191
(including any ballonets)
192
@return CoG location in the structural frame. */
193
const FGColumnVector3& GetXYZ(void) const {return vXYZ;}
195
/** Get the center of gravity location of the gas cell
196
(including any ballonets)
197
@return CoG location in the structural frame. */
198
double GetXYZ(int idx) const {return vXYZ(idx);}
204
200
/** Get the current mass of the gas cell (including any ballonets)
205
201
@return gas mass in slug. */
206
double GetMass(void) {return Mass;}
202
double GetMass(void) const {return Mass;}
208
204
/** Get the moments of inertia of the gas cell (including any ballonets)
209
@return moments of inertia matrix in slug ft<sup>2</sup>. */
210
FGMatrix33& GetInertia(void) {return gasCellJ;}
205
@return moments of inertia matrix relative the gas cell location
206
in slug ft<sup>2</sup>. */
207
const FGMatrix33& GetInertia(void) const {return gasCellJ;}
212
209
/** Get the moment due to mass of the gas cell (including any ballonets)
214
211
Note that the buoyancy of the gas cell is handled separately by the
215
212
FGForce part and not included here.
216
213
@return moment vector in lbs ft. */
217
FGColumnVector3& GetMassMoment(void) {return gasCellM;}
214
const FGColumnVector3& GetMassMoment(void) const {return gasCellM;}
219
216
/** Get the current gas temperature inside the gas cell
220
217
@return gas temperature in Rankine. */
221
double GetTemperature(void) {return Temperature;}
218
double GetTemperature(void) const {return Temperature;}
223
220
/** Get the current gas pressure inside the gas cell
224
221
@return gas pressure in lbs / ft<sup>2</sup>. */
225
double GetPressure(void) {return Pressure;}
222
double GetPressure(void) const {return Pressure;}
229
226
enum GasType {ttUNKNOWN, ttHYDROGEN, ttHELIUM, ttAIR};
234
231
// Structural constants
235
232
double MaxVolume; // [ft�]
317
314
/** Get the center of gravity location of the ballonet
318
315
@return CoG location in the structural frame. */
319
const FGColumnVector3& GetXYZ(void) {return vXYZ;}
316
const FGColumnVector3& GetXYZ(void) const {return vXYZ;}
320
317
/** Get the center of gravity location of the ballonet
321
318
@return CoG location in the structural frame. */
322
double GetXYZ(int idx) {return vXYZ(idx);}
319
double GetXYZ(int idx) const {return vXYZ(idx);}
324
321
/** Get the current mass of the ballonets
325
322
@return mass in slug. */
326
double GetMass(void) {return Contents * M_air;}
323
double GetMass(void) const {return Contents * M_air;}
328
325
/** Get the moments of inertia of the ballonet
329
326
@return moments of inertia matrix in slug ft<sup>2</sup>. */
330
FGMatrix33& GetInertia(void) {return ballonetJ;}
327
const FGMatrix33& GetInertia(void) const {return ballonetJ;}
332
329
/** Get the current volume of the ballonet
333
330
@return volume in ft<sup>3</sup>. */
334
double GetVolume(void) {return Volume;}
331
double GetVolume(void) const {return Volume;}
335
332
/** Get the current heat flow into the ballonet
336
333
@return heat flow in lbs ft / sec. */
337
double GetHeatFlow(void) {return dU;} // [lbs ft / sec]
334
double GetHeatFlow(void) const {return dU;} // [lbs ft / sec]