Module: GeoPoint::Calc::Destination

Defined in:
lib/geo_point/calc.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.destination_point(base_point, brng, dist) ⇒ Object

Returns the destination point from this point having travelled the given distance (in km) on the given initial bearing (bearing may vary before destination is reached)

see http:#williams.best.vwh.net/avform.htm#LL
  • Numeric bearing: Initial bearing in degrees

  • Numeric dist: Distance in km

Returns GeoPoint: Destination point



23
24
25
# File 'lib/geo_point/calc.rb', line 23

def self.destination_point base_point, brng, dist
  GeoPoint.new GeoCalc::Destination.destination_point(base_point, brng, dist).to_coords
end

Instance Method Details

#destination_point(brng, dist) ⇒ Object



11
12
13
# File 'lib/geo_point/calc.rb', line 11

def destination_point brng, dist
  GeoPoint.new GeoCalc::Destination.destination_point(self, brng, dist).to_coords
end