]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AICarrier.cxx
allow to trigger widgets via accelerator key, which is defined via "keynum"
[flightgear.git] / src / AIModel / AICarrier.cxx
index 474dc300e8274270b1af9b6d8dabbbe775c54afc..525592c740b275e152710d4a494477aa0c485a98 100644 (file)
@@ -101,7 +101,7 @@ void FGAICarrier::setFlolsOffset(const Point3D& off) {
   flols_off = off;
 }
 
-void FGAICarrier::getVelocityWrtEarth(sgdVec3 v, sgdVec3 omega, sgdVec3 pivot) {
+void FGAICarrier::getVelocityWrtEarth(sgdVec3& v, sgdVec3& omega, sgdVec3& pivot) {
   sgdCopyVec3(v, vel_wrt_earth );
   sgdCopyVec3(omega, rot_wrt_earth );
   sgdCopyVec3(pivot, rot_pivot_wrt_earth );
@@ -301,18 +301,13 @@ void FGAICarrier::bind() {
                 SGRawValuePointer<double>(&rel_wind_speed_kts));
    props->tie("controls/flols/wave-off-lights",  
                 SGRawValuePointer<bool>(&wave_off_lights));
-   props->tie("instrumentation/TACAN/bearing-true-deg",  
-                SGRawValuePointer<double>(&bearing));
-   props->tie("instrumentation/TACAN/range-nm",  
-                SGRawValuePointer<double>(&range));
                     
    props->setBoolValue("controls/flols/cut-lights", false);
    props->setBoolValue("controls/flols/wave-off-lights", false);
    props->setBoolValue("controls/flols/cond-datum-lights", true);
    props->setBoolValue("controls/crew", false);
 
-   props->setStringValue("instrumentation/TACAN/channel-ID", TACAN_channel_id.c_str());
-  
+   props->setStringValue("navaids/tacan/channel-ID", TACAN_channel_id.c_str());
    props->setStringValue("sign", sign.c_str());
 }
 
@@ -331,9 +326,7 @@ void FGAICarrier::unbind() {
     props->untie("environment/rel-wind-from-degs");
     props->untie("environment/rel-wind-speed-kts");
     props->untie("controls/flols/wave-off-lights");
-    props->untie("instrumentation/TACAN/bearing-true-deg");
-    props->untie("instrumentation/TACAN/range-nm");
-    props->untie("instrumentation/TACAN/channel-ID");
+    
 }
 
 bool FGAICarrier::getParkPosition(const string& id, Point3D& geodPos,
@@ -541,7 +534,7 @@ bool FGAICarrier::mark_cat(ssgEntity* e, const list<string>& cat_objects, bool m
   return found;
 }
 
-void FGAICarrier::UpdateFlols(sgdMat3 trans) {
+void FGAICarrier::UpdateFlols(const sgdMat3& trans) {
     
     float in[3];
     float out[3];
@@ -756,7 +749,7 @@ void FGAICarrier::UpdateWind( double dt) {
        wave_off_lights = true;
     }    
        
-    cout << "rel wind: " << rel_wind << endl;
+    // cout << "rel wind: " << rel_wind << endl;
 
 }// end update wind
 
@@ -800,7 +793,7 @@ void FGAICarrier::ReturnToBox(){
                      
     distance *= SG_METER_TO_NM;
 
-    cout << "return course: " << course << " distance: " << distance << endl;
+    //cout << "return course: " << course << " distance: " << distance << endl;
     //turn the carrier
        FGAIShip::TurnTo(course); 
        FGAIShip::AccelTo(base_speed);
@@ -867,7 +860,7 @@ void FGAICarrier::UpdateTACAN(double dt){ //update the TACAN
 bool FGAICarrier::OutsideBox(){ //returns true if the carrier is outside operating box
 
     if ( max_lat == 0 && min_lat == 0 && max_long == 0 && min_long == 0) {
-       SG_LOG(SG_GENERAL, SG_INFO,"AICarrier: No Operating Box defined" );
+       SG_LOG(SG_GENERAL, SG_BULK,"AICarrier: No Operating Box defined" );
        return false;
     }