X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIEscort.cxx;h=680b5113f992920e112b3c3ea1dbe00edfaab692;hb=6b1391e404b11e0d9a5bfcd11c1307e2e9531616;hp=2b758e6abb7e3c1ec19fda419f7f78f253164469;hpb=df00df3feb95a35fb1087da3435d3d36a76e54b9;p=flightgear.git diff --git a/src/AIModel/AIEscort.cxx b/src/AIModel/AIEscort.cxx index 2b758e6ab..680b5113f 100644 --- a/src/AIModel/AIEscort.cxx +++ b/src/AIModel/AIEscort.cxx @@ -35,7 +35,6 @@ #include
#include -#include #include "AIEscort.hxx" @@ -230,7 +229,6 @@ bool FGAIEscort::getGroundElev(SGGeod inpos) { } - void FGAIEscort::setParent() { double lat = _selected_ac->getDoubleValue("position/latitude-deg"); @@ -278,13 +276,6 @@ void FGAIEscort::calcRangeBearing(double lat, double lon, double lat2, double lo range = distance * SG_METER_TO_NM; } -double FGAIEscort::calcRelBearingDeg(double bearing, double heading) -{ - double angle = bearing - heading; - SG_NORMALIZE_RANGE(angle, -180.0, 180.0); - return angle; -} - double FGAIEscort::calcTrueBearingDeg(double bearing, double heading) { double angle = bearing + heading; @@ -292,13 +283,6 @@ double FGAIEscort::calcTrueBearingDeg(double bearing, double heading) return angle; } -double FGAIEscort::calcRecipBearingDeg(double bearing) -{ - double angle = bearing - 180; - SG_NORMALIZE_RANGE(angle, 0.0, 360.0); - return angle; -} - SGVec3d FGAIEscort::getCartHitchPosAt(const SGVec3d& _off) const { double hdg = _selected_ac->getDoubleValue("orientation/true-heading-deg"); double pitch = _selected_ac->getDoubleValue("orientation/pitch-deg"); @@ -330,7 +314,7 @@ void FGAIEscort::setStationSpeed(){ // these are the AI rules for the manoeuvring of escorts if (_MPControl && _tgtrange > 4 * _stn_limit){ - SG_LOG(SG_GENERAL, SG_ALERT, "AIEscort: " << _name + SG_LOG(SG_AI, SG_ALERT, "AIEscort: " << _name << " re-aligning to MP pos"); pos = _tgtpos; speed = 0;