mavsdk::geometry::CoordinateTransformation Class Reference

#include: geometry.h


This is a utility class for coordinate transformations.

The projections used to transform from global (lat/lon) to local (meter) coordinates are taken from: http://mathworld.wolfram.com/AzimuthalEquidistantProjection.html and inspired by the implementations in: https://github.com/PX4/ecl/blob/master/geo/geo.cpp

Data Structures

struct GlobalCoordinate

struct LocalCoordinate

Public Member Functions

Type Name Description
  CoordinateTransformation ()=delete Default constructor not available.
  CoordinateTransformation (GlobalCoordinate reference) Constructor to initialize projection reference.
  ~CoordinateTransformation ()=default Destructor.
LocalCoordinate local_from_global (GlobalCoordinate global_coordinate)const Calculate local coordinates from global coordinates.
GlobalCoordinate global_from_local (LocalCoordinate local_coordinate)const Calculate global coordinates from local coordinates.

Constructor & Destructor Documentation

CoordinateTransformation()

mavsdk::geometry::CoordinateTransformation::CoordinateTransformation()=delete

Default constructor not available.

CoordinateTransformation()

mavsdk::geometry::CoordinateTransformation::CoordinateTransformation(GlobalCoordinate reference)

Constructor to initialize projection reference.

Parameters

~CoordinateTransformation()

mavsdk::geometry::CoordinateTransformation::~CoordinateTransformation()=default

Destructor.

Member Function Documentation

local_from_global()

LocalCoordinate mavsdk::geometry::CoordinateTransformation::local_from_global(GlobalCoordinate global_coordinate) const

Calculate local coordinates from global coordinates.

Parameters

Returns

LocalCoordinate -

global_from_local()

GlobalCoordinate mavsdk::geometry::CoordinateTransformation::global_from_local(LocalCoordinate local_coordinate) const

Calculate global coordinates from local coordinates.

Parameters

Returns

GlobalCoordinate -

© MAVSDK Development Team 2017-2023. License: CC BY 4.0            Updated: 2023-12-27 03:10:20

results matching ""

    No results matching ""