Skip to content

Commit

Permalink
metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Dec 9, 2019
1 parent 9ec957f commit f5d78d7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 64 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: [scivision]
ko_fi: scivision
48 changes: 20 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Meson
run: python -m pip install meson
python-version: '3.x'
- run: pip install -r requirements.txt
- name: Install packages
run: sudo apt install -yq --no-install-recommends ninja-build gfortran
- name: Meson configure
run: meson setup build -Drealbits=64
run: |
sudo apt update -yq
sudo apt install -yq --no-install-recommends gfortran
- run: meson setup build -Drealbits=64
env:
FC: gfortran
- name: Meson test
run: meson test -C build -v
- run: meson test -C build -v
- uses: actions/upload-artifact@v1
if: failure()
with:
Expand All @@ -33,17 +32,16 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Meson
run: python -m pip install meson
python-version: '3.x'
- run: pip install -r requirements.txt
- name: Install packages
run: sudo apt install -yq --no-install-recommends ninja-build gfortran
- name: Meson configure
run: meson setup build -Drealbits=32
run: |
sudo apt update -yq
sudo apt install -yq --no-install-recommends gfortran
- run: meson setup build -Drealbits=32
env:
FC: gfortran
- name: Meson test
run: meson test -C build -v
- run: meson test -C build -v
- uses: actions/upload-artifact@v1
if: failure()
with:
Expand All @@ -54,26 +52,20 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Cmake configure
run: cmake -B build -Drealbits=64 -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
- run: cmake -B build -Drealbits=64 -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
env:
FC: gfortran
- name: Cmake build
run: cmake --build build --parallel
- name: Cmake test
run: ctest -V
- run: cmake --build build --parallel
- run: ctest -V
working-directory: build

windowsCmake32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Cmake configure
run: cmake -B build -Drealbits=32 -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
- run: cmake -B build -Drealbits=32 -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
env:
FC: gfortran
- name: Cmake build
run: cmake --build build --parallel
- name: Cmake test
run: ctest -V
- run: cmake --build build --parallel
- run: ctest -V
working-directory: build
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.7)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug or Release")
endif()
project(MapTran Fortran)
project(MapTran
LANGUAGES Fortran
VERSION 1.1.0)
enable_testing()

include(cmake/compilers.cmake)
Expand Down
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[![DOI](https://zenodo.org/badge/144193557.svg)](https://zenodo.org/badge/latestdoi/144193557)
# Maptran 3D

[![DOI](https://zenodo.org/badge/144193557.svg)](https://zenodo.org/badge/latestdoi/144193557)
[![Actions Status](https://github.com/scivision/maptran3d/workflows/ci/badge.svg)](https://github.com/scivision/maptran3d/actions)


# Maptran 3D
Modern Fortran 3D coordinate conversions for geospace ecef enu eci.
Similar to Python
[PyMap3D](https://github.com/scivision/pymap3d)
Expand All @@ -23,6 +22,14 @@ Note: as with any program or programming language, the accuracy of 32-bit reals
The large real values typical of map coordinates can lead to large error with 32-bit reals.
64-bit reals are the default.

### Meson

```sh
meson build

meson test -C build
```

### CMake

```sh
Expand All @@ -36,20 +43,11 @@ ctest -V
```

Optionally, verify Fortran functionality:
```sh
ctest -V
```

### Meson

```sh
meson build

meson test -C build
ctest -V
```



## Usage

The modern Fortran API is simple like PyMap3D and Matlab Mapping Toolbox.
Expand All @@ -67,6 +65,7 @@ call geodetic2aer(lat,lon,alt, observer_lat, observer_lon, observer_alt)
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
Expand All @@ -79,13 +78,12 @@ 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)
* [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.

6 changes: 0 additions & 6 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,3 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL NAG)
endif()

include(CheckFortranSourceCompiles)

check_fortran_source_compiles("use, intrinsic:: ieee_arithmetic; end"
f08ieee SRC_EXT f90)
if(NOT f08ieee)
message(FATAL_ERROR "IEEE_arithmetic not supported by " ${CMAKE_Fortran_COMPILER_ID})
endif()
16 changes: 6 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
project('MapTran', 'fortran',
version: '1.1.0',
meson_version : '>=0.51.2',
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3', 'fortran_std=f2018'])

realbits = '-DREALBITS='+get_option('realbits')
realbits = '-DREALBITS=' + get_option('realbits')

fc = meson.get_compiler('fortran')
f18flag = fc.first_supported_argument(['-std=f2018', '-stand f18', '/stand:f18'])
if fc.get_id() == 'gcc'
add_project_arguments('-fimplicit-none', f18flag, language : 'fortran')
elif fc.get_id() == 'intel'
add_project_arguments('-warn', '-heap-arrays', f18flag, language : 'fortran')
if fc.get_id() == 'intel'
add_project_arguments('-heap-arrays', language : 'fortran')
elif fc.get_id() == 'intel-cl'
add_project_arguments('/fpp', '/warn', '/heap-arrays', f18flag, language : 'fortran')
elif fc.get_id() == 'pgi'
add_project_arguments('-C', '-Mdclchk', language : 'fortran')
add_project_arguments('/fpp', '/heap-arrays', language : 'fortran')
endif

subdir('src')
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
meson
meson
ninja

0 comments on commit f5d78d7

Please sign in to comment.