Radar Utilities Reference

Table of contents


Introduction

The radar utilities are shared by the weather radar page in the aircraft apps and in the standalone Radar app. They provide:

In the beam geometry functions, altitudes are in feet, distances are in nautical miles, and angles are in degrees. A beam tilt is positive above horizontal and negative below horizontal.

The radar weather model is based on the freezing level. In stable weather, the high reflectivity zone is a band around the freezing level (from hrTopTemp to hrBotTemp), and the moderate reflectivity zone extends above it to mrTopTemp. In unstable (convective) weather, the high reflectivity zone extends from the stable bottom of the zone up to unstableTopAlt. A radar beam shows weather when it spans these zones.

Importing

The radar utilities are not re-exported by common/aero/export.js. Import them directly from common/aero/radarUtil.js.


Constants

ERADIUS

The radius of the earth in nautical miles: 6371.01 km, or about 3440.07 nm.

mrTopTemp

The temperature in degrees Celsius at the top of the moderate reflectivity zone: -20.

hrTopTemp

The temperature in degrees Celsius at the top of the high reflectivity (freezing level) zone: -5.

hrBotTemp

The temperature in degrees Celsius at the bottom of the high reflectivity (freezing level) zone: 2.

unstableTopAlt

The altitude in feet of the top of the moderate reflectivity zone in unstable conditions: 30,000.

classToFill

An object that maps radar display classes to SVG fill colors. The classes are:

MAX_TACTICAL_RANGE

The maximum outer range in nautical miles for an overfly (tactical) scan: 200 (about 20 minutes at 600 knots).

nearZone

The size in feet of the overscan zone below the aircraft altitude in overfly mode: 5,000.

stableRise

The maximum rise rate of low convection in feet per minute: 1,000. The radar page uses it to warn of a possible dangerous overscan when an overfly scan would spend longer in the red zone than convection could take to rise across the gap to the overfly altitude.


Beam geometry functions

beamAltitude()

Syntax

beamAltitude(acAlt, angle, dist, gndAlt)

Returns the altitude of the center of a radar beam at a distance from the aircraft, accounting for the curvature of the earth. If the beam is pointed at the ground and the distance is at or beyond the tangent point, the ground altitude is returned.

Parameters

Return value

The beam altitude in feet, rounded to the nearest foot, and never lower than gndAlt.


beamDistToAltitude()

Syntax

beamDistToAltitude(fromAlt, angle, toAlt)

Returns the distances along a beam that start at altitude fromAlt with a tilt of angle at which the beam reaches altitude toAlt. If toAlt is not lower than fromAlt, there is one solution. If toAlt is lower than fromAlt, the beam crosses toAlt twice (going down and then up again after the earth curves away), so there are two solutions.

Parameters

Return value

An array with 1 or 2 distances in nautical miles. With two distances, the nearer one is first. A distance is NaN if the beam never reaches toAlt.


beamTangentDistance()

Syntax

beamTangentDistance(acAlt, targetAlt)

Returns the distance at which a beam from the aircraft would be tangent to the earth at altitude targetAlt. For targetAlt equal to the ground altitude, this is the distance to the horizon.

Parameters

Return value

The tangent distance in nautical miles.


beamTanAngle()

Syntax

beamTanAngle(acAlt, targetAlt)

Returns the tilt angle at which a beam from the aircraft would be tangent to the earth at altitude targetAlt. This is the beam tilt that just touches the horizon.

Parameters

Return value

The tilt in degrees. It is negative (below horizontal) when targetAlt is below acAlt.


beamWidthAtDistance()

Syntax

beamWidthAtDistance(dist, beamWidth)

Returns the width in nautical miles of a beam at a distance.

Parameters

Return value

The width of the beam in nautical miles at dist.


earthCenterDistance()

Syntax

earthCenterDistance(ft)

Returns the distance from an altitude to the center of the earth.

Parameters

Return value

The distance in nautical miles from the center of the earth: ERADIUS plus the altitude.


lowestBeamAlt()

Syntax

lowestBeamAlt(acAlt, gndAlt, tilt, tiltOffset, beamWidth, range)

Returns the lowest altitude reached by the bottom edge of the weather beam in normal mode, within the selected range. The effective tilt is the manual tilt plus the radar's mount tiltOffset. The bottom edge of the beam is half the beamWidth below that. If the bottom edge points up (zero or positive), the lowest point is the aircraft altitude. Otherwise, it is the beam altitude at the nearer of the earth-tangent distance of the bottom edge and the selected range.

Parameters

Return value

The lowest altitude of the beam in feet. It is never lower than gndAlt.


oatAtAltitude()

Syntax

oatAtAltitude(targetOat, acAlt, oat)

Returns the altitude at which the temperature is targetOat, given the temperature oat at altitude acAlt, assuming the standard temperature lapse rate (STD_TEMP_LAPSE). It is used to find the altitudes of the reflectivity zones from the freezing level (where the temperature is 0): for example, oatAtAltitude(hrTopTemp, freezingLevel, 0).

Parameters

Return value

The altitude in feet, rounded to the nearest 1,000 feet. It is never lower than 0.


Radar diagram functions

The radar diagram functions draw SVG drawings into the wrapper node of an svg state variable, like the aeronautical diagram functions. They are designed to be assigned as the value of an svg state variable. The function sets the innerHTML of node. If node is falsy, nothing is drawn. Instead of reading the page's state variables, they take a plain values object so that both the aircraft radar pages and the standalone Radar app can share them.

The values object

The v argument of the diagram functions is an object with the following properties:


drawProfileSvg()

Syntax

drawProfileSvg(node, v)

Draws a side view (profile) of the radar beam into node. The view shows the curved earth, the beam or beams (the weather beam and the narrower ground return beam) with distance rings and distances, the freezing level, the high and moderate reflectivity zones, altitude lines every 10,000 feet, and the ground. The beams are clipped against the ground and the earth's shadow beyond the horizon. In overfly mode, the safety zone (yellow) and the zone within nearZone feet below the aircraft (red) are also drawn. The vertical scale is stretched so that maxAlt down to the ground at the maximum range fills the diagram height.

Parameters

Return value

None.


drawScopeSvg()

Syntax

drawScopeSvg(node, v)

Draws a picture of the radar scope into node. The scope is a 90° fan out to the scan range (v.range in normal mode, v.overflyOuterRange in overfly mode) that shows how the radar would display weather. The fan is divided into distance bands that are colored by the reflectivity class of the beam at that distance (see classToFill): the beam is over or under the weather, spans the moderate reflectivity zone, or spans the high reflectivity zone. In overfly mode, bands that show no weather are colored red where the beam bottom is within nearZone feet below the aircraft, or yellow where it provides overfly coverage. Dot patterns show the ground return, and the ground return from the weather beam. The fan has quarter-range arcs labeled with distance and time at the ground speed, and ellipses that show the beam width and how the beam smears with distance. A legend and the range of the ground return are drawn at the left.

The function asserts that the scan range is greater than 0.

Parameters

Return value

None.