trackfile

package
v0.0.0-...-1c9a717 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aircraft

type Aircraft struct {
	// UnitID is the in-game ID.
	UnitID uint32
	// Name is a unique string for each aircraft.
	// If this is a player's aircraft, it will be the player's in-game name.
	Name string
	// Coalition the aircraft belongs to.
	Coalition common.Coalition
	// The string for the aircraft type in DCS. This is sometimes a weird string like FA18C_hornet, A-10C_2, or F-15ESE.
	// Use github.com/dharmab/skyeye/pkg/encyclopedia to look up the real world type.
	EditorType string
}

type Frame

type Frame struct {
	// Timestamp of the observation.
	Timestamp time.Time
	// Point is the contact's 2D position.
	Point orb.Point
	// Altitude above sea level.
	Altitude unit.Length
	// Heading is the direction the contact is moving. This is not necessarily the direction the nose is poining.
	Heading unit.Angle
	// Speed is ground speed.
	Speed unit.Speed
}

Frame describes a contact's position and velocity at a point in time.

type Trackfile

type Trackfile struct {
	// Contact contains identifying information.
	Contact Aircraft
	// Track is a collection of frames, ordered from most recent to least recent.
	Track deque.Deque[Frame]
	// MaxLength is the maximum number of frames to keep in the trackfile.
	// At least 3 are needed to distinguish linear tracks and curved tracks. More than 5 is probably excessive.
	MaxLength int
}

Trackfile tracks a contact's movement over time.

func NewTrackfile

func NewTrackfile(a Aircraft) *Trackfile

func (*Trackfile) Bullseye

func (t *Trackfile) Bullseye(bullseye orb.Point) brevity.Bullseye

func (*Trackfile) LastKnown

func (t *Trackfile) LastKnown() Frame

func (*Trackfile) Update

func (t *Trackfile) Update(f Frame)

Jump to

Keyboard shortcuts

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