1
0
Fork 0

src/Viewer/view.cxx: Fixed Walker Orbit view.

The fix is to add handling of target-lon-deg-path etc in View::recalcLookAt.
This commit is contained in:
Julian Smith 2020-03-01 18:12:32 +00:00
parent db255233f7
commit 368443a4b3

View file

@ -1031,6 +1031,25 @@ View::recalcLookAt ()
); );
} }
_target.setLongitudeDeg(
ViewPropertyEvaluator::getDoubleValue(
"((/sim/view[(/sim/current-view/view-number-raw)]/config/root)(/sim/view[(/sim/current-view/view-number-raw)]/config/target-lon-deg-path))",
_target.getLongitudeDeg()
)
);
_target.setLatitudeDeg(
ViewPropertyEvaluator::getDoubleValue(
"((/sim/view[(/sim/current-view/view-number-raw)]/config/root)(/sim/view[(/sim/current-view/view-number-raw)]/config/target-lat-deg-path))",
_target.getLatitudeDeg()
)
);
_target.setElevationFt(
ViewPropertyEvaluator::getDoubleValue(
"((/sim/view[(/sim/current-view/view-number-raw)]/config/root)(/sim/view[(/sim/current-view/view-number-raw)]/config/target-alt-ft-path))",
_target.getElevationFt()
)
);
if (_lookat_agl) { if (_lookat_agl) {
handleAGL(); handleAGL();
} }