hivemind 1.0.0
Loading...
Searching...
No Matches
CoordinateConverter::CoordConv Class Reference

This is the class that performs coordinate conversions. More...

#include <coordinate_converter.h>

Collaboration diagram for CoordinateConverter::CoordConv:
Collaboration graph

Static Public Member Functions

static void ResetOrigin (Core::GeographicalCoordinate geoCoord, int size)
 Sets the origin coordinate to use with relative coordinates.
 
static Core::CartesianCoordinate GeographicalToCartesian (Core::GeographicalCoordinate geoCoord)
 Function used to convert a geographical coordinate to a cartesian coordinate.
 
static Core::GeographicalCoordinate CartesianToGeographical (Core::CartesianCoordinate cartCoord)
 \biref Function used to convert a cartesian coordinate to a geograpical coordinate
 
static Core::GeographicalCoordinate GetOrigin ()
 
static Core::CartesianCoordinate SymmetricToAsymmetric (Core::CartesianCoordinate symmetric)
 Function used to convert a coordinate in a symmetric coordinate system to a coordinate in an asymmetric coordinate system.
 
static Core::CartesianCoordinate AsymmetricToSymmetric (Core::CartesianCoordinate asymmetric)
 Function used to convert a coordinate in an asymmetric cooridnate system to a coordinate in a symmetric coordinate system.
 
static Core::UTMCoordinate GeographicToUTM (Core::GeographicalCoordinate GeoCoord)
 Function used to convert a geographical coordinate to a UTM coordinate.
 
static Core::GeographicalCoordinate UTMToGeographic (Core::UTMCoordinate UTMCoord)
 Function used to convert a UTM coordinate to a geographical coordinate.
 
static int GetSize ()
 

Private Member Functions

 CoordConv ()
 The constructor is made private to adhere to the singleton pattern.
 

Static Private Member Functions

static CoordConvGetInstance ()
 Get the single instance of CoordConv.
 

Private Attributes

Core::GeographicalCoordinate m_OriginGeographical
 
GeographicLib::LocalCartesian m_Origin
 
int m_Size
 

Detailed Description

This is the class that performs coordinate conversions.

Definition at line 13 of file coordinate_converter.h.

Constructor & Destructor Documentation

◆ CoordConv()

CoordinateConverter::CoordConv::CoordConv ( )
inlineprivate

The constructor is made private to adhere to the singleton pattern.

Definition at line 91 of file coordinate_converter.h.

Member Function Documentation

◆ AsymmetricToSymmetric()

Core::CartesianCoordinate CoordinateConverter::CoordConv::AsymmetricToSymmetric ( Core::CartesianCoordinate  asymmetric)
static

Function used to convert a coordinate in an asymmetric cooridnate system to a coordinate in a symmetric coordinate system.

Parameters
asymmetricCartesian coordinate in an asymmetric coordinate system
Returns
The symmetric coordinate corresponds to the asymmetric coordinate

Definition at line 66 of file coordinate_converter.cpp.

References GetInstance(), Core::CartesianCoordinate::X, and Core::CartesianCoordinate::Y.

Referenced by Routemaker::Routemaker::MakeRoute(), and Gui::MapViewer::mousePressEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CartesianToGeographical()

Core::GeographicalCoordinate CoordinateConverter::CoordConv::CartesianToGeographical ( Core::CartesianCoordinate  cartCoord)
static

\biref Function used to convert a cartesian coordinate to a geograpical coordinate

Parameters
cartCoordCartesian coordinate to convert
Returns
return a geographical point relative to origin and the cartesian coordinates.

Definition at line 33 of file coordinate_converter.cpp.

References GetInstance(), Core::CartesianCoordinate::X, Core::CartesianCoordinate::Y, and Core::CartesianCoordinate::Z.

Here is the call graph for this function:

◆ GeographicalToCartesian()

Core::CartesianCoordinate CoordinateConverter::CoordConv::GeographicalToCartesian ( Core::GeographicalCoordinate  geoCoord)
static

Function used to convert a geographical coordinate to a cartesian coordinate.

Parameters
geoCoordGeograhical coordinate to convert
Returns
return a cartesian point relative to origin

Definition at line 22 of file coordinate_converter.cpp.

References GetInstance(), Core::GeographicalCoordinate::Latitude, and Core::GeographicalCoordinate::Longitude.

Here is the call graph for this function:

◆ GeographicToUTM()

Core::UTMCoordinate CoordinateConverter::CoordConv::GeographicToUTM ( Core::GeographicalCoordinate  GeoCoord)
static

Function used to convert a geographical coordinate to a UTM coordinate.

Parameters
GeoCoordGeographical coordinate
Returns
UTM coordinate corresponds to the geographical coordinate

Definition at line 78 of file coordinate_converter.cpp.

References Core::UTMCoordinate::Easting, Core::UTMCoordinate::IsNorthHemisphere, Core::GeographicalCoordinate::Latitude, Core::GeographicalCoordinate::Longitude, Core::UTMCoordinate::Northing, and Core::UTMCoordinate::Zone.

Referenced by CompileScenario::Scenario::Scenario(), and CompileScenario::Scenario::SetOrigin().

Here is the caller graph for this function:

◆ GetInstance()

static CoordConv & CoordinateConverter::CoordConv::GetInstance ( )
inlinestaticprivate

Get the single instance of CoordConv.

Returns
The single instance of CoordConv.

Definition at line 97 of file coordinate_converter.h.

Referenced by AsymmetricToSymmetric(), CartesianToGeographical(), GeographicalToCartesian(), GetOrigin(), GetSize(), ResetOrigin(), and SymmetricToAsymmetric().

Here is the caller graph for this function:

◆ GetOrigin()

Core::GeographicalCoordinate CoordinateConverter::CoordConv::GetOrigin ( )
static
Returns
The geographical coordinates to origin.

Definition at line 44 of file coordinate_converter.cpp.

References GetInstance().

Here is the call graph for this function:

◆ GetSize()

static int CoordinateConverter::CoordConv::GetSize ( )
inlinestatic

Definition at line 82 of file coordinate_converter.h.

References GetInstance(), and m_Size.

Referenced by Gui::MapViewer::DrawKeyframes(), Gui::MapViewer::DrawRoutes(), and Gui::MapViewer::mousePressEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetOrigin()

void CoordinateConverter::CoordConv::ResetOrigin ( Core::GeographicalCoordinate  geoCoord,
int  size 
)
static

Sets the origin coordinate to use with relative coordinates.

Parameters
geoCoordGeographical coordinate to be used as the origin of relative coordinates

Definition at line 10 of file coordinate_converter.cpp.

References GetInstance(), Core::GeographicalCoordinate::Latitude, and Core::GeographicalCoordinate::Longitude.

Referenced by CompileScenario::Scenario::Scenario(), and CompileScenario::Scenario::SetOrigin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SymmetricToAsymmetric()

Core::CartesianCoordinate CoordinateConverter::CoordConv::SymmetricToAsymmetric ( Core::CartesianCoordinate  symmetric)
static

Function used to convert a coordinate in a symmetric coordinate system to a coordinate in an asymmetric coordinate system.

Parameters
symmetricCartesian coordinate in a symmetric coordinate system
Returns
The asymmetric coordinate corresponds to the symmetric coordinate

Definition at line 54 of file coordinate_converter.cpp.

References GetInstance(), Core::CartesianCoordinate::X, and Core::CartesianCoordinate::Y.

Referenced by Gui::MapViewer::DrawKeyframes(), Gui::MapViewer::DrawRoutes(), and Routemaker::Routemaker::MakeRoute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UTMToGeographic()

Core::GeographicalCoordinate CoordinateConverter::CoordConv::UTMToGeographic ( Core::UTMCoordinate  UTMCoord)
static

Function used to convert a UTM coordinate to a geographical coordinate.

Parameters
UTMCoordUTM coordinate
Returns
Geographical coordinate corresponds to the UTM coordinate

Definition at line 90 of file coordinate_converter.cpp.

References Core::UTMCoordinate::Easting, Core::UTMCoordinate::IsNorthHemisphere, Core::GeographicalCoordinate::Latitude, Core::GeographicalCoordinate::Longitude, Core::UTMCoordinate::Northing, and Core::UTMCoordinate::Zone.

Member Data Documentation

◆ m_Origin

GeographicLib::LocalCartesian CoordinateConverter::CoordConv::m_Origin
private

Definition at line 105 of file coordinate_converter.h.

◆ m_OriginGeographical

Core::GeographicalCoordinate CoordinateConverter::CoordConv::m_OriginGeographical
private

Definition at line 104 of file coordinate_converter.h.

◆ m_Size

int CoordinateConverter::CoordConv::m_Size
private

Definition at line 106 of file coordinate_converter.h.

Referenced by GetSize().


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