package
Version:
v0.0.0-...-d12e797
Opens a new window with list of versions in this module.
Published: Jun 13, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
EarthRadius is the radius of the Earth in meter, UTM, WGS84
Angle calculates the angle <AOB>
the angle value: [0, 180] in degree
lat /|\
| a *
| /
| /
| o *------* b
|
+---------------> lon
type Line struct {
Points []*Point
}
Line ...
OnSide ...
Side is calc point p on which side of (a->b)
a *
| \
| \
v \
| * p
|
b *
vector a->b: ab = b - a
vector a->p: ap = p - a
cross-product: m = ab x ap
m > 0: p on the left
m < 0: p on the right
m = 0: p on the middle
type Point struct {
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
}
Point is GPS point
Source Files
¶
Click to show internal directories.
Click to hide internal directories.