On Wed, 30 May 2007 20:33:53 -0500
"Jon S. Berndt" <[EMAIL PROTECTED]> wrote:

> > 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;
> > }
> 
> In FGJSBsim there is this:
> 
>     _set_V_ground_speed( Auxiliary->GetVground() );
> 
> That is, JSBSim already calculates ground speed in ft/sec. I'm not sure I
> understand what you are trying to do. I would think that all FDMs work in
> the same units when setting V_ground_speed.
> 
> Jon

Hi Jon , thanks for the reply , I'm not sure I know WHAT I'm doing anymore :)
I wanted to output groundspeed to a property in /velocities/, in knots, so that 
it would be available for instruments...
rather than having it redone in Nasal ... but nasal is beginning to look more 
inviting at the moment ...

and I just discovered I cant "return gspd" .... 
Its probably a simple matter for the gurus , which I'm definately not !

cheers,
Syd  











syd & sandy <[EMAIL PROTECTED]>

-------------------------------------------------------------------------
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