struct CrystalGpx::Point

Defined in:

crystal_gpx/point.cr

Constant Summary

D2R = Math::PI / 180.0

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(lat : Float64, lon : Float64) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.direction(lat1, lon1, lat2, lon2) #

return direction in degrees

before normalize south = -90 -> 180 north = 90 -> 0 east = 0 -> 90 west = 180 -> 270

after normalize south = 180 north = 0 east = 90 west = 270


[View source]
def self.direction(point1 : CrystalGpx::Point, point2 : CrystalGpx::Point) #

[View source]
def self.direction_to_human(d : Float64) : String #

[View source]
def self.distance(lat1, lon1, lat2, lon2) #

[View source]
def self.distance(point1 : CrystalGpx::Point, point2 : CrystalGpx::Point) #

[View source]
def self.from_node(n : XML::Node) #

[View source]
def self.interpolate(points : Array(CrystalGpx::Point), time : Time) #

[View source]

Instance Method Detail

def direction_to(other_lat : Float64, other_lon : Float64) #

[View source]
def direction_to(other_point : CrystalGpx::Point) #

[View source]
def distance_to(other_lat : Float64, other_lon : Float64) #

[View source]
def distance_to(other_point : CrystalGpx::Point) #

[View source]
def ele : Float64 #

[View source]
def ele=(ele : Float64) #

[View source]
def lat : Float64 #

[View source]
def lat=(lat : Float64) #

[View source]
def lon : Float64 #

[View source]
def lon=(lon : Float64) #

[View source]
def time : Time #

[View source]
def time=(time : Time) #

[View source]