- node->setDoubleValue("capacity-gal_us",
- Propulsion->GetTank(i)->GetCapacity() / 6.6);
+
+ d = node->getNode( "level-lbs", true )->getDoubleValue();
+ if( d > 0.0 ) {
+ tank->SetContents( d );
+ } else {
+ node->getNode( "level-lbs", true )->setDoubleValue( tank->GetContents() );
+ }
+ /* Capacity is read-only in FGTank and can't be overwritten from FlightGear */
+ node->getNode("capacity-gal_us", true )->setDoubleValue( tank->GetCapacityGallons() );