struct CrystalGpx::Point
- CrystalGpx::Point
- Struct
- Value
- Object
Defined in:
crystal_gpx/point.crConstant Summary
-
D2R =
Math::PI / 180.0
Constructors
Class Method Summary
-
.direction(lat1, lon1, lat2, lon2)
return direction in degrees
- .direction(point1 : CrystalGpx::Point, point2 : CrystalGpx::Point)
- .direction_to_human(d : Float64) : String
- .distance(lat1, lon1, lat2, lon2)
- .distance(point1 : CrystalGpx::Point, point2 : CrystalGpx::Point)
- .from_node(n : XML::Node)
- .interpolate(points : Array(CrystalGpx::Point), time : Time)
Instance Method Summary
- #direction_to(other_lat : Float64, other_lon : Float64)
- #direction_to(other_point : CrystalGpx::Point)
- #distance_to(other_lat : Float64, other_lon : Float64)
- #distance_to(other_point : CrystalGpx::Point)
- #ele : Float64
- #ele=(ele : Float64)
- #lat : Float64
- #lat=(lat : Float64)
- #lon : Float64
- #lon=(lon : Float64)
- #time : Time
- #time=(time : Time)
Constructor Detail
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