+bool
+FGJSBsim::get_agl_ft(double t, const double pt[3], double alt_off,
+ double contact[3], double normal[3], double vel[3],
+ double angularVel[3], double *agl)
+{
+ const SGMaterial* material;
+ simgear::BVHNode::Id id;
+ if (!FGInterface::get_agl_ft(t, pt, alt_off, contact, normal, vel,
+ angularVel, material, id))
+ return false;
+ SGGeod geodPt = SGGeod::fromCart(SG_FEET_TO_METER*SGVec3d(pt));
+ SGQuatd hlToEc = SGQuatd::fromLonLat(geodPt);
+ *agl = dot(hlToEc.rotate(SGVec3d(0, 0, 1)), SGVec3d(contact) - SGVec3d(pt));
+ return true;
+}
+