1
0
Fork 0

Added gear position in meters to yasim and jsbsim

This commit is contained in:
Richard Harrison 2021-10-18 18:11:11 +02:00
parent be39d5b6ef
commit 0f6341352b
2 changed files with 10 additions and 0 deletions

View file

@ -1247,9 +1247,15 @@ void FGJSBsim::init_gear(void )
for (int i=0;i<Ngear;i++) {
FGLGear *gear = gr->GetGearUnit(i);
SGPropertyNode * node = fgGetNode("gear/gear", i, true);
// coordinates are in feet so convert
node->setDoubleValue("xoffset-in", gear->GetBodyLocation()(1) * 12);
node->setDoubleValue("yoffset-in", gear->GetBodyLocation()(2) * 12);
node->setDoubleValue("zoffset-in", gear->GetBodyLocation()(3) * 12);
node->setDoubleValue("xoffset-m", gear->GetBodyLocation()(1) * 0.08333333);
node->setDoubleValue("yoffset-m", gear->GetBodyLocation()(2) * 0.08333333);
node->setDoubleValue("zoffset-m", gear->GetBodyLocation()(3) * 0.08333333);
node->setBoolValue("wow", gear->GetWOW());
node->setDoubleValue("rollspeed-ms", gear->GetWheelRollVel()*0.3043);
node->setBoolValue("has-brake", gear->GetBrakeGroup() > 0);

View file

@ -204,6 +204,10 @@ void YASim::init()
node->setDoubleValue("yoffset-in", pos[1] * M2FT * 12);
node->setDoubleValue("zoffset-in", pos[2] * M2FT * 12);
node->setDoubleValue("xoffset-m", pos[0]);
node->setDoubleValue("yoffset-m", pos[1]);
node->setDoubleValue("zoffset-m", pos[2]);
_gearProps.push_back(GearProps(node));
}