// explicitely. lat & lon are in radians. abs_view_pos in meters.
// Returns result in meters.
double
-fgTileMgrCurElev( const fgBUCKET& p ) {
+fgTileMgrCurElevNEW( const fgBUCKET& p ) {
fgTILE *t;
fgFRAGMENT *frag_ptr;
Point3D abs_view_pos = current_view.get_abs_view_pos();
}
}
- cout << "(new) no terrain intersection found\n";
+ FG_LOG( FG_TERRAIN, FG_INFO, "(new) no terrain intersection found" );
+
return 0.0;
}
// explicitely. lat & lon are in radians. abs_view_pos in meters.
// Returns result in meters.
double
-fgTileMgrCurElevOLD( double lon, double lat, const Point3D& abs_view_pos ) {
+fgTileMgrCurElev( double lon, double lat, const Point3D& abs_view_pos ) {
fgTILECACHE *c;
fgTILE *t;
// fgVIEW *v;
local_up[1] = abs_view_pos.y();
local_up[2] = abs_view_pos.z();
+ FG_LOG( FG_TERRAIN, FG_DEBUG, "Absolute view pos = " << abs_view_pos );
+
// Find current translation offset
fgBucketFind(lon * RAD_TO_DEG, lat * RAD_TO_DEG, &p);
index = c->exists(p);
scenery.next_center = t->center;
- // earth_center = Point3D(0.0, 0.0, 0.0);
-
FG_LOG( FG_TERRAIN, FG_DEBUG,
"Pos = (" << lon * RAD_TO_DEG << ", " << lat * RAD_TO_DEG
<< ") Current bucket = " << p
}
}
- cout << "(old) no terrain intersection found\n";
+ FG_LOG( FG_TERRAIN, FG_INFO, "(old) no terrain intersection found" );
+
return 0.0;
}
// First time through, initialize the system and load all
// relavant tiles
+ FG_LOG( FG_TERRAIN, FG_INFO, "Updating Tile list for " << p1 );
FG_LOG( FG_TERRAIN, FG_INFO, " First time through ... " );
FG_LOG( FG_TERRAIN, FG_INFO, " Updating Tile list for " << p1 );
FG_LOG( FG_TERRAIN, FG_INFO, " Loading "
}
// find our current elevation (feed in the current bucket to save work)
- scenery.cur_elev = fgTileMgrCurElev( p1 );
+ Point3D geod_pos = Point3D( f->get_Longitude(), f->get_Latitude(), 0.0);
+ Point3D tmp_abs_view_pos = fgGeodToCart(geod_pos);
+
+ scenery.cur_elev =
+ fgTileMgrCurElev( f->get_Longitude(), f->get_Latitude(),
+ tmp_abs_view_pos );
p_last.lon = p1.lon;
p_last.lat = p1.lat;
// $Log$
+// Revision 1.52 1999/01/27 04:49:48 curt
+// Fixes so that the sim can start out at an airport below sea level.
+//
// Revision 1.51 1998/12/09 18:50:33 curt
// Converted "class fgVIEW" to "class FGView" and updated to make data
// members private and make required accessor functions.
// render the scene, but we'd also like to be able to do this
// explicitely. lat & lon are in radians. abs_view_pos in meters.
// Returns result in meters.
-double fgTileMgrCurElev( const fgBUCKET& p );
-double fgTileMgrCurElevOLD( double lon, double lat, const Point3D& abs_view_pos );
+double fgTileMgrCurElevNEW( const fgBUCKET& p );
+double fgTileMgrCurElev( double lon, double lat, const Point3D& abs_view_pos );
// Render the local tiles --- hack, hack, hack
// $Log$
+// Revision 1.7 1999/01/27 04:49:49 curt
+// Fixes so that the sim can start out at an airport below sea level.
+//
// Revision 1.6 1998/12/03 01:18:19 curt
// Converted fgFLIGHT to a class.
// Tweaks for Sun Portability.