location

package
v1.31.0-release.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccuracyUnitsFeet          = "feet"
	AccuracyUnitsMeters        = "meters"
	AccuracyValueFeetMaximum   = AccuracyValueMetersMaximum / 0.3048
	AccuracyValueFeetMinimum   = AccuracyValueMetersMinimum / 0.3048
	AccuracyValueMetersMaximum = 1000.0
	AccuracyValueMetersMinimum = 0.0
)
View Source
const (
	ElevationUnitsFeet          = "feet"
	ElevationUnitsMeters        = "meters"
	ElevationValueFeetMaximum   = ElevationValueMetersMaximum / 0.3048
	ElevationValueFeetMinimum   = ElevationValueMetersMinimum / 0.3048
	ElevationValueMetersMaximum = 1000000.0
	ElevationValueMetersMinimum = -20000.0
)
View Source
const (
	GPSFloorMaximum = 1000
	GPSFloorMinimum = -1000
)
View Source
const (
	LatitudeUnitsDegrees        = "degrees"
	LatitudeValueDegreesMaximum = 90.0
	LatitudeValueDegreesMinimum = -90.0
)
View Source
const (
	LongitudeUnitsDegrees        = "degrees"
	LongitudeValueDegreesMaximum = 180.0
	LongitudeValueDegreesMinimum = -180.0
)
View Source
const NameLengthMaximum = 100

Variables

This section is empty.

Functions

func AccuracyUnits

func AccuracyUnits() []string

func AccuracyValueRangeForUnits

func AccuracyValueRangeForUnits(units *string) (float64, float64)

func ElevationUnits

func ElevationUnits() []string

func ElevationValueRangeForUnits

func ElevationValueRangeForUnits(units *string) (float64, float64)

func LatitudeUnits

func LatitudeUnits() []string

func LatitudeValueRangeForUnits

func LatitudeValueRangeForUnits(units *string) (float64, float64)

func LongitudeUnits

func LongitudeUnits() []string

func LongitudeValueRangeForUnits

func LongitudeValueRangeForUnits(units *string) (float64, float64)

Types

type Accuracy

type Accuracy struct {
	Units *string  `json:"units,omitempty" bson:"units,omitempty"`
	Value *float64 `json:"value,omitempty" bson:"value,omitempty"`
}

func NewAccuracy

func NewAccuracy() *Accuracy

func ParseAccuracy

func ParseAccuracy(parser structure.ObjectParser) *Accuracy

func (*Accuracy) Parse

func (a *Accuracy) Parse(parser structure.ObjectParser)

func (*Accuracy) Validate

func (a *Accuracy) Validate(validator structure.Validator)

type Elevation

type Elevation struct {
	Units *string  `json:"units,omitempty" bson:"units,omitempty"`
	Value *float64 `json:"value,omitempty" bson:"value,omitempty"`
}

func NewElevation

func NewElevation() *Elevation

func ParseElevation

func ParseElevation(parser structure.ObjectParser) *Elevation

func (*Elevation) Parse

func (e *Elevation) Parse(parser structure.ObjectParser)

func (*Elevation) Validate

func (e *Elevation) Validate(validator structure.Validator)

type GPS

type GPS struct {
	Elevation          *Elevation     `json:"elevation,omitempty" bson:"elevation,omitempty"`
	Floor              *int           `json:"floor,omitempty" bson:"floor,omitempty"`
	HorizontalAccuracy *Accuracy      `json:"horizontalAccuracy,omitempty" bson:"horizontalAccuracy,omitempty"`
	Latitude           *Latitude      `json:"latitude,omitempty" bson:"latitude,omitempty"`
	Longitude          *Longitude     `json:"longitude,omitempty" bson:"longitude,omitempty"`
	Origin             *origin.Origin `json:"origin,omitempty" bson:"origin,omitempty"`
	VerticalAccuracy   *Accuracy      `json:"verticalAccuracy,omitempty" bson:"verticalAccuracy,omitempty"`
}

func NewGPS

func NewGPS() *GPS

func ParseGPS

func ParseGPS(parser structure.ObjectParser) *GPS

func (*GPS) Parse

func (g *GPS) Parse(parser structure.ObjectParser)

func (*GPS) Validate

func (g *GPS) Validate(validator structure.Validator)

type Latitude

type Latitude struct {
	Units *string  `json:"units,omitempty" bson:"units,omitempty"`
	Value *float64 `json:"value,omitempty" bson:"value,omitempty"`
}

func NewLatitude

func NewLatitude() *Latitude

func ParseLatitude

func ParseLatitude(parser structure.ObjectParser) *Latitude

func (*Latitude) Parse

func (l *Latitude) Parse(parser structure.ObjectParser)

func (*Latitude) Validate

func (l *Latitude) Validate(validator structure.Validator)

type Location

type Location struct {
	GPS  *GPS    `json:"gps,omitempty" bson:"gps,omitempty"`
	Name *string `json:"name,omitempty" bson:"name,omitempty"`
}

func NewLocation

func NewLocation() *Location

func ParseLocation

func ParseLocation(parser structure.ObjectParser) *Location

func (*Location) Parse

func (l *Location) Parse(parser structure.ObjectParser)

func (*Location) Validate

func (l *Location) Validate(validator structure.Validator)

type Longitude

type Longitude struct {
	Units *string  `json:"units,omitempty" bson:"units,omitempty"`
	Value *float64 `json:"value,omitempty" bson:"value,omitempty"`
}

func NewLongitude

func NewLongitude() *Longitude

func ParseLongitude

func ParseLongitude(parser structure.ObjectParser) *Longitude

func (*Longitude) Parse

func (l *Longitude) Parse(parser structure.ObjectParser)

func (*Longitude) Validate

func (l *Longitude) Validate(validator structure.Validator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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