On Feb 19, 2008 3:59 PM, David <[EMAIL PROTECTED]> wrote:

> I would like to use Matlab+FlightGear to display the movement of a
> helicopter modeled on Matlab/Simulink.
> To achieve that, I have several problems that users with more experience
> might solve.


I can share some thoughts, even though I have no direct experience with
matlab+simulink.


> To start with, the block that sends the position/attitude data to
> flighgear, uses geodetic inputs, while the model uses a traditional
> x,y,z frame, and I don't know how to convert it.


I had a situation where I was faced with the same problem.  Here's what I
did and it seemed to work out pretty well.  I defined x=0,y=0,z=0 to be some
arbitrary lon/lat at zero elevation.  Now as your simulation progresses,
your X & Y values will change.  You can compute a heading and a distance you
have moved from 0,0,0.  In flightgear we have code that will compute a new
lon/lat given a starting lon/lat, a heading, and a distance traveled.  You
may need to port that routine to matlab.  In my case, the result worked out
quite well, especially if I didn't fly 1000's of miles from the starting
point.


> If that could be solved, there is the little thing that I'm unable to
> start the engine so that the rotor is portrayed turning.


I probably should defer to the helicopter experts on this one, but perhaps
you just need a small amount of nasal script to copy the rotor rpm from one
of the data slots you can send through the predefined structure to the
property name that the helicopters use for animating their rotor rotation.

And to end with, there is the need to record the flightgear window and
> again, I don't know how to do it.


If you need a high quality recording, you might investigate the use of a
scan converter to convert your vga signal into NTSC/PAL, or perhaps check to
see if your video card does video out.  If you can get by with lower quality
(and how low the quality is will depend on your hardware) you could look at
something like fraps or xvidcap which is a software solution for capturing
your screen as a digital movie.  Another option which I kind of like because
it is easy (but the results are usually washed out) is to point a video
camera at the screen while the simulation is running.  Once nice thing about
this approach is that you can get very natural looking camera jitter and the
double indirection has a natural antialiasing effect which tends to hide or
minimize the sharp digital edges you see in the raw display.

Hope that helps,

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to