Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_survey::MapProjection Class Reference

Forward and inverse WGS-84 Transverse Mercator conversion for one UTM zone. More...

#include <map_projection.h>

Public Member Functions

 MapProjection (double latitude, double longitude)
 Choose the UTM zone and hemisphere from a representative coordinate.
int epsg () const
 Get the CRS identifier for this WGS-84 UTM zone.
double centralMeridian () const
 Return the selected zone's central meridian in radians.
double convergence (double latitude, double longitude) const
 Estimate grid convergence in degrees at a geographic position.
double scale (double latitude, double longitude) const
 Estimate local UTM point scale at a geographic position.
std::pair< double, double > forward (double latitude, double longitude) const
 Project a geographic position into UTM easting and northing.
std::pair< double, double > inverse (double east, double north) const
 Convert UTM easting/northing back to WGS-84 latitude/longitude.

Static Private Member Functions

static int zone (double latitude, double longitude)
 Select a standard six-degree UTM zone.

Private Attributes

int zone_
bool north_

Static Private Attributes

static constexpr double a = 6378137
static constexpr double e2 = 0.0066943799901413165
static constexpr double k = 0.9996
static constexpr double radians = 0.01745329251994329577

Detailed Description

Forward and inverse WGS-84 Transverse Mercator conversion for one UTM zone.

This projection locates simulator imagery; it does not establish camera calibration, relief correction, or surveyed positional accuracy.

Definition at line 46 of file map_projection.h.

Constructor & Destructor Documentation

◆ MapProjection()

pangea_survey::MapProjection::MapProjection ( double latitude,
double longitude )
inline

Choose the UTM zone and hemisphere from a representative coordinate.

Parameters
[in]latitudeWGS-84 latitude in degrees.
[in]longitudeWGS-84 longitude in degrees.
Exceptions
std::runtime_errorIf the coordinate is outside supported UTM limits.

Definition at line 71 of file map_projection.h.

Member Function Documentation

◆ centralMeridian()

double pangea_survey::MapProjection::centralMeridian ( ) const
inline

Return the selected zone's central meridian in radians.

Definition at line 78 of file map_projection.h.

◆ convergence()

double pangea_survey::MapProjection::convergence ( double latitude,
double longitude ) const
inline

Estimate grid convergence in degrees at a geographic position.

Definition at line 80 of file map_projection.h.

◆ epsg()

int pangea_survey::MapProjection::epsg ( ) const
inline

Get the CRS identifier for this WGS-84 UTM zone.

Returns
EPSG code in the northern 326xx or southern 327xx family.

Include the hemisphere so consumers can interpret false northing.

Definition at line 76 of file map_projection.h.

◆ forward()

std::pair< double, double > pangea_survey::MapProjection::forward ( double latitude,
double longitude ) const
inline

Project a geographic position into UTM easting and northing.

Parameters
[in]latitudeWGS-84 latitude in degrees.
[in]longitudeWGS-84 longitude in degrees.
Returns
Easting and northing in metres, including standard UTM false origins.
Exceptions
std::runtime_errorIf the coordinate crosses the selected hemisphere or lies too far from the selected zone's central meridian.

Definition at line 101 of file map_projection.h.

◆ inverse()

std::pair< double, double > pangea_survey::MapProjection::inverse ( double east,
double north ) const
inline

Convert UTM easting/northing back to WGS-84 latitude/longitude.

Parameters
[in]eastUTM easting in metres.
[in]northUTM northing in metres.
Returns
Latitude and longitude in degrees.
Exceptions
std::runtime_errorIf either projected coordinate is nonfinite.

Definition at line 127 of file map_projection.h.

◆ scale()

double pangea_survey::MapProjection::scale ( double latitude,
double longitude ) const
inline

Estimate local UTM point scale at a geographic position.

Definition at line 85 of file map_projection.h.

◆ zone()

int pangea_survey::MapProjection::zone ( double latitude,
double longitude )
inlinestaticprivate

Select a standard six-degree UTM zone.

Parameters
latitudeWGS-84 latitude in degrees.
longitudeWGS-84 longitude in degrees.
Returns
Zone number from 1 to 60.
Exceptions
std::runtime_errorFor nonfinite or unsupported coordinates.

Clamp the positive antimeridian endpoint to zone 60 and use regular longitudinal bands rather than regional exceptions.

Definition at line 58 of file map_projection.h.

Field Documentation

◆ a

double pangea_survey::MapProjection::a = 6378137
staticconstexprprivate

Definition at line 49 of file map_projection.h.

◆ e2

double pangea_survey::MapProjection::e2 = 0.0066943799901413165
staticprivate

Definition at line 49 of file map_projection.h.

◆ k

double pangea_survey::MapProjection::k = 0.9996
staticprivate

Definition at line 49 of file map_projection.h.

◆ north_

bool pangea_survey::MapProjection::north_
private

Definition at line 48 of file map_projection.h.

◆ radians

double pangea_survey::MapProjection::radians = 0.01745329251994329577
staticconstexprprivate

Definition at line 50 of file map_projection.h.

◆ zone_

int pangea_survey::MapProjection::zone_
private

Definition at line 47 of file map_projection.h.


The documentation for this class was generated from the following file: