1 /***************************************************************************
5 ----------------------------------------------------------------------------
7 FUNCTION: dummy engine routine
9 ----------------------------------------------------------------------------
11 MODULE STATUS: incomplete
13 ----------------------------------------------------------------------------
15 GENEALOGY: This is a renamed navion_engine.c originall written by E. Bruce
19 ----------------------------------------------------------------------------
25 MAINTAINED BY: maintainer
27 ----------------------------------------------------------------------------
33 CURRENT RCS HEADER INFO:
37 * Revision 1.1 92/12/30 13:21:46 bjax
41 ----------------------------------------------------------------------------
45 ----------------------------------------------------------------------------
47 CALLED BY: ls_model();
49 ----------------------------------------------------------------------------
53 ----------------------------------------------------------------------------
57 ----------------------------------------------------------------------------
61 --------------------------------------------------------------------------*/
64 #include "ls_constants.h"
65 #include "ls_generic.h"
66 #include "ls_sim_control.h"
67 #include "ls_cockpit.h"
68 #include "c172_aero.h"
70 extern SIM_CONTROL sim_control_;
72 void c172_engine( SCALAR dt, int init ) {
77 Throttle[3] = Throttle_pct;
80 if ( ! Use_External_Engine ) {
81 /* do a crude engine power calc based on throttle position */
88 pa=(0.00144*v + 0.546)*(1 - 1.6E-5*h)*bhp;
92 F_X_engine = Throttle[3]*(pa*550)/v;
94 /* accept external settings */
97 /* printf("F_X_engine = %.3f\n", F_X_engine); */
99 M_m_engine = F_X_engine*0.734*cbar;
100 /* 0.734 - estimated (WAGged) location of thrust line in the z-axis*/