Documentation
¶
Index ¶
- Constants
- func DrawWaypoints(ctx *panes.Context, waypoints []av.Waypoint, ...)
- func GenerateRouteDrawingCommands(cb *renderer.CommandBuffer, transforms ScopeTransformations, ...)
- type Brightness
- 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 WeatherRadar
Constants ¶
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)
func GenerateRouteDrawingCommands ¶
func GenerateRouteDrawingCommands(cb *renderer.CommandBuffer, transforms ScopeTransformations, ctx *panes.Context, ld *renderer.ColoredLinesDrawBuilder, pd *renderer.ColoredTrianglesDrawBuilder, td *renderer.TextDrawBuilder, ldr *renderer.ColoredLinesDrawBuilder)
Types ¶
type Brightness ¶
type Brightness int
func (Brightness) RGB ¶
func (b Brightness) RGB() renderer.RGB
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 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 ¶
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.