- globals->get_current_view()->set_view_offset(offset * SGD_DEGREES_TO_RADIANS);
-}
-
-static double
-getGoalViewOffset ()
-{
- return (globals->get_current_view()
- ->get_goal_view_offset() * SGD_RADIANS_TO_DEGREES);
-}
-
-static void
-setGoalViewOffset (double offset)
-{
- while ( offset < 0 ) {
- offset += 360.0;
- }
- while ( offset > 360.0 ) {
- offset -= 360.0;
- }
- // Snap to center if we are close
- if ( fabs(offset) < 1.0 || fabs(offset) > 359.0 ) {
- offset = 0.0;
- }
-
- globals->get_current_view()
- ->set_goal_view_offset(offset * SGD_DEGREES_TO_RADIANS);
-}
-
-/**
- * Get the current view tilt in degrees.
- */
-static double
-getViewTilt ()
-{
- return (globals->get_current_view()
- ->get_view_tilt() * SGD_RADIANS_TO_DEGREES);
-}
-
-
-static void
-setViewTilt (double tilt)
-{
- globals->get_current_view()->set_view_tilt(tilt * SGD_DEGREES_TO_RADIANS);
-}
-
-static double
-getGoalViewTilt ()
-{
- return (globals->get_current_view()
- ->get_goal_view_tilt() * SGD_RADIANS_TO_DEGREES);
-}
-
-static void
-setGoalViewTilt (double tilt)
-{
- while ( tilt < 0 ) {
- tilt += 360.0;
- }
- while ( tilt > 360.0 ) {
- tilt -= 360.0;
- }
- // Snap to center if we are close
- if ( fabs(tilt) < 1.0 || fabs(tilt) > 359.0 ) {
- tilt = 0.0;
- }
-
- globals->get_current_view()
- ->set_goal_view_tilt(tilt * SGD_DEGREES_TO_RADIANS);
-}
-
-
-/**
- * Pilot position offset from CG.
- */
-static float
-getPilotPositionXOffset ()
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- return offset[0];
-}
-
-static void
-setPilotPositionXOffset (float x)
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- pilot_view->set_pilot_offset(x, offset[1], offset[2]);
-}
-
-static float
-getPilotPositionYOffset ()
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- return offset[1];
-}
-
-static void
-setPilotPositionYOffset (float y)
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- pilot_view->set_pilot_offset(offset[0], y, offset[2]);
-}
-
-static float
-getPilotPositionZOffset ()
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- return offset[2];
-}
-
-static void
-setPilotPositionZOffset (float z)
-{
- FGViewer * pilot_view = globals->get_viewmgr()->get_view(0);
- float * offset = pilot_view->get_pilot_offset();
- pilot_view->set_pilot_offset(offset[0], offset[1], z);