char buf[256];
for(int i=0; i<_fdm->getAirplane()->getModel()->numThrusters(); i++) {
- sprintf(buf, "/engines/engine[%d]/fuel-flow-gph", i); fgUntie(buf);
- sprintf(buf, "/engines/engine[%d]/rpm", i); fgUntie(buf);
- sprintf(buf, "/engines/engine[%d]/mp-osi", i); fgUntie(buf);
- sprintf(buf, "/engines/engine[%d]/egt-degf", i); fgUntie(buf);
+ sprintf(buf, "/engines/engine[%d]/fuel-flow-gph", i); fgUntie(buf);
+ sprintf(buf, "/engines/engine[%d]/rpm", i); fgUntie(buf);
+ sprintf(buf, "/engines/engine[%d]/mp-osi", i); fgUntie(buf);
+ sprintf(buf, "/engines/engine[%d]/egt-degf", i); fgUntie(buf);
+ sprintf(buf, "/engines/engine[%d]/oil-temperature-degf", i); fgUntie(buf);
}
}
SGPropertyNode * node = fgGetNode("gear/gear", i, true);
float pos[3];
g->getPosition(pos);
- node->setDoubleValue("xoffset-in", pos[0]);
- node->setDoubleValue("yoffset-in", pos[1]);
- node->setDoubleValue("zoffset-in", pos[2]);
+ node->setDoubleValue("xoffset-in", pos[0] * M2FT * 12);
+ node->setDoubleValue("yoffset-in", pos[1] * M2FT * 12);
+ node->setDoubleValue("zoffset-in", pos[2] * M2FT * 12);
}
// Are we at ground level? If so, lift the plane up so the gear
// ground. Calculate a cartesian coordinate for the ground under
// us, find the (geodetic) up vector normal to the ground, then
// use that to find the final (radius) term of the plane equation.
- float v[3] = { get_uBody()*FT2M, get_vBody()*FT2M, get_wBody()*FT2M };
+ float v[3] = { get_uBody(), get_vBody(), get_wBody() };
float lat = get_Latitude(); float lon = get_Longitude();
- double xyz[3];
- sgGeodToCart(lat, lon, 0.0, xyz);
+ float alt = get_Altitude() * FT2M; double xyz[3];
+ sgGeodToCart(lat, lon, alt, xyz);
// build the environment cache.
float vr = _fdm->getVehicleRadius();
- vr += 2.0*dt*Math::mag3(v);
+ vr += 2.0*FT2M*dt*Math::mag3(v);
prepare_ground_cache_m( 0.0, xyz, vr );
// Track time increments.
int i;
for(i=0; i<iterations; i++) {
- gr->setTimeOffset(iterations*_dt);
+ gr->setTimeOffset(i*_dt);
copyToYASim(false);
_fdm->iterate(_dt);
copyFromYASim();
double lat, lon, alt;
sgCartToGeod(s->pos, &lat, &lon, &alt);
_set_Geodetic_Position(lat, lon, alt*M2FT);
+ _update_ground_elev_at_pos();
// UNUSED
//_set_Geocentric_Position(Glue::geod2geocLat(lat), lon, alt*M2FT);
node->setBoolValue("has-brake", g->getBrake() != 0);
node->setBoolValue("wow", g->getCompressFraction() != 0);
node->setFloatValue("compression-norm", g->getCompressFraction());
+ node->setFloatValue("caster-angle-deg", g->getCasterAngle() * RAD2DEG);
+ node->setFloatValue("rollspeed-ms", g->getRollSpeed());
}
Hook* h = airplane->getHook();