Documentation
¶
Overview ¶
package sim provides an inteface for receiving telemetry data from DCS World
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Faded ¶
type Faded struct {
// Real-time timestamp when the aircraft disappeared.
Timestamp time.Time
// Mission time when the aircraft disappeared.
MissionTimestamp time.Time
// ID of the aircraft that disappeared.
ID uint64
}
Faded is a message sent when an aircraft disappears.
type Sim ¶
type Sim interface {
// Stream aircraft updates from the sim to the provided channels.
// The first channel receives updates for active aircraft.
// The second channel receives messages when an aircraft disappears.
// This function blocks until the context is cancelled.
Stream(context.Context, chan<- Started, chan<- Updated, chan<- Faded)
// Bullseye returns the coalition's bullseye center.
Bullseye(coalitions.Coalition) (orb.Point, error)
// Time returns the starting time of the mission.
// This is useful for looking up magnetic variation.
Time() time.Time
}
Sim is the interface for receiving telemetry data from the flight simulator.
type Started ¶ added in v0.4.0
type Started struct {
// Real-time timestamp when the mission start was observed.
Timestamp time.Time
// Mission time when the mission started.
MissionTimestamp time.Time
}
Started is a message sent when a new mission starts.
type Updated ¶
type Updated struct {
// Labels contains the aircraft's identity.
Labels trackfiles.Labels
// Frame contains the aircraft's observed position data.
Frame trackfiles.Frame
}
Updated is a message sent when an aircraft is updated.
Click to show internal directories.
Click to hide internal directories.