28#include <simgear/math/SGMath.hxx>
29#include <simgear/sg_inlines.h>
232 int n = rootNode->getChildren(
"tank").size();
233 if( n == 0 ) n = rootNode->getIntValue(
"numtanks", 8 );
234 for(
int i = 0;
i < n;
i++ ) {
235 push_back(
new TankProperties( rootNode->getChild(
"tank",
i,
true ) ) );
238 _tiedProperties.setRoot( rootNode );
244 for( const_iterator it = begin(); it != end(); ++it )
245 value += (*it)->getContent_lbs();
252 for( const_iterator it = begin(); it != end(); ++it )
253 value += (*it)->getContent_kg();
260 for( const_iterator it = begin(); it != end(); ++it )
261 value += (*it)->getContent_gal_us();
268 for( const_iterator it = begin(); it != end(); ++it )
269 value += (*it)->getContent_gal_imp();
276 for( const_iterator it = begin(); it != end(); ++it )
277 value += (*it)->getContent_m3();
283 double content = 0.0;
284 double capacity = 0.0;
285 for( const_iterator it = begin(); it != end(); ++it ) {
286 content += (*it)->getContent_m3();
287 capacity += (*it)->getCapacity_m3();
289 return capacity > SGLimitsd::min() ? content / capacity : 0.0;
301 for( const_iterator it = begin(); it != end(); ++it ) {
308 for( const_iterator it = begin(); it != end(); ++it ) {
311 _tiedProperties.Untie();
static const double M3_PER_USGAL
static const double M3_PER_IMPGAL
static const double KG_PER_LBS
static const double IMPGAL_PER_M3
static const double LBS_PER_KG
static const double USGAL_PER_M3
double getTotalContent_gal_imp() const
double getTotalContent_lbs() const
double getTotalContent_m3() const
TankPropertiesList(SGPropertyNode_ptr rootNode)
double getTotalContent_gal_us() const
double getTotalContent_norm() const
double getTotalContent_kg() const
void setUnusable_gal_us(double value)
double getDensity_kgpm3() const
virtual ~TankProperties()
void setContent_kg(double value)
double getUnusable_m3() const
TankProperties(SGPropertyNode_ptr rootNode)
void setDensity_ppg(double value)
void setUnusable_m3(double value)
double getContent_gal_us() const
void setContent_gal_us(double value)
double getContent_kg() const
double getContent_norm() const
double getContent_lbs() const
double getContent_gal_imp() const
void setCapacity_gal_imp(double value)
void setContent_norm(double value)
double getCapacity_gal_imp() const
void setCapacity_m3(double value)
void setCapacity_gal_us(double value)
double getCapacity_gal_us() const
double getUnusable_gal_us() const
double getDensity_ppg() const
void setDensity_kgpm3(double value)
double getContent_m3() const
void setContent_m3(double value)
double getUnusable_gal_imp() const
simgear::TiedPropertyList _tiedProperties
void setContent_gal_imp(double value)
void setUnusable_gal_imp(double value)
void setContent_lbs(double value)
double getCapacity_m3() const