airspace

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

README

gb-airspace

Go library and REST server for UK airspace for Paraglider / hang glider pilots

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearanceRequired

func ClearanceRequired(f Feature) bool

func Danger

func Danger(f Feature) bool

func ToSVG

func ToSVG(features []Feature, w io.Writer) error

Types

type Circle

type Circle struct {
	Radius float64
	Centre orb.Point
}

type Feature

type Feature struct {
	ID       string
	Name     string
	Type     string
	Class    string
	Geometry []Volume
}

func Decode

func Decode(data []byte) ([]Feature, error)

func Load

func Load(url string) ([]Feature, error)

func LoadFile

func LoadFile(fileName string) ([]Feature, error)

type Volume

type Volume struct {
	ID                string
	Name              string
	Type              string
	Class             string
	Sequence          int
	Lower             float64
	Upper             float64
	ClearanceRequired bool
	Danger            bool
	// The (horizontal) shape will be either a circle or a polygon.
	// One of:
	Circle  Circle
	Polygon orb.Ring
}

func EnclosingVolumes added in v1.0.1

func EnclosingVolumes(point orb.Point, features []Feature) []Volume

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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