Code Monkey home page Code Monkey logo

egm96-universal's Introduction

egm96-universal

Node.js CI npm Coverage Status

A library to convert between EGM96-relative altitudes and WGS84 ellipsoid-relative altitudes.

Works both in the browser and node.js, you can test the result on the demo page.

It uses the EGM96 sample data file provided by the NGA to lookup reference mean sea level and performs bilinear interpolation on the result.

This library is automatically tested by CI on the reference implementation in Fortran.

This project was initially created to allow usage of KML files (that use EGM96 as reference according to the specification, just like Google Earth) in Cesium. It should work for any similar task that necessitate conversion between the two references.

Usage

Installation

npm install egm96-universal

Import

const egm96 = require('egm96-universal')

or

import * as egm96 from 'egm96-universal'

Getting mean sea level according to EGM96

const msl = egm96.meanSeaLevel(latitudeInDegrees, longitudeInDegrees)
// mean sea level in meters relative to the WGS84 ellipsoid

Convert between WGS84 ellipsoid-relative altitude and EGM96-relative altitude

const egm96Alt = egm96.ellipsoidToEgm96(latitude, longitude, altitude)
const ellipsoidAlt = egm96.egm96ToEllipsoid(latitude, longitude, altitude)

Changelog

1.1.0

  • Added Typescript definitions

License

See the license file.

Contributing

See the contribution guide.

egm96-universal's People

Contributors

nicolas-van avatar eran-pinhas avatar jleppert avatar kevmo314 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.