This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Geodetic Class

The Geodetic class.

The Geodetic class implementation can be found in the data/core/scripts/geodetic.h file.

Geodetic Class

Members


Geodetic ()

Constructor. Creates a new Geodetic class instance and sets the WGS origin to zero.

Geodetic (dvec3 origin)

Constructor. Creates a new Geodetic class instance and sets the WGS origin by using the given data.

Arguments

  • dvec3 origin - The origin of the WGS coordinate system.

Geodetic (double latitude, double longitude, double height)

Constructor. Creates a new Geodetic class instance and sets the WGS origin by using the given data.

Arguments

  • double latitude - The latitude of the origin of the WGS coordinate system in degrees.
  • double longitude - The longitude of the origin of the WGS coordinate system in degrees.
  • double height - The height of the origin of the WGS coordinate system in degrees.

double getDegrees (double degrees, double minutes, double seconds)

Returns the coordinate value in degrees.

Arguments

  • double degrees - Degrees of a coordinate.
  • double minutes - Minutes of a coordinate.
  • double seconds - Seconds of a coordinate.

Return value

Coordinate value in degrees.

double getDelta (dvec3 position)

Calculates the offset between geodetic and Cartesian heights.

Arguments

  • dvec3 position - Position coordinates.

Return value

Delta.

double getRadius (dvec3 sin_latitude)

Returns the radius by using the given sine of the latitude.

Arguments

  • dvec3 sin_latitude - Sine of the latitude.

Return value

Radius.

void setWGSOrigin (dvec3 position)

Sets the given position as the origin of the WGS coordinate system and calculate the ECF origin, rotation matrix and inversed rotation matrix.

Arguments

  • dvec3 position - The position in the WGS coordinate system.

dvec3 getWGSOrigin ()

Returns the origin of the WGS coordinate system.

Return value

The origin of the WGS coordinate system.

dvec3 getECFOrigin ()

Returns the origin of the ECF coordinate system.

Return value

The origin of the ECF coordinate system.

mat4 getRotation ()

Returns the rotation matrix.

Return value

The rotation matrix.

mat4 getIRotation ()

Returns the inversed rotation matrix.

Return value

The inversed rotation matrix.

dvec3 getNEDPosition (dvec3 position)

Converts WGS84 position to NED relative to origin.

Arguments

  • dvec3 position - Position in WGS coordinates.

Return value

Position in NED coordinates.

dvec3 getWGSPosition (dvec3 position)

Converts the NED position to WGS84 relative to origin.

Arguments

  • dvec3 position - Position in NED coordinates.

Return value

Position in WGS coordinates.

dvec3 WGSToECF (dvec3 position)

Converts the WGS84 position to ECF.

Arguments

  • dvec3 position - Position in WGS coordinates.

Return value

Position in ECF coordinates.

dvec3 ECFToWGS (dvec3 position)

Converts the ECF position to WGS.

Arguments

  • dvec3 position - Position in ECF coordinates.

Return value

Position in WGS coordinates.
Last update: 2017-07-03
Build: ()