Pass velocities in local body axis.
This commit is contained in:
parent
a7fb46bcb2
commit
c1417a0268
2 changed files with 10 additions and 1 deletions
|
@ -177,6 +177,9 @@ static void net2global( FGNetFDM *net ) {
|
||||||
htond(net->psidot);
|
htond(net->psidot);
|
||||||
htond(net->vcas);
|
htond(net->vcas);
|
||||||
htond(net->climb_rate);
|
htond(net->climb_rate);
|
||||||
|
htond(net->v_north);
|
||||||
|
htond(net->v_east);
|
||||||
|
htond(net->v_down);
|
||||||
|
|
||||||
htond(net->A_X_pilot);
|
htond(net->A_X_pilot);
|
||||||
htond(net->A_Y_pilot);
|
htond(net->A_Y_pilot);
|
||||||
|
@ -221,6 +224,9 @@ static void net2global( FGNetFDM *net ) {
|
||||||
net->psidot );
|
net->psidot );
|
||||||
cur_fdm_state->_set_V_calibrated_kts( net->vcas );
|
cur_fdm_state->_set_V_calibrated_kts( net->vcas );
|
||||||
cur_fdm_state->_set_Climb_Rate( net->climb_rate );
|
cur_fdm_state->_set_Climb_Rate( net->climb_rate );
|
||||||
|
cur_fdm_state->_set_Velocities_Local( net->v_north,
|
||||||
|
net->v_east,
|
||||||
|
net->v_down );
|
||||||
cur_fdm_state->_set_Accels_Pilot_Body( net->A_X_pilot,
|
cur_fdm_state->_set_Accels_Pilot_Body( net->A_X_pilot,
|
||||||
net->A_Y_pilot,
|
net->A_Y_pilot,
|
||||||
net->A_Z_pilot );
|
net->A_Z_pilot );
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include <time.h> // time_t
|
#include <time.h> // time_t
|
||||||
|
|
||||||
const int FG_NET_FDM_VERSION = 8;
|
const int FG_NET_FDM_VERSION = 9;
|
||||||
|
|
||||||
|
|
||||||
// Define a structure containing the top level flight dynamics model
|
// Define a structure containing the top level flight dynamics model
|
||||||
|
@ -69,6 +69,9 @@ public:
|
||||||
double psidot; // yaw rate (radians/sec)
|
double psidot; // yaw rate (radians/sec)
|
||||||
double vcas; // calibrated airspeed
|
double vcas; // calibrated airspeed
|
||||||
double climb_rate; // feet per second
|
double climb_rate; // feet per second
|
||||||
|
double v_north; // north velocity in local/body frame, fps
|
||||||
|
double v_east; // east velocity in local/body frame, fps
|
||||||
|
double v_down; // down/vertical velocity in local/body frame, fps
|
||||||
|
|
||||||
// Accelerations
|
// Accelerations
|
||||||
double A_X_pilot; // X accel in body frame ft/sec^2
|
double A_X_pilot; // X accel in body frame ft/sec^2
|
||||||
|
|
Loading…
Add table
Reference in a new issue