Spacecraft Control Framework 1.0
Spacecraft Control Library
Public Member Functions | Static Public Member Functions | List of all members
sc_earth_elevation Class Reference

Manages requests for earth elevation. More...

#include <sc_earth_elevation.h>

Public Member Functions

 sc_earth_elevation (const char *pathToDemFiles)
 constructor More...
 
 ~sc_earth_elevation ()
 destructor More...
 
double elevationForLatLon (double lat, double lon)
 Return an approximate land elevation for the given actual lat & lon (degrees) - return value in km. More...
 
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. More...
 
bool hasLandInGridSquare (double lat, double lon, ElevationPrecision gridSize)
 Returns true if there is any land in the grid square containing the lat/lon. More...
 

Static Public Member Functions

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

Detailed Description

Manages requests for earth elevation.

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::sc_earth_elevation ( const char *  pathToDemFiles)

constructor

Constructor.

Parameters
pathToDemFilespath where DEM files can be found

Referenced by default_manager().

◆ ~sc_earth_elevation()

sc_earth_elevation::~sc_earth_elevation ( )

destructor

Destructor.

Member Function Documentation

◆ default_manager()

sc_earth_elevation * sc_earth_elevation::default_manager ( )
static

Get a default singleton manager which uses the maps at the default location kDefaultElevationMapsPath.

Return the singleton elevation manager object.

References sc_earth_elevation().

Referenced by earth_surface_ef_pos(), and earth_surface_elevation().

◆ elevationForLatLon()

double sc_earth_elevation::elevationForLatLon ( double  lat,
double  lon 
)

Return an approximate land elevation for the given actual lat & lon (degrees) - return value in km.

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().

◆ elevationForEFPos()

double sc_earth_elevation::elevationForEFPos ( const ml_matrix &  efPos,
double  f = FLATTENING_FACTOR 
)

Return an approximate land elevation for the given EF coordinate position - return value in km.

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(), and pos_to_lat_lon_alt().

Referenced by earth_surface_ef_pos(), and earth_surface_elevation().

◆ hasLandInGridSquare()

bool sc_earth_elevation::hasLandInGridSquare ( double  lat,
double  lon,
ElevationPrecision  gridSize 
)

Returns true if there is any land in the grid square containing the lat/lon.

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().