+ if (Mass_appMass)
+ F_Z_aero += -Mass_appMass * W_dot_body;
+ if (I_xx_appMass)
+ M_l_aero += -I_xx_appMass * P_dot_body;
+ if (I_yy_appMass)
+ M_m_aero += -I_yy_appMass * Q_dot_body;
+ if (I_zz_appMass)
+ M_n_aero += -I_zz_appMass * R_dot_body;
+
+ // gyroscopic moments
+ // engineOmega is positive when rotation is ccw when viewed from the front
+ if (gyroForce_Q_body)
+ M_n_aero += polarInertia * engineOmega * Q_body;
+ if (gyroForce_R_body)
+ M_m_aero += -polarInertia * engineOmega * R_body;
+
+ // ornithopter support
+ if (flapper_model)
+ {
+ uiuc_get_flapper(dt);
+ F_X_aero += F_X_aero_flapper;
+ F_Z_aero += F_Z_aero_flapper;
+ M_m_aero += flapper_Moment;
+ }
+
+ // fog field update
+ Fog = 0;
+ if (fog_field)
+ uiuc_fog();
+
+ double vis;
+ if (Fog != 0)
+ {
+ vis = fgGetDouble("/environment/visibility-m");
+ if (Fog > 0)
+ vis /= 1.01;
+ else
+ vis *= 1.01;
+ fgSetDouble("/environment/visibility-m", vis);
+ }
+
+
+ /* Send data on the network to the Glass Cockpit */
+
+ // string input="";
+
+ // input += " stick_right " + ftoa(Lat_control);
+ // input += " rudder_left " + ftoa(-Rudder_pedal);
+ // input += " stick_forward " + ftoa(Long_control);
+ // input += " stick_trim_forward " + ftoa(Long_trim);
+ // input += " vehicle_pitch " + ftoa(Theta * 180.0 / 3.14);
+ // input += " vehicle_roll " + ftoa(Phi * 180.0 / 3.14);
+ // input += " vehicle_speed " + ftoa(V_rel_wind);
+ // input += " throttle_forward " + ftoa(Throttle_pct);
+ // input += " altitude " + ftoa(Altitude);
+ // input += " climb_rate " + ftoa(-1.0*V_down_rel_ground);
+
+ // testarray.getHello();
+ // testarray.sendData(input);
+
+ /* End of Networking */
+
+}
+
+void uiuc_wind_routine()
+{
+ uiuc_getwind();