Added velocity and climb_rate to mini_fdm structure.
This commit is contained in:
parent
f3d4f741f0
commit
9bff823e0a
3 changed files with 16 additions and 1 deletions
|
@ -916,7 +916,7 @@ parse_option (const string& arg)
|
|||
} else if ( arg.find( "--native-fdm=" ) == 0 ) {
|
||||
add_channel( "native_fdm", arg.substr(13) );
|
||||
} 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 ) {
|
||||
// char stop;
|
||||
// cout << "Adding channel for OpenGC Display" << endl; cin >> stop;
|
||||
|
|
|
@ -114,6 +114,10 @@ void FGProps2NetMiniFDM( FGNetMiniFDM *net ) {
|
|||
net->theta = cur_fdm_state->get_Theta();
|
||||
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
|
||||
net->num_tanks = FGNetMiniFDM::FG_MAX_TANKS;
|
||||
for ( i = 0; i < net->num_tanks; ++i ) {
|
||||
|
@ -134,6 +138,8 @@ void FGProps2NetMiniFDM( FGNetMiniFDM *net ) {
|
|||
htond(net->phi);
|
||||
htond(net->theta);
|
||||
htond(net->psi);
|
||||
htond(net->vcas);
|
||||
htond(net->climb_rate);
|
||||
|
||||
for ( i = 0; i < net->num_tanks; ++i ) {
|
||||
htond(net->fuel_quantity[i]);
|
||||
|
@ -157,6 +163,8 @@ void FGNetMiniFDM2Props( FGNetMiniFDM *net ) {
|
|||
htond(net->phi);
|
||||
htond(net->theta);
|
||||
htond(net->psi);
|
||||
htond(net->vcas);
|
||||
htond(net->climb_rate);
|
||||
|
||||
net->num_tanks = htonl(net->num_tanks);
|
||||
for ( i = 0; i < net->num_tanks; ++i ) {
|
||||
|
@ -178,6 +186,9 @@ void FGNetMiniFDM2Props( FGNetMiniFDM *net ) {
|
|||
net->theta,
|
||||
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 ) {
|
||||
SGPropertyNode * node
|
||||
= fgGetNode("/consumables/fuel/tank", i, true);
|
||||
|
|
|
@ -62,6 +62,10 @@ public:
|
|||
double theta; // pitch (radians)
|
||||
double psi; // yaw or true heading (radians)
|
||||
|
||||
// Velocities
|
||||
double vcas;
|
||||
double climb_rate; // feet per second
|
||||
|
||||
// Consumables
|
||||
int num_tanks; // Max number of fuel tanks
|
||||
double fuel_quantity[FG_MAX_TANKS];
|
||||
|
|
Loading…
Reference in a new issue