Functions | |
| void | convertGeoToNed (const QGeoCoordinate &coord, const QGeoCoordinate &origin, double &x, double &y, double &z) |
| void | convertNedToGeo (double x, double y, double z, const QGeoCoordinate &origin, QGeoCoordinate &coord) |
| QVector3D | convertGpsToEnu (const QGeoCoordinate &coord, const QGeoCoordinate &ref) |
| QGeoCoordinate | convertEnuToGps (const QVector3D &enu, const QGeoCoordinate &ref) |
| QVector3D | convertGeodeticToEcef (const QGeoCoordinate &coord) |
| QGeoCoordinate | convertEcefToGeodetic (const QVector3D &ecef) |
| QVector3D | convertEcefToEnu (const QVector3D &ecef, const QGeoCoordinate &ref) |
| QVector3D | convertEnuToEcef (const QVector3D &enu, const QGeoCoordinate &ref) |
| int | convertGeoToUTM (const QGeoCoordinate &coord, double &easting, double &northing) |
| bool | convertUTMToGeo (double easting, double northing, int zone, bool southhemi, QGeoCoordinate &coord) |
| QString | convertGeoToMGRS (const QGeoCoordinate &coord) |
| bool | convertMGRSToGeo (const QString &mgrs, QGeoCoordinate &coord) |
| QString | convertDegreesToDMS (double value, bool isLatitude) |
| double | convertDMSToDegrees (const QString &text, bool isLatitude, bool *ok) |
| bool | convertDMSToGeo (const QString &latitude, const QString &longitude, QGeoCoordinate &coord) |
| double | geodesicDistance (const QGeoCoordinate &from, const QGeoCoordinate &to) |
| double | geodesicAzimuth (const QGeoCoordinate &from, const QGeoCoordinate &to) |
| QGeoCoordinate | geodesicDestination (const QGeoCoordinate &from, double azimuth, double distance) |
| double | pathLength (const QList< QGeoCoordinate > &path) |
| double | polygonArea (const QList< QGeoCoordinate > &polygon) |
| double | polygonPerimeter (const QList< QGeoCoordinate > &polygon) |
| QList< QGeoCoordinate > | interpolatePath (const QGeoCoordinate &from, const QGeoCoordinate &to, int numPoints) |
| QGeoCoordinate | interpolateAtDistance (const QGeoCoordinate &from, const QGeoCoordinate &to, double distance) |
| QString QGCGeo::convertDegreesToDMS | ( | double | value, |
| bool | isLatitude ) |
Format a latitude or longitude as degrees, minutes, seconds with hemisphere.
| value | Angle in decimal degrees (negative = south/west). |
| isLatitude | True for latitude (N/S), false for longitude (E/W). |
Definition at line 231 of file QGCGeo.cc.
References convertDegreesToDMS().
Referenced by convertDegreesToDMS(), and TransformPositionController::initValues().
| double QGCGeo::convertDMSToDegrees | ( | const QString & | text, |
| bool | isLatitude, | ||
| bool * | ok = nullptr ) |
Parse a latitude or longitude typed in any common notation. Accepts degrees-minutes-seconds ("34 44 17.6 N", "34°44'17.6\"N"), degrees-decimal-minutes ("34 44.293 N") and decimal degrees ("34.7382", "-86.6017"). The hemisphere letter (N/S for latitude, E/W for longitude, either case) may lead or trail; without one a leading '-' means S/W.
| text | Text to parse. | |
| isLatitude | True for latitude (N/S, +/-90), false for longitude (E/W, +/-180). | |
| [out] | ok | Set to false for malformed input, a hemisphere letter of the other axis, '-' together with a hemisphere letter, minutes/seconds >= 60, or an out of range value. |
Definition at line 245 of file QGCGeo.cc.
References convertDMSToDegrees().
Referenced by convertDMSToDegrees(), and convertDMSToGeo().
| bool QGCGeo::convertDMSToGeo | ( | const QString & | latitude, |
| const QString & | longitude, | ||
| QGeoCoordinate & | coord ) |
Convert a latitude/longitude pair in any notation accepted by convertDMSToDegrees() to a coordinate.
| latitude | Latitude text. | |
| longitude | Longitude text. | |
| [out] | coord | Latitude and longitude are set on success; altitude is left unchanged. |
Definition at line 318 of file QGCGeo.cc.
References convertDMSToDegrees(), and convertDMSToGeo().
Referenced by convertDMSToGeo(), and TransformPositionController::setFromDMS().
| QVector3D QGCGeo::convertEcefToEnu | ( | const QVector3D & | ecef, |
| const QGeoCoordinate & | ref ) |
Convert ECEF to ENU relative to a reference point.
| ecef | ECEF vector in meters. |
| ref | Reference point for local tangent plane. |
Definition at line 118 of file QGCGeo.cc.
References convertEcefToEnu().
Referenced by convertEcefToEnu().
| QGeoCoordinate QGCGeo::convertEcefToGeodetic | ( | const QVector3D & | ecef | ) |
Convert ECEF (Earth-Centered Earth-Fixed) to geodetic coordinate.
| ecef | ECEF vector in meters. |
Definition at line 111 of file QGCGeo.cc.
References convertEcefToGeodetic().
Referenced by convertEcefToGeodetic().
| QVector3D QGCGeo::convertEnuToEcef | ( | const QVector3D & | enu, |
| const QGeoCoordinate & | ref ) |
Convert ENU to ECEF relative to a reference point.
| enu | ENU vector in meters. |
| ref | Reference point for local tangent plane. |
Definition at line 132 of file QGCGeo.cc.
References convertEnuToEcef().
Referenced by convertEnuToEcef().
| QGeoCoordinate QGCGeo::convertEnuToGps | ( | const QVector3D & | enu, |
| const QGeoCoordinate & | ref ) |
Convert ENU (East-North-Up) coordinate to geodetic.
| enu | ENU vector in meters (x=East, y=North, z=Up). |
| ref | Reference point for local tangent plane. |
Definition at line 91 of file QGCGeo.cc.
References convertEnuToGps().
Referenced by convertEnuToGps().
| QVector3D QGCGeo::convertGeodeticToEcef | ( | const QGeoCoordinate & | coord | ) |
Convert geodetic coordinate to ECEF (Earth-Centered Earth-Fixed).
| coord | Geodetic coordinate (lat/lon/alt). |
Definition at line 104 of file QGCGeo.cc.
References convertGeodeticToEcef().
Referenced by convertGeodeticToEcef().
| QString QGCGeo::convertGeoToMGRS | ( | const QGeoCoordinate & | coord | ) |
Convert geodetic coordinate to MGRS string.
| coord | Geodetic coordinate to convert. |
Definition at line 181 of file QGCGeo.cc.
References convertGeoToMGRS().
Referenced by convertGeoToMGRS(), and TransformPositionController::initValues().
| void QGCGeo::convertGeoToNed | ( | const QGeoCoordinate & | coord, |
| const QGeoCoordinate & | origin, | ||
| double & | x, | ||
| double & | y, | ||
| double & | z ) |
Convert geodetic coordinate to NED (North-East-Down) relative to origin.
| coord | Geodetic coordinate to convert. | |
| origin | Reference point for local tangent plane. | |
| [out] | x | North component in meters. |
| [out] | y | East component in meters. |
| [out] | z | Down component in meters (positive = below origin). |
Definition at line 36 of file QGCGeo.cc.
References convertGeoToNed().
Referenced by convertGeoToNed(), QGCMapPolygon::nedPolygon(), and QGCMapPolyline::nedPolyline().
| int QGCGeo::convertGeoToUTM | ( | const QGeoCoordinate & | coord, |
| double & | easting, | ||
| double & | northing ) |
Convert geodetic coordinate to UTM.
| coord | Geodetic coordinate to convert. | |
| [out] | easting | UTM easting in meters. |
| [out] | northing | UTM northing in meters. |
Definition at line 150 of file QGCGeo.cc.
References convertGeoToUTM().
Referenced by convertGeoToUTM(), and TransformPositionController::initValues().
| QVector3D QGCGeo::convertGpsToEnu | ( | const QGeoCoordinate & | coord, |
| const QGeoCoordinate & | ref ) |
Convert geodetic coordinate to ENU (East-North-Up) relative to reference.
| coord | Geodetic coordinate to convert. |
| ref | Reference point for local tangent plane. |
Definition at line 82 of file QGCGeo.cc.
References convertGpsToEnu().
Referenced by convertGpsToEnu(), and OsmBuildingHandler::way().
| bool QGCGeo::convertMGRSToGeo | ( | const QString & | mgrs, |
| QGeoCoordinate & | coord ) |
Convert MGRS string to geodetic coordinate.
| mgrs | MGRS string (spaces optional, e.g., "32TMT6588647092" or "32T MT 65886 47092"). | |
| [out] | coord | Resulting geodetic coordinate (altitude = 0). |
Definition at line 207 of file QGCGeo.cc.
References convertMGRSToGeo().
Referenced by convertMGRSToGeo(), and TransformPositionController::setFromMGRS().
| void QGCGeo::convertNedToGeo | ( | double | x, |
| double | y, | ||
| double | z, | ||
| const QGeoCoordinate & | origin, | ||
| QGeoCoordinate & | coord ) |
Convert NED (North-East-Down) coordinate to geodetic.
| x | North component in meters. | |
| y | East component in meters. | |
| z | Down component in meters (positive = below origin). | |
| origin | Reference point for local tangent plane. | |
| [out] | coord | Resulting geodetic coordinate. |
Definition at line 58 of file QGCGeo.cc.
References convertNedToGeo().
Referenced by convertNedToGeo(), QGCMapPolygon::offset(), and QGCMapPolyline::offsetPolyline().
| bool QGCGeo::convertUTMToGeo | ( | double | easting, |
| double | northing, | ||
| int | zone, | ||
| bool | southhemi, | ||
| QGeoCoordinate & | coord ) |
Convert UTM to geodetic coordinate.
| easting | UTM easting in meters. | |
| northing | UTM northing in meters. | |
| zone | UTM zone (1-60). | |
| southhemi | True if southern hemisphere. | |
| [out] | coord | Resulting geodetic coordinate (altitude = 0). |
Definition at line 163 of file QGCGeo.cc.
References convertUTMToGeo().
Referenced by convertUTMToGeo(), SHPFileHelper::loadPointsFromFile(), SHPFileHelper::loadPolygonsFromFile(), SHPFileHelper::loadPolylinesFromFile(), and TransformPositionController::setFromUTM().
| double QGCGeo::geodesicAzimuth | ( | const QGeoCoordinate & | from, |
| const QGeoCoordinate & | to ) |
Calculate geodesic azimuth (bearing) from one coordinate to another using WGS84 ellipsoid.
| from | Starting coordinate. |
| to | Ending coordinate. |
Definition at line 345 of file QGCGeo.cc.
References geodesicAzimuth().
Referenced by geodesicAzimuth().
| QGeoCoordinate QGCGeo::geodesicDestination | ( | const QGeoCoordinate & | from, |
| double | azimuth, | ||
| double | distance ) |
Calculate destination coordinate given start point, azimuth, and distance using WGS84 ellipsoid.
| from | Starting coordinate. |
| azimuth | Forward azimuth in degrees, clockwise from north. |
| distance | Distance in meters. |
Definition at line 358 of file QGCGeo.cc.
References geodesicDestination().
Referenced by geodesicDestination().
| double QGCGeo::geodesicDistance | ( | const QGeoCoordinate & | from, |
| const QGeoCoordinate & | to ) |
Calculate geodesic distance between two coordinates using WGS84 ellipsoid.
| from | Starting coordinate. |
| to | Ending coordinate. |
Definition at line 337 of file QGCGeo.cc.
References geodesicDistance().
Referenced by geodesicDistance(), and pathLength().
| QGeoCoordinate QGCGeo::interpolateAtDistance | ( | const QGeoCoordinate & | from, |
| const QGeoCoordinate & | to, | ||
| double | distance ) |
Get the coordinate at a specific distance along a geodesic path using WGS84 ellipsoid.
| from | Starting coordinate. |
| to | Ending coordinate. |
| distance | Distance from start in meters (clamped to path length). |
Definition at line 457 of file QGCGeo.cc.
References interpolateAtDistance().
Referenced by interpolateAtDistance().
| QList< QGeoCoordinate > QGCGeo::interpolatePath | ( | const QGeoCoordinate & | from, |
| const QGeoCoordinate & | to, | ||
| int | numPoints ) |
Interpolate evenly-spaced points along a geodesic path using WGS84 ellipsoid.
| from | Starting coordinate. |
| to | Ending coordinate. |
| numPoints | Number of points to generate (must be >= 2). |
Definition at line 416 of file QGCGeo.cc.
References interpolatePath().
Referenced by interpolatePath().
| double QGCGeo::pathLength | ( | const QList< QGeoCoordinate > & | path | ) |
Calculate total geodesic length of a path using WGS84 ellipsoid.
| path | List of coordinates defining the path. |
Definition at line 369 of file QGCGeo.cc.
References geodesicDistance(), and pathLength().
Referenced by pathLength().
| double QGCGeo::polygonArea | ( | const QList< QGeoCoordinate > & | polygon | ) |
Calculate geodesic area of a polygon using WGS84 ellipsoid.
| polygon | List of coordinates defining the polygon vertices (automatically closed). |
Definition at line 382 of file QGCGeo.cc.
References polygonArea().
Referenced by polygonArea().
| double QGCGeo::polygonPerimeter | ( | const QList< QGeoCoordinate > & | polygon | ) |
Calculate geodesic perimeter of a polygon using WGS84 ellipsoid.
| polygon | List of coordinates defining the polygon vertices (automatically closed). |
Definition at line 400 of file QGCGeo.cc.
References polygonPerimeter().
Referenced by polygonPerimeter().