void FGAIBase::Transform() {
if (!invisible) {
+ aip.setVisible(true);
aip.setPosition(pos);
if (no_roll)
aip.setOrientation(roll, pitch, hdg);
aip.update();
+ } else {
+ aip.setVisible(false);
+ aip.update();
}
}
}
SGVec3d FGAIBase::getCartPos() const {
- // Transform that one to the horizontal local coordinate system.
- SGQuatd hlTrans = SGQuatd::fromLonLat(pos);
-
- // and postrotate the orientation of the AIModel wrt the horizontal
- // local frame
- hlTrans *= SGQuatd::fromYawPitchRollDeg(hdg, pitch, roll);
-
SGVec3d cartPos = SGVec3d::fromGeod(pos);
-
return cartPos;
}
pos.setLatitudeDeg(latitude);
}
+void FGAIBase::_setUserPos(){
+ userpos.setLatitudeDeg(manager->get_user_latitude());
+ userpos.setLongitudeDeg(manager->get_user_longitude());
+ userpos.setElevationM(manager->get_user_altitude() * SG_FEET_TO_METER);
+}
+
void FGAIBase::_setSubID( int s ) {
_subID = s;
}
return hdg;
}
+double FGAIBase::_getXOffset() const {
+ return _x_offset;
+}
+
+double FGAIBase::_getYOffset() const {
+ return _y_offset;
+}
+
+double FGAIBase::_getZOffset() const {
+ return _z_offset;
+}
+
const char* FGAIBase::_getPath() const {
return model_path.c_str();
}
return _submodel.c_str();
}
-
void FGAIBase::CalculateMach() {
// Calculate rho at altitude, using standard atmosphere
// For the temperature T and the pressure p,