]> git.mxchange.org Git - flightgear.git/commitdiff
Minor changes to variable name and comments
authordaveluff <daveluff>
Wed, 4 Dec 2002 20:04:26 +0000 (20:04 +0000)
committerdaveluff <daveluff>
Wed, 4 Dec 2002 20:04:26 +0000 (20:04 +0000)
src/ATC/AIPlane.cxx
src/ATC/AIPlane.hxx

index c3a25ece0421d2196854c1192e231ea32d51e9ea..e175a33bafd35191b062d0d74497c2b20234c25d 100644 (file)
@@ -48,30 +48,31 @@ void FGAIPlane::Update(double dt) {
 }
 
 void FGAIPlane::Bank(double angle) {
-    // This *should* bank us smoothly to any angle
-    if(fabs(roll - angle) > 0.6) {
-       roll -= ((roll - angle)/fabs(roll - angle));  
-    }
+       // This *should* bank us smoothly to any angle
+       if(fabs(roll - angle) > 0.6) {
+               roll -= ((roll - angle)/fabs(roll - angle));  
+       }
 }
 
 // Duplication of Bank(0.0) really - should I cut this?
 void FGAIPlane::LevelWings(void) {
-    // bring the plane back to level smoothly (this should work to come out of either bank)
-    if(fabs(roll) > 0.6) {
-       roll -= (roll/fabs(roll));
-    }
+       // bring the plane back to level smoothly (this should work to come out of either bank)
+       if(fabs(roll) > 0.6) {
+               roll -= (roll/fabs(roll));
+       }
 }
 
 void FGAIPlane::Transmit(string msg) {
-    double user_freq0 = fgGetDouble("/radios/comm[0]/frequencies/selected-mhz");
-    //double user_freq0 = ("/radios/comm[0]/frequencies/selected-mhz");
-    //comm1 is not used yet.
-
-    if(freq == user_freq0) {
-       // we are on the same frequency, so check distance to the user plane
-       if(1) {
-           // For now (testing) assume in range !!!
-           globals->get_ATC_display()->RegisterSingleMessage(msg, 0);
+       double user_freq0 = fgGetDouble("/radios/comm[0]/frequencies/selected-mhz");
+       //double user_freq0 = ("/radios/comm[0]/frequencies/selected-mhz");
+       //comm1 is not used yet.
+       
+       if(freq == user_freq0) {
+               // we are on the same frequency, so check distance to the user plane
+               if(1) {
+                       // For now (testing) assume in range !!!
+                       // TODO - implement range checking
+                       globals->get_ATC_display()->RegisterSingleMessage(msg, 0);
+               }
        }
-    }
 }
index bb58f20cb4c36e564a3e347a49e8350a0c9478af..82eef86efd9c2ce7a951277d380f73acdca87160 100644 (file)
@@ -59,7 +59,7 @@ protected:
 
     double mag_hdg;    // degrees - the heading that the physical aircraft is *pointing*
     double track;      // track that the physical aircraft is *following* - degrees relative to *true* north
-    double yaw;
+    double crab;       // Difference between heading and track due to wind.
     double mag_var;    // degrees
     double IAS;                // Indicated airspeed in knots
     double vel;                // velocity along track in knots