Documentation ¶
Index ¶
- Constants
- Variables
- type ATPAStatus
- type AircraftState
- func (s *AircraftState) HaveHeading() bool
- func (s *AircraftState) HeadingVector(nmPerLongitude, magneticVariation float32) math.Point2LL
- func (s *AircraftState) Ident(now time.Time) bool
- func (s *AircraftState) LostTrack(now time.Time) bool
- func (s *AircraftState) TrackAltitude() int
- func (s *AircraftState) TrackDeltaAltitude() int
- func (s *AircraftState) TrackGroundspeed() int
- func (s *AircraftState) TrackHeading(nmPerLongitude float32) float32
- func (s *AircraftState) TrackPosition() math.Point2LL
- type AudioType
- type BasicSTARSList
- type CAAircraft
- type CRDAMode
- type CRDARunwayPairState
- type CRDARunwayState
- type CommandMode
- type CommandStatus
- type CommonPreferences
- type CoordinationList
- type DatablockType
- type DwellMode
- type GhostState
- type ModeledAircraft
- type PreferenceSet
- type Preferences
- type QuickLookPosition
- type RestrictionAreaSettings
- type STARSBrightness
- type STARSConvergingRunways
- type STARSError
- type STARSFont
- type STARSGlyph
- type STARSPane
- func (sp *STARSPane) Activate(r renderer.Renderer, p platform.Platform, eventStream *sim.EventStream, ...)
- func (sp *STARSPane) CanTakeKeyboardFocus() bool
- func (sp *STARSPane) DisplayName() string
- func (sp *STARSPane) Draw(ctx *panes.Context, cb *renderer.CommandBuffer)
- func (sp *STARSPane) DrawUI(p platform.Platform, config *platform.Config)
- func (sp *STARSPane) Hide() bool
- func (sp *STARSPane) LoadedSim(client *sim.ControlClient, ss sim.State, pl platform.Platform, lg *log.Logger)
- func (sp *STARSPane) ResetSim(client *sim.ControlClient, ss sim.State, pl platform.Platform, lg *log.Logger)
- func (sp *STARSPane) Upgrade(from, to int)
- func (sp *STARSPane) WarnOutsideAirspace(ctx *panes.Context, ac *av.Aircraft) ([][2]int, bool)
- type STARSRangeBearingLine
- type ScopeTransformations
- func (st *ScopeTransformations) LatLongFromWindowP(p [2]float32) math.Point2LL
- func (st *ScopeTransformations) LatLongFromWindowV(v [2]float32) math.Point2LL
- func (st *ScopeTransformations) LoadLatLongViewingMatrices(cb *renderer.CommandBuffer)
- func (st *ScopeTransformations) LoadWindowViewingMatrices(cb *renderer.CommandBuffer)
- func (st *ScopeTransformations) NormalizedFromWindowP(p [2]float32) [2]float32
- func (st *ScopeTransformations) PixelDistanceNM(nmPerLongitude float32) float32
- func (st *ScopeTransformations) WindowFromLatLongP(p math.Point2LL) [2]float32
- type VideoMapsGroup
- type WeatherRadar
Constants ¶
const ( CommandModeNone = iota CommandModeInitiateControl CommandModeTerminateControl CommandModeHandOff CommandModeVFRPlan CommandModeMultiFunc CommandModeFlightData CommandModeCollisionAlert CommandModeMin CommandModeSavePrefAs CommandModeMaps CommandModeLDR CommandModeRangeRings CommandModeRange CommandModeSiteMenu CommandModeWX CommandModePref CommandModeReleaseDeparture CommandModeRestrictionArea CommandModeTargetGen )
const ( PartialDatablock = iota LimitedDatablock FullDatablock )
const ( AudioConflictAlert = iota AudioSquawkSPC AudioMinimumSafeAltitudeWarning AudioModeCIntruder AudioTest AudioInboundHandoff AudioCommandError AudioHandoffAccepted AudioNumTypes )
The types of events we may play audio for.
const ( CRDAModeStagger = iota CRDAModeTie )
const ( VideoMapNoCategory = iota - 1 VideoMapGeographicMaps VideoMapControlledAirspace VideoMapRunwayExtensions VideoMapDangerAreas VideoMapAerodromes VideoMapGeneralAviation VideoMapSIDsSTARs VideoMapMilitary VideoMapGeographicPoints VideoMapProcessingAreas VideoMapCurrent VideoMapNumCategories )
const ( // Make 0 be "on" so zero-initialization gives "on" DwellModeOn = iota DwellModeLock DwellModeOff )
const ( RadarModeSingle = iota RadarModeMulti RadarModeFused )
const ( ATPAStatusUnset = iota ATPAStatusMonitor ATPAStatusWarning ATPAStatusAlert )
const ( GhostStateRegular = iota GhostStateSuppressed GhostStateForced )
const AlertAudioDuration = 5 * time.Second
const LateralMinimum = 3
IFR TRACON separation requirements
const STARSFilledUpTriangle = string(rune(0x1e))
Filled upward-pointing triangle
const STARSTriangleCharacter = string(rune(0x80))
STARS ∆ is character 0x80 in the font
const TabListEntries = 100
const TabListUnassignedIndex = -1
const VerticalMinimum = 1000
Variables ¶
var ( ErrSTARSAmbiguousACID = NewSTARSError("AMB ACID") ErrSTARSBeaconMismatch = NewSTARSError("BCN MISMATCH") ErrSTARSCapacity = NewSTARSError("CAPACITY") ErrSTARSCommandFormat = NewSTARSError("FORMAT") ErrSTARSDuplicateBeacon = NewSTARSError("DUP BCN") ErrSTARSDuplicateCommand = NewSTARSError("DUP CMD") ErrSTARSIllegalACID = NewSTARSError("ILL ACID") ErrSTARSIllegalACType = NewSTARSError("ACTYPE NOT\nADAPTED") 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 FNCT") 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") 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") ErrSTARSRangeLimit = NewSTARSError("RANGE LIMIT") )
var ( STARSBackgroundColor = renderer.RGB{.2, .2, .2} // at 100 contrast STARSListColor = renderer.RGB{.1, .9, .1} STARSTextAlertColor = renderer.RGB{1, 0, 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} STARSInboundPointOutColor = 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 AircraftState ¶
type AircraftState struct { DatablockType DatablockType FullLDBEndTime time.Time // If the LDB displays the groundspeed. When to stop DisplayRequestedAltitude *bool // nil if unspecified IsSelected bool // middle click TabListIndex int // 0-99. If -1, we ran out and haven't assigned one. // 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 string POFlashingEndTime time.Time UNFlashingEndTime time.Time IFFlashing bool // Will continue to flash unless slewed or a successful handoff NextController string AcceptedHandoffSector string AcceptedHandoffDisplayEnd time.Time // These are only set if a leader line direction was specified for this // aircraft individually: LeaderLineDirection *math.CardinalOrdinalDirection GlobalLeaderLineDirection *math.CardinalOrdinalDirection UseGlobalLeaderLine bool Ghost struct { PartialDatablock bool State GhostState } DisplayLDBBeaconCode bool DisplayPTL bool DisableCAWarnings bool MSAW bool // minimum safe altitude warning DisableMSAW bool 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 FirstSeen time.Time FirstRadarTrack time.Time EnteredOurAirspace bool CWTCategory string // cache this for performance IdentStart, IdentEnd time.Time 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. PointedOut bool ForceQL bool // contains filtered or unexported fields }
func (*AircraftState) HaveHeading ¶
func (s *AircraftState) HaveHeading() bool
func (*AircraftState) HeadingVector ¶
func (s *AircraftState) 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 (*AircraftState) TrackAltitude ¶
func (s *AircraftState) TrackAltitude() int
func (*AircraftState) TrackDeltaAltitude ¶
func (s *AircraftState) TrackDeltaAltitude() int
func (*AircraftState) TrackGroundspeed ¶
func (s *AircraftState) TrackGroundspeed() int
func (*AircraftState) TrackHeading ¶
func (s *AircraftState) TrackHeading(nmPerLongitude float32) float32
func (*AircraftState) TrackPosition ¶
func (s *AircraftState) TrackPosition() math.Point2LL
type BasicSTARSList ¶ added in v0.11.5
type CAAircraft ¶
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
type CommandStatus ¶
type CommandStatus struct {
// contains filtered or unexported fields
}
type CommonPreferences ¶ added in v0.11.5
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 [numWxLevels]bool LastDisplayWeatherLevel [numWxLevels]bool // For aircraft tracked by the user. LeaderLineDirection math.CardinalOrdinalDirection LeaderLineLength int // 0-7 OverflightFullDatablocks bool AutomaticFDBOffset bool DisplayTPASize bool DisplayATPAInTrailDist bool `json:"DisplayATPAIntrailDist"` DisplayATPAWarningAlertCones bool DisplayATPAMonitorCones bool PTLLength float32 PTLOwn, PTLAll bool DwellMode DwellMode Brightness struct { DCB STARSBrightness BackgroundContrast STARSBrightness VideoGroupA STARSBrightness VideoGroupB STARSBrightness FullDatablocks STARSBrightness Lists STARSBrightness Positions STARSBrightness LimitedDatablocks STARSBrightness OtherTracks STARSBrightness Lines STARSBrightness RangeRings STARSBrightness Compass STARSBrightness BeaconSymbols STARSBrightness PrimarySymbols STARSBrightness History STARSBrightness Weather STARSBrightness WxContrast STARSBrightness } 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 Range bool PredictedTrackLines bool AltitudeFilters 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 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 ¶ added in v0.11.5
type CoordinationList struct { BasicSTARSList // Note that Visible is ignored for coordination lists. Group string AutoRelease bool }
type DatablockType ¶
type DatablockType int
type GhostState ¶
type GhostState int
type ModeledAircraft ¶
type ModeledAircraft struct {
// contains filtered or unexported fields
}
func MakeModeledAircraft ¶
func MakeModeledAircraft(ac *av.Aircraft, state *AircraftState, 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 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 ¶ added in v0.11.5
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 ¶ added in v0.11.5
ResetDefault resets the current preferences to the system defaults.
func (*PreferenceSet) SetCurrent ¶ added in v0.11.5
func (p *PreferenceSet) SetCurrent(cur Preferences, pl platform.Platform, sp *STARSPane)
func (*PreferenceSet) Upgrade ¶
func (p *PreferenceSet) Upgrade(from, to int)
type Preferences ¶ added in v0.11.5
type Preferences struct { CommonPreferences Name string // Name given if it's been saved Center math.Point2LL // The default center Range float32 CurrentCenter math.Point2LL RangeRingsCenter math.Point2LL RangeRingRadius int // Whether we center them at RangeRingsCenter or Center RangeRingsUserCenter bool // 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 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? SelectedBeaconCodes []string DisableCAWarnings bool DisableMSAW bool VideoMapVisible map[int]interface{} DisplayRequestedAltitude bool }
Preferences encapsulates the user-settable STARS preferences that
func (*Preferences) Activate ¶ added in v0.11.5
func (p *Preferences) Activate(pl platform.Platform, sp *STARSPane)
func (*Preferences) Duplicate ¶ added in v0.11.5
func (p *Preferences) Duplicate() *Preferences
func (*Preferences) Reset ¶ added in v0.11.5
func (p *Preferences) Reset(ss sim.State, sp *STARSPane)
func (*Preferences) Upgrade ¶ added in v0.11.5
func (ps *Preferences) Upgrade(from, to int)
type QuickLookPosition ¶
func (QuickLookPosition) String ¶ added in v0.11.4
func (q QuickLookPosition) String() string
type RestrictionAreaSettings ¶ added in v0.11.6
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 STARSBrightness ¶
type STARSBrightness int
func (STARSBrightness) RGB ¶
func (b STARSBrightness) RGB() renderer.RGB
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 STARSFont ¶
type STARSFont struct { PointSize int Width, Height int Glyphs []STARSGlyph }
type STARSGlyph ¶
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 // All of the aircraft in the world, each with additional information // carried along in an STARSAircraftState. Aircraft map[string]*AircraftState TabListAircraft [TabListEntries]string TabListSearchStart int UnsupportedTracks map[av.Squawk]bool // visible or not // explicit JSON name to avoid errors during config deserialization for // backwards compatibility, since this used to be a // map[string]interface{}. AutoTrackDepartures bool `json:"autotrack_departures"` LockDisplay bool // callsign -> controller id InboundPointOuts map[string]string OutboundPointOuts map[string]string RejectedPointOuts map[string]interface{} ForceQLCallsigns map[string]interface{} // 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[string]interface{} RangeBearingLines []STARSRangeBearingLine MinSepAircraft [2]string CAAircraft []CAAircraft // For CRDA ConvergingRunways []STARSConvergingRunways // Various UI state FlipNumericKeypad bool TgtGenKey byte FontSelection int // contains filtered or unexported fields }
func NewSTARSPane ¶
func NewSTARSPane() *STARSPane
func (*STARSPane) CanTakeKeyboardFocus ¶
func (*STARSPane) DisplayName ¶
type STARSRangeBearingLine ¶
type ScopeTransformations ¶
type ScopeTransformations struct {
// contains filtered or unexported fields
}
ScopeTransformations manages various transformation matrices that are useful when drawing radar scopes and provides a number of useful methods to transform among related coordinate spaces.
func GetScopeTransformations ¶
func GetScopeTransformations(paneExtent math.Extent2D, magneticVariation float32, nmPerLongitude float32, center math.Point2LL, rangenm float32, rotationAngle float32) ScopeTransformations
GetScopeTransformations returns a ScopeTransformations object corresponding to the specified radar scope center, range, and rotation angle.
func (*ScopeTransformations) LatLongFromWindowP ¶
func (st *ScopeTransformations) LatLongFromWindowP(p [2]float32) math.Point2LL
LatLongFromWindowP transforms a point p in window coordinates to latitude-longitude.
func (*ScopeTransformations) LatLongFromWindowV ¶
func (st *ScopeTransformations) LatLongFromWindowV(v [2]float32) math.Point2LL
LatLongFromWindowV transforms a vector in window coordinates to a vector in latitude-longitude coordinates.
func (*ScopeTransformations) LoadLatLongViewingMatrices ¶
func (st *ScopeTransformations) LoadLatLongViewingMatrices(cb *renderer.CommandBuffer)
LoadLatLongViewingMatrices adds commands to the provided command buffer to load viewing matrices so that latitude-longiture positions can be provided for subsequent vertices.
func (*ScopeTransformations) LoadWindowViewingMatrices ¶
func (st *ScopeTransformations) LoadWindowViewingMatrices(cb *renderer.CommandBuffer)
LoadWindowViewingMatrices adds commands to the provided command buffer to load viewing matrices so that window-coordinate positions can be provided for subsequent vertices.
func (*ScopeTransformations) NormalizedFromWindowP ¶
func (st *ScopeTransformations) NormalizedFromWindowP(p [2]float32) [2]float32
NormalizedFromWindowP transforms a point p in window coordinates to normalized [0,1]^2 coordinates.
func (*ScopeTransformations) PixelDistanceNM ¶
func (st *ScopeTransformations) PixelDistanceNM(nmPerLongitude float32) float32
PixelDistanceNM returns the space between adjacent pixels expressed in nautical miles.
func (*ScopeTransformations) WindowFromLatLongP ¶
func (st *ScopeTransformations) WindowFromLatLongP(p math.Point2LL) [2]float32
WindowFromLatLongP transforms a point given in latitude-longitude coordinates to window coordinates, snapped to a pixel center.
type VideoMapsGroup ¶
type VideoMapsGroup int
type WeatherRadar ¶
type WeatherRadar struct {
// contains filtered or unexported fields
}
WeatherRadar provides functionality for fetching radar images to display in radar scopes. Only locations in the USA are currently supported, as the only current data source is the US NOAA...
func (*WeatherRadar) Activate ¶
func (w *WeatherRadar) Activate(r renderer.Renderer, lg *log.Logger)
Activate must be called to initialize the WeatherRadar before weather radar images can be fetched.
func (*WeatherRadar) Draw ¶
func (w *WeatherRadar) Draw(ctx *panes.Context, hist int, intensity float32, contrast float32, active [numWxLevels]bool, transforms ScopeTransformations, cb *renderer.CommandBuffer)
Draw draws the current weather radar image, if available. (If none is yet available, it returns rather than stalling waiting for it).
func (*WeatherRadar) HaveWeather ¶ added in v0.11.2
func (w *WeatherRadar) HaveWeather() [numWxLevels]bool
func (*WeatherRadar) UpdateCenter ¶
func (w *WeatherRadar) UpdateCenter(center math.Point2LL)
UpdateCenter provides a new center point for the radar image, causing a new image to be fetched.