On Wednesday 30 May 2007 21:53, syd & sandy wrote:
> 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

Hello Syd,

If I were to build an instrument on an actual aircraft for measuring ground 
speed, I would use an accelerometer and integrate its output.

So, following this concept, you could implement this in Nasal by using the 
following algorithm:
1) implement a data type for holding the velocity and simulation-time for the 
current frame.  Then, push the instance of the data type into a queue every 
frame.  (The queue can be found here 
http://cvs.flightgear.org/cgi-bin/viewvc/viewvc.cgi/data/Aircraft/A380/Systems/FDX/Switch/queue.nas?revision=1.1&view=markup)

2) Go through the queue and dequeue instances that are X seconds old.  Then, 
calculate the delta_t between two instances and multiple the value by the 
acceleration in one of the instances.

3) Summing up all the results in step 2 and dividing the result by X should 
give you the ground speed.

I hope this helps. :D



Ampere

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