+
+ // Fill out our engine and gear objects
+ int i;
+ for(i=0; i<airplane->numGear(); i++) {
+ Gear* g = airplane->getGear(i);
+ SGPropertyNode * node = fgGetNode("gear/gear", i, true);
+ node->setBoolValue("has-brake", g->getBrake() != 0);
+ node->setBoolValue("wow", g->getCompressFraction() != 0);
+ node->setFloatValue("compression-norm", g->getCompressFraction());
+ node->setFloatValue("compression-m", g->getCompressDist());
+ node->setFloatValue("caster-angle-deg", g->getCasterAngle() * RAD2DEG);
+ node->setFloatValue("rollspeed-ms", g->getRollSpeed());
+ node->setBoolValue("ground-is-solid", g->getGroundIsSolid()!=0);
+ node->setFloatValue("ground-friction-factor", g->getGroundFrictionFactor());
+ }
+
+ Hook* h = airplane->getHook();
+ if(h) {
+ SGPropertyNode * node = fgGetNode("gear/tailhook", 0, true);
+ node->setFloatValue("position-norm", h->getCompressFraction());
+ }
+
+ Launchbar* l = airplane->getLaunchbar();
+ if(l) {
+ SGPropertyNode * node = fgGetNode("gear/launchbar", 0, true);
+ node->setFloatValue("position-norm", l->getCompressFraction());
+ node->setFloatValue("holdback-position-norm", l->getHoldbackCompressFraction());
+ node->setStringValue("state", l->getState());
+ node->setBoolValue("strop", l->getStrop());
+ }
+