ofp

package
v0.0.0-...-db4f834 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Airport

type Airport struct {
	ICAOCode   string  `xml:"icao_code"`
	PlanRunway string  `xml:"plan_rwy"`
	Name       string  `xml:"name"`
	Elevation  int     `xml:"elevation"`
	Latitude   float64 `xml:"pos_lat"`
	Longitude  float64 `xml:"pos_long"`
}

type Fix

type Fix struct {
	Ident       string  `xml:"ident"`
	Name        string  `xml:"name"`
	Type        string  `xml:"type"`
	Latitude    float64 `xml:"pos_lat"`
	Longitude   float64 `xml:"pos_long"`
	Stage       string  `xml:"stage"`
	IsSIDorSTAR bool    `xml:"is_sid_star"`
	Distance    float64 `xml:"distance"`
	Altitude    int     `xml:"altitude_feet"`
	KIAS        int     `xml:"ind_airspeed"`
	TAS         int     `xml:"true_airspeed"`
	MACH        float64 `xml:"mach"`
	GS          int     `xml:"groundspeed"`
}

type Flightplan

type Flightplan struct {
	// General part of the SimBrief flightplan.
	General struct {
		// Release is ... ?
		Release string `xml:"release"`

		// AirlineCode is the ICAO 3-letter code for the airline.
		AirlineCode string `xml:"icao_airline"`

		// FlightNumber is the flight number. Together with the AirlineCode
		// it forms the flight code.
		FlightNumber string `xml:"flight_number"`
	} `xml:"general"`

	Origin      Airport `xml:"origin"`
	Destination Airport `xml:"destination"`
	NavLog      []Fix   `xml:"navlog>fix"`
}

Flightplan represents an OFP flight plan.

func NewFlightPlanFromBytes

func NewFlightPlanFromBytes(contents []byte) (Flightplan, error)

func NewFlightPlanFromFile

func NewFlightPlanFromFile(path string) (Flightplan, error)

Jump to

Keyboard shortcuts

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