Public Member Functions | Static Public Member Functions

sc_earth_elevation Class Reference

Manages requests for earth elevation. More...

List of all members.

Public Member Functions

 sc_earth_elevation (const char *pathToDemFiles)
 constructor
 ~sc_earth_elevation ()
 destructor
double elevationForLatLon (double lat, double lon)
 Return an approximate land elevation for the given actual lat & lon (degrees) - return value in km.
double elevationForEFPos (const ml_matrix &efPos, double f=FLATTENING_FACTOR)
 Return an approximate land elevation for the given EF coordinate position - return value in km.
bool hasLandInGridSquare (double lat, double lon, ElevationPrecision gridSize)
 Returns true if there is any land in the grid square containing the lat/lon.

Static Public Member Functions

static sc_earth_elevationdefault_manager ()
 Get a default singleton manager which uses the maps at the default location kDefaultElevationMapsPath.

Detailed Description

sc_earth_elevation manages requests for land elevation at particular lat/lon locations by passing the request to the correct sc_earth_elevation_square. Can also determine if there is land at a particular location.


Constructor & Destructor Documentation

sc_earth_elevation::sc_earth_elevation ( const char *  pathToDemFiles )

Constructor.

Parameters:
pathToDemFilespath where DEM files can be found

Referenced by default_manager().

sc_earth_elevation::~sc_earth_elevation (  )

Destructor.


Member Function Documentation

sc_earth_elevation * sc_earth_elevation::default_manager (  ) [static]

Return the singleton elevation manager object.

References sc_earth_elevation().

Referenced by earth_surface_ef_pos(), and earth_surface_elevation().

double sc_earth_elevation::elevationForLatLon ( double  lat,
double  lon 
)
Parameters:
latlatitude (degrees -90 to 90)
lonlongitude (degrees -180 to 180)
Returns:
approximate land elevation in km for the given lat/lon (degrees)

References sc_earth_elevation_square::elevationForLatLon().

Referenced by earth_surface_elevation(), and elevationForEFPos().

double sc_earth_elevation::elevationForEFPos ( const ml_matrix &  efPos,
double  f = FLATTENING_FACTOR 
)
Parameters:
efPosa 3x1 position in the EF coordinate system (Earth Fixed)
fFlattening factor
Returns:
approximate late elevation in km for the given EF coordinate position

References elevationForLatLon().

Referenced by earth_surface_ef_pos(), and earth_surface_elevation().

bool sc_earth_elevation::hasLandInGridSquare ( double  lat,
double  lon,
ElevationPrecision  gridSize 
)
Parameters:
latlatitude (degrees -90 to 90)
lonlongitude (degrees -180 to 180)
gridSizesize of grid square
Returns:
true if the grid square containing the given lat/lon contains any land

References sc_earth_elevation_square::hasLandInGridSquare().