Replies: 3 comments 1 reply
-
So you can from the outside periodically update the point mass's weight. Which will also update it's moment of inertia etc. based on the shape type. // This function binds properties for each pointmass object created.
//
void FGMassBalance::PointMass::bind(FGPropertyManager* PropertyManager,
unsigned int num) {
string tmp = CreateIndexedPropertyName("inertia/pointmass-weight-lbs", num);
PropertyManager->Tie( tmp.c_str(), this, &PointMass::GetPointMassWeight,
&PointMass::SetPointMassWeight); That's for a point mass. Now if you're specifically talking about fuel being added or lost then you don't want to use a point mass, you want to deal with an actual fuel tank. property_name = base_property_name + "/external-flow-rate-pps";
PropertyManager->Tie( property_name.c_str(), (FGTank*)this, &FGTank::GetExternalFlow,
&FGTank::SetExternalFlow ); double FGTank::Calculate(double dt, double TAT_C)
{
if(ExternalFlow < 0.) Drain( -ExternalFlow *dt);
else Fill(ExternalFlow * dt); |
Beta Was this translation helpful? Give feedback.
-
@seanmcleod Can a point mass be set to a variable mass, and the variable value be changed in a script according to a user-defined function? |
Beta Was this translation helpful? Give feedback.
-
The PointMass object doesn't have an equivalent If you're trying to model fuel in terms of leaks or getting additional fuel via aerial re-fueling etc. I'd suggest using the fuel tank object and not a point mass. |
Beta Was this translation helpful? Give feedback.
-
It would be good to have a point mass with a variable value.
For instance, this would model a tank that would leak fuel. Or a tank that would be filled during a refueling manoeuvre.
This mass variation in time should be taken into account at each time step when aircraft mass & balance are recalculated.
Beta Was this translation helpful? Give feedback.
All reactions