1
0
Fork 0

Added velocity and climb_rate to mini_fdm structure.

This commit is contained in:
curt 2003-01-13 00:27:50 +00:00
parent f3d4f741f0
commit 9bff823e0a
3 changed files with 16 additions and 1 deletions

View file

@ -916,7 +916,7 @@ parse_option (const string& arg)
} else if ( arg.find( "--native-fdm=" ) == 0 ) { } else if ( arg.find( "--native-fdm=" ) == 0 ) {
add_channel( "native_fdm", arg.substr(13) ); add_channel( "native_fdm", arg.substr(13) );
} else if ( arg.find( "--mini-fdm=" ) == 0 ) { } else if ( arg.find( "--mini-fdm=" ) == 0 ) {
add_channel( "mini_fdm", arg.substr(13) ); add_channel( "mini_fdm", arg.substr(11) );
} else if ( arg.find( "--opengc=" ) == 0 ) { } else if ( arg.find( "--opengc=" ) == 0 ) {
// char stop; // char stop;
// cout << "Adding channel for OpenGC Display" << endl; cin >> stop; // cout << "Adding channel for OpenGC Display" << endl; cin >> stop;

View file

@ -114,6 +114,10 @@ void FGProps2NetMiniFDM( FGNetMiniFDM *net ) {
net->theta = cur_fdm_state->get_Theta(); net->theta = cur_fdm_state->get_Theta();
net->psi = cur_fdm_state->get_Psi(); net->psi = cur_fdm_state->get_Psi();
// Velocities
net->vcas = cur_fdm_state->get_V_calibrated_kts();
net->climb_rate = cur_fdm_state->get_Climb_Rate();
// Consumables // Consumables
net->num_tanks = FGNetMiniFDM::FG_MAX_TANKS; net->num_tanks = FGNetMiniFDM::FG_MAX_TANKS;
for ( i = 0; i < net->num_tanks; ++i ) { for ( i = 0; i < net->num_tanks; ++i ) {
@ -134,6 +138,8 @@ void FGProps2NetMiniFDM( FGNetMiniFDM *net ) {
htond(net->phi); htond(net->phi);
htond(net->theta); htond(net->theta);
htond(net->psi); htond(net->psi);
htond(net->vcas);
htond(net->climb_rate);
for ( i = 0; i < net->num_tanks; ++i ) { for ( i = 0; i < net->num_tanks; ++i ) {
htond(net->fuel_quantity[i]); htond(net->fuel_quantity[i]);
@ -157,6 +163,8 @@ void FGNetMiniFDM2Props( FGNetMiniFDM *net ) {
htond(net->phi); htond(net->phi);
htond(net->theta); htond(net->theta);
htond(net->psi); htond(net->psi);
htond(net->vcas);
htond(net->climb_rate);
net->num_tanks = htonl(net->num_tanks); net->num_tanks = htonl(net->num_tanks);
for ( i = 0; i < net->num_tanks; ++i ) { for ( i = 0; i < net->num_tanks; ++i ) {
@ -178,6 +186,9 @@ void FGNetMiniFDM2Props( FGNetMiniFDM *net ) {
net->theta, net->theta,
net->psi ); net->psi );
cur_fdm_state->_set_V_calibrated_kts( net->vcas );
cur_fdm_state->_set_Climb_Rate( net->climb_rate );
for (i = 0; i < net->num_tanks; ++i ) { for (i = 0; i < net->num_tanks; ++i ) {
SGPropertyNode * node SGPropertyNode * node
= fgGetNode("/consumables/fuel/tank", i, true); = fgGetNode("/consumables/fuel/tank", i, true);

View file

@ -62,6 +62,10 @@ public:
double theta; // pitch (radians) double theta; // pitch (radians)
double psi; // yaw or true heading (radians) double psi; // yaw or true heading (radians)
// Velocities
double vcas;
double climb_rate; // feet per second
// Consumables // Consumables
int num_tanks; // Max number of fuel tanks int num_tanks; // Max number of fuel tanks
double fuel_quantity[FG_MAX_TANKS]; double fuel_quantity[FG_MAX_TANKS];