-dnl aclocal.m4 generated automatically by aclocal 1.4
+dnl aclocal.m4 generated automatically by aclocal 1.4-p4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
// gear, its initialization call should located in this routine.
// Returns non-zero if a problem encountered.
bool fgInitSubsystems( void ) {
+ static const SGPropertyNode *longitude
+ = fgGetNode("/position/longitude-deg");
+ static const SGPropertyNode *latitude
+ = fgGetNode("/position/latitude-deg");
+ static const SGPropertyNode *altitude
+ = fgGetNode("/position/altitude-ft");
+
fgLIGHT *l = &cur_light_params;
SG_LOG( SG_GENERAL, SG_INFO, "Initialize Subsystems");
FGViewerRPH *pilot_view =
(FGViewerRPH *)globals->get_viewmgr()->get_view( 0 );
- pilot_view->set_geod_view_pos( cur_fdm_state->get_Longitude(),
- cur_fdm_state->get_Lat_geocentric(),
- cur_fdm_state->get_Altitude() *
- SG_FEET_TO_METER );
- pilot_view->set_sea_level_radius( cur_fdm_state->get_Sea_level_radius() *
- SG_FEET_TO_METER );
+ pilot_view->set_geod_view_pos( longitude->getDoubleValue()
+ * SGD_DEGREES_TO_RADIANS,
+ latitude->getDoubleValue()
+ * SGD_DEGREES_TO_RADIANS,
+ altitude->getDoubleValue()
+ * SG_FEET_TO_METER );
pilot_view->set_rph( cur_fdm_state->get_Phi(),
cur_fdm_state->get_Theta(),
cur_fdm_state->get_Psi() );
cur_fdm_state->get_Runway_altitude() * SG_FEET_TO_METER,
cur_fdm_state->get_Altitude() * SG_FEET_TO_METER); */
- if ( scenery.get_cur_elev() > -9990 ) {
+ if ( scenery.get_cur_elev() > -9990 && cur_fdm_state->get_inited() ) {
if ( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER <
(scenery.get_cur_elev() + alt_adjust_m - 3.0) ) {
// now set aircraft altitude above ground
// chunks. If the chunk isn't already in the cache, then read it from
// disk.
int FGTileMgr::update( double lon, double lat ) {
- SG_LOG( SG_TERRAIN, SG_INFO, "FGTileMgr::update() for " << lon << " " << lat );
+ SG_LOG( SG_TERRAIN, SG_DEBUG, "FGTileMgr::update() for "
+ << lon << " " << lat );
longitude = lon;
latitude = lat;
scenery.set_cur_normal( tmp_normal );
} else {
scenery.set_cur_elev( -9999.0 );
- }
+ }
+ // cout << "Current elevation = " << scenery.get_cur_elev() << endl;
#if 0
}
#endif