]> git.mxchange.org Git - flightgear.git/blob - src/FDM/flight.cxx
I tested:
[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
30 #include <FDM/LaRCsim/ls_interface.h>
31 #include <Main/globals.hxx>
32 #include <Time/timestamp.hxx>
33
34 #include "External.hxx"
35 #include "flight.hxx"
36 #include "JSBSim.hxx"
37 #include "LaRCsim.hxx"
38 #include "Balloon.h"
39
40
41 // base_fdm_state is the internal state that is updated in integer
42 // multiples of "dt".  This leads to "jitter" with respect to the real
43 // world time, so we introduce cur_fdm_state which is extrapolated by
44 // the difference between sim time and real world time
45
46 FGInterface *cur_fdm_state;
47 FGInterface base_fdm_state;
48
49 inline void init_vec(FG_VECTOR_3 vec) {
50     vec[0] = 0.0; vec[1] = 0.0; vec[2] = 0.0;
51 }  
52
53 FGEngInterface::FGEngInterface(void) {
54     
55     // inputs
56     Throttle=0;
57     Mixture=0;
58     Prop_Advance=0;
59
60     // outputs
61     RPM=0;
62     Manifold_Pressure=0;
63     MaxHP=0;
64     Percentage_Power=0;
65     EGT=0;
66     prop_thrust=0;
67 }
68
69 FGEngInterface::~FGEngInterface(void) {
70 }
71
72
73 // Constructor
74 FGInterface::FGInterface(void) {
75     init_vec( d_pilot_rp_body_v );
76     init_vec( d_cg_rp_body_v );
77     init_vec( f_body_total_v );
78     init_vec( f_local_total_v );
79     init_vec( f_aero_v );
80     init_vec( f_engine_v );
81     init_vec( f_gear_v );
82     init_vec( m_total_rp_v );
83     init_vec( m_total_cg_v );
84     init_vec( m_aero_v );
85     init_vec( m_engine_v );
86     init_vec( m_gear_v );
87     init_vec( v_dot_local_v );
88     init_vec( v_dot_body_v );
89     init_vec( a_cg_body_v );
90     init_vec( a_pilot_body_v );
91     init_vec( n_cg_body_v );
92     init_vec( n_pilot_body_v );
93     init_vec( omega_dot_body_v );
94     init_vec( v_local_v );
95     init_vec( v_local_rel_ground_v ); 
96     init_vec( v_local_airmass_v );    
97     init_vec( v_local_rel_airmass_v );  
98     init_vec( v_local_gust_v ); 
99     init_vec( v_wind_body_v );     
100     init_vec( omega_body_v );         
101     init_vec( omega_local_v );        
102     init_vec( omega_total_v );       
103     init_vec( euler_rates_v );
104     init_vec( geocentric_rates_v );   
105     init_vec( geocentric_position_v );
106     init_vec( geodetic_position_v );
107     init_vec( euler_angles_v );
108     init_vec( d_cg_rwy_local_v );     
109     init_vec( d_cg_rwy_rwy_v );       
110     init_vec( d_pilot_rwy_local_v );  
111     init_vec( d_pilot_rwy_rwy_v );    
112     init_vec( t_local_to_body_m[0] );
113     init_vec( t_local_to_body_m[1] );
114     init_vec( t_local_to_body_m[2] );
115     
116     mass=i_xx=i_yy=i_zz=i_xz=0;
117     nlf=0;  
118     v_rel_wind=v_true_kts=v_rel_ground=v_inertial=0;
119     v_ground_speed=v_equiv=v_equiv_kts=0;
120     v_calibrated=v_calibrated_kts=0;
121     gravity=0;            
122     centrifugal_relief=0; 
123     alpha=beta=alpha_dot=beta_dot=0;   
124     cos_alpha=sin_alpha=cos_beta=sin_beta=0;
125     cos_phi=sin_phi=cos_theta=sin_theta=cos_psi=sin_psi=0;
126     gamma_vert_rad=gamma_horiz_rad=0;    
127     sigma=density=v_sound=mach_number=0;
128     static_pressure=total_pressure=impact_pressure=0;
129     dynamic_pressure=0;
130     static_temperature=total_temperature=0;
131     sea_level_radius=earth_position_angle=0;
132     runway_altitude=runway_latitude=runway_longitude=0;
133     runway_heading=0;
134     radius_to_rwy=0;
135     climb_rate=0;           
136     sin_lat_geocentric=cos_lat_geocentric=0;
137     sin_latitude=cos_latitude=0;
138     sin_longitude=cos_longitude=0;
139     altitude_agl=0;
140
141     resetNeeded=false;
142 }  
143
144
145 // Destructor
146 FGInterface::~FGInterface() {
147 }
148
149
150 bool FGInterface::init( double dt ) {
151     cout << "dummy init() ... SHOULDN'T BE CALLED!" << endl;
152     return false;
153 }
154
155
156 bool FGInterface::update( int multi_loop ) {
157     cout << "dummy update() ... SHOULDN'T BE CALLED!" << endl;
158     return false;
159 }
160
161
162 // Extrapolate fdm based on time_offset (in usec)
163 void FGInterface::extrapolate( int time_offset ) {
164     double dt = time_offset / 1000000.0;
165
166     // -dw- metrowerks complains about ambiguous access, not critical
167     // to keep this ;)
168 #ifndef __MWERKS__
169     cout << "extrapolating FDM by dt = " << dt << endl;
170 #endif
171
172     double lat = geodetic_position_v[0] + geocentric_rates_v[0] * dt;
173     double lat_geoc = geocentric_position_v[0] + geocentric_rates_v[0] * dt;
174
175     double lon = geodetic_position_v[1] + geocentric_rates_v[1] * dt;
176     double lon_geoc = geocentric_position_v[1] + geocentric_rates_v[1] * dt;
177
178     double alt = geodetic_position_v[2] + geocentric_rates_v[2] * dt;
179     double radius = geocentric_position_v[2] + geocentric_rates_v[2] * dt;
180
181     geodetic_position_v[0] = lat;
182     geocentric_position_v[0] = lat_geoc;
183
184     geodetic_position_v[1] = lon;
185     geocentric_position_v[1] = lon_geoc;
186
187     geodetic_position_v[2] = alt;
188     geocentric_position_v[2] = radius;
189 }
190
191
192 // Set the altitude (force)
193 void fgFDMForceAltitude(int model, double alt_meters) {
194     double sea_level_radius_meters;
195     double lat_geoc;
196
197     // Set the FG variables first
198     sgGeodToGeoc( base_fdm_state.get_Latitude(), alt_meters, 
199                   &sea_level_radius_meters, &lat_geoc);
200
201     base_fdm_state.set_Altitude( alt_meters * METER_TO_FEET );
202     base_fdm_state.set_Sea_level_radius( sea_level_radius_meters *
203                                          METER_TO_FEET ); 
204                                           
205
206     // additional work needed for some flight models
207     if ( model == FGInterface::FG_LARCSIM ) {
208         ls_ForceAltitude( base_fdm_state.get_Altitude() );
209     }
210 }
211
212
213 // Set the local ground elevation
214 void fgFDMSetGroundElevation(int model, double ground_meters) {
215     FG_LOG( FG_FLIGHT,FG_INFO, "fgFDMSetGroundElevation: "
216             << ground_meters*METER_TO_FEET ); 
217     base_fdm_state.set_Runway_altitude( ground_meters * METER_TO_FEET );
218     cur_fdm_state->set_Runway_altitude( ground_meters * METER_TO_FEET );
219 }
220
221
222 // Positions
223 void FGInterface::set_Latitude(double lat) { 
224     geodetic_position_v[0] = lat;
225 }  
226
227 void FGInterface::set_Longitude(double lon) {
228     geodetic_position_v[1] = lon;
229 }       
230
231 void FGInterface::set_Altitude(double alt) {
232     geodetic_position_v[2] = alt;
233 }          
234
235 void FGInterface::set_AltitudeAGL(double altagl) {
236     altitude_agl=altagl;
237 }  
238
239 // Velocities
240 void FGInterface::set_V_calibrated_kts(double vc) {
241     v_calibrated_kts = vc;
242 }  
243
244 void FGInterface::set_Mach_number(double mach) {
245     mach_number = mach;
246 }  
247
248 void FGInterface::set_Velocities_Local( double north, 
249                                         double east, 
250                                         double down ){
251     v_local_v[0] = north;
252     v_local_v[1] = east;
253     v_local_v[2] = down;                                                 
254 }  
255
256 void FGInterface::set_Velocities_Wind_Body( double u, 
257                                             double v, 
258                                             double w){
259     v_wind_body_v[0] = u;
260     v_wind_body_v[1] = v;
261     v_wind_body_v[2] = w;
262
263
264 // Euler angles 
265 void FGInterface::set_Euler_Angles( double phi, 
266                                     double theta, 
267                                     double psi ) {
268     euler_angles_v[0] = phi;
269     euler_angles_v[1] = theta;
270     euler_angles_v[2] = psi;                                            
271 }  
272
273 // Flight Path
274 void FGInterface::set_Climb_Rate( double roc) {
275     climb_rate = roc;
276 }  
277
278 void FGInterface::set_Gamma_vert_rad( double gamma) {
279     gamma_vert_rad = gamma;
280 }  
281
282 // Earth
283 void FGInterface::set_Sea_level_radius(double slr) {
284     sea_level_radius = slr;
285 }  
286
287 void FGInterface::set_Runway_altitude(double ralt) {
288     runway_altitude = ralt;
289 }  
290
291 void FGInterface::set_Static_pressure(double p) { static_pressure = p; }
292 void FGInterface::set_Static_temperature(double T) { static_temperature = T; }
293 void FGInterface::set_Density(double rho) { density = rho; }
294
295 void FGInterface::set_Velocities_Local_Airmass (double wnorth, 
296                                                 double weast, 
297                                                 double wdown ) {
298     v_local_airmass_v[0] = wnorth;
299     v_local_airmass_v[1] = weast;
300     v_local_airmass_v[2] = wdown;
301 }     
302
303
304 void FGInterface::busdump(void) {
305
306     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]);
307     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]);
308     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]);
309     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]);
310     FG_LOG(FG_FLIGHT,FG_INFO,"f_aero_v[3]: " << f_aero_v[0] << ", " << f_aero_v[1] << ", " << f_aero_v[2]);
311     FG_LOG(FG_FLIGHT,FG_INFO,"f_engine_v[3]: " << f_engine_v[0] << ", " << f_engine_v[1] << ", " << f_engine_v[2]);
312     FG_LOG(FG_FLIGHT,FG_INFO,"f_gear_v[3]: " << f_gear_v[0] << ", " << f_gear_v[1] << ", " << f_gear_v[2]);
313     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]);
314     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]);
315     FG_LOG(FG_FLIGHT,FG_INFO,"m_aero_v[3]: " << m_aero_v[0] << ", " << m_aero_v[1] << ", " << m_aero_v[2]);
316     FG_LOG(FG_FLIGHT,FG_INFO,"m_engine_v[3]: " << m_engine_v[0] << ", " << m_engine_v[1] << ", " << m_engine_v[2]);
317     FG_LOG(FG_FLIGHT,FG_INFO,"m_gear_v[3]: " << m_gear_v[0] << ", " << m_gear_v[1] << ", " << m_gear_v[2]);
318     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]);
319     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]);
320     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]);
321     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]);
322     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]);
323     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]);
324     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]);
325     FG_LOG(FG_FLIGHT,FG_INFO,"v_local_v[3]: " << v_local_v[0] << ", " << v_local_v[1] << ", " << v_local_v[2]);
326     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]);
327     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]);
328     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]);
329     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]);
330     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]);
331     FG_LOG(FG_FLIGHT,FG_INFO,"omega_body_v[3]: " << omega_body_v[0] << ", " << omega_body_v[1] << ", " << omega_body_v[2]);
332     FG_LOG(FG_FLIGHT,FG_INFO,"omega_local_v[3]: " << omega_local_v[0] << ", " << omega_local_v[1] << ", " << omega_local_v[2]);
333     FG_LOG(FG_FLIGHT,FG_INFO,"omega_total_v[3]: " << omega_total_v[0] << ", " << omega_total_v[1] << ", " << omega_total_v[2]);
334     FG_LOG(FG_FLIGHT,FG_INFO,"euler_rates_v[3]: " << euler_rates_v[0] << ", " << euler_rates_v[1] << ", " << euler_rates_v[2]);
335     FG_LOG(FG_FLIGHT,FG_INFO,"geocentric_rates_v[3]: " << geocentric_rates_v[0] << ", " << geocentric_rates_v[1] << ", " << geocentric_rates_v[2]);
336     FG_LOG(FG_FLIGHT,FG_INFO,"geocentric_position_v[3]: " << geocentric_position_v[0] << ", " << geocentric_position_v[1] << ", " << geocentric_position_v[2]);
337     FG_LOG(FG_FLIGHT,FG_INFO,"geodetic_position_v[3]: " << geodetic_position_v[0] << ", " << geodetic_position_v[1] << ", " << geodetic_position_v[2]);
338     FG_LOG(FG_FLIGHT,FG_INFO,"euler_angles_v[3]: " << euler_angles_v[0] << ", " << euler_angles_v[1] << ", " << euler_angles_v[2]);
339     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]);
340     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]);
341     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]);
342     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]);
343   
344     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]);
345     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]);
346     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]);
347
348     FG_LOG(FG_FLIGHT,FG_INFO,"mass: " << mass );
349     FG_LOG(FG_FLIGHT,FG_INFO,"i_xx: " << i_xx );
350     FG_LOG(FG_FLIGHT,FG_INFO,"i_yy: " << i_yy );
351     FG_LOG(FG_FLIGHT,FG_INFO,"i_zz: " << i_zz );
352     FG_LOG(FG_FLIGHT,FG_INFO,"i_xz: " << i_xz );
353     FG_LOG(FG_FLIGHT,FG_INFO,"nlf: " << nlf );
354     FG_LOG(FG_FLIGHT,FG_INFO,"v_rel_wind: " << v_rel_wind );
355     FG_LOG(FG_FLIGHT,FG_INFO,"v_true_kts: " << v_true_kts );
356     FG_LOG(FG_FLIGHT,FG_INFO,"v_rel_ground: " << v_rel_ground );
357     FG_LOG(FG_FLIGHT,FG_INFO,"v_inertial: " << v_inertial );
358     FG_LOG(FG_FLIGHT,FG_INFO,"v_ground_speed: " << v_ground_speed );
359     FG_LOG(FG_FLIGHT,FG_INFO,"v_equiv: " << v_equiv );
360     FG_LOG(FG_FLIGHT,FG_INFO,"v_equiv_kts: " << v_equiv_kts );
361     FG_LOG(FG_FLIGHT,FG_INFO,"v_calibrated: " << v_calibrated );
362     FG_LOG(FG_FLIGHT,FG_INFO,"v_calibrated_kts: " << v_calibrated_kts );
363     FG_LOG(FG_FLIGHT,FG_INFO,"gravity: " << gravity );
364     FG_LOG(FG_FLIGHT,FG_INFO,"centrifugal_relief: " << centrifugal_relief );
365     FG_LOG(FG_FLIGHT,FG_INFO,"alpha: " << alpha );
366     FG_LOG(FG_FLIGHT,FG_INFO,"beta: " << beta );
367     FG_LOG(FG_FLIGHT,FG_INFO,"alpha_dot: " << alpha_dot );
368     FG_LOG(FG_FLIGHT,FG_INFO,"beta_dot: " << beta_dot );
369     FG_LOG(FG_FLIGHT,FG_INFO,"cos_alpha: " << cos_alpha );
370     FG_LOG(FG_FLIGHT,FG_INFO,"sin_alpha: " << sin_alpha );
371     FG_LOG(FG_FLIGHT,FG_INFO,"cos_beta: " << cos_beta );
372     FG_LOG(FG_FLIGHT,FG_INFO,"sin_beta: " << sin_beta );
373     FG_LOG(FG_FLIGHT,FG_INFO,"cos_phi: " << cos_phi );
374     FG_LOG(FG_FLIGHT,FG_INFO,"sin_phi: " << sin_phi );
375     FG_LOG(FG_FLIGHT,FG_INFO,"cos_theta: " << cos_theta );
376     FG_LOG(FG_FLIGHT,FG_INFO,"sin_theta: " << sin_theta );
377     FG_LOG(FG_FLIGHT,FG_INFO,"cos_psi: " << cos_psi );
378     FG_LOG(FG_FLIGHT,FG_INFO,"sin_psi: " << sin_psi );
379     FG_LOG(FG_FLIGHT,FG_INFO,"gamma_vert_rad: " << gamma_vert_rad );
380     FG_LOG(FG_FLIGHT,FG_INFO,"gamma_horiz_rad: " << gamma_horiz_rad );
381     FG_LOG(FG_FLIGHT,FG_INFO,"sigma: " << sigma );
382     FG_LOG(FG_FLIGHT,FG_INFO,"density: " << density );
383     FG_LOG(FG_FLIGHT,FG_INFO,"v_sound: " << v_sound );
384     FG_LOG(FG_FLIGHT,FG_INFO,"mach_number: " << mach_number );
385     FG_LOG(FG_FLIGHT,FG_INFO,"static_pressure: " << static_pressure );
386     FG_LOG(FG_FLIGHT,FG_INFO,"total_pressure: " << total_pressure );
387     FG_LOG(FG_FLIGHT,FG_INFO,"impact_pressure: " << impact_pressure );
388     FG_LOG(FG_FLIGHT,FG_INFO,"dynamic_pressure: " << dynamic_pressure );
389     FG_LOG(FG_FLIGHT,FG_INFO,"static_temperature: " << static_temperature );
390     FG_LOG(FG_FLIGHT,FG_INFO,"total_temperature: " << total_temperature );
391     FG_LOG(FG_FLIGHT,FG_INFO,"sea_level_radius: " << sea_level_radius );
392     FG_LOG(FG_FLIGHT,FG_INFO,"earth_position_angle: " << earth_position_angle );
393     FG_LOG(FG_FLIGHT,FG_INFO,"runway_altitude: " << runway_altitude );
394     FG_LOG(FG_FLIGHT,FG_INFO,"runway_latitude: " << runway_latitude );
395     FG_LOG(FG_FLIGHT,FG_INFO,"runway_longitude: " << runway_longitude );
396     FG_LOG(FG_FLIGHT,FG_INFO,"runway_heading: " << runway_heading );
397     FG_LOG(FG_FLIGHT,FG_INFO,"radius_to_rwy: " << radius_to_rwy );
398     FG_LOG(FG_FLIGHT,FG_INFO,"climb_rate: " << climb_rate );
399     FG_LOG(FG_FLIGHT,FG_INFO,"sin_lat_geocentric: " << sin_lat_geocentric );
400     FG_LOG(FG_FLIGHT,FG_INFO,"cos_lat_geocentric: " << cos_lat_geocentric );
401     FG_LOG(FG_FLIGHT,FG_INFO,"sin_longitude: " << sin_longitude );
402     FG_LOG(FG_FLIGHT,FG_INFO,"cos_longitude: " << cos_longitude );
403     FG_LOG(FG_FLIGHT,FG_INFO,"sin_latitude: " << sin_latitude );
404     FG_LOG(FG_FLIGHT,FG_INFO,"cos_latitude: " << cos_latitude );
405     FG_LOG(FG_FLIGHT,FG_INFO,"altitude_agl: " << altitude_agl );
406 }  
407