1
0
Fork 0

Merge branch 'next' of git://gitorious.org/fg/flightgear into next

This commit is contained in:
Frederic Bouvier 2011-01-30 21:16:57 +01:00
commit 95a5326c4e
3 changed files with 24 additions and 9 deletions

View file

@ -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);

View file

@ -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();
}
}

View file

@ -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;