From 32b69f823abd9d9adf99c2cf9aa6bf98f5f780bb Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 30 Jan 2011 16:05:28 +0100 Subject: [PATCH 1/3] Betrand Coconnier: fix bugs #47,#184: roll/pitch/speed via command-line Specifying initial roll, pitch and speed should be working again. --- src/FDM/flight.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index 5676e688b..d501d1507 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -268,15 +268,15 @@ FGInterface::bind () // Orientation fgTie("/orientation/roll-deg", this, &FGInterface::get_Phi_deg, - &FGInterface::set_Phi_deg); + &FGInterface::set_Phi_deg, false); fgSetArchivable("/orientation/roll-deg"); fgTie("/orientation/pitch-deg", this, &FGInterface::get_Theta_deg, - &FGInterface::set_Theta_deg); + &FGInterface::set_Theta_deg, false); fgSetArchivable("/orientation/pitch-deg"); fgTie("/orientation/heading-deg", this, &FGInterface::get_Psi_deg, - &FGInterface::set_Psi_deg); + &FGInterface::set_Psi_deg, false); fgSetArchivable("/orientation/heading-deg"); fgTie("/orientation/track-deg", this, &FGInterface::get_Track); @@ -331,11 +331,11 @@ FGInterface::bind () // LaRCSim are fixed (LaRCSim adds the // earth's rotation to the east velocity). fgTie("/velocities/speed-north-fps", this, - &FGInterface::get_V_north, &FGInterface::set_V_north); + &FGInterface::get_V_north, &FGInterface::set_V_north, false); fgTie("/velocities/speed-east-fps", this, - &FGInterface::get_V_east, &FGInterface::set_V_east); + &FGInterface::get_V_east, &FGInterface::set_V_east, false); fgTie("/velocities/speed-down-fps", this, - &FGInterface::get_V_down, &FGInterface::set_V_down); + &FGInterface::get_V_down, &FGInterface::set_V_down, false); fgTie("/velocities/north-relground-fps", this, &FGInterface::get_V_north_rel_ground); From 91d001ff4ebf78205fd83b2342b1003fb3e35411 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 30 Jan 2011 17:35:07 +0100 Subject: [PATCH 2/3] Fix viewer issue with Tower and Chase View. When looking _at_ a model with an x,y offset of 0, then the view heading has no effect. So, force heading offset property to 0 to keep other property consumers from running incorrect calculations. => Trying to rotate the heading offset in Tower/Chase view no longer rotates the blue sky around the aircraft, though the viewer itself isn't rotating anything. --- src/Main/viewer.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index 05816f8bc..a61198d66 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -289,7 +289,14 @@ void FGViewer::setHeadingOffset_deg (double heading_offset_deg) { _dirty = true; - _heading_offset_deg = heading_offset_deg; + if (_at_model && (_offset_m.x() == 0.0)&&(_offset_m.y() == 0.0)) + { + /* avoid optical effects (e.g. rotating sky) when looking at something + * with heading offsets x==y==0 (view heading cannot change). */ + _heading_offset_deg = 0.0; + } + else + _heading_offset_deg = heading_offset_deg; } void @@ -317,6 +324,14 @@ void FGViewer::setGoalHeadingOffset_deg (double goal_heading_offset_deg) { _dirty = true; + if (_at_model && (_offset_m.x() == 0.0)&&(_offset_m.y() == 0.0)) + { + /* avoid optical effects (e.g. rotating sky) when looking at something + * with heading offsets x==y==0 (view heading cannot change). */ + _goal_heading_offset_deg = 0.0; + return; + } + _goal_heading_offset_deg = goal_heading_offset_deg; while ( _goal_heading_offset_deg < 0.0 ) { _goal_heading_offset_deg += 360; From f68f300bb33617102944fd9f8e443ff91886ae3a Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 28 Jan 2011 00:06:23 +0100 Subject: [PATCH 3/3] Proposed fix for #251: Waypoint handling Do not consider destination/runway waypoints as done, when these are far away - even if the course is off by > 90 degrees. --- src/Instrumentation/rnav_waypt_controller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/rnav_waypt_controller.cxx b/src/Instrumentation/rnav_waypt_controller.cxx index 09ac2b812..278484d0a 100644 --- a/src/Instrumentation/rnav_waypt_controller.cxx +++ b/src/Instrumentation/rnav_waypt_controller.cxx @@ -221,7 +221,7 @@ private: /** * Special controller for runways. For runways, we want very narrow deviation - * contraints, and to understand that any point along the paved area is + * constraints, and to understand that any point along the paved area is * equivalent to being 'at' the runway. */ class RunwayCtl : public WayptController @@ -252,7 +252,7 @@ public: double _courseDev = brg - _targetTrack; SG_NORMALIZE_RANGE(_courseDev, -180.0, 180.0); - if (fabs(_courseDev) > 90.0) { + if ((fabs(_courseDev) > 90.0) && (_distanceM < _rnav->overflightArmDistanceM())) { setDone(); } }