Skip to content

geospace-code/matmap3d

Repository files navigation

MatMap3d

DOI View matmap3d on File Exchange

Matlab coordinate conversions for geospace ecef enu eci. Similar to Python PyMap3D.

Usage

MatMap3D is setup as a Matlab package, which means import matmap3d statements allow scoped use of this code.

import matmap3d.*
% or add matmap3d. to start of function name

[x,y,z] = geodetic2ecef([],lat,lon,alt)

[az,el,range] = geodetic2aer(lat, lon, alt, observer_lat, observer_lon, observer_alt)

Optionally, verify functionality:

matmap3d.tests.test_unit

Functions

Popular mapping & aerospace toolbox functions ported to Matlab include the following, where the source coordinate system (before the "2") is converted to the desired coordinate system:

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

Abbreviations:

Caveats

  • Atmospheric effects neglected in all functions not invoking AstroPy. Would need to update code to add these input parameters (just start a GitHub Issue to request).
  • Planetary perturbations and nutation etc. not fully considered.

Mathworks currently charges $1000 for the Matlab Mapping Toolbox that provides these functions.

Notes

The full set of Python conversions are accessed from Matlab ≥ R2014b by commands like:

lla = py.pymap3d.geodetic2ecef(x,y,z)