Thanks Erik. 

I failed to find acms.xml file in official released 0.9.6 base
file...but I understood you point.

After checking codes, I found that the replay works without interaction
with FDM because:

        if ( ! replay_master->getBoolValue() ) {
            cur_fdm_state->update( delta_time_sec );   // FDM update
here.
        } else {
            FGReplay *r = (FGReplay *)(globals->get_subsystem( "replay"
));
            r->replay( replay_time->getDoubleValue() );
        ...

The FDM states will be updated by update_fdm in replay func.

The reason why I could not get the aircraft moved is because the
replay_time->getDoubleValue() is always 0. I fixed it with a temporary
solution and I got the data in the FDR replayed successfully with the
great FlightGear! Though the effect is not good enough because the lon,
lat, alt values got from FDR are not accurate enough...they are just to
three places of decimals.

Thanks again...
> Hi,
> 
> I am trying to read flight data from a FDR (Flight Data Recorder, 
> black
> box) and input some of the data into FlightGear's Replay system to 
> display the flight.
> 
> If using the Replay functionality in the FlightGear and I only care 
> some
> of the values such as:
> 
> -Longitude, latitude, altitude, agl
> -v_north, v_east, v_down
> -phi, theta, psi
> ...
> All these for displaying the aircraft's attitude, position, 
> trajectory.
> While I don't care those values such as control surfaces, engines 
> status, instruments related, and etc.

There is a file called acms.xml in FlightGear/data/Protocol/ (base 
package) which was used for the helicopter playback. Now to play back 
the data using that file you will have to use the latest version of 
FlightGear compiled with --enable-sp-fdms

If the file format as described by the acms.xml file corresponds to the 
data you have you will be able to play the data by running:

fgfs --aircraft=c172p \
       --generic=file,in,1,<path_to_FDR_file>,acms \
       --fdm=acms

> 
> I tried to import the data (lon,lat,...) I want to use into the Replay
> subsystem and "hardcode" those control surfaces, engines/tanks status,

> and etc. At the beginning, I set the replay_master as true and I got
the 
> program started in replay mode. But the problem is, I failed to see
the 
> aircraft moving which supposed to be because I have the lon, lat, alt,

> groundspeed keep changing.

This is because the default FDM will override these values. You will 
have to use --fdm=null or --fdm=acms
> 
> So my question is, how does the Replay subsystem work in FlightGear?
> Does it use the control surfaces' (and other control elements like 
> engines) changes as the inputs and then use the FDM to recalculate all

> the outputs again?

With the above description it will only mode the model in the scenery. 
Lots of stuff can be done by extending the code though.

Erik

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

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

Reply via email to