https://github.com/geospace-code/maptran3d
Modern Fortran 3D coordinate conversions for geospace ecef enu eci
https://github.com/geospace-code/maptran3d
coordinate-conversions coordinate-transformation fortran2018 geodesy modern-fortran
Last synced: 3 months ago
JSON representation
Modern Fortran 3D coordinate conversions for geospace ecef enu eci
- Host: GitHub
- URL: https://github.com/geospace-code/maptran3d
- Owner: geospace-code
- License: bsd-2-clause
- Created: 2018-08-09T19:12:24.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2022-11-25T18:56:07.000Z (almost 3 years ago)
- Last Synced: 2025-04-12T17:27:36.967Z (6 months ago)
- Topics: coordinate-conversions, coordinate-transformation, fortran2018, geodesy, modern-fortran
- Language: Fortran
- Homepage:
- Size: 155 KB
- Stars: 14
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
- Codemeta: codemeta.json
Awesome Lists containing this project
README
# Maptran 3D
[](https://zenodo.org/badge/latestdoi/144193557)
Modern Fortran 3D coordinate conversions for geospace ecef enu eci.
Similar to Python
[PyMap3D](https://github.com/scivision/pymap3d)
and Matlab
[Matmap3d](https://github.com/geospace-code/matmap3d).Default real precision is double precision (64 bit).
```sh
cmake -B build
cmake --build build
```Set 32-bit real by:
```sh
cmake -B build -Drealbits=32
cmake --build build
```which produces build/libmaptran.a or similar.
The modern Fortran API is simple like PyMap3D and Matlab Mapping Toolbox.
`elemental` procedures are used throughout to enable seamless support of scalar or array coordinate inputs.```fortran
use maptrancall geodetic2ecef(lat,lon,alt, x,y,z)
call geodetic2aer(lat,lon,alt, observer_lat, observer_lon, observer_alt)
```## Functions
Popular mapping toolbox functions ported to Fortran 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
azel2radec radec2azel
lookAtSpheroid
```Abbreviations:
* [AER: Azimuth, Elevation, Range](https://en.wikipedia.org/wiki/Spherical_coordinate_system)
* [ECEF: Earth-centered, Earth-fixed](https://en.wikipedia.org/wiki/ECEF)
* [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)## Caveats
* Atmospheric effects neglected in all functions.
* Planetary perturbations and nutation etc. not fully considered.