Coder Social home page Coder Social logo

simonpoole / earth-gravitational-model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barbeau/earth-gravitational-model

0.0 1.0 0.0 246 KB

A lightweight port of the GeoTools EarthGravitationalModel (http://docs.geotools.org/latest/javadocs/org/geotools/referencing/operation/transform/EarthGravitationalModel.html).

Java 100.00%

earth-gravitational-model's Introduction

earth-gravitational-model Build Status

A lightweight port of the GeoTools EarthGravitationalModel (source code) that can be used on Android without requiring the entire GeoTools suite.

From the original EarthGravitationalModel.java file:

This class transforms vertical coordinates using coefficients from the Earth Gravitational Model. This class is an adaption of Fortran code clenqt.for from the National Geospatial-Intelligence Agency and available in public domain. The normalized geopotential coefficients file bundled in this module is an adaptation of egm180.nor file, with some spaces trimmed.

The egm180.nor file is included in src/main/resources directory in this project.

Requirements

You'll need JDK 7 or higher.

Usage

The below example shows how to use the EarthGravitationalModel.

EarthGravitationalModel gh = new EarthGravitationalModel();
gh.load("/egm180.nor");

// GPS lat, lon, and altitude
double lat = 45;
double lon = 45;
double altitudeWgs84 = 0;

// Calculate the offset between the ellipsoid and geoid
double offset = gh.heightOffset(lon, lat, altitudeWgs84);

// Add the offset to the GPS altitude to get the height above the geoid (in meters)
double altitudeMeanSeaLevel = altitudeWgs84 + offset;

Compiling the code yourself

Setting up your environment

This project was created in IntelliJ. You can also compile it from the command line using Maven.

Getting the code

To get started with this project, use a Git client to clone this repository to your local computer. Then, in IntelliJ import the project as a Maven project.

Build the project

  • IntelliJ - Clean and build the project
  • Maven - mvn install

earth-gravitational-model's People

Contributors

barbeau avatar

Watchers

 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.