Oops!  Forgot 4 important things.  Try this one instead:


Attachment: AIBase.cxx
Description: Binary data



(as follows):


void FGAIBase::bind() { double (FGAIBase::*pgVS_fps) () const; void (FGAIBase::*psVS_fps) ( double ); double (FGAIBase::*pga) () const ; void (FGAIBase::*psa) ( double ) ; double (FGAIBase::*pgLat) () const ; void (FGAIBase::*psLat) ( double ) ; double (FGAIBase::*pgLong) () const ; void (FGAIBase::*psLong) ( double ) ; bool (FGAIBase::*piN) () const;

pgVS_fps = &FGAIBase::_getVS_fps ;
psVS_fps = &FGAIBase::_setVS_fps ;
pga = &FGAIBase::_getAltitude ;
psa = &FGAIBase::_setAltitude ;
pgLat = &FGAIBase::_getLatitude ;
psLat = &FGAIBase::_setLatitude ;
pgLong = &FGAIBase::_getLongitude ;
psLong = &FGAIBase::_setLongitude ;
piN = &FGAIBase::_isNight ;

props->tie("id", SGRawValuePointer<int>(&id));
props->tie("velocities/true-airspeed-kt", SGRawValuePointer<double>(&speed));
props->tie("velocities/vertical-speed-fps",
SGRawValueMethods<FGAIBase,double>(*this,
pgVS_fps,
psVS_fps));

   props->tie("position/altitude-ft",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pga,
                                         psa ));
   props->tie("position/latitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pgLat,
                                         psLat));
   props->tie("position/longitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pgLong,
                                         psLong ));

props->tie("orientation/pitch-deg", SGRawValuePointer<double>(&pitch));
props->tie("orientation/roll-deg", SGRawValuePointer<double>(&roll));
props->tie("orientation/true-heading-deg", SGRawValuePointer<double>(&hdg));

props->tie("radar/bearing-deg", SGRawValuePointer<double>(&bearing));
props->tie("radar/elevation-deg", SGRawValuePointer<double>(&elevation));
props->tie("radar/range-nm", SGRawValuePointer<double>(&range));
props->tie("radar/h-offset", SGRawValuePointer<double>(&horiz_offset));
props->tie("radar/v-offset", SGRawValuePointer<double>(&vert_offset));
props->tie("radar/x-shift", SGRawValuePointer<double>(&x_shift));
props->tie("radar/y-shift", SGRawValuePointer<double>(&y_shift));
props->tie("radar/rotation", SGRawValuePointer<double>(&rotation));

   props->tie("controls/lighting/nav-lights",
               SGRawValueMethods<FGAIBase,bool>(*this, piN));
   props->setBoolValue("controls/lighting/beacon", true);
   props->setBoolValue("controls/lighting/strobe", true);
}

Sorry for the trouble!

Ima
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to