util

package
v0.0.0-...-7b3ddb2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EARTH_EQUATOR = 2 * math.Pi * EARTH_SEMI_LONG_AXIS
View Source
const EARTH_RADIUS = 6378137
View Source
const EARTH_RADIUS_FLOAT64 = float64(EARTH_RADIUS)
View Source
const EARTH_SEMI_LONG_AXIS = 6378137.0

Earth semi long axis defined by WGS84 in meters

View Source
const EARTH_SEMI_SHORT_AXIS = 6378137.0

Earth semi short axis defined by WGS84 in meters

View Source
const RAD = math.Pi / 180.0

Variables

This section is empty.

Functions

func DistancePerDegree

func DistancePerDegree() float64

func GeoDistanceAre

func GeoDistanceAre(lat1, lon1, lat2, lon2 float64) (float64, error)

func GeoDistancePlane

func GeoDistancePlane(lat1, lon1, lat2, lon2 float64) (float64, error)

Types

type GeoLocation

type GeoLocation struct {
	Lat float64 `json:"lat,omitempty"`
	Lon float64 `json:"lon,omitempty"`
}

func GeoLocationFromOrigin

func GeoLocationFromOrigin(origin string) (GeoLocation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL