Weight and Mass #368
Replies: 3 comments 10 replies
-
The name is misleading but the empty weight is actually the empty mass. The units of In the code, the mass jsbsim/src/models/FGMassBalance.cpp Lines 191 to 194 in 868fcd5 However I agree that the name "empty weight" as it is currently used in JSBSim is improper since a weight is a force while the mass is, well, a mass 😄 The same is true about the general usage of the word "weight" in JSBSim which is improperly used... |
Beta Was this translation helpful? Give feedback.
-
To further clarify, when I wrote the initial code I had no thought that it would ever be used to model flight on another planet. So, Earth properties were assumed. Since the weight of something depends on the acceleration of gravity, this code totally breaks down on a planet other than Earth: SetAircraftBaseInertias(ReadInertiaMatrix(document));
if (document->FindElement("emptywt")) {
EmptyWeight = document->FindElementValueAsNumberConvertTo("emptywt", "LBS");
}
Element *element = document->FindElement("location");
while (element) {
element_name = element->GetAttributeValue("name");
if (element_name == "CG") vbaseXYZcg = element->FindElementTripletConvertTo("IN");
element = document->FindNextElement("location");
}
// Find all POINTMASS elements that descend from this METRICS branch of the
// config file.
element = document->FindElement("pointmass");
while (element) {
AddPointMass(element);
element = document->FindNextElement("pointmass");
}
double ChildFDMWeight = 0.0;
for (int fdm=0; fdm<FDMExec->GetFDMCount(); fdm++) {
if (FDMExec->GetChildFDM(fdm)->mated) ChildFDMWeight += FDMExec->GetChildFDM(fdm)->exec->GetMassBalance()->GetWeight();
}
Weight = EmptyWeight + in.TanksWeight + GetTotalPointMassWeight()
+ in.GasMass*slugtolb + ChildFDMWeight;
Mass = lbtoslug*Weight; For modeling mass properties on another planet, I'll need to change the lbstoslugs value so that specifying the weight of a craft on another planet converts to mass properly. Actually, it's probably more sensible to specify mass in the first place, in units of ONLY EITHER slugs or kilograms. I'm wondering, though, if this might break some peoples' models? |
Beta Was this translation helpful? Give feedback.
-
Furthermore, all this has lead me to consider that it might be time for a FGPlanet class that models a user-selectable planet. It would include gravity, geodesy, and perhaps even atmosphere. If that is too large a change in code, it might be accomplished by specifying a planet to be used (Earth being default, of course) and then letting the code construct the correct planetary gravity, geodesy, and atmosphere. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this has been talked about before but I believe that the current code only permits a vehicle weight being entered via the aircraft config file:
I am currently modeling a vehicle that will fly on another planet. That has involved changing the planet properties and will involve implementing a new atmosphere. I would like to add the ability to optionally enter a vehicle mass instead of weight. This would be an either/or proposition, of course. The Load() code might look something like this:
... or something like that.
Comments?
Beta Was this translation helpful? Give feedback.
All reactions