1
0
Fork 0

Tweaks to get startup time, relative sun angle, sky colors, etc. to be

properly initialized.
This commit is contained in:
curt 2001-11-07 04:55:57 +00:00
parent 5fe0f04702
commit e19d456716
4 changed files with 19 additions and 10 deletions

2
aclocal.m4 vendored
View file

@ -1,4 +1,4 @@
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

View file

@ -487,6 +487,13 @@ bool fgInitGeneral( void ) {
// 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");
@ -600,12 +607,12 @@ bool fgInitSubsystems( void ) {
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() );

View file

@ -1095,7 +1095,7 @@ static void fgMainLoop( void ) {
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

View file

@ -251,7 +251,8 @@ void FGTileMgr::initialize_queue()
// 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;
@ -381,7 +382,8 @@ int FGTileMgr::update( double lon, double 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