eram

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Overview

TODO: 1. Fix mouse to put top box not the bottom box

Index

Constants

View Source
const (
	Line4None = iota
	Line4Destination
	Line4Type
)

Variables

View Source
var (
	ERAMPopupPaneBackgroundColor = renderer.RGB{R: 0, G: 0, B: 0}
	ERAMYellow                   = renderer.RGB{R: .894, G: .894}
)
View Source
var (
	ErrCommandFormat       = NewERAMError("FORMAT")
	ErrERAMAmbiguousACID   = NewERAMError("AMB ACID")
	ErrERAMIllegalACID     = NewERAMError("ILL CID")
	ErrERAMIllegalPosition = NewERAMError("ILLEGAL POSITION")
	ErrERAMIllegalValue    = NewERAMError("ILLEGAL VALUE")
	ErrERAMIllegalAirport  = NewERAMError("ILLEGAL AIRPORT")
	ErrIllegalUserAction   = NewERAMError("ILLEGAL USER ACTION")
	ErrERAMMapUnavailable  = NewERAMError("MAP UNAVAILABLE")
	ErrERAMMessageTooLong  = NewERAMError("MESSAGE TOO LONG")
	ErrERAMSectorNotActive = NewERAMError("SECTOR NOT ACTIVE")
)

Functions

This section is empty.

Types

type CommandMode

type CommandMode int

type CommandStatus

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

type CommonPreferences

type CommonPreferences struct {
	ClockPosition []int

	CharSize struct {
		Line4   int // Find out what this is
		RDB     int
		LDB     int
		FDB     int
		Toolbar int
		Outage  int // Again, what is this?
		Portal  int // Same here...
	}
	Brightness struct {
		Background radar.Brightness
		Cursor     radar.Brightness
		Text       radar.Brightness
		PRTGT      radar.Brightness
		UNPTGT     radar.Brightness
		PRHST      radar.Brightness
		UNPHST     radar.Brightness
		LDB        radar.Brightness
		SLDB       radar.Brightness
		WX         radar.Brightness
		NEXRAD     radar.Brightness
		Backlight  radar.Brightness
		Button     radar.Brightness
		Border     radar.Brightness
		Toolbar    radar.Brightness
		TBBRDR     radar.Brightness
		ABBRDR     radar.Brightness
		FDB        radar.Brightness
		Portal     radar.Brightness
		Satcomm    radar.Brightness
		ONFREQ     radar.Brightness
		Line4      radar.Brightness
		Dwell      radar.Brightness
		Fence      radar.Brightness
		DBFEL      radar.Brightness
		Outage     radar.Brightness
	}

	Line4Type int
	// contains filtered or unexported fields
}

type DatablockType

type DatablockType int

DatablockType enumerates the supported ERAM datablock formats. Only the general types are provided here; the specific contents are defined elsewhere.

const (
	// LimitedDatablock represents the two-line limited data block used for
	// untracked or unpaired targets.
	LimitedDatablock DatablockType = iota
	// FullDatablock represents the five line full data block.
	FullDatablock
	// EnhancedLimitedDatablock represents the optional enhanced limited data
	// block.  It behaves like LimitedDatablock with additional information.
	EnhancedLimitedDatablock
)

type ERAMError

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

func GetERAMError

func GetERAMError(e error, lg *log.Logger) *ERAMError

func NewERAMError

func NewERAMError(msg string, args ...any) *ERAMError

type ERAMPane

type ERAMPane struct {
	ERAMPreferenceSets map[string]*PrefrenceSet `json:"PreferenceSets,omitempty"`

	TrackState map[av.ADSBCallsign]*TrackState `json:"-"`

	ERAMOptIn          bool `json:"-"`
	DisableERAMtoRadio bool `json:"-"`

	InboundPointOuts  map[string]string `json:"-"`
	OutboundPointOuts map[string]string `json:"-"`

	Input inputText `json:"-"`

	IFPHelpers struct {
		ArrivalsColor    *[3]float32
		ApproachesColor  *[3]float32
		DeparturesColor  *[3]float32
		OverflightsColor *[3]float32
		AirspaceColor    *[3]float32
	}
	// contains filtered or unexported fields
}

func NewERAMPane

func NewERAMPane() *ERAMPane

func (*ERAMPane) Activate

func (ep *ERAMPane) Activate(r renderer.Renderer, pl platform.Platform, es *sim.EventStream, log *log.Logger)

func (*ERAMPane) CanTakeKeyboardFocus

func (ep *ERAMPane) CanTakeKeyboardFocus() bool

func (*ERAMPane) DisplayName

func (ep *ERAMPane) DisplayName() string

func (*ERAMPane) Draw

func (ep *ERAMPane) Draw(ctx *panes.Context, cb *renderer.CommandBuffer)

func (*ERAMPane) DrawInfo

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

func (*ERAMPane) DrawUI

func (ep *ERAMPane) DrawUI(p platform.Platform, config *platform.Config)

func (*ERAMPane) ERAMFont

func (ep *ERAMPane) ERAMFont(size int) *renderer.Font

func (*ERAMPane) ERAMInputFont

func (ep *ERAMPane) ERAMInputFont() *renderer.Font

func (*ERAMPane) ERAMToolbarFont

func (ep *ERAMPane) ERAMToolbarFont() *renderer.Font

func (*ERAMPane) Hide

func (ep *ERAMPane) Hide() bool

func (*ERAMPane) LoadedSim

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

func (*ERAMPane) ResetSim

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

func (*ERAMPane) ScaledRGBFromColorPickerRGB

func (ep *ERAMPane) ScaledRGBFromColorPickerRGB(input [3]float32) renderer.RGB

type Preferences

type Preferences struct {
	CommonPreferences

	Name string

	// ARTCC facility identifier for which this preference set applies (e.g., ZNY)
	ARTCC string

	Center math.Point2LL
	Range  float32

	CurrentCenter math.Point2LL

	VideoMapGroup string // ZNYMAP, AREAA, AREAB, etc

	AltitudeFilters []float32 // find out the different targets

	VideoMapVisible map[string]interface{}

	DisplayToolbar bool

	Line4Size   int
	FDBSize     int
	PoralSize   int
	ToolbarSize int
	RDBSize     int // CRR datablocks
	LDBSize     int
	OutageSize  int

	VideoMapBrightness map[string]int
	// contains filtered or unexported fields
}

type PrefrenceSet

type PrefrenceSet struct {
	Current  Preferences
	Selected *int
	// Saved preference slots (10). Some slots may be nil. Each stored
	// Preferences includes ARTCC and VideoMapGroup so we can filter rows.
	Saved [numSavedPreferenceSets]*Preferences
}

type TrackState

type TrackState struct {
	CID int

	DatablockType DatablockType

	DisplayJRing        bool
	DisplayReducedJRing bool

	DisplayVCI bool

	OSectorEndTime time.Time
	// contains filtered or unexported fields
}

func (*TrackState) Climbing

func (ts *TrackState) Climbing() bool

func (*TrackState) Descending

func (ts *TrackState) Descending() bool

func (*TrackState) HaveHeading

func (ts *TrackState) HaveHeading() bool

func (*TrackState) HeadingVector

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

func (*TrackState) IsLevel

func (ts *TrackState) IsLevel() bool

func (*TrackState) TrackDeltaAltitude

func (ts *TrackState) TrackDeltaAltitude() int

func (*TrackState) TrackHeading

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

Jump to

Keyboard shortcuts

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