Documentation ¶
Overview ¶
package trackfiles records aircraft movement over time.
Index ¶
- type Frame
- type Labels
- type Trackfile
- func (t *Trackfile) Bullseye(bullseye orb.Point) brevity.Bullseye
- func (t *Trackfile) Course() bearings.Bearing
- func (t *Trackfile) Direction() brevity.Track
- func (t *Trackfile) IsLastKnownPointZero() bool
- func (t *Trackfile) LastKnown() Frame
- func (t *Trackfile) Speed() unit.Speed
- func (t *Trackfile) String() string
- func (t *Trackfile) Update(f Frame)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct { // Time within the simulation when the event occurred. // This is not a wall-clock time. It may be decades in the past or years in the future, relative to the system clock. Time time.Time // Point is the contact's 2D position. Point orb.Point // Altitude above sea level. Altitude unit.Length // Altitude above ground level, if available. AGL *unit.Length // Heading is the direction the contact is moving. This is not necessarily the direction the nose is poining. Heading unit.Angle }
Frame describes a contact's position and velocity at a point in time.
type Labels ¶
type Labels struct { // ID is the object ID from TacView. ID uint64 // 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 coalitions.Coalition // The name of the aircraft type in the ACMI file. // See https://www.tacview.net/documentation/database/en/ ACMIName string }
Labels are identifying information attached to a trackfile.
type Trackfile ¶
type Trackfile struct { // Contact contains identifying information. Contact Labels // contains filtered or unexported fields }
Trackfile tracks a contact's movement over time.
func NewTrackfile ¶
func (*Trackfile) Bullseye ¶
Bullseye returns the bearing and distance from the bullseye to the track's last known position.
func (*Trackfile) Course ¶
Course returns the angle that the track is moving in. If the track has not moved very far, the course may be unreliable. You can check for this condition by checking if Trackfile.Direction returns brevity.UnknownDirection.
func (*Trackfile) Direction ¶
Direction returns the cardinal direction that the track is moving in, or brevity.UnknownDirection if the track is not moving faster than 1 m/s.
func (*Trackfile) IsLastKnownPointZero ¶
func (*Trackfile) LastKnown ¶
LastKnown returns the most recent frame in the trackfile. If the trackfile is empty, a stub frame with a zero-value time is returned.