// schedule a needed buckets for loading
void FGTileMgr::schedule_needed() {
- cout << "scheduling needed tiles for " << longitude << " " << latitude << endl;
+ // sanity check (unfortunately needed!)
+ if ( longitude < -180.0 || longitude > 180.0
+ || latitude < -90.0 || latitude > 90.0 )
+ {
+ SG_LOG( SG_TERRAIN, SG_ALERT,
+ "Attempting to schedule tiles for bogus latitude and" );
+ SG_LOG( SG_TERRAIN, SG_ALERT,
+ "longitude. This is a FATAL error. Exiting!" );
+ exit(-1);
+ }
+
+ SG_LOG( SG_TERRAIN, SG_INFO,
+ "scheduling needed tiles for " << longitude << " " << latitude );
+
#ifndef FG_OLD_WEATHER
if ( WeatherDatabase != NULL ) {
vis = WeatherDatabase->getWeatherVisibility();
// 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