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


Classes | |
| class | CartCoords |
| Class that represents cartesian coordinates. More... | |
Public Types | |
| enum class | CoordZSpheroidType { COORDZ_SPHERE = 0 , COORDZ_GRS80 , COORDZ_WGS84 } |
| Spheroid model to use. More... | |
Public Member Functions | |
| constexpr | CoordZ (double lat=COORD_NOT_SET_VALUE, double lon=COORD_NOT_SET_VALUE, double z=COORD_NOT_SET_VALUE) |
| constexpr | CoordZ (const Coord &coords, double depth=COORD_NOT_SET_VALUE) |
| constexpr | CoordZ (const CoordZ ©)=default |
| constexpr | CoordZ (CoordZ &&tmp)=default |
| constexpr void | setDepth (double d) |
| constexpr double | getDepth () const |
| constexpr CartCoords | getCartCoords (CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) const |
| constexpr double | getCartX (CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) const |
| constexpr double | getCartY (CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) const |
| constexpr double | getCartZ (CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) const |
| constexpr double | getSphericalRho () const |
| constexpr double | getSphericalTheta () const |
| constexpr double | getSphericalPhi () const |
| constexpr double | getCartDistance (const CoordZ &coords, CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) const |
| constexpr double | getCartRelZenith (const CoordZ &coords) const |
| constexpr double | getCartRelAzimuth (const CoordZ &coords) const |
| constexpr bool | isValid () const |
| constexpr CoordZ & | operator= (const CoordZ &coordz)=default |
| constexpr CoordZ & | operator= (CoordZ &&coordz)=default |
| Public Member Functions inherited from woss::Coord | |
| constexpr | Coord (double lat=COORD_NOT_SET_VALUE, double lon=COORD_NOT_SET_VALUE) |
| constexpr | Coord (const Coord ©)=default |
| constexpr | Coord (Coord &&tmp)=default |
| constexpr void | setLatitude (double lat) |
| constexpr void | setLongitude (double lon) |
| constexpr bool | isValid () const |
| constexpr double | getLatitude () const |
| constexpr double | getLongitude () const |
| constexpr int | getMarsdenSquare () const |
| constexpr int | getMarsdenOneDegreeSquare () const |
| constexpr MarsdenCoord | getMarsdenCoord () const |
| constexpr double | getInitialBearing (const Coord &destination) const |
| constexpr double | getFinalBearing (const Coord &destination) const |
| constexpr double | getGreatCircleDistance (const Coord &destination, double depth=0) const |
| constexpr Coord & | operator= (const Coord ©)=default |
| constexpr Coord & | operator= (Coord &&tmp)=default |
Static Public Member Functions | |
| static constexpr CoordZ | getCoordZAlongCartLine (const CoordZ &start, const CoordZ &end, double distance) |
| static constexpr CoordZ | getCoordZAlongGreatCircle (const CoordZ &start, const CoordZ &end, double distance) |
| static constexpr CoordZ | getCoordZFromCartesianCoords (double x, double y, double z, CoordZSpheroidType type=CoordZSpheroidType::COORDZ_SPHERE) |
| static constexpr CoordZ | getCoordZFromCartesianCoords (const CartCoords &cart_coords) |
| static constexpr CoordZ | getCoordZFromSphericalCoords (double rho, double theta, double phi) |
| Static Public Member Functions inherited from woss::Coord | |
| static constexpr Coord | getCoordFromBearing (const Coord &start_coord, double bearing, double distance, double depth=0.0) |
| static constexpr Coord | getCoordAlongGreatCircle (const Coord &start_coord, const Coord &end_coord, double distance, double depth=0.0) |
| static constexpr Coord | getCoordFromUtmWgs84 (double easting, double northing, double utm_zone_number, UtmZoneChar utm_zone_char) |
Static Public Attributes | |
| static constexpr double | COORDZ_MIN_DEPTH = 0.0 |
| Minimum valid depth. | |
| Static Public Attributes inherited from woss::Coord | |
| static constexpr double | COORD_MIN_LATITUDE = -90.0 |
| Minimum valid Latitude. | |
| static constexpr double | COORD_MAX_LATITUDE = 90.0 |
| Maximum valid Latitude. | |
| static constexpr double | COORD_MIN_LONGITUDE = -180.0 |
| Minimum valid Longitude. | |
| static constexpr double | COORD_MAX_LONGITUDE = 180.0 |
| Maximum valid Longitude. | |
| static constexpr double | EARTH_RADIUS = 6371000.0 |
| Mean earth radius in meters. | |
| static constexpr double | EARTH_SEMIMAJOR_AXIS = 6378137.0 |
| Earth's semi-major axis in meters as defined by both GRS80 and WGS84. | |
| static constexpr double | EARTH_GRS80_POLAR_RADIUS = 6356752.3141 |
| Earth's semi-major axis in meters as defined by GRS80. | |
| static constexpr double | EARTH_WGS84_POLAR_RADIUS = 6356752.314245 |
| Earth's polar radius in meters as defined by WGS84. | |
| static constexpr double | EARTH_GRS80_ECCENTRICITY = 0.0818191910428158 |
| Earth's first eccentricity as defined by GRS80. | |
| static constexpr double | EARTH_WGS84_ECCENTRICITY = 0.0818191908426215 |
| Earth's first eccentricity as defined by WGS84. | |
Protected Attributes | |
| double | depth |
| Protected Attributes inherited from woss::Coord | |
| double | latitude |
| double | longitude |
| int | marsden_square |
| int | marsden_one_degree |
Friends | |
| constexpr CoordZ | operator+ (const CoordZ &left, const CoordZ &right) |
| constexpr CoordZ | operator- (const CoordZ &left, const CoordZ &right) |
| constexpr CoordZ & | operator+= (CoordZ &left, const CoordZ &right) |
| constexpr CoordZ & | operator-= (CoordZ &left, const CoordZ &right) |
| constexpr bool | operator== (const CoordZ &left, const CoordZ &right) |
| constexpr bool | operator!= (const CoordZ &left, const CoordZ &right) |
| constexpr bool | operator> (const CoordZ &left, const CoordZ &right) |
| constexpr bool | operator< (const CoordZ &left, const CoordZ &right) |
| constexpr bool | operator>= (const CoordZ &left, const CoordZ &right) |
| constexpr bool | operator<= (const CoordZ &left, const CoordZ &right) |
| std::ostream & | operator<< (std::ostream &os, const CoordZ &instance) |
Additional Inherited Members | |
| Protected Member Functions inherited from woss::Coord | |
| constexpr void | updateMarsdenCoord () |
| Static Protected Member Functions inherited from woss::Coord | |
| static constexpr bool | isValidUtmZoneChar (UtmZoneChar utm_zone_char) |
3D-Coordinates (lat, long, depth) class definitions and functions library
|
strong |
Spheroid model to use.
Spheroid model to use: perfect sphere (CoordZSpheroidType::COORDZ_SPHERE), Geodetic Reference System 1980 (COORDZ_GRS80), or World Geodetic System 1984 (COORDZ_WGS84)
| Enumerator | |
|---|---|
| COORDZ_SPHERE | |
| COORDZ_GRS80 | |
| COORDZ_WGS84 | |
|
inlineconstexpr |
CoordZ 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 |
| z | depth value in meters. Default value makes the instance not valid |
References woss::Coord::Coord(), and depth.
Referenced by CoordZ(), CoordZ(), getCartDistance(), getCartRelAzimuth(), getCartRelZenith(), getCoordZAlongCartLine(), getCoordZAlongGreatCircle(), getCoordZFromCartesianCoords(), getCoordZFromCartesianCoords(), getCoordZFromSphericalCoords(), operator!=, operator+, operator+=, operator-, operator-=, operator<, operator<<, operator<=, operator=(), operator=(), operator==, operator>, and operator>=.

|
inlineexplicitconstexpr |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexpr |
Gets cartesian x coordinate
| type | Earh Model type |
References COORDZ_GRS80, COORDZ_SPHERE, depth, woss::Coord::EARTH_GRS80_ECCENTRICITY, woss::Coord::EARTH_RADIUS, woss::Coord::EARTH_SEMIMAJOR_AXIS, woss::Coord::EARTH_WGS84_ECCENTRICITY, woss::Coord::latitude, and woss::Coord::longitude.
Referenced by WossCoordDefTest::doCoordCartTests(), getCartDistance(), getCartRelAzimuth(), getCartRelZenith(), getCartX(), getCartY(), getCartZ(), and getCoordZAlongCartLine().
|
inlineconstexpr |
Gets the distance from cartesian coordinates approximations
| coords | a const reference to a valid CoordZ object |
References CoordZ(), getCartCoords(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), woss::CoordZ::CartCoords::getZ(), and isValid().
Referenced by WossMPropagation::computeGain(), WossCoordDefTest::doBearingTests(), WossCoordDefTest::doCoordCartTests(), getCartRelZenith(), WossMPropagation::getGain(), woss::WossManager::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::Location::isEquivalentTo(), woss::CoordComparator< CompUser, CoordZ >::operator()(), and ChEstimatorPlugIn::recvSyncClMsg().

|
inlineconstexpr |
Gets relative azimuth from cartesian coordinates approximations, assuming earth as a sphere of ray = 6371000.0 meters
References CoordZ(), COORDZ_SPHERE, getCartCoords(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and isValid().
Referenced by getCoordZAlongCartLine().

|
inlineconstexpr |
Gets relative zenith from cartesian coordinates approximations, assuming earth as a sphere of ray = 6371000.0 meters
References CoordZ(), COORDZ_SPHERE, getCartCoords(), getCartDistance(), woss::CoordZ::CartCoords::getZ(), and isValid().
Referenced by getCoordZAlongCartLine().

|
inlineconstexpr |
Gets cartesian x coordinate
| type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getX().
Referenced by woss::Location::getX(), WossPosition::WossPosition(), and woss::Transducer::writeVertBeamPattern().

|
inlineconstexpr |
Gets cartesian y coordinate
| type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getY().
Referenced by woss::Location::getY(), WossPosition::WossPosition(), and woss::Transducer::writeVertBeamPattern().

|
inlineconstexpr |
Gets cartesian z coordinate
| type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getZ().
Referenced by woss::Location::getZ(), WossPosition::WossPosition(), and woss::Transducer::writeVertBeamPattern().

|
staticconstexpr |
Gets The CoordZ at given distance along the line in cartesian coordinates, assuming earth as a sphere of ray = 6371000.0 meters that ties start and end CoordZ
| start | a const reference to a valid CoordZ object |
| end | a const reference to a valid CoordZ object |
| distance | travel distance in meters |
References CoordZ(), COORDZ_SPHERE, depth, woss::Coord::EARTH_RADIUS, getCartCoords(), getCartRelAzimuth(), getCartRelZenith(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and woss::CoordZ::CartCoords::getZ().

|
staticconstexpr |
Gets The CoordZ at given distance along the great circle at starting CoordZ depth. The output depth is calculated uniformly between start and end depth that ties start and end CoordZ
| start | a const reference to a valid CoordZ object |
| end | a const reference to a valid CoordZ object |
| distance | travel distance in meters |
References woss::Coord::Coord(), CoordZ(), woss::Coord::getCoordAlongGreatCircle(), getDepth(), and woss::Coord::getGreatCircleDistance().
Referenced by WossWpPosition::WayPoint::getCurrentPosition().

|
inlinestaticconstexpr |
Gets the CoordZ converted from given cartesian coordinates
| cart_coords | const reference to a valid CoordZ::CartCoords object |
References CoordZ(), getCoordZFromCartesianCoords(), woss::CoordZ::CartCoords::getType(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and woss::CoordZ::CartCoords::getZ().

|
inlinestaticconstexpr |
Gets the CoordZ converted from given cartesian coordinates
| x | x axis |
| y | y axis |
| z | z axis |
| type | Earth model type |
References CoordZ(), COORDZ_GRS80, COORDZ_SPHERE, woss::Coord::EARTH_GRS80_POLAR_RADIUS, woss::Coord::EARTH_RADIUS, woss::Coord::EARTH_SEMIMAJOR_AXIS, woss::Coord::EARTH_WGS84_POLAR_RADIUS, woss::Coord::latitude, and woss::Coord::longitude.
Referenced by WossCoordDefTest::doCoordCartTests(), and getCoordZFromCartesianCoords().

|
staticconstexpr |
Gets the CoordZ converted from given spherical coordinates
| rho | radius |
| theta | theta angle |
| phi | phi angle |
References CoordZ(), and woss::Coord::EARTH_RADIUS.

|
inlineconstexpr |
Gets depth
References depth.
Referenced by woss::BellhopWoss::checkDepthOffsets(), getCoordZAlongGreatCircle(), woss::Location::getDepth(), WossChannelModule::getPropDelay(), WossWpPosition::WayPoint::getTimeOfArrival(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossTimeArr(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::Location::operator<<, WossUnitTest::testCoordZ(), WossWpPosition::updateVerticalOrientation(), and WossPosition::WossPosition().
|
inlineconstexpr |
Gets spherical phi coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References woss::Coord::longitude.
Referenced by woss::Transducer::writeVertBeamPattern().
|
inlineconstexpr |
Gets spherical rho coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References depth, and woss::Coord::EARTH_RADIUS.
|
inlineconstexpr |
Gets spherical theta coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References woss::Coord::latitude.
Referenced by woss::Transducer::writeVertBeamPattern().
|
inlineconstexpr |
Checks the validity of coordinates and depth provided
References COORDZ_MIN_DEPTH, depth, and woss::Coord::isValid().
Referenced by WossCoordDefTest::doCoordCartTests(), WossCoordDefTest::doRun(), getCartDistance(), getCartRelAzimuth(), getCartRelZenith(), woss::ACToolboxWoss::initCoordZVector(), woss::Location::isEquivalentTo(), operator+, operator+=, operator-, operator-=, and woss::Woss::Woss().

|
inlineconstexpr |
Sets depth
| d | depth in meters |
References depth.
Referenced by woss::ACToolboxWoss::initCoordZVector().
Inequality operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, woss::Coord::latitude, and woss::Coord::longitude.
Sum operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, isValid(), woss::Coord::latitude, and woss::Coord::longitude.
Compound assignment sum operator
| left | left operand reference |
| right | right operand const reference |
References CoordZ(), depth, isValid(), woss::Coord::latitude, and woss::Coord::longitude.
Subtraction operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, isValid(), woss::Coord::latitude, and woss::Coord::longitude.
Compound assignment subtraction operator
| left | left operand reference |
| right | right operand const reference |
References CoordZ(), depth, isValid(), woss::Coord::latitude, and woss::Coord::longitude.
Less than operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, woss::Coord::latitude, and woss::Coord::longitude.
|
friend |
<< operator
| os | left operand ostream reference |
| instance | right operand const CoordZ reference |
References CoordZ(), depth, woss::Coord::latitude, woss::Coord::longitude, woss::Coord::marsden_one_degree, and woss::Coord::marsden_square.
Less than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ().
Equality operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, woss::Coord::latitude, and woss::Coord::longitude.
Greater than operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ(), depth, woss::Coord::latitude, and woss::Coord::longitude.
Greater than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
References CoordZ().
|
staticconstexpr |
Minimum valid depth.
Referenced by isValid().
|
protected |
Depth value
Referenced by CoordZ(), CoordZ(), getCartCoords(), getCoordZAlongCartLine(), getDepth(), getSphericalRho(), isValid(), operator!=, operator+, operator+=, operator-, operator-=, operator<, operator<<, operator==, operator>, and setDepth().