|
World Ocean Simulation System (WOSS) library
|
Coordinates (lat, long) class definitions and functions library. More...
#include <coordinates-definitions.h>


Public Member Functions | |
| Coord (double lat=COORD_NOT_SET_VALUE, double lon=COORD_NOT_SET_VALUE) | |
| Coord (const Coord ©) | |
| void | setLatitude (double lat) |
| void | setLongitude (double lon) |
| virtual bool | isValid () const |
| double | getLatitude () const |
| double | getLongitude () const |
| int | getMarsdenSquare () const |
| int | getMarsdenOneDegreeSquare () const |
| MarsdenCoord | getMarsdenCoord () const |
| double | getInitialBearing (const Coord &destination) const |
| double | getFinalBearing (const Coord &destination) const |
| double | getGreatCircleDistance (const Coord &destination, double depth=0) const |
| Coord & | operator= (const Coord ©) |
| friend::std::ostream & | operator<< (::std::ostream &os, const Coord &instance) |
Static Public Member Functions | |
| static const Coord | getCoordFromBearing (const Coord &start_coord, double bearing, double distance, double depth=0.0) |
| static const Coord | getCoordAlongGreatCircle (const Coord &start_coord, const Coord &end_coord, double distance, double depth=0.0) |
| static const Coord | getCoordFromUtmWgs84 (double easting, double northing, double utm_zone_number, UtmZoneChar utm_zone_char) |
Protected Member Functions | |
| void | updateMarsdenCoord () |
Static Protected Member Functions | |
| static bool | isValidUtmZoneChar (UtmZoneChar utm_zone_char) |
Protected Attributes | |
| double | latitude |
| double | longitude |
| int | marsden_square |
| int | marsden_one_degree |
Friends | |
| const Coord | operator+ (const Coord &left, const Coord &right) |
| const Coord | operator- (const Coord &left, const Coord &right) |
| Coord & | operator+= (Coord &left, const Coord &right) |
| Coord & | operator-= (Coord &left, const Coord &right) |
| bool | operator== (const Coord &left, const Coord &right) |
| bool | operator!= (const Coord &left, const Coord &right) |
| bool | operator> (const Coord &left, const Coord &right) |
| bool | operator< (const Coord &left, const Coord &right) |
| bool | operator>= (const Coord &left, const Coord &right) |
| bool | operator<= (const Coord &left, const Coord &right) |
Coordinates (lat, long) class definitions and functions library.
Coord class stores a double decimal degree latitude and double decimal degree longitude. It has a reach library for Marsden coordinates, distance, bearing and arithmetic calculations. This class has virtual methods for the sole purpose of CoordZ inheritance.
| Coord::Coord | ( | double | lat = COORD_NOT_SET_VALUE, |
| double | lon = COORD_NOT_SET_VALUE |
||
| ) |
Coord constructor.
| lat | decimal degree latitude value. Default value makes the instance not valid |
| lon | decimal degree longitude value. Default value makes the instance not valid |
References updateMarsdenCoord().

| Coord::Coord | ( | const Coord & | copy | ) |
Coord copy constructor.
| copy | Coord to be copied |
References latitude, longitude, and updateMarsdenCoord().

|
static |
Gets destination Cood given bearing and distance from a start Coord, travelling along a (shortest distance) great circle arc of given depth to end Coord
| start_coord | valid start Coord instance |
| end_coord | valid end Coord instance |
| distance | distance measured in meters |
| depth | depth measured in meters |
References getCoordFromBearing(), and getInitialBearing().
Referenced by woss::CoordZ::getCoordZAlongGreatCircle().

|
static |
Gets destination Cood given bearing and distance from a start Coord, travelling along a (shortest distance) great circle arc of given depth
| start_coord | valid start Coord instance |
| bearing | bearing measured in radians |
| distance | distance measured in meters |
| depth | depth measured in meters |
References EARTH_RADIUS, isValid(), latitude, and longitude.
Referenced by getCoordAlongGreatCircle(), and woss::ACToolboxWoss::initCoordZVector().

|
static |
Gets destination Cood given easting and northing in UTM - WGS84 coordinates
| easting | valid easting relative to central UTM zone meridian |
| end_coord | valid northing |
| utm_zone_number | validzone number |
| utm_zone_char | validzone character |
References EARTH_SEMIMAJOR_AXIS, EARTH_WGS84_POLAR_RADIUS, isValidUtmZoneChar(), latitude, and longitude.

| double Coord::getFinalBearing | ( | const Coord & | destination | ) | const |
Gets the final bearing of a trajectory
| destination | destination Coord instance |
References getInitialBearing().

| double Coord::getGreatCircleDistance | ( | const Coord & | destination, |
| double | depth = 0 |
||
| ) | const |
Gets calculates great-circle distances between the two points – that is, the shortest distance over the earth’s surface – using the ‘Haversine’ formula
| destination | valid destination Coord instance |
References EARTH_RADIUS, isValid(), latitude, and longitude.
Referenced by woss::CoordZ::getCoordZAlongGreatCircle(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::ACToolboxWoss::initAltimetry(), woss::Woss::initialize(), and woss::WossDbManager::RangeOperator::operator()().

| double Coord::getInitialBearing | ( | const Coord & | destination | ) | const |
Gets the initial bearing of a trajectory
| destination | destination Coord instance |
References isValid(), latitude, and longitude.
Referenced by getCoordAlongGreatCircle(), getFinalBearing(), woss::Woss::initialize(), and woss::WossDbManager::BearingOperator::operator()().

|
inline |
Gets the latitude value
References latitude.
Referenced by woss::BellhopWoss::checkDepthOffsets(), woss::BellhopWoss::checkRangeOffsets(), woss::BathyGebcoDb::get1DBathyIndex(), woss::BathyGebcoDb::get2DBathyIndexes(), woss::SSP::getDepthfromPressure(), woss::Location::getLatitude(), woss::SSP::getPressureFromDepth(), woss::SedimDeck41CoordDb::getSeaFloorType(), woss::SedimDeck41CoordDb::getSedimIndex(), woss::SedimDeck41CoordDb::getSedimIndexes(), woss::SspWoa2005Db::getSSPIndexes(), woss::UtmWgs84::getUtmWgs84FromCoord(), woss::BathyGebcoDb::getValue(), woss::SSP::isAntarcticOcean(), woss::SSP::isArcticOcean(), woss::SSP::isBalticSea(), woss::SSP::isBlackSea(), woss::SSP::isCanonOcean(), woss::SSP::isCelebesSea(), woss::SSP::isHalmaheraSea(), woss::SSP::isJapanSea(), woss::SSP::isMediterraneanSea(), woss::SSP::isNEAtlanticOcean(), woss::SSP::isRedSea(), woss::SSP::isSuluSea(), and woss::Location::operator<<().
|
inline |
Gets the longitude value
References longitude.
Referenced by woss::BellhopWoss::checkDepthOffsets(), woss::BellhopWoss::checkRangeOffsets(), woss::BathyGebcoDb::get1DBathyIndex(), woss::BathyGebcoDb::get2DBathyIndexes(), woss::Location::getLongitude(), woss::SedimDeck41CoordDb::getSeaFloorType(), woss::SedimDeck41CoordDb::getSedimIndex(), woss::SedimDeck41CoordDb::getSedimIndexes(), woss::SspWoa2005Db::getSSPIndexes(), woss::UtmWgs84::getUtmWgs84FromCoord(), woss::BathyGebcoDb::getValue(), woss::SSP::isBalticSea(), woss::SSP::isBlackSea(), woss::SSP::isCelebesSea(), woss::SSP::isHalmaheraSea(), woss::SSP::isJapanSea(), woss::SSP::isMediterraneanSea(), woss::SSP::isNEAtlanticOcean(), woss::SSP::isRedSea(), woss::SSP::isSuluSea(), and woss::Location::operator<<().
|
inline |
Gets the marsden coordinates
References marsden_one_degree, and marsden_square.
|
inline |
Gets the marsden one degree square value
References marsden_one_degree.
|
inline |
Gets the marsden square value
References marsden_square.
|
inlinevirtual |
Checks the validity of coordinates provided
Reimplemented in woss::CoordZ.
References COORD_MAX_LATITUDE, COORD_MAX_LONGITUDE, COORD_MIN_LATITUDE, COORD_MIN_LONGITUDE, latitude, and longitude.
Referenced by getCoordFromBearing(), getGreatCircleDistance(), getInitialBearing(), woss::SSP::insertValue(), woss::CoordZ::isValid(), woss::operator+=(), woss::operator-=(), woss::SSP::transform(), and updateMarsdenCoord().
|
staticprotected |
Checks if the passed utm zone character is valid
| utm_zone_char | utm zone character |
Referenced by getCoordFromUtmWgs84().
| friend::std::ostream & woss::Coord::operator<< | ( | ::std::ostream & | os, |
| const Coord & | instance | ||
| ) |
<< operator
| os | left operand ostream reference |
| instance | right operand const Coord reference |
Assignment operator
| copy | const reference to a Coord object to be copied |
References latitude, longitude, marsden_one_degree, and marsden_square.
|
inline |
Sets latitude and updates marsden coordinates
| lat | latitude value |
References latitude, and updateMarsdenCoord().
Referenced by woss::Location::setLatitude().

|
inline |
Sets longitude and updates marsden coordinates
| lon | longitude value |
References longitude, and updateMarsdenCoord().
Referenced by woss::Location::setLongitude().

|
protected |
Calculates marsden coordinates from latitude and longitude
References isValid(), latitude, longitude, marsden_one_degree, and marsden_square.
Referenced by Coord(), Coord(), setLatitude(), and setLongitude().

Inequality operator
| left | left operand const reference |
| right | right operand const reference |
Sum operator
| left | left operand const reference |
| right | right operand const reference |
Compound assignment sum operator
| left | left operand reference |
| right | right operand const reference |
Subtraction operator
| left | left operand const reference |
| right | right operand const reference |
Compound assignment subtraction operator
| left | left operand reference |
| right | right operand const reference |
Less than operator
| left | left operand const reference |
| right | right operand const reference |
Less than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
Equality operator
| left | left operand const reference |
| right | right operand const reference |
Greater than operator
| left | left operand const reference |
| right | right operand const reference |
Greater than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
|
protected |
Latitude value
Referenced by Coord(), woss::CoordZ::getCartCoords(), getCoordFromBearing(), getCoordFromUtmWgs84(), woss::CoordZ::getCoordZFromCartesianCoords(), getGreatCircleDistance(), getInitialBearing(), getLatitude(), woss::CoordZ::getSphericalTheta(), isValid(), woss::operator+=(), woss::operator+=(), woss::operator-=(), woss::operator-=(), operator=(), woss::CoordZ::operator=(), setLatitude(), and updateMarsdenCoord().
|
protected |
Longitude value
Referenced by Coord(), woss::CoordZ::getCartCoords(), getCoordFromBearing(), getCoordFromUtmWgs84(), woss::CoordZ::getCoordZFromCartesianCoords(), getGreatCircleDistance(), getInitialBearing(), getLongitude(), woss::CoordZ::getSphericalPhi(), isValid(), woss::operator+=(), woss::operator+=(), woss::operator-=(), woss::operator-=(), operator=(), woss::CoordZ::operator=(), setLongitude(), and updateMarsdenCoord().
|
protected |
Marsden one degree square value
Referenced by getMarsdenCoord(), getMarsdenOneDegreeSquare(), operator=(), woss::CoordZ::operator=(), and updateMarsdenCoord().
|
protected |
Marsden square value
Referenced by getMarsdenCoord(), getMarsdenSquare(), operator=(), woss::CoordZ::operator=(), and updateMarsdenCoord().