krisajenkins / elm-exts / Exts.LatLng

Calculations between points on the earth.

distanceBetween : { a | latitude : Basics.Float, longitude : Basics.Float } -> { b | latitude : Basics.Float, longitude : Basics.Float } -> Basics.Float

Calculate the distance in kilometers between two points.

Note that this assumes the earth is spherical, which is not true, but may be true enough for your purposes.

bearingTo : { a | latitude : Basics.Float, longitude : Basics.Float } -> { b | latitude : Basics.Float, longitude : Basics.Float } -> Basics.Float

Calculate the heading you'd need to travel on to get from point a to point b.