Module: Latitude
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
- #final_bearing(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
- #great_circle_distance(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
- #initial_bearing(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
Instance Method Details
#final_bearing(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
19 20 21 22 |
# File 'lib/latitude.rb', line 19 def final_bearing(start_latitude, start_longitude, end_latitude, end_longitude) Vincenty.final_bearing(start_latitude, start_longitude, end_latitude, end_longitude) end |
#great_circle_distance(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/latitude.rb', line 6 def great_circle_distance(start_latitude, start_longitude, end_latitude, end_longitude) # in kilometers m_distance = Vincenty.great_circle_distance(start_latitude, start_longitude, end_latitude, end_longitude) return m_distance / 1000.0 end |
#initial_bearing(start_latitude, start_longitude, end_latitude, end_longitude) ⇒ Object
14 15 16 17 |
# File 'lib/latitude.rb', line 14 def initial_bearing(start_latitude, start_longitude, end_latitude, end_longitude) Vincenty.initial_bearing(start_latitude, start_longitude, end_latitude, end_longitude) end |