GithubHelp home page GithubHelp logo

cppmap3d's Introduction

cppmap3d

Header only single file C++ Implementation of pymap3d. API is similar to the $1000 Matlab Mapping toolbox.

Docs

Usage

#include "cppmap3d.hh"

double x = ..., y = ..., z = ...;

double x, y, z;
cppmap3d::geodetic2ecef(lat, lon, alt, x, y, z);

double az, el, range;
cppmap3d::geodetic2aer(lat, lon, alt, observer_lat, observer_lon, observer_alt, az, el, range);

If speed is important the library includes an alternative ecef2geodetic implementation that is faster according to this comparison. A microbenchmark is included in src/benchmarks indicating about 2x the performance. However, this implementation does not handle degenerate cases as well.

#define CPPMAP3D_ECEF2GEODETIC_OLSON
#include "cppmap3d.hh"

double x = ..., y = ..., z = ...;
double lat, lon, alt;
cppmap3d::ecef2geodetic(x, y, z, lat, lon, alt);

Install

Copy cppmap3d.hh into your project files.

Prerequisites

Tests run at C++11, use at own risk for older compiler versions.

Functions

aer2ecef  aer2enu  aer2geodetic  aer2ned
ecef2aer  ecef2enu  ecef2geodetic  ecef2ned
enu2aer  enu2ecef   enu2geodetic
geodetic2aer  geodetic2ecef  geodetic2enu  geodetic2ned
ned2aer  ned2ecef   ned2geodetic

Abbreviations:

Limitations

Unlike pymap3d this library cannot take advantage of SIMD by processing large vectorized inputs. This is non-trivial in C++ but feel free to submit a PR.

Doubles are used for all operations, if anyone wants to refactor for arbitrary precision, submit a PR.

Similar toolboxes in other languages

cppmap3d's People

Contributors

clancywalters avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.