- if (node->getChild("level-gal_us", 0, false) != 0) {
- Propulsion->GetTank(i)->SetContents(node->getDoubleValue("level-gal_us") * 6.6);
+ FGTank* tank = Propulsion->GetTank(i);
+
+ d = node->getNode( "density-ppg", true )->getDoubleValue();
+ if( d > 0.0 ) {
+ tank->SetDensity( d );
+ } else {
+ node->getNode( "density-ppg", true )->setDoubleValue( SG_MAX2<double>(tank->GetDensity(), 0.1) );
+ }
+
+ d = node->getNode( "level-lbs", true )->getDoubleValue();
+ if( d > 0.0 ) {
+ tank->SetContents( d );