Git Product home page Git Product logo

greatcircle.net's Introduction

GreatCircle.NET

GreatCircle.NET - which is based on the amazing work of Chris Veness, the owner of the Geodesy functions project - provides a comprehensive set of extension methods to the BasicGeoposition struct that make working with GPS locations and performing calculations on then simple and easy.

(For a more general introduction, see: Movable Type Scripts Latitude / Longitude Calculations Reference)

Status

Thus far, I have worked on porting the spherical-earth model, which provides simple formulae covering the accuracy requirements of most use cases.

Quick Links

Getting Started

GreatCircle.NET should be used via NuGet dependency manager.

Documentation

CrossTrackDistance(thisPosition, startPosition, endPosititon)

Summary

Calculates the cross track distance of this position relative to the specified start position and end position.

Returns

The cross track distance of this position relative to the specified start position and end position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
startPosition BasicGeoposition The start position.
endPosititon BasicGeoposition The end position.

CrossTrackMethods

CrossTrackPosition(thisPosition, startPosition, endPosititon)

Summary

Calculates a position representing the cross track point of this location relative to the specified start position and end position.

Returns

A position representing the cross track point of this location relative to the specified start position and end position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
startPosition BasicGeoposition The start position.
endPosititon BasicGeoposition The end position.

CrossTrackMethods

DistanceToOtherPosition(thisPosition, position)

Summary

Calculates the distance (in meters) between this position and the other position.

Returns

The distance (in meters) between this position and the other position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
position BasicGeoposition The other position.

EqualToPosition(thisPosition, position, includeAltitude)

Summary

Compares this position to the other position for equality.

Returns

true, if the positions are the same; otherwise, false.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
position BasicGeoposition The other position.
includeAltitude System.Boolean A value which indicates whether to include altitude in the comparison.

FinalBearingToPosition(thisPosition, position)

Summary

Calculates the final bearing (in degrees) between this position and the other position.

Returns

The final bearing (in degrees) between this position and the other position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
position BasicGeoposition The other position.
Remarks

The final bearing will differ from the initial bearing by varying degrees according to distance and latitude.

InitialBearingToPosition(thisPosition, position)

Summary

Calculates the initial bearing (in degrees) between this position and the other position.

Returns

The initial bearing (in degrees) between this position and the other position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
position BasicGeoposition The other position.

IntersectionOf(position1, bearing1, position2, bearing2)

Summary

Calculates a location representing the point of intersection of two paths, each specified by a location and bearing.

Returns

A location representing the point of intersection of two paths, each specified by a location and bearing.

Parameters
Name Type Description
position1 BasicGeoposition The first position.
bearing1 System.Double The first bearing.
position2 BasicGeoposition The second position.
bearing2 System.Double The second bearing.

LocationWithBearingAndDistance(thisPosition, bearing, distance)

Summary

Calculates a position representing the point that lies at the specified bearing and distance from this position.

Returns

A position representing the point that lies at the specified bearing and distance from this position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
bearing System.Double The bearing.
distance System.Double The distance.

MidpointToPosition(thisPosition, position)

Summary

Calculates a position representing the midpoint between this position and the other position.

Returns

A position representing the midpoint between this position and the other position.

Parameters
Name Type Description
thisPosition BasicGeoposition This position.
position BasicGeoposition The other position.

Midpoint

Contributing

GreatCircle is a work in progress and your contributions are most welcome. Feel free to fork the repo and submit PR's.

License

GreatCircle is released under the MIT License.

greatcircle.net's People

Contributors

softwarenerd avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

cedarlogic

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.