]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/native_fdm.cxx
YASim now supports the new fuel.nas fuel management system. It
[flightgear.git] / src / Network / native_fdm.cxx
index 665004948a0a89415c207173350d33feaafec5d4..58fb2d8a691debff849347c6a10e2cfdf2086dff 100644 (file)
@@ -133,6 +133,8 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
     net->phi = cur_fdm_state->get_Phi();
     net->theta = cur_fdm_state->get_Theta();
     net->psi = cur_fdm_state->get_Psi();
+    net->alpha = cur_fdm_state->get_Alpha();
+    net->beta = cur_fdm_state->get_Beta();
     net->phidot = cur_fdm_state->get_Phi_dot_degps() * SG_DEGREES_TO_RADIANS;
     net->thetadot = cur_fdm_state->get_Theta_dot_degps()
         * SG_DEGREES_TO_RADIANS;
@@ -200,6 +202,8 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
     // Control surface positions
     SGPropertyNode *node = fgGetNode("/surface-positions", true);
     net->elevator = node->getDoubleValue( "elevator-pos-norm" );
+    net->elevator_trim_tab
+        = node->getDoubleValue( "elevator-trim-tab-pos-norm" );
     net->flaps = node->getDoubleValue( "flap-pos-norm" );
     net->left_aileron = node->getDoubleValue( "left-aileron-pos-norm" );
     net->right_aileron = node->getDoubleValue( "right-aileron-pos-norm" );
@@ -219,6 +223,8 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
         htonf(net->phi);
         htonf(net->theta);
         htonf(net->psi);
+        htonf(net->alpha);
+        htonf(net->beta);
 
         htonf(net->phidot);
         htonf(net->thetadot);
@@ -267,6 +273,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
         htonf(net->visibility);
 
         htonf(net->elevator);
+        htonf(net->elevator_trim_tab);
         htonf(net->flaps);
         htonf(net->left_aileron);
         htonf(net->right_aileron);
@@ -292,6 +299,8 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
         htonf(net->phi);
         htonf(net->theta);
         htonf(net->psi);
+        htonf(net->alpha);
+        htonf(net->beta);
 
         htonf(net->phidot);
         htonf(net->thetadot);
@@ -340,6 +349,7 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
         htonf(net->visibility);
 
         htonf(net->elevator);
+        htonf(net->elevator_trim_tab);
         htonf(net->flaps);
         htonf(net->left_aileron);
         htonf(net->right_aileron);
@@ -367,6 +377,8 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
         cur_fdm_state->_set_Euler_Angles( net->phi,
                                           net->theta,
                                           net->psi );
+        cur_fdm_state->_set_Alpha( net->alpha );
+        cur_fdm_state->_set_Beta( net->beta );
         cur_fdm_state->_set_Euler_Rates( net->phidot,
                                         net->thetadot,
                                         net->psidot );
@@ -439,6 +451,8 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
 
         SGPropertyNode *node = fgGetNode("/surface-positions", true);
         node->setDoubleValue("elevator-pos-norm", net->elevator);
+        node->setDoubleValue("elevator-trim-tab-pos-norm",
+                             net->elevator_trim_tab);
         node->setDoubleValue("flap-pos-norm", net->flaps);
         node->setDoubleValue("left-aileron-pos-norm", net->left_aileron);
         node->setDoubleValue("right-aileron-pos-norm", net->right_aileron);