e->set_MaxHP( eng.get_MaxHP() );
e->set_Percentage_Power( eng.get_Percentage_Power() );
e->set_EGT( eng.get_EGT() );
+ e->set_CHT( eng.get_CHT() );
e->set_prop_thrust( eng.get_prop_thrust_SI() );
#if 0
double MaxHP;
double Percentage_Power;
double EGT;
+ double CHT;
double prop_thrust;
/* others...
inline double get_MaxHP() const { return MaxHP; }
inline double get_Percentage_Power() const { return Percentage_Power; }
inline double get_EGT() const { return EGT; }
+ inline double get_CHT() const { return CHT; }
inline double get_prop_thrust() const { return prop_thrust; }
inline void set_Throttle( double t ) { Throttle = t; }
inline void set_MaxHP( double hp ) { MaxHP = hp; }
inline void set_Percentage_Power( double p ) { Percentage_Power = p; }
inline void set_EGT( double e ) { EGT = e; }
+ inline void set_CHT( double c ) { CHT = c; }
inline void set_prop_thrust( double t ) { prop_thrust = t; }
};
getRPM, 0);
current_properties.tieDouble("/engines/engine0/egt",
getEGT, 0);
+ current_properties.tieDouble("/engines/engine0/cht",
+ getCHT, 0);
// Velocities
current_properties.tieDouble("/velocities/airspeed",
}
+/**
+ * Return the current engine0 CHT.
+ */
+double
+FGBFI::getCHT ()
+{
+ if ( current_aircraft.fdm_state->get_engine(0) != NULL ) {
+ return current_aircraft.fdm_state->get_engine(0)->get_CHT();
+ }
+}
+
+
\f
////////////////////////////////////////////////////////////////////////
// Velocities
static double getRPM ();
static void setRPM ( double rpm );
static double getEGT ();
+ static double getCHT ();
// Velocities
static double getAirspeed ();
cur_fdm_state->get_Theta(),
cur_fdm_state->get_Psi() );
+ // set current view to 0 (first) which is our main pilot view
+ globals->set_current_view( pilot_view );
+
FG_LOG( FG_GENERAL, FG_DEBUG, " abs_view_pos = "
<< globals->get_current_view()->get_abs_view_pos());
cur_fdm_state->get_Theta(),
cur_fdm_state->get_Psi() );
+ // set current view to 0 (first) which is our main pilot view
+ globals->set_current_view( pilot_view );
+
FG_LOG( FG_GENERAL, FG_DEBUG, " abs_view_pos = "
<< globals->get_current_view()->get_abs_view_pos());
fgUpdateSkyAndLightingParams();
return;
case 118: // v key
-// globals->get_options()->cycle_view_mode();
+ globals->set_current_view( globals->get_viewmgr()->next_view() );
+#if 0
+ // globals->get_options()->cycle_view_mode();
if ( globals->get_options()->get_view_mode() ==
FGOptions::FG_VIEW_FOLLOW )
{
v->set_view_offset( FG_PI * 1.75 );
globals->get_current_view()->set_pilot_offset(25.0, -25.0, 1.0);
}
+#endif
fgReshape( globals->get_options()->get_xsize(),
globals->get_options()->get_ysize() );
return;
cur_fdm_state->get_Theta(),
cur_fdm_state->get_Psi() );
+ FGViewerLookAt *chase_view =
+ (FGViewerLookAt *)globals->get_viewmgr()->get_view( 1 );
+
+ sgVec3 po; // chase view pilot_offset
+ sgVec3 wup; // chase view world up
+ sgCopyVec3( po, chase_view->get_pilot_offset() );
+ sgCopyVec3( wup, chase_view->get_world_up() );
+ sgMat4 CXFM; // chase view + pilot offset xform
+ sgMakeRotMat4( CXFM, cur_fdm_state->get_Psi() * RAD_TO_DEG, wup );
+ sgVec3 npo; // new pilot offset after rotation
+ sgXformVec3( npo, po, CXFM );
+
+ chase_view->set_geod_view_pos( cur_fdm_state->get_Longitude(),
+ cur_fdm_state->get_Lat_geocentric(),
+ cur_fdm_state->get_Altitude() *
+ FEET_TO_METER );
+ chase_view->set_pilot_offset( npo[0], npo[1], npo[2] );
+ sgVec3 negpo;
+ sgNegateVec3( negpo, npo );
+ chase_view->set_view_forward( negpo );
+ chase_view->set_view_up( wup );
+
#if 0
// this is a test, we are trying to match RPH and LookAt
// matrices
FGViewerRPH *pv = new FGViewerRPH;
globals->get_viewmgr()->add_view( pv );
- globals->set_current_view( pv );
+
+ FGViewerLookAt *chase = new FGViewerLookAt;
+ globals->get_viewmgr()->add_view( chase );
+
+ // set current view to 0 (first) which is our main pilot view
+ globals->set_current_view( globals->get_viewmgr()->get_view( 0 ) );
// Scan the config file(s) and command line options to see if
// fg_root was specified (ignore all other options for now)
// getters
inline int size() const { return views.size(); }
+ inline FGViewer *get_view() {
+ return views[current];
+ }
inline FGViewer *get_view( int i ) {
if ( i < 0 ) { i = 0; }
if ( i >= (int)views.size() ) { i = views.size() - 1; }