_testModeNode->setBoolValue(false);
_viewHeadingNode = _Instrument->getChild("view-heading-deg", 0, true);
+ _userLatNode = _Instrument->getChild("user-latitude-deg", 0, true);
+ _userLonNode = _Instrument->getChild("user-longitude-deg", 0, true);
+ _userPositionEnable = _Instrument->getChild("user-position", 0, true);
+
// OSG geometry setup
_radarGeode = new osg::Geode;
_projectMat = osg::Matrixf::scale(_scale, _scale, 1.0) *
degRotation(-_view_heading) * _centerTrans;
- _pos = globals->get_aircraft_position();
-
+ if (_userPositionEnable->getBoolValue()) {
+ _pos = SGGeod::fromDeg(_userLonNode->getDoubleValue(), _userLatNode->getDoubleValue());
+ } else {
+ _pos = globals->get_aircraft_position();
+ }
+
// invalidate the cache of positioned items, if we travelled more than 1nm
if (_cachedItemsValid) {
SGVec3d cartNow(SGVec3d::fromGeod(_pos));
SGPropertyNode_ptr _radar_mode_control_node;
SGPropertyNode_ptr _user_heading_node;
SGPropertyNode_ptr _testModeNode;
-
+ SGPropertyNode_ptr _userLatNode, _userLonNode, _userPositionEnable;
+
FGODGauge *_odg;
// Convenience function for creating a property node with a