Hi guys,
Im attempting to add a groundspeed property , but need some assistance if 
anyone feels up to it...
The logical place seems to be /source/FDM/flight.cxx , so I added this :

  fgTie("/velocities/groundspeed-kt", this,
        &FGInterface::get_V_ground_speed,
        &FGInterface::set_V_ground_speed,
        false);

void FGInterface::set_V_ground_speed(double v) {
    v_ground_speed = v; 
return v *      
}

and the appropriate modifications to flight.hxx .This works great, I now get a 
/velocities/groundspeed-kt, but from further poking and prodding , I think it 
returns feet per second ....
The property is showing nearly double airspeed ....
Yes my class inexperience is showing :)

Should I have this instead ?   

void FGInterface::set_V_ground_speed(double v) {
    gspd = v * SG_FEET_TO_METER * 3600 * SG_METER_TO_NM; 
        v_ground_speed = gspd; 
return gspd;
}

My difficulty is understand if FGTie() outputs the result directly to the 
property tree ...

Thanks,
Syd 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to