stars

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: GPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AudioConflictAlert = iota
	AudioSquawkSPC
	AudioMinimumSafeAltitudeWarning
	AudioModeCIntruder
	AudioTest
	AudioInboundHandoff
	AudioCommandError
	AudioHandoffAccepted
	AudioNumTypes
)

The types of events we may play audio for.

View Source
const (
	CRDAModeStagger = iota
	CRDAModeTie
)
View Source
const (
	VideoMapNoCategory = iota - 1
	VideoMapGeographicMaps
	VideoMapControlledAirspace
	VideoMapRunwayExtensions
	VideoMapDangerAreas
	VideoMapAerodromes
	VideoMapGeneralAviation
	VideoMapSIDsSTARs
	VideoMapMilitary
	VideoMapGeographicPoints
	VideoMapProcessingAreas
	VideoMapCurrent
	VideoMapNumCategories
)
View Source
const (
	// Make 0 be "on" so zero-initialization gives "on"
	DwellModeOn = iota
	DwellModeLock
	DwellModeOff
)
View Source
const (
	RadarModeSingle = iota
	RadarModeMulti
	RadarModeFused
)
View Source
const (
	ATPAStatusUnset = iota
	ATPAStatusMonitor
	ATPAStatusWarning
	ATPAStatusAlert
)
View Source
const (
	GhostStateRegular = iota
	GhostStateSuppressed
	GhostStateForced
)
View Source
const AlertAudioDuration = 5 * time.Second
View Source
const (
	FPMThreshold = 8400 / 100
)
View Source
const LateralMinimum = 3

IFR TRACON separation requirements

View Source
const STARSFilledUpTriangle = string(rune(0x1e))

Filled upward-pointing triangle

View Source
const STARSTriangleCharacter = string(rune(0x80))

STARS ∆ is character 0x80 in the font

View Source
const TabListEntries = 100
View Source
const TabListUnassignedIndex = -1
View Source
const VerticalMinimum = 1000

Variables

View Source
var (
	ErrSTARSAmbiguousACID              = NewSTARSError("AMB ACID")
	ErrSTARSBeaconMismatch             = NewSTARSError("BCN MISMATCH")
	ErrSTARSCapacity                   = NewSTARSError("CAPACITY")
	ErrSTARSCapacityBeacon             = NewSTARSError("CAPACITY - BCN")
	ErrSTARSCommandFormat              = NewSTARSError("FORMAT")
	ErrSTARSDuplicateACID              = NewSTARSError("DUP NEW ID")
	ErrSTARSDuplicateBeacon            = NewSTARSError("DUP BCN")
	ErrSTARSDuplicateCommand           = NewSTARSError("DUP CMD")
	ErrSTARSIllegalACID                = NewSTARSError("ILL ACID")
	ErrSTARSIllegalACType              = NewSTARSError("ACTYPE NOT ADAPTED")
	ErrSTARSIllegalATIS                = NewSTARSError("ILL ATIS")
	ErrSTARSIllegalAirport             = NewSTARSError("ILL AIRPORT")
	ErrSTARSIllegalCode                = NewSTARSError("ILL CODE")
	ErrSTARSIllegalColor               = NewSTARSError("ILL COLOR")
	ErrSTARSIllegalFix                 = NewSTARSError("ILL FIX")
	ErrSTARSIllegalFlight              = NewSTARSError("ILL FLIGHT")
	ErrSTARSIllegalFunction            = NewSTARSError("ILL FUNC")
	ErrSTARSIllegalFunctionAlertActive = NewSTARSError("ILL FUNC - ALERT ACTIVE")
	ErrSTARSIllegalGeoId               = NewSTARSError("ILL GEO ID")
	ErrSTARSIllegalGeoLoc              = NewSTARSError("ILL GEO LOC")
	ErrSTARSIllegalLine                = NewSTARSError("ILL LINE")
	ErrSTARSIllegalMap                 = NewSTARSError("ILL MAP")
	ErrSTARSIllegalParam               = NewSTARSError("ILL PARAM")
	ErrSTARSIllegalPosition            = NewSTARSError("ILL POS")
	ErrSTARSIllegalPrefset             = NewSTARSError("ILL PREFSET")
	ErrSTARSIllegalRange               = NewSTARSError("ILL RANGE")
	ErrSTARSIllegalRegion              = NewSTARSError("ILL REGION")
	ErrSTARSIllegalRPC                 = NewSTARSError("ILL RPC") // CRDA runway pair config
	ErrSTARSIllegalRunway              = NewSTARSError("ILL RWY")
	ErrSTARSIllegalScratchpad          = NewSTARSError("ILL SCR")
	ErrSTARSIllegalSector              = NewSTARSError("ILL SECTOR")
	ErrSTARSIllegalText                = NewSTARSError("ILL TEXT")
	ErrSTARSIllegalTrack               = NewSTARSError("ILL TRK")
	ErrSTARSIllegalValue               = NewSTARSError("ILL VALUE")
	ErrSTARSMultipleFlights            = NewSTARSError("MULTIPLE FLIGHT")
	ErrSTARSNoFlight                   = NewSTARSError("NO FLIGHT")
	ErrSTARSNoTrack                    = NewSTARSError("NO TRK")
	ErrSTARSRangeLimit                 = NewSTARSError("RANGE LIMIT")
)
View Source
var (
	STARSBackgroundColor    = renderer.RGB{.2, .2, .2} // at 100 contrast
	STARSListColor          = renderer.RGB{.1, .9, .1}
	STARSTextAlertColor     = renderer.RGB{1, 0, 0}
	STARSTextWarningColor   = renderer.RGB{1, 1, 0}
	STARSCompassColor       = renderer.RGB{.55, .55, .55}
	STARSRangeRingColor     = renderer.RGB{.55, .55, .55}
	STARSTrackBlockColor    = renderer.RGB{0.12, 0.48, 1}
	STARSTrackHistoryColors = [5]renderer.RGB{
		renderer.RGB{.12, .31, .78},
		renderer.RGB{.28, .28, .67},
		renderer.RGB{.2, .2, .51},
		renderer.RGB{.16, .16, .43},
		renderer.RGB{.12, .12, .35},
	}
	STARSJRingConeColor         = renderer.RGB{.5, .5, 1}
	STARSTrackedAircraftColor   = renderer.RGB{1, 1, 1}
	STARSUntrackedAircraftColor = renderer.RGB{0, 1, 0}
	STARSTrackAlertColor        = renderer.RGB{1, 1, 0}
	STARSGhostColor             = renderer.RGB{1, 1, 0}
	STARSSelectedAircraftColor  = renderer.RGB{0, 1, 1}

	STARSATPAWarningColor = renderer.RGB{1, 1, 0}
	STARSATPAAlertColor   = renderer.RGB{1, .215, 0}
)

Functions

This section is empty.

Types

type ATPAStatus

type ATPAStatus int

type AudioType

type AudioType int

func (AudioType) String

func (ae AudioType) String() string

type BasicSTARSList

type BasicSTARSList struct {
	Position [2]float32
	Visible  bool
	Lines    int
}

type CAAircraft

type CAAircraft struct {
	ADSBCallsigns [2]av.ADSBCallsign // sorted alphabetically
	Acknowledged  bool
	SoundEnd      time.Time
	Start         time.Time
}

Used both for CAs and MCIs.

type CRDAMode

type CRDAMode int

type CRDARunwayPairState

type CRDARunwayPairState struct {
	Enabled     bool
	Mode        CRDAMode
	RunwayState [2]CRDARunwayState
}

stores the per-preference set state for each STARSConvergingRunways

type CRDARunwayState

type CRDARunwayState struct {
	Enabled                 bool
	LeaderLineDirection     *math.CardinalOrdinalDirection // nil -> unset
	DrawCourseLines         bool
	DrawQualificationRegion bool
}

type CommandMode

type CommandMode int
const (
	// Keyboard command entry modes; can be main or DCB menu for these; sp.dcbShowAux decides.
	CommandModeNone CommandMode = iota
	CommandModeInitiateControl
	CommandModeTrackReposition
	CommandModeTrackSuspend
	CommandModeTerminateControl
	CommandModeHandOff
	CommandModeVFRPlan
	CommandModeMultiFunc
	CommandModeFlightData
	CommandModeCollisionAlert
	CommandModeMin
	CommandModeTargetGen
	CommandModeTargetGenLock
	CommandModeReleaseDeparture
	CommandModeRestrictionArea
	CommandModeDrawRoute
	CommandModeDrawWind

	// These correspond to buttons on the main DCB menu.
	CommandModeRange
	CommandModePlaceCenter
	CommandModeRangeRings
	CommandModePlaceRangeRings
	CommandModeMaps
	CommandModeWX
	CommandModeBrite
	CommandModeBriteSpinner
	CommandModeLDR
	CommandModeLDRDir
	CommandModeCharSize
	CommandModeCharSizeSpinner
	CommandModeSite
	CommandModePref
	CommandModeSavePrefAs
	CommandModeSSAFilter
	CommandModeGITextFilter

	// These correspond to buttons on the secondary DCB menu.
	CommandModeVolume
	CommandModeHistory
	CommandModeHistoryRate
	CommandModePTLLength
	CommandModeDwell
	CommandModeTPA
)

func (CommandMode) PreviewString

func (c CommandMode) PreviewString(sp *STARSPane) string

type CommandStatus

type CommandStatus struct {
	// contains filtered or unexported fields
}

type CommonPreferences

type CommonPreferences struct {
	DisplayDCB  bool
	DCBPosition int

	AudioVolume int // 1-10

	RadarTrackHistory int // Number of history markers
	// 4-94: 0.5s increments via trackball but 0.1s increments allowed if
	// keyboard input.
	RadarTrackHistoryRate float32

	AudioEffectEnabled []bool

	DisplayWeatherLevel     [radar.NumWxLevels]bool
	LastDisplayWeatherLevel [radar.NumWxLevels]bool

	// For aircraft tracked by the user.
	LeaderLineDirection math.CardinalOrdinalDirection
	LeaderLineLength    int // 0-7

	OverflightFullDatablocks bool
	AutomaticFDBOffset       bool

	AutoCursorHome bool
	CursorHome     [2]float32

	DisplayTPASize               bool
	DisplayATPAInTrailDist       bool `json:"DisplayATPAIntrailDist"`
	DisplayATPAWarningAlertCones bool
	DisplayATPAMonitorCones      bool

	PTLLength      float32
	PTLOwn, PTLAll bool

	DwellMode DwellMode

	DisplaySuspendedTrackAltitude bool

	Brightness struct {
		DCB                radar.Brightness
		BackgroundContrast radar.Brightness
		VideoGroupA        radar.Brightness
		VideoGroupB        radar.Brightness
		FullDatablocks     radar.Brightness
		Lists              radar.Brightness
		Positions          radar.Brightness
		LimitedDatablocks  radar.Brightness
		OtherTracks        radar.Brightness
		Lines              radar.Brightness
		RangeRings         radar.Brightness
		Compass            radar.Brightness
		BeaconSymbols      radar.Brightness
		PrimarySymbols     radar.Brightness
		History            radar.Brightness
		Weather            radar.Brightness
		WxContrast         radar.Brightness
	}

	CharSize struct {
		DCB             int
		Datablocks      int
		Lists           int
		Tools           int
		PositionSymbols int
	}

	PreviewAreaPosition [2]float32

	SSAList struct {
		Position [2]float32
		Filter   struct {
			All                 bool
			Wx                  bool
			Time                bool
			Altimeter           bool
			Status              bool
			Radar               bool
			Codes               bool
			SpecialPurposeCodes bool
			SysOff              bool
			Range               bool
			PredictedTrackLines bool
			AltitudeFilters     bool
			Intrail             bool
			Intrail25           bool
			AirportWeather      bool
			QuickLookPositions  bool
			DisabledTerminal    bool
			ActiveCRDAPairs     bool
			WxHistory           bool

			Text struct {
				Main bool
				GI   [9]bool
			}
		}
	}
	VFRList       BasicSTARSList
	TABList       BasicSTARSList
	AlertList     BasicSTARSList
	CoastList     BasicSTARSList
	SignOnList    BasicSTARSList
	VideoMapsList struct {
		Position  [2]float32
		Visible   bool
		Selection VideoMapsGroup
	}
	CRDAStatusList      BasicSTARSList
	MCISuppressionList  BasicSTARSList
	TowerLists          [3]BasicSTARSList
	CoordinationLists   map[string]*CoordinationList
	RestrictionAreaList BasicSTARSList

	RestrictionAreaSettings map[int]*RestrictionAreaSettings
}

CommonPreferences stores the STARS preference settings that are generally TRACON-independent--font size, brightness, etc. This is admittedly somewhat subjective. Splitting them out in this way lets us maintain those settings when the user starts a scenario at a new TRACON so that they don't need to start from scratch for each one.

type CoordinationList

type CoordinationList struct {
	BasicSTARSList // Note that Visible is ignored for coordination lists.
	Group          string
	AutoRelease    bool
}

type DatablockType

type DatablockType int
const (
	PartialDatablock DatablockType = iota
	LimitedDatablock
	FullDatablock
	SuspendedDatablock
)

type DwellMode

type DwellMode int

func (DwellMode) String

func (d DwellMode) String() string

type GhostState

type GhostState int

type ListFormatter

type ListFormatter struct {
	Title      string
	Lines      int
	Entries    int
	FormatLine func(idx int, sb *strings.Builder)
}

Most system lists are drawn via drawSystemList / ListFormatter, which allows a mostly-declarative style for specifying list contents where drawSystemList handles the formatting details in a single place.

type ModeledAircraft

type ModeledAircraft struct {
	// contains filtered or unexported fields
}

func MakeModeledAircraft

func MakeModeledAircraft(ctx *panes.Context, trk sim.Track, state *TrackState, threshold math.Point2LL) ModeledAircraft

func (*ModeledAircraft) EstimatedAltitude

func (ma *ModeledAircraft) EstimatedAltitude(s float32) float32

estimated altitude s seconds in the future

func (*ModeledAircraft) NextPosition

func (ma *ModeledAircraft) NextPosition(p [2]float32) [2]float32

Return estimated position 1s in the future

type PointOutControllers

type PointOutControllers struct {
	From, To string
}

type PreferenceSet

type PreferenceSet struct {
	Current  Preferences
	Selected *int // if non-nil, an index into Saved
	Saved    [numSavedPreferenceSets]*Preferences
}

PreferenceSet stores the currently active preferences and up to numSavedPreferenceSets saved preferences; STARSPane keeps a separate PreferenceSet for each TRACON that the user signs in to.

func (*PreferenceSet) Reset

func (p *PreferenceSet) Reset(ss sim.State, sp *STARSPane)

Reset ends up being called when a new Sim is started. It is responsible for resetting all of the preference values in the PreferenceSet that we don't expect to persist on a restart (e.g. quick look positions.)

func (*PreferenceSet) ResetDefault

func (p *PreferenceSet) ResetDefault(ss sim.State, pl platform.Platform, sp *STARSPane)

ResetDefault resets the current preferences to the system defaults.

func (*PreferenceSet) SetCurrent

func (p *PreferenceSet) SetCurrent(cur Preferences, pl platform.Platform, sp *STARSPane)

func (*PreferenceSet) Upgrade

func (p *PreferenceSet) Upgrade(from, to int)

type Preferences

type Preferences struct {
	CommonPreferences

	Name string // Name given if it's been saved

	// Radar scope
	DefaultCenter math.Point2LL `json:"Center"` /* backwards compat */
	UserCenter    math.Point2LL `json:"CurrentCenter"`
	UseUserCenter bool
	Range         float32

	RangeRingsUserCenter math.Point2LL `json:"RangeRingsCenter"`
	RangeRingRadius      int
	// Whether we center them at RangeRingsCenter or Center
	UseUserRangeRingsCenter bool `json:"RangeRingsUserCenter"`

	// User-supplied text for the SSA list
	ATIS   string
	GIText [9]string

	// If empty, then then MULTI or FUSED mode, depending on
	// FusedRadarMode.  The custom JSON name is so we don't get errors
	// parsing old configs, which stored this as an array...
	RadarSiteSelected string `json:"RadarSiteSelectedName"`
	FusedRadarMode    bool

	// For tracked by other controllers
	ControllerLeaderLineDirections map[string]math.CardinalOrdinalDirection
	// If not specified in ControllerLeaderLineDirections...
	OtherControllerLeaderLineDirection *math.CardinalOrdinalDirection
	// Only set if specified by the user (and not used currently...)
	UnassociatedLeaderLineDirection *math.CardinalOrdinalDirection

	AltitudeFilters struct {
		Unassociated [2]int // low, high
		Associated   [2]int
	}

	AutomaticHandoffs struct {
		Interfacility bool
		Intrafacility bool
	}

	QuickLookAll             bool
	QuickLookAllIsPlus       bool
	QuickLookPositions       []QuickLookPosition
	DisabledQuicklookRegions []string

	DisplayEmptyCoordinationLists bool

	CRDA struct {
		Disabled bool
		// RunwayPairState has the same size and indexing as corresponding
		// the STARSPane STARSConvergingRunways member.
		RunwayPairState []CRDARunwayPairState
		ForceAllGhosts  bool
	}

	DisplayLDBBeaconCodes bool // TODO: default?
	SelectedBeacons       []av.Squawk

	DisableCAWarnings  bool
	DisableMCIWarnings bool
	DisableMSAW        bool

	VideoMapVisible map[int]interface{}

	InhibitPositionSymOnUnassociatedPrimary bool // 4-29
}

Preferences encapsulates the user-settable STARS preferences

func (*Preferences) Activate

func (p *Preferences) Activate(pl platform.Platform, sp *STARSPane)

func (*Preferences) Duplicate

func (p *Preferences) Duplicate() *Preferences

func (*Preferences) Reset

func (p *Preferences) Reset(ss sim.State, sp *STARSPane)

func (*Preferences) Upgrade

func (p *Preferences) Upgrade(from, to int)

type QuickLookPosition

type QuickLookPosition struct {
	Id   string
	Plus bool
}

func (QuickLookPosition) String

func (q QuickLookPosition) String() string

type RestrictionAreaSettings

type RestrictionAreaSettings struct {
	Visible           bool
	HideText          bool
	StopBlinkingText  bool
	ForceBlinkingText bool
}

RestrictionAreaSettings holds local settings related to restriction areas that aren't sent back to the server to be changed for all users.

type STARSConvergingRunways

type STARSConvergingRunways struct {
	av.ConvergingRunways
	ApproachRegions [2]*av.ApproachRegion
	Airport         string
	Index           int
}

this is read-only, stored in STARSPane for convenience

type STARSError

type STARSError struct {
	// contains filtered or unexported fields
}

func GetSTARSError

func GetSTARSError(e error, lg *log.Logger) *STARSError

func NewSTARSError

func NewSTARSError(msg string) *STARSError

type STARSPane

type STARSPane struct {
	TRACONPreferenceSets map[string]*PreferenceSet

	// These are the current prefs from the prior representation; we read
	// them back in if they're there to use to bootstrap the new
	// representation.
	// TODO: remove this at some point in the future.
	OldPrefsCurrentPreferenceSet  *Preferences  `json:"CurrentPreferenceSet,omitempty"`
	OldPrefsSelectedPreferenceSet *int          `json:"SelectedPreferenceSet,omitempty"`
	OldPrefsPreferenceSets        []Preferences `json:"PreferenceSets,omitempty"`

	// Preferences that were active when we entered the PREF menu.
	RestorePreferences       *Preferences
	RestorePreferencesNumber *int

	// It seems like this should be based on ACID but then we also need
	// state for unassociated tracks, so... ?
	TrackState map[av.ADSBCallsign]*TrackState

	LockDisplay bool

	// a/c callsign -> controllers
	PointOuts         map[sim.ACID]PointOutControllers
	RejectedPointOuts map[sim.ACID]interface{}
	ForceQLACIDs      map[sim.ACID]interface{}

	CoastSuspendIndex int // Next index to assign

	// Hold for release callsigns we have seen but not released. (We need
	// to track this since auto release only applies to new ones seen after
	// it is enabled.)
	ReleaseRequests map[av.ADSBCallsign]interface{}

	// Periodically updated in processEvents
	DuplicateBeacons map[av.Squawk]interface{}

	RangeBearingLines []STARSRangeBearingLine
	MinSepAircraft    [2]av.ADSBCallsign

	CAAircraft  []CAAircraft
	MCIAircraft []CAAircraft

	// For CRDA
	ConvergingRunways []STARSConvergingRunways

	// Various UI state
	FlipNumericKeypad bool
	TgtGenKey         byte

	FontSelection int32

	DisplayBeaconCode        av.Squawk
	DisplayBeaconCodeEndTime time.Time

	DisplayRequestedAltitude bool

	// When VFR flight plans were first seen (used for sorting in VFR list)
	VFRFPFirstSeen map[sim.ACID]time.Time

	// Instrument Flight Procedure (SIDs, STARs, IAPs etc) Helpers
	IFPHelpers struct {
		ArrivalsColor    *[3]float32
		ApproachesColor  *[3]float32
		DeparturesColor  *[3]float32
		OverflightsColor *[3]float32
		AirspaceColor    *[3]float32
		HoldsColor       *[3]float32
	}
	// contains filtered or unexported fields
}

func NewSTARSPane

func NewSTARSPane() *STARSPane

func (*STARSPane) Activate

func (sp *STARSPane) Activate(r renderer.Renderer, p platform.Platform, eventStream *sim.EventStream, lg *log.Logger)

func (*STARSPane) CanTakeKeyboardFocus

func (sp *STARSPane) CanTakeKeyboardFocus() bool

func (*STARSPane) DisplayName

func (sp *STARSPane) DisplayName() string

func (*STARSPane) Draw

func (sp *STARSPane) Draw(ctx *panes.Context, cb *renderer.CommandBuffer)

func (*STARSPane) DrawInfo

func (sp *STARSPane) DrawInfo(c *client.ControlClient, p platform.Platform, lg *log.Logger)

func (*STARSPane) DrawUI

func (sp *STARSPane) DrawUI(p platform.Platform, config *platform.Config)

func (*STARSPane) Hide

func (sp *STARSPane) Hide() bool

func (*STARSPane) LoadedSim

func (sp *STARSPane) LoadedSim(client *client.ControlClient, ss sim.State, pl platform.Platform, lg *log.Logger)

func (*STARSPane) ResetSim

func (sp *STARSPane) ResetSim(client *client.ControlClient, ss sim.State, pl platform.Platform, lg *log.Logger)

func (*STARSPane) ScaledRGBFromColorPickerRGB

func (sp *STARSPane) ScaledRGBFromColorPickerRGB(input [3]float32) renderer.RGB

func (*STARSPane) Upgrade

func (sp *STARSPane) Upgrade(from, to int)

func (*STARSPane) WarnOutsideAirspace

func (sp *STARSPane) WarnOutsideAirspace(ctx *panes.Context, trk sim.Track) ([][2]int, bool)

type STARSRangeBearingLine

type STARSRangeBearingLine struct {
	P [2]struct {
		// If callsign is given, use that aircraft's position;
		// otherwise we have a fixed position.
		Loc          math.Point2LL
		ADSBCallsign av.ADSBCallsign
	}
}

func (STARSRangeBearingLine) GetPoints

func (rbl STARSRangeBearingLine) GetPoints(ctx *panes.Context, tracks []sim.Track, sp *STARSPane) (math.Point2LL, math.Point2LL)

type TrackState

type TrackState struct {
	FullLDBEndTime           time.Time // If the LDB displays the groundspeed. When to stop
	DisplayRequestedAltitude *bool     // nil if unspecified

	IsSelected bool // middle click

	// We handed it off, the other controller accepted it, we haven't yet
	// slewed to make it a PDB.
	DisplayFDB bool

	// Hold for release aircraft released and deleted from the coordination
	// list by the controller.
	ReleaseDeleted bool

	// Only drawn if non-zero
	JRingRadius    float32
	ConeLength     float32
	DisplayTPASize *bool // unspecified->system default if nil

	DisplayATPAMonitor       *bool // unspecified->system default if nil
	DisplayATPAWarnAlert     *bool // unspecified->system default if nil
	IntrailDistance          float32
	ATPAStatus               ATPAStatus
	MinimumMIT               float32
	ATPALeadAircraftCallsign av.ADSBCallsign

	POFlashingEndTime time.Time
	UNFlashingEndTime time.Time
	IFFlashing        bool // Will continue to flash unless slewed or a successful handoff

	SuspendedShowAltitudeEndTime time.Time

	AcceptedHandoffSector     string
	AcceptedHandoffDisplayEnd time.Time

	// These are only set if a leader line direction was specified for this
	// aircraft individually:
	LeaderLineDirection *math.CardinalOrdinalDirection
	UseGlobalLeaderLine bool

	Ghost struct {
		PartialDatablock bool
		State            GhostState
	}

	DisplayLDBBeaconCode bool
	DisplayPTL           bool

	MSAW             bool // minimum safe altitude warning
	MSAWStart        time.Time
	InhibitMSAW      bool // only applies if in an alert. clear when alert is over?
	MSAWAcknowledged bool
	MSAWSoundEnd     time.Time

	SPCAlert        bool
	SPCAcknowledged bool
	SPCSoundEnd     time.Time

	MissingFlightPlanAcknowledged bool

	// record the code when it was ack'ed so that if it happens again with
	// a different code, we get a flashing DB in the datablock.
	DBAcknowledged av.Squawk

	FirstRadarTrackTime time.Time
	EnteredOurAirspace  bool

	OutboundHandoffAccepted bool
	OutboundHandoffFlashEnd time.Time

	RDIndicatorEnd time.Time

	// Set when the user enters a command to clear the primary scratchpad,
	// but it is already empty. (In turn, this causes the exit
	// fix/destination airport and the like to no longer be displayed, when
	// it is adapted to be shown in the FDB.)
	ClearedScratchpadAlternate bool

	// This is a little messy: we maintain maps from callsign->sector id
	// for pointouts that track the global state of them. Here we track
	// just inbound pointouts to the current controller so that the first
	// click acks a point out but leaves it yellow and a second clears it
	// entirely.
	PointOutAcknowledged bool
	ForceQL              bool

	// Unreasonable Mode-C
	UnreasonableModeC       bool
	ConsecutiveNormalTracks int

	// This is for [FLT DATA][SLEW] of an unowned FDB in which case it only
	// applies locally; for owned tracks, the flight plan is modified so it
	// applies globally.
	InhibitACTypeDisplay      *bool
	ForceACTypeDisplayEndTime time.Time

	// Draw the datablock in yellow (until cleared); currently only used for
	// [MF]Y[SLEW] quick flight plans
	DatablockAlert bool
	// contains filtered or unexported fields
}

func (*TrackState) HaveHeading

func (ts *TrackState) HaveHeading() bool

func (*TrackState) HeadingVector

func (ts *TrackState) HeadingVector(nmPerLongitude, magneticVariation float32) math.Point2LL

Note that the vector returned by HeadingVector() is along the aircraft's extrapolated path. Thus, it includes the effect of wind. The returned vector is scaled so that it represents where it is expected to be one minute in the future.

func (*TrackState) TrackDeltaAltitude

func (ts *TrackState) TrackDeltaAltitude() int

func (*TrackState) TrackHeading

func (ts *TrackState) TrackHeading(nmPerLongitude float32) float32

type VideoMapsGroup

type VideoMapsGroup int

Jump to

Keyboard shortcuts

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