X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Frnav_waypt_controller.cxx;h=f893b9413ccabdb7d6943d7024465c2c1fa90cd1;hb=805c4cbba15c6922e511b3a20ba5a9cb56ceed4f;hp=e728b88d2014889d76ea82cf725a6521b6b52877;hpb=133cfbfa7f4ec62ddc97bd93d4a50fec81b52362;p=flightgear.git diff --git a/src/Instrumentation/rnav_waypt_controller.cxx b/src/Instrumentation/rnav_waypt_controller.cxx index e728b88d2..f893b9413 100644 --- a/src/Instrumentation/rnav_waypt_controller.cxx +++ b/src/Instrumentation/rnav_waypt_controller.cxx @@ -86,12 +86,12 @@ bool geocRadialIntersection(const SGGeoc& a, double r1, const SGGeoc& b, double double ang2 = SGMiscd::normalizeAngle2(crs21-crs23); if ((sin(ang1) == 0.0) && (sin(ang2) == 0.0)) { - SG_LOG(SG_GENERAL, SG_WARN, "geocRadialIntersection: infinity of intersections"); + SG_LOG(SG_INSTR, SG_WARN, "geocRadialIntersection: infinity of intersections"); return false; } if ((sin(ang1)*sin(ang2))<0.0) { - SG_LOG(SG_GENERAL, SG_WARN, "geocRadialIntersection: intersection ambiguous"); + SG_LOG(SG_INSTR, SG_WARN, "geocRadialIntersection: intersection ambiguous"); return false; } @@ -317,33 +317,31 @@ public: double curAlt = _rnav->position().getElevationFt(); switch (_waypt->altitudeRestriction()) { - case RESTRICT_AT: { + case RESTRICT_AT: + case RESTRICT_COMPUTED: + { double d = curAlt - _waypt->altitudeFt(); if (fabs(d) < 50.0) { - SG_LOG(SG_GENERAL, SG_INFO, "ConstHdgToAltCtl, reached target altitude " << _waypt->altitudeFt()); + SG_LOG(SG_INSTR, SG_INFO, "ConstHdgToAltCtl, reached target altitude " << _waypt->altitudeFt()); setDone(); } } break; case RESTRICT_ABOVE: if (curAlt >= _waypt->altitudeFt()) { - SG_LOG(SG_GENERAL, SG_INFO, "ConstHdgToAltCtl, above target altitude " << _waypt->altitudeFt()); + SG_LOG(SG_INSTR, SG_INFO, "ConstHdgToAltCtl, above target altitude " << _waypt->altitudeFt()); setDone(); } break; case RESTRICT_BELOW: if (curAlt <= _waypt->altitudeFt()) { - SG_LOG(SG_GENERAL, SG_INFO, "ConstHdgToAltCtl, below target altitude " << _waypt->altitudeFt()); + SG_LOG(SG_INSTR, SG_INFO, "ConstHdgToAltCtl, below target altitude " << _waypt->altitudeFt()); setDone(); } break; - case RESTRICT_NONE: - assert(false); - break; - case SPEED_RESTRICT_MACH: - assert(false); + default: break; } } @@ -395,7 +393,7 @@ public: double r = SGGeodesy::courseDeg(_waypt->position(), _rnav->position()); SG_LOG(SG_AUTOPILOT, SG_INFO, "current radial=" << r); if (fabs(r - _trueRadial) < 0.5) { - SG_LOG(SG_GENERAL, SG_INFO, "InterceptCtl, intercepted radial " << _trueRadial); + SG_LOG(SG_INSTR, SG_INFO, "InterceptCtl, intercepted radial " << _trueRadial); setDone(); } } @@ -440,7 +438,7 @@ public: _distanceNm = SGGeodesy::distanceNm(_rnav->position(), _dme->position()); double d = fabs(_distanceNm - _dme->dmeDistanceNm()); if (d < 0.1) { - SG_LOG(SG_GENERAL, SG_INFO, "DMEInterceptCtl, intercepted DME " << _dme->dmeDistanceNm()); + SG_LOG(SG_INSTR, SG_INFO, "DMEInterceptCtl, intercepted DME " << _dme->dmeDistanceNm()); setDone(); } }