Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,28 @@ converted to the desired coordinate system:

```
aer2ecef aer2enu aer2geodetic aer2ned
aer2nwu aer2sez
body2ecef body2ecefv body2enu body2geodetic body2ned
body2nwu body2sez
ecef2aer ecef2enu ecef2enuv ecef2geodetic ecef2ned ecef2nedv
ecef2body ecef2bodyv
ecef2nwu ecef2nwuv ecef2sez ecef2sezv
ecef2eci eci2ecef eci2aer aer2eci geodetic2eci eci2geodetic
enu2aer enu2ecef enu2geodetic
geodetic2aer geodetic2ecef geodetic2enu geodetic2ned
enu2body enu2body_matrix
ecef2enu_matrix enu2ecef_matrix
geodetic2aer geodetic2body geodetic2ecef geodetic2enu geodetic2ned
geodetic2nwu geodetic2sez
ned2aer ned2ecef ned2geodetic
ned2body ned2body_matrix
nwu2body nwu2body_matrix
sez2body sez2body_matrix
ecef2ned_matrix ned2ecef_matrix
nwu2aer nwu2ecef nwu2geodetic
ecef2nwu_matrix nwu2ecef_matrix
sez2aer sez2ecef sez2geodetic
ecef2sez_matrix sez2ecef_matrix
body_matrix body2enu_matrix body2ned_matrix body2nwu_matrix body2sez_matrix
azel2radec radec2azel
lookAtSpheroid
track2 departure meanm
Expand Down Expand Up @@ -123,8 +140,52 @@ Abbreviations:
* [ECI: Earth-centered Inertial using IERS](https://www.iers.org/IERS/EN/Home/home_node.html) via `astropy`
* [ENU: East North Up](https://en.wikipedia.org/wiki/Axes_conventions#Ground_reference_frames:_ENU_and_NED)
* [NED: North East Down](https://en.wikipedia.org/wiki/North_east_down)
* NWU: North West Up
* SEZ: South East Zenith
* [radec: right ascension, declination](https://en.wikipedia.org/wiki/Right_ascension)

### Local Frames

PyMap3D includes several local tangent-plane frames:

* `ENU` East, North, Up
* `NED` North, East, Down
* `NWU` North, West, Up
* `SEZ` South, East, Zenith

For vector-only workflows, explicit 3x3 rotation matrices are also available:

```python
import pymap3d as pm

r_ecef_to_enu = pm.ecef2enu_matrix(lat0, lon0)
r_enu_to_ecef = pm.enu2ecef_matrix(lat0, lon0)
```

### Body Frame

PyMap3D also includes an aerospace body frame:

* `x` forward
* `y` right
* `z` down

The default body attitude uses yaw / pitch / roll with `sequence="zyx"`:

* positive yaw turns right
* positive pitch is nose up
* positive roll is right wing down

```python
import pymap3d as pm

xb, yb, zb = pm.ned2body(n, e, d, yaw, pitch, roll)
n, e, d = pm.body2ned(xb, yb, zb, yaw, pitch, roll)
```

The composed body transforms can use any of the supported local parent frames:
`frame="ned"`, `frame="enu"`, `frame="nwu"`, or `frame="sez"`.

### Ellipsoid

Numerous functions in pymap3d use an ellipsoid model.
Expand Down
108 changes: 107 additions & 1 deletion src/pymap3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,31 @@
__version__ = "3.2.0"

from .aer import aer2ecef, aer2geodetic, ecef2aer, geodetic2aer
from .body import (
body2ecef,
body2ecefv,
body2enu,
body2enu_matrix,
body2geodetic,
body2ned,
body2ned_matrix,
body2nwu,
body2nwu_matrix,
body2sez,
body2sez_matrix,
body_matrix,
ecef2body,
ecef2bodyv,
enu2body,
enu2body_matrix,
geodetic2body,
ned2body,
ned2body_matrix,
nwu2body,
nwu2body_matrix,
sez2body,
sez2body_matrix,
)
from .dca import (
enu2dca,
dca2enu,
Expand All @@ -57,16 +82,50 @@
uvw2enu,
)
from .ellipsoid import Ellipsoid
from .enu import aer2enu, enu2aer, enu2geodetic, geodetic2enu, enu2ecefv
from .enu import (
aer2enu,
enu2aer,
enu2geodetic,
geodetic2enu,
enu2ecefv,
ecef2enu_matrix,
enu2ecef_matrix,
)
from .ned import (
aer2ned,
ecef2ned,
ecef2nedv,
ecef2ned_matrix,
geodetic2ned,
ned2ecef_matrix,
ned2aer,
ned2ecef,
ned2geodetic,
)
from .nwu import (
aer2nwu,
ecef2nwu,
ecef2nwuv,
ecef2nwu_matrix,
geodetic2nwu,
nwu2aer,
nwu2ecef,
nwu2ecefv,
nwu2ecef_matrix,
nwu2geodetic,
)
from .sez import (
aer2sez,
ecef2sez,
ecef2sezv,
ecef2sez_matrix,
geodetic2sez,
sez2aer,
sez2ecef,
sez2ecefv,
sez2ecef_matrix,
sez2geodetic,
)
from .sidereal import datetime2sidereal, greenwichsrt
from .spherical import geodetic2spherical, spherical2geodetic
from .timeconv import str2dt
Expand Down Expand Up @@ -97,6 +156,29 @@
"aer2geodetic",
"ecef2aer",
"geodetic2aer",
"body_matrix",
"ned2body_matrix",
"body2ned_matrix",
"enu2body_matrix",
"body2enu_matrix",
"ned2body",
"body2ned",
"enu2body",
"body2enu",
"sez2body",
"body2sez",
"nwu2body",
"body2nwu",
"sez2body_matrix",
"body2sez_matrix",
"nwu2body_matrix",
"body2nwu_matrix",
"ecef2body",
"body2ecef",
"ecef2bodyv",
"body2ecefv",
"geodetic2body",
"body2geodetic",
"ecef2enu",
"ecef2enuv",
"ecef2geodetic",
Expand All @@ -112,13 +194,37 @@
"enu2geodetic",
"enu2ecefv",
"geodetic2enu",
"ecef2enu_matrix",
"enu2ecef_matrix",
"aer2ned",
"ecef2ned",
"ecef2nedv",
"ecef2ned_matrix",
"geodetic2ned",
"ned2aer",
"ned2ecef",
"ned2ecef_matrix",
"ned2geodetic",
"aer2sez",
"ecef2sez",
"ecef2sezv",
"ecef2sez_matrix",
"geodetic2sez",
"sez2aer",
"sez2ecef",
"sez2ecefv",
"sez2ecef_matrix",
"sez2geodetic",
"aer2nwu",
"ecef2nwu",
"ecef2nwuv",
"ecef2nwu_matrix",
"geodetic2nwu",
"nwu2aer",
"nwu2ecef",
"nwu2ecefv",
"nwu2ecef_matrix",
"nwu2geodetic",
"datetime2sidereal",
"greenwichsrt",
"geodetic2spherical",
Expand Down
Loading