]> git.mxchange.org Git - flightgear.git/blob - src/FDM/flight.cxx
43163d4cd44aeff1b0a7a8097fcbdebdc827956c
[flightgear.git] / src / FDM / flight.cxx
1 // flight.c -- a general interface to the various flight models
2 //
3 // Written by Curtis Olson, started May 1997.
4 //
5 // Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 //
21 // $Id$
22
23
24 #include <stdio.h>
25
26 #include <simgear/constants.h>
27 #include <simgear/debug/logstream.hxx>
28 #include <simgear/math/sg_geodesy.hxx>
29 #include <simgear/timing/timestamp.hxx>
30
31 #include <Scenery/scenery.hxx>
32 #include <FDM/LaRCsim/ls_interface.h>
33 #include <Main/globals.hxx>
34 #include <Main/fg_props.hxx>
35
36 #include "External.hxx"
37 #include "flight.hxx"
38 #include "JSBSim.hxx"
39 #include "LaRCsim.hxx"
40 #include "Balloon.h"
41
42
43 // base_fdm_state is the internal state that is updated in integer
44 // multiples of "dt".  This leads to "jitter" with respect to the real
45 // world time, so we introduce cur_fdm_state which is extrapolated by
46 // the difference between sim time and real world time
47
48 FGInterface *cur_fdm_state;
49 FGInterface base_fdm_state;
50
51 inline void init_vec(FG_VECTOR_3 vec) {
52     vec[0] = 0.0; vec[1] = 0.0; vec[2] = 0.0;
53 }  
54
55 FGEngInterface::FGEngInterface(void) {
56     
57     // inputs
58     Throttle=0;
59     Mixture=0;
60     Prop_Advance=0;
61
62     // outputs
63     RPM=0;
64     Manifold_Pressure=0;
65     MaxHP=0;
66     Percentage_Power=0;
67     EGT=0;
68     prop_thrust=0;
69 }
70
71 FGEngInterface::~FGEngInterface(void) {
72 }
73
74
75 // Constructor
76 FGInterface::FGInterface(void) {
77     init_vec( d_pilot_rp_body_v );
78     init_vec( d_cg_rp_body_v );
79     init_vec( f_body_total_v );
80     init_vec( f_local_total_v );
81     init_vec( f_aero_v );
82     init_vec( f_engine_v );
83     init_vec( f_gear_v );
84     init_vec( m_total_rp_v );
85     init_vec( m_total_cg_v );
86     init_vec( m_aero_v );
87     init_vec( m_engine_v );
88     init_vec( m_gear_v );
89     init_vec( v_dot_local_v );
90     init_vec( v_dot_body_v );
91     init_vec( a_cg_body_v );
92     init_vec( a_pilot_body_v );
93     init_vec( n_cg_body_v );
94     init_vec( n_pilot_body_v );
95     init_vec( omega_dot_body_v );
96     init_vec( v_local_v );
97     init_vec( v_local_rel_ground_v ); 
98     init_vec( v_local_airmass_v );    
99     init_vec( v_local_rel_airmass_v );  
100     init_vec( v_local_gust_v ); 
101     init_vec( v_wind_body_v );     
102     init_vec( omega_body_v );         
103     init_vec( omega_local_v );        
104     init_vec( omega_total_v );       
105     init_vec( euler_rates_v );
106     init_vec( geocentric_rates_v );   
107     init_vec( geocentric_position_v );
108     init_vec( geodetic_position_v );
109     init_vec( euler_angles_v );
110     init_vec( d_cg_rwy_local_v );     
111     init_vec( d_cg_rwy_rwy_v );       
112     init_vec( d_pilot_rwy_local_v );  
113     init_vec( d_pilot_rwy_rwy_v );    
114     init_vec( t_local_to_body_m[0] );
115     init_vec( t_local_to_body_m[1] );
116     init_vec( t_local_to_body_m[2] );
117     
118     mass=i_xx=i_yy=i_zz=i_xz=0;
119     nlf=0;  
120     v_rel_wind=v_true_kts=v_rel_ground=v_inertial=0;
121     v_ground_speed=v_equiv=v_equiv_kts=0;
122     v_calibrated=v_calibrated_kts=0;
123     gravity=0;            
124     centrifugal_relief=0; 
125     alpha=beta=alpha_dot=beta_dot=0;   
126     cos_alpha=sin_alpha=cos_beta=sin_beta=0;
127     cos_phi=sin_phi=cos_theta=sin_theta=cos_psi=sin_psi=0;
128     gamma_vert_rad=gamma_horiz_rad=0;    
129     sigma=density=v_sound=mach_number=0;
130     static_pressure=total_pressure=impact_pressure=0;
131     dynamic_pressure=0;
132     static_temperature=total_temperature=0;
133     sea_level_radius=earth_position_angle=0;
134     runway_altitude=runway_latitude=runway_longitude=0;
135     runway_heading=0;
136     radius_to_rwy=0;
137     climb_rate=0;           
138     sin_lat_geocentric=cos_lat_geocentric=0;
139     sin_latitude=cos_latitude=0;
140     sin_longitude=cos_longitude=0;
141     altitude_agl=0;
142 }  
143
144
145 // Destructor
146 FGInterface::~FGInterface() {
147 //   unbind();                  // FIXME: should be called explicitly
148 }
149
150
151 void
152 FGInterface::init ()
153 {
154   init(1.0 / fgGetInt("/sim/model-hz"));
155 }
156
157 void
158 FGInterface::bind ()
159 {
160                                 // Aircraft position
161   fgTie("/position/latitude", this,
162         &(FGInterface::get_Latitude_deg),
163         &(FGInterface::set_Latitude_deg));
164   fgTie("/position/longitude", this,
165         &(FGInterface::get_Longitude_deg),
166         &(FGInterface::set_Longitude_deg));
167   fgTie("/position/altitude", this,
168         &(FGInterface::get_Altitude),
169         &(FGInterface::set_Altitude));
170   fgTie("/position/altitude-agl", this,
171         &(FGInterface::get_Altitude_AGL)); // read-only
172
173                                 // Orientation
174   fgTie("/orientation/roll", this,
175         &(FGInterface::get_Phi_deg),
176         &(FGInterface::set_Phi_deg));
177   fgTie("/orientation/pitch", this,
178         &(FGInterface::get_Theta_deg),
179         &(FGInterface::set_Theta_deg));
180   fgTie("/orientation/heading", this,
181         &(FGInterface::get_Psi_deg),
182         &(FGInterface::set_Psi_deg));
183
184                                 // Calibrated airspeed
185   fgTie("/velocities/airspeed", this,
186         &(FGInterface::get_V_calibrated_kts),
187         &(FGInterface::set_V_calibrated_kts));
188
189                                 // Local velocities
190   fgTie("/velocities/speed-north", this,
191         &(FGInterface::get_V_north));
192   fgTie("/velocities/speed-east", this,
193         &(FGInterface::get_V_east),
194         &(FGInterface::set_V_east));
195   fgTie("/velocities/speed-down", this,
196         &(FGInterface::get_V_down),
197         &(FGInterface::set_V_down));
198
199                                 // Relative wind
200   fgTie("/velocities/uBody", this,
201         &(FGInterface::get_uBody),
202         &(FGInterface::set_uBody));
203   fgTie("/velocities/vBody", this,
204         &(FGInterface::get_vBody),
205         &(FGInterface::set_vBody));
206   fgTie("/velocities/wBody", this,
207         &(FGInterface::get_wBody),
208         &(FGInterface::set_wBody));
209
210                                 // Climb and slip (read-only)
211   fgTie("/velocities/vertical-speed", this,
212         &(FGInterface::get_Climb_Rate)); // read-only
213   fgTie("/velocities/side-slip", this,
214         &(FGInterface::get_Beta)); // read-only
215 }
216
217 void
218 FGInterface::unbind ()
219 {
220   fgUntie("/position/latitude");
221   fgUntie("/position/longitude");
222   fgUntie("/position/altitude");
223   fgUntie("/position/heading");
224   fgUntie("/position/pitch");
225   fgUntie("/position/roll");
226   fgUntie("/velocities/airspeed");
227   fgUntie("/velocities/speed-north");
228   fgUntie("/velocities/speed-east");
229   fgUntie("/velocities/speed-down");
230   fgUntie("/velocities/uBody");
231   fgUntie("/velocities/vBody");
232   fgUntie("/velocities/wBody");
233   fgUntie("/velocities/vertical-speed");
234   fgUntie("/velocities/side-slip");
235 }
236
237 void
238 FGInterface::update ()
239 {
240   update(1);
241 }
242
243
244 bool FGInterface::init( double dt ) {
245     cout << "dummy init() ... SHOULDN'T BE CALLED!" << endl;
246     return false;
247 }
248
249
250 bool FGInterface::update( int multi_loop ) {
251     cout << "dummy update() ... SHOULDN'T BE CALLED!" << endl;
252     return false;
253 }
254
255   
256 void FGInterface::_updatePosition( double lat_geoc, double lon, double alt ) {
257     double lat_geod, tmp_alt, sl_radius1, sl_radius2, tmp_lat_geoc;
258         
259     sgGeocToGeod( lat_geoc, EQUATORIAL_RADIUS_M + alt * FEET_TO_METER,
260                   &lat_geod, &tmp_alt, &sl_radius1 );
261     sgGeodToGeoc( lat_geod, alt * FEET_TO_METER, &sl_radius2, &tmp_lat_geoc );
262
263     FG_LOG( FG_FLIGHT, FG_DEBUG, "lon = " << lon 
264             << " lat_geod = " << lat_geod
265             << " lat_geoc = " << lat_geoc
266             << " alt = " << alt 
267             << " tmp_alt = " << tmp_alt * METER_TO_FEET
268             << " sl_radius1 = " << sl_radius1 * METER_TO_FEET
269             << " sl_radius2 = " << sl_radius2 * METER_TO_FEET
270             << " Equator = " << EQUATORIAL_RADIUS_FT );
271
272     _set_Geocentric_Position( lat_geoc, lon, 
273                               sl_radius2 * METER_TO_FEET + alt );
274         
275     _set_Geodetic_Position( lat_geod, lon, alt );
276         
277     _set_Sea_level_radius( sl_radius2 * METER_TO_FEET );
278     _set_Runway_altitude( scenery.cur_elev*METERS_TO_FEET ); 
279         
280     _set_sin_lat_geocentric( lat_geoc );
281     _set_cos_lat_geocentric( lat_geoc );
282         
283     _set_sin_cos_longitude( lon );
284         
285     _set_sin_cos_latitude( lat_geod );
286         
287     /* Norman's code for slope of the terrain */
288     /* needs to be tested -- get it on the HUD and taxi around */
289     /* double *tnorm = scenery.cur_normal;
290         
291        double sy = sin ( -get_Psi() ) ;
292        double cy = cos ( -get_Psi() ) ;
293
294        double phitb, thetatb, psitb;
295        if(tnorm[1] != 0.0) {
296                 psitb = -atan2 ( tnorm[0], tnorm[1] );
297        }
298        if(tnorm[2] != 0.0) {    
299                 thetatb =  atan2 ( tnorm[0] * cy - tnorm[1] * sy, tnorm[2] );
300                 phitb = -atan2 ( tnorm[1] * cy + tnorm[0] * sy, tnorm[2] );  
301        }        
302         
303        _set_terrain_slope(phitb, thetatb, psitb) 
304      */
305 }
306
307
308 // Extrapolate fdm based on time_offset (in usec)
309 void FGInterface::extrapolate( int time_offset ) {
310     double dt = time_offset / 1000000.0;
311
312     // -dw- metrowerks complains about ambiguous access, not critical
313     // to keep this ;)
314 #ifndef __MWERKS__
315     cout << "extrapolating FDM by dt = " << dt << endl;
316 #endif
317
318     double lat = geodetic_position_v[0] + geocentric_rates_v[0] * dt;
319     double lat_geoc = geocentric_position_v[0] + geocentric_rates_v[0] * dt;
320
321     double lon = geodetic_position_v[1] + geocentric_rates_v[1] * dt;
322     double lon_geoc = geocentric_position_v[1] + geocentric_rates_v[1] * dt;
323
324     double alt = geodetic_position_v[2] + geocentric_rates_v[2] * dt;
325     double radius = geocentric_position_v[2] + geocentric_rates_v[2] * dt;
326
327     geodetic_position_v[0] = lat;
328     geocentric_position_v[0] = lat_geoc;
329
330     geodetic_position_v[1] = lon;
331     geocentric_position_v[1] = lon_geoc;
332
333     geodetic_position_v[2] = alt;
334     geocentric_position_v[2] = radius;
335 }
336
337
338 // Set the altitude (force)
339 void fgFDMForceAltitude(const string &model, double alt_meters) {
340     double sea_level_radius_meters;
341     double lat_geoc;
342
343     // Set the FG variables first
344     sgGeodToGeoc( base_fdm_state.get_Latitude(), alt_meters, 
345                   &sea_level_radius_meters, &lat_geoc);
346
347     base_fdm_state.set_Altitude( alt_meters * METER_TO_FEET );
348     base_fdm_state.set_Sea_level_radius( sea_level_radius_meters *
349                                          METER_TO_FEET ); 
350                                           
351
352     // additional work needed for some flight models
353     if ( model == "larcsim" ) {
354         ls_ForceAltitude( base_fdm_state.get_Altitude() );
355     }
356 }
357
358
359 // Set the local ground elevation
360 void fgFDMSetGroundElevation(const string &model, double ground_meters) {
361     FG_LOG( FG_FLIGHT,FG_INFO, "fgFDMSetGroundElevation: "
362             << ground_meters*METER_TO_FEET ); 
363     base_fdm_state.set_Runway_altitude( ground_meters * METER_TO_FEET );
364     cur_fdm_state->set_Runway_altitude( ground_meters * METER_TO_FEET );
365 }
366
367
368 // Positions
369 void FGInterface::set_Latitude(double lat) { 
370     geodetic_position_v[0] = lat;
371 }  
372
373 void FGInterface::set_Longitude(double lon) {
374     geodetic_position_v[1] = lon;
375 }       
376
377 void FGInterface::set_Altitude(double alt) {
378     geodetic_position_v[2] = alt;
379 }          
380
381 void FGInterface::set_AltitudeAGL(double altagl) {
382     altitude_agl=altagl;
383 }  
384
385 // Velocities
386 void FGInterface::set_V_calibrated_kts(double vc) {
387     v_calibrated_kts = vc;
388 }  
389
390 void FGInterface::set_Mach_number(double mach) {
391     mach_number = mach;
392 }  
393
394 void FGInterface::set_Velocities_Local( double north, 
395                                         double east, 
396                                         double down ){
397     v_local_v[0] = north;
398     v_local_v[1] = east;
399     v_local_v[2] = down;                                                 
400 }  
401
402 void FGInterface::set_Velocities_Wind_Body( double u, 
403                                             double v, 
404                                             double w){
405     v_wind_body_v[0] = u;
406     v_wind_body_v[1] = v;
407     v_wind_body_v[2] = w;
408
409
410 // Euler angles 
411 void FGInterface::set_Euler_Angles( double phi, 
412                                     double theta, 
413                                     double psi ) {
414     euler_angles_v[0] = phi;
415     euler_angles_v[1] = theta;
416     euler_angles_v[2] = psi;                                            
417 }  
418
419 // Flight Path
420 void FGInterface::set_Climb_Rate( double roc) {
421     climb_rate = roc;
422 }  
423
424 void FGInterface::set_Gamma_vert_rad( double gamma) {
425     gamma_vert_rad = gamma;
426 }  
427
428 // Earth
429 void FGInterface::set_Sea_level_radius(double slr) {
430     sea_level_radius = slr;
431 }  
432
433 void FGInterface::set_Runway_altitude(double ralt) {
434     runway_altitude = ralt;
435 }  
436
437 void FGInterface::set_Static_pressure(double p) { static_pressure = p; }
438 void FGInterface::set_Static_temperature(double T) { static_temperature = T; }
439 void FGInterface::set_Density(double rho) { density = rho; }
440
441 void FGInterface::set_Velocities_Local_Airmass (double wnorth, 
442                                                 double weast, 
443                                                 double wdown ) {
444     v_local_airmass_v[0] = wnorth;
445     v_local_airmass_v[1] = weast;
446     v_local_airmass_v[2] = wdown;
447 }     
448
449
450 void FGInterface::_busdump(void) {
451
452     FG_LOG(FG_FLIGHT,FG_INFO,"d_pilot_rp_body_v[3]: " << d_pilot_rp_body_v[0] << ", " << d_pilot_rp_body_v[1] << ", " << d_pilot_rp_body_v[2]);
453     FG_LOG(FG_FLIGHT,FG_INFO,"d_cg_rp_body_v[3]: " << d_cg_rp_body_v[0] << ", " << d_cg_rp_body_v[1] << ", " << d_cg_rp_body_v[2]);
454     FG_LOG(FG_FLIGHT,FG_INFO,"f_body_total_v[3]: " << f_body_total_v[0] << ", " << f_body_total_v[1] << ", " << f_body_total_v[2]);
455     FG_LOG(FG_FLIGHT,FG_INFO,"f_local_total_v[3]: " << f_local_total_v[0] << ", " << f_local_total_v[1] << ", " << f_local_total_v[2]);
456     FG_LOG(FG_FLIGHT,FG_INFO,"f_aero_v[3]: " << f_aero_v[0] << ", " << f_aero_v[1] << ", " << f_aero_v[2]);
457     FG_LOG(FG_FLIGHT,FG_INFO,"f_engine_v[3]: " << f_engine_v[0] << ", " << f_engine_v[1] << ", " << f_engine_v[2]);
458     FG_LOG(FG_FLIGHT,FG_INFO,"f_gear_v[3]: " << f_gear_v[0] << ", " << f_gear_v[1] << ", " << f_gear_v[2]);
459     FG_LOG(FG_FLIGHT,FG_INFO,"m_total_rp_v[3]: " << m_total_rp_v[0] << ", " << m_total_rp_v[1] << ", " << m_total_rp_v[2]);
460     FG_LOG(FG_FLIGHT,FG_INFO,"m_total_cg_v[3]: " << m_total_cg_v[0] << ", " << m_total_cg_v[1] << ", " << m_total_cg_v[2]);
461     FG_LOG(FG_FLIGHT,FG_INFO,"m_aero_v[3]: " << m_aero_v[0] << ", " << m_aero_v[1] << ", " << m_aero_v[2]);
462     FG_LOG(FG_FLIGHT,FG_INFO,"m_engine_v[3]: " << m_engine_v[0] << ", " << m_engine_v[1] << ", " << m_engine_v[2]);
463     FG_LOG(FG_FLIGHT,FG_INFO,"m_gear_v[3]: " << m_gear_v[0] << ", " << m_gear_v[1] << ", " << m_gear_v[2]);
464     FG_LOG(FG_FLIGHT,FG_INFO,"v_dot_local_v[3]: " << v_dot_local_v[0] << ", " << v_dot_local_v[1] << ", " << v_dot_local_v[2]);
465     FG_LOG(FG_FLIGHT,FG_INFO,"v_dot_body_v[3]: " << v_dot_body_v[0] << ", " << v_dot_body_v[1] << ", " << v_dot_body_v[2]);
466     FG_LOG(FG_FLIGHT,FG_INFO,"a_cg_body_v[3]: " << a_cg_body_v[0] << ", " << a_cg_body_v[1] << ", " << a_cg_body_v[2]);
467     FG_LOG(FG_FLIGHT,FG_INFO,"a_pilot_body_v[3]: " << a_pilot_body_v[0] << ", " << a_pilot_body_v[1] << ", " << a_pilot_body_v[2]);
468     FG_LOG(FG_FLIGHT,FG_INFO,"n_cg_body_v[3]: " << n_cg_body_v[0] << ", " << n_cg_body_v[1] << ", " << n_cg_body_v[2]);
469     FG_LOG(FG_FLIGHT,FG_INFO,"n_pilot_body_v[3]: " << n_pilot_body_v[0] << ", " << n_pilot_body_v[1] << ", " << n_pilot_body_v[2]);
470     FG_LOG(FG_FLIGHT,FG_INFO,"omega_dot_body_v[3]: " << omega_dot_body_v[0] << ", " << omega_dot_body_v[1] << ", " << omega_dot_body_v[2]);
471     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_v[3]: " << v_local_v[0] << ", " << v_local_v[1] << ", " << v_local_v[2]);
472     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_rel_ground_v[3]: " << v_local_rel_ground_v[0] << ", " << v_local_rel_ground_v[1] << ", " << v_local_rel_ground_v[2]);
473     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_airmass_v[3]: " << v_local_airmass_v[0] << ", " << v_local_airmass_v[1] << ", " << v_local_airmass_v[2]);
474     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_rel_airmass_v[3]: " << v_local_rel_airmass_v[0] << ", " << v_local_rel_airmass_v[1] << ", " << v_local_rel_airmass_v[2]);
475     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_gust_v[3]: " << v_local_gust_v[0] << ", " << v_local_gust_v[1] << ", " << v_local_gust_v[2]);
476     FG_LOG(FG_FLIGHT,FG_INFO,"v_wind_body_v[3]: " << v_wind_body_v[0] << ", " << v_wind_body_v[1] << ", " << v_wind_body_v[2]);
477     FG_LOG(FG_FLIGHT,FG_INFO,"omega_body_v[3]: " << omega_body_v[0] << ", " << omega_body_v[1] << ", " << omega_body_v[2]);
478     FG_LOG(FG_FLIGHT,FG_INFO,"omega_local_v[3]: " << omega_local_v[0] << ", " << omega_local_v[1] << ", " << omega_local_v[2]);
479     FG_LOG(FG_FLIGHT,FG_INFO,"omega_total_v[3]: " << omega_total_v[0] << ", " << omega_total_v[1] << ", " << omega_total_v[2]);
480     FG_LOG(FG_FLIGHT,FG_INFO,"euler_rates_v[3]: " << euler_rates_v[0] << ", " << euler_rates_v[1] << ", " << euler_rates_v[2]);
481     FG_LOG(FG_FLIGHT,FG_INFO,"geocentric_rates_v[3]: " << geocentric_rates_v[0] << ", " << geocentric_rates_v[1] << ", " << geocentric_rates_v[2]);
482     FG_LOG(FG_FLIGHT,FG_INFO,"geocentric_position_v[3]: " << geocentric_position_v[0] << ", " << geocentric_position_v[1] << ", " << geocentric_position_v[2]);
483     FG_LOG(FG_FLIGHT,FG_INFO,"geodetic_position_v[3]: " << geodetic_position_v[0] << ", " << geodetic_position_v[1] << ", " << geodetic_position_v[2]);
484     FG_LOG(FG_FLIGHT,FG_INFO,"euler_angles_v[3]: " << euler_angles_v[0] << ", " << euler_angles_v[1] << ", " << euler_angles_v[2]);
485     FG_LOG(FG_FLIGHT,FG_INFO,"d_cg_rwy_local_v[3]: " << d_cg_rwy_local_v[0] << ", " << d_cg_rwy_local_v[1] << ", " << d_cg_rwy_local_v[2]);
486     FG_LOG(FG_FLIGHT,FG_INFO,"d_cg_rwy_rwy_v[3]: " << d_cg_rwy_rwy_v[0] << ", " << d_cg_rwy_rwy_v[1] << ", " << d_cg_rwy_rwy_v[2]);
487     FG_LOG(FG_FLIGHT,FG_INFO,"d_pilot_rwy_local_v[3]: " << d_pilot_rwy_local_v[0] << ", " << d_pilot_rwy_local_v[1] << ", " << d_pilot_rwy_local_v[2]);
488     FG_LOG(FG_FLIGHT,FG_INFO,"d_pilot_rwy_rwy_v[3]: " << d_pilot_rwy_rwy_v[0] << ", " << d_pilot_rwy_rwy_v[1] << ", " << d_pilot_rwy_rwy_v[2]);
489   
490     FG_LOG(FG_FLIGHT,FG_INFO,"t_local_to_body_m[0][3]: " << t_local_to_body_m[0][0] << ", " << t_local_to_body_m[0][1] << ", " << t_local_to_body_m[0][2]);
491     FG_LOG(FG_FLIGHT,FG_INFO,"t_local_to_body_m[1][3]: " << t_local_to_body_m[1][0] << ", " << t_local_to_body_m[1][1] << ", " << t_local_to_body_m[1][2]);
492     FG_LOG(FG_FLIGHT,FG_INFO,"t_local_to_body_m[2][3]: " << t_local_to_body_m[2][0] << ", " << t_local_to_body_m[2][1] << ", " << t_local_to_body_m[2][2]);
493
494     FG_LOG(FG_FLIGHT,FG_INFO,"mass: " << mass );
495     FG_LOG(FG_FLIGHT,FG_INFO,"i_xx: " << i_xx );
496     FG_LOG(FG_FLIGHT,FG_INFO,"i_yy: " << i_yy );
497     FG_LOG(FG_FLIGHT,FG_INFO,"i_zz: " << i_zz );
498     FG_LOG(FG_FLIGHT,FG_INFO,"i_xz: " << i_xz );
499     FG_LOG(FG_FLIGHT,FG_INFO,"nlf: " << nlf );
500     FG_LOG(FG_FLIGHT,FG_INFO,"v_rel_wind: " << v_rel_wind );
501     FG_LOG(FG_FLIGHT,FG_INFO,"v_true_kts: " << v_true_kts );
502     FG_LOG(FG_FLIGHT,FG_INFO,"v_rel_ground: " << v_rel_ground );
503     FG_LOG(FG_FLIGHT,FG_INFO,"v_inertial: " << v_inertial );
504     FG_LOG(FG_FLIGHT,FG_INFO,"v_ground_speed: " << v_ground_speed );
505     FG_LOG(FG_FLIGHT,FG_INFO,"v_equiv: " << v_equiv );
506     FG_LOG(FG_FLIGHT,FG_INFO,"v_equiv_kts: " << v_equiv_kts );
507     FG_LOG(FG_FLIGHT,FG_INFO,"v_calibrated: " << v_calibrated );
508     FG_LOG(FG_FLIGHT,FG_INFO,"v_calibrated_kts: " << v_calibrated_kts );
509     FG_LOG(FG_FLIGHT,FG_INFO,"gravity: " << gravity );
510     FG_LOG(FG_FLIGHT,FG_INFO,"centrifugal_relief: " << centrifugal_relief );
511     FG_LOG(FG_FLIGHT,FG_INFO,"alpha: " << alpha );
512     FG_LOG(FG_FLIGHT,FG_INFO,"beta: " << beta );
513     FG_LOG(FG_FLIGHT,FG_INFO,"alpha_dot: " << alpha_dot );
514     FG_LOG(FG_FLIGHT,FG_INFO,"beta_dot: " << beta_dot );
515     FG_LOG(FG_FLIGHT,FG_INFO,"cos_alpha: " << cos_alpha );
516     FG_LOG(FG_FLIGHT,FG_INFO,"sin_alpha: " << sin_alpha );
517     FG_LOG(FG_FLIGHT,FG_INFO,"cos_beta: " << cos_beta );
518     FG_LOG(FG_FLIGHT,FG_INFO,"sin_beta: " << sin_beta );
519     FG_LOG(FG_FLIGHT,FG_INFO,"cos_phi: " << cos_phi );
520     FG_LOG(FG_FLIGHT,FG_INFO,"sin_phi: " << sin_phi );
521     FG_LOG(FG_FLIGHT,FG_INFO,"cos_theta: " << cos_theta );
522     FG_LOG(FG_FLIGHT,FG_INFO,"sin_theta: " << sin_theta );
523     FG_LOG(FG_FLIGHT,FG_INFO,"cos_psi: " << cos_psi );
524     FG_LOG(FG_FLIGHT,FG_INFO,"sin_psi: " << sin_psi );
525     FG_LOG(FG_FLIGHT,FG_INFO,"gamma_vert_rad: " << gamma_vert_rad );
526     FG_LOG(FG_FLIGHT,FG_INFO,"gamma_horiz_rad: " << gamma_horiz_rad );
527     FG_LOG(FG_FLIGHT,FG_INFO,"sigma: " << sigma );
528     FG_LOG(FG_FLIGHT,FG_INFO,"density: " << density );
529     FG_LOG(FG_FLIGHT,FG_INFO,"v_sound: " << v_sound );
530     FG_LOG(FG_FLIGHT,FG_INFO,"mach_number: " << mach_number );
531     FG_LOG(FG_FLIGHT,FG_INFO,"static_pressure: " << static_pressure );
532     FG_LOG(FG_FLIGHT,FG_INFO,"total_pressure: " << total_pressure );
533     FG_LOG(FG_FLIGHT,FG_INFO,"impact_pressure: " << impact_pressure );
534     FG_LOG(FG_FLIGHT,FG_INFO,"dynamic_pressure: " << dynamic_pressure );
535     FG_LOG(FG_FLIGHT,FG_INFO,"static_temperature: " << static_temperature );
536     FG_LOG(FG_FLIGHT,FG_INFO,"total_temperature: " << total_temperature );
537     FG_LOG(FG_FLIGHT,FG_INFO,"sea_level_radius: " << sea_level_radius );
538     FG_LOG(FG_FLIGHT,FG_INFO,"earth_position_angle: " << earth_position_angle );
539     FG_LOG(FG_FLIGHT,FG_INFO,"runway_altitude: " << runway_altitude );
540     FG_LOG(FG_FLIGHT,FG_INFO,"runway_latitude: " << runway_latitude );
541     FG_LOG(FG_FLIGHT,FG_INFO,"runway_longitude: " << runway_longitude );
542     FG_LOG(FG_FLIGHT,FG_INFO,"runway_heading: " << runway_heading );
543     FG_LOG(FG_FLIGHT,FG_INFO,"radius_to_rwy: " << radius_to_rwy );
544     FG_LOG(FG_FLIGHT,FG_INFO,"climb_rate: " << climb_rate );
545     FG_LOG(FG_FLIGHT,FG_INFO,"sin_lat_geocentric: " << sin_lat_geocentric );
546     FG_LOG(FG_FLIGHT,FG_INFO,"cos_lat_geocentric: " << cos_lat_geocentric );
547     FG_LOG(FG_FLIGHT,FG_INFO,"sin_longitude: " << sin_longitude );
548     FG_LOG(FG_FLIGHT,FG_INFO,"cos_longitude: " << cos_longitude );
549     FG_LOG(FG_FLIGHT,FG_INFO,"sin_latitude: " << sin_latitude );
550     FG_LOG(FG_FLIGHT,FG_INFO,"cos_latitude: " << cos_latitude );
551     FG_LOG(FG_FLIGHT,FG_INFO,"altitude_agl: " << altitude_agl );
552 }  
553