]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIWingman.cxx
Improve timing statistics
[flightgear.git] / src / AIModel / AIWingman.cxx
index cef9ad737f5f749f5b707365036a64bdbcc407da..b64446dbe4e65e27365e36fb50028b9b82658f47 100644 (file)
@@ -375,7 +375,7 @@ void FGAIWingman::Break(double dt) {
 void FGAIWingman::Join(double dt) {
 
     double range, bearing, az2;
-    double parent_hdg, parent_spd, parent_ht= 0;
+    double parent_hdg, parent_spd = 0;
     double p_hdg, p_pch, p_rll = 0;
 
     setTgtOffsets(dt, 25);
@@ -425,10 +425,10 @@ void FGAIWingman::Join(double dt) {
     double rel_brg   = calcRelBearingDeg(bearing, hdg);
     double recip_brg = calcRecipBearingDeg(bearing);
     double angle = calcAngle(distance,_offsetpos, pos);
-    double approx_angle = atan2(daltM, range);
+    //double approx_angle = atan2(daltM, range);
     double frm_spd = 50; // formation speed
     double join_rnge = 1000.0;
-    double recip_parent_hdg = calcRecipBearingDeg(parent_hdg);
+//    double recip_parent_hdg = calcRecipBearingDeg(parent_hdg);
     int turn = SGMiscd::sign(rel_brg);// turn direction: 1 = right, -1 = left
 
     if (range <= join_rnge && (hdg >= hdg_l_lim || hdg <= hdg_r_lim)){