radar

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Normal = iota
	Procedure
	Local
)
View Source
const NumWxLevels = 6

Variables

This section is empty.

Functions

func DrawWaypoints

func DrawWaypoints(ctx *panes.Context, waypoints []av.Waypoint, drawnWaypoints map[string]interface{},
	transforms ScopeTransformations, td *renderer.TextDrawBuilder, style renderer.TextStyle,
	ld *renderer.ColoredLinesDrawBuilder, pd *renderer.ColoredTrianglesDrawBuilder, ldr *renderer.ColoredLinesDrawBuilder, color renderer.RGB)

Types

type Brightness

type Brightness int

func (Brightness) RGB

func (b Brightness) RGB() renderer.RGB

func (Brightness) ScaleRGB

func (b Brightness) ScaleRGB(r renderer.RGB) renderer.RGB

type ClientVideoMap added in v0.13.0

type ClientVideoMap struct {
	sim.VideoMap
	CommandBuffer renderer.CommandBuffer
}

ClientVideoMap extends sim.VideoMap with client-side rendering capabilities.

func BuildClientVideoMaps added in v0.13.0

func BuildClientVideoMaps(maps []sim.VideoMap) []ClientVideoMap

BuildClientVideoMaps converts []sim.VideoMap to ClientVideoMaps, generating CommandBuffers along the way.

type ERAMVideoMap added in v0.13.0

type ERAMVideoMap struct {
	sim.ERAMMap
	CommandBuffer renderer.CommandBuffer
}

func BuildERAMClientVideoMaps added in v0.13.0

func BuildERAMClientVideoMaps(maps []sim.ERAMMap) []ERAMVideoMap

TODO: Eventually combine them

type ScopeTransformations

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

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 WeatherRadar

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

WeatherRadar provides functionality for fetching precipitation data from the server and displaying it in radar scopes.

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 data, if available.

func (*WeatherRadar) HaveWeather

func (w *WeatherRadar) HaveWeather() [NumWxLevels]bool

Jump to

Keyboard shortcuts

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