module Geodesy
Will return a coordinate based on a starting point, the bearing, and the distance.
Constants
- COMPASS_POINTS
- DEGREES_PER_RADIAN
- EARTH_RADIUS
- KM_TO_MI
- METERS_TO_YARDS
- VERSION
- YARDS_PER_METER
Public Instance Methods
bearing(starting, ending)
click to toggle source
starting is an array of [ lat, lng ] ending is an array of [ lat, lng ]
Returns
It returns a floating point number
# File lib/geodesy.rb, line 21 def bearing(starting, ending) Bearing.new( Coordinates.new(*starting), Coordinates.new(*ending) ).calculate end
final_coordinate(starting, bearing, distance = 10)
click to toggle source
starting is an array of [ lat, lng ] bearing is a float distance is an integer or float - units: meters
Returns
It returns a Coordinates
Object
# File lib/geodesy.rb, line 38 def final_coordinate(starting, bearing, distance = 10) Destination.new( Coordinates.new(*starting), bearing, distance ).calculate end