OrbPro2 a Cesium distribution

Sensor

new Cesium.Sensor(options)

A sensor primitive for visualization and detection. Combines WASM-accelerated geometric detection with shadow map-based occlusion analysis for viewshed.
Name Type Description
options object Configuration options.
Name Type Default Description
scene Scene The scene.
position Cartesian3 Sensor position in world coordinates.
type SensorType SensorType.CONIC optional Sensor geometry type.
radius number Number.POSITIVE_INFINITY optional Range in meters.
orientation Quaternion Quaternion.IDENTITY optional Sensor orientation.
allowPicking boolean true optional Whether the volume participates in picking. When false, picks pass through to objects behind it.
innerHalfAngle number 0.0 optional Inner cone half-angle (conic).
outerHalfAngle number Math.PI/4 optional Outer cone half-angle (conic).
minimumClockAngle number 0.0 optional Minimum azimuth (conic).
maximumClockAngle number 2*Math.PI optional Maximum azimuth (conic).
minimumConeAngle number 0.0 optional Minimum cone angle from +Z for spherical slices.
maximumConeAngle number Math.PI optional Maximum cone angle from +Z for spherical slices.
xHalfAngle number Math.PI/4 optional Horizontal half-angle (rectangular).
yHalfAngle number Math.PI/4 optional Vertical half-angle (rectangular).
directions Array optional Clock/cone angle pairs (custom).
sphericalCap boolean true optional Use spherical cap. When true, shows dome and uses spherical range. When false, open-ended cone with planar boundary.
flatShading boolean false optional Render the volume as one uniform, unlit color (no lighting, no facing/wall dimming).
shadingBandsOnWall boolean false optional Paint stripes on the lateral wall too — concentric iso-range rings matching the shell's circular bands.
show boolean true optional Whether visible.
color Color Color.WHITE.withAlpha(0.5) optional Sensor color.
splitDirection SplitDirection SplitDirection.NONE optional Screen split direction for side-by-side comparison rendering.
shaderMode string SensorShaderMode.VIEWSHED optional Which shader renders the ground overlay — see SensorShaderMode. The named, first-class form of `viewshedVisualizationMode`; the two stay in sync.
disabledShaderModes Array.<string> optional Shader modes this sensor REFUSES. A selection that lands on one of them resolves to SensorShaderMode.NONE and nothing is drawn — the sensor never substitutes a different physical quantity.
shaderOverlayAlpha number 1.0 optional Opacity multiplier for the overlay, 0-1. Drop it to present a result as stale/pending without removing it; a uniform, so it costs no shader rebuild.
showVolume boolean true optional Whether the sensor's volume body is drawn, independent of the viewshed raster.
volumeShading string SensorVolumeShading.FLAT optional How the sensor VOLUME is shaded — see SensorVolumeShading.
shadingBandCount number 9 optional Number of elevation contour bands across the sensor's maximum half-angle when `volumeShading` is `ELEVATION_BANDED` (9 over a 90-degree dome is ~10 degrees per band).
shadingBandColor Color Color.WHITE.withAlpha(0.35) optional The light half of the elevation-banded zebra.
shadingBandAlternateColor Color Color.BLACK.withAlpha(0.35) optional The dark half of the elevation-banded zebra.
gainPatternType string optional Radiation-pattern shape used when `volumeShading` is `GAIN_BANDED` — an AntennaPattern.Type.
gainPattern object optional Full pattern option bag forwarded to the internal AntennaPattern (side-lobe levels, ramp colors, sample counts). Individual `gainPatternType` / `mainLobeExponent` / `minimumRadiusScale` / `contourCount` / `volumeAlpha` options override it. `gainPattern.allowPicking=false` makes the lobe non-selectable, so a pattern drawn ON a spacecraft or a ground site stops swallowing the pick for the object underneath it (owner directive 2026-08-10).
showViewshed boolean false optional Enable viewshed analysis.
visibleColor Color Color.LIME.withAlpha(0.5) optional Visible terrain color.
occludedColor Color Color.RED.withAlpha(0.5) optional Occluded terrain color.
viewshedVisualizationMode ViewshedVisualizationMode ViewshedVisualizationMode.VISIBILITY optional Viewshed coloring mode. Legacy numeric view of `shaderMode`.
viewshedRfFrequency number 2.4e9 optional Frequency in Hz for RF path-loss visualization.
viewshedRfAtmosphericLossDbPerKm number 0.0 optional Atmospheric attenuation rate used by RF path-loss visualization.
viewshedRfOccludedLossDb number 35.0 optional Additional loss applied to occluded fragments in RF path-loss visualization.
viewshedRfThresholdDb number 140.0 optional Path-loss threshold used by the legacy analytic RF path-loss shader.
viewshedRfTransitionWidthDb number 6.0 optional Transition band around the RF threshold in analytic RF path-loss mode, or around zero margin in projected RF link-margin mode.
viewshedRfPositiveMarginColor Color Color.LIME.withAlpha(0.55) optional Color for terrain cells with positive link margin.
viewshedRfNegativeMarginColor Color Color.RED.withAlpha(0.55) optional Color for terrain cells with negative link margin.
viewshedRfGoodColor Color optional Legacy alias for `viewshedRfPositiveMarginColor`.
viewshedRfBadColor Color optional Legacy alias for `viewshedRfNegativeMarginColor`.
viewshedQualityHighColor Color Color.LIME.withAlpha(0.55) optional Color used for high-quality visible coverage in the coverage-quality heat map.
viewshedQualityMediumColor Color Color.YELLOW.withAlpha(0.55) optional Color used for mid-quality visible coverage in the coverage-quality heat map.
viewshedQualityLowColor Color Color.RED.withAlpha(0.55) optional Color used for low-quality visible coverage in the coverage-quality heat map.
viewshedQualityDistanceExponent number 1.0 optional Exponent controlling how quickly coverage quality falls off with distance.
viewshedQualityAngleExponent number 1.5 optional Exponent controlling how quickly coverage quality falls off away from boresight.
viewshedPattern object optional Optional radiation pattern used for viewshed clipping and pattern-aware containment tests.
viewshedRfLinkMarginFootprint object optional Optional terrain-analysis-backed projected link-margin raster used by `RF_LINK_MARGIN`.
viewshedResolution number 2048 optional Shadow map resolution.
terrainDetail number optional Terrain detail level within sensor area (1-8, lower=more detail). If not specified, uses the global terrain LOD setting.
terrainDetailMode string "distance" optional Terrain detail distance mode. "distance" uses sensor-to-tile distance, while "forced" caps the far-footprint distance for stable high-detail terrain.
showIntersection boolean true optional Show terrain intersection line.
intersectionColor Color Color.WHITE optional Intersection line color.
intersectionWidth number 2.0 optional Intersection line width.
Example:
// Sensor automatically adds itself to scene.primitives on construction
// and removes itself on destroy().
const sensor = new Cesium.Sensor({
  scene: viewer.scene,
  position: Cesium.Cartesian3.fromDegrees(-122.4, 37.8, 100),
  type: Cesium.Sensor.Type.CONIC,
  outerHalfAngle: Cesium.Math.toRadians(30),
  radius: 5000,
  color: Cesium.Color.CYAN.withAlpha(0.5),
  showViewshed: true,
});

// Viewshed auto-caches when sensor is stationary.
// Force refresh if objects in FOV change:
sensor.refreshViewshed();

// To remove:
sensor.destroy();

Members

static Cesium.Sensor.forceJSFallback : boolean

Set to true to force use of JS fallback instead of WASM for containsPoint. Useful for debugging.

allowPicking : boolean

Whether the sensor volume participates in the pick pass.
Default Value: true

disabledShaderModes : Array.<string>

The shader modes this sensor refuses to render, as an array. Assigning replaces the whole set; Sensor#disableShaderMode and Sensor#enableShaderMode adjust one at a time.

readonly effectiveShaderMode : string

The shader that ACTUALLY renders this frame. Equal to Sensor#shaderMode unless that mode is disabled on this sensor or its required projected data is absent, in which case it is SensorShaderMode.NONE and no overlay is drawn.

environmentIntersectionColor : Color

Color of the environment-contact edge.
Default Value: Color.WHITE

environmentIntersectionWidth : number

Width of the environment-contact edge, in meters along the boresight distance at the cut.
Default Value: 5.0

flatShading : boolean

Whether the volume renders as one uniform, unlit color: no per-fragment lighting, no back-face or lateral-wall dimming, and the fragment alpha is exactly the configured color/band alpha. Default is false (lit shading).
Default Value: false

gainPattern : object

The radiation-pattern options driving the gain-banded volume. Assigning merges into the current bag and rebuilds the lobe.

readonly ready : Promise.<void>

A promise that resolves when the sensor's WASM handle is ready. Await this before calling containsPoint() to ensure WASM is initialized.
Gets or sets which shader renders this sensor's ground overlay, by name — see SensorShaderMode.

This is the first-class selection. Sensor#viewshedVisualizationMode is the same state expressed as the legacy numeric enum, and setting either updates both, so helpers that still assign the numeric mode keep working.

What renders is Sensor#effectiveShaderMode, which may be SensorShaderMode.NONE if this mode is disabled on this sensor or its projected data has not arrived. It is never silently another shader.

Default Value: SensorShaderMode.VIEWSHED
Example:
sensor.shaderMode = Cesium.SensorShaderMode.RF_COVERAGE;
sensor.disableShaderMode(Cesium.SensorShaderMode.VIEWSHED);

shaderOverlayAlpha : number

Opacity multiplier applied to whatever the overlay shader produces, 0-1.

Its purpose is presenting a result as provisional. An RF sensor whose emitter has just been dragged still holds the PREVIOUS solve; dimming it says "this is stale, a fresh one is coming" without either lying about it or blanking the screen. It is a uniform, so it takes effect on the next frame with no shader rebuild — the drop can dim within the gesture.

Default Value: 1.0

shadingBandAlternateColor : Color

The color of the odd elevation bands when Sensor#volumeShading is `ELEVATION_BANDED` — the dark half of the zebra.
Default Value: Color.BLACK.withAlpha(0.35)
The color of the even elevation bands when Sensor#volumeShading is `ELEVATION_BANDED`. Its alpha is how strongly the stripe is composited over the volume color.
Default Value: Color.WHITE.withAlpha(0.35)

shadingBandCount : number

How many elevation contour bands the volume is striped into across the sensor's own maximum half-angle, when Sensor#volumeShading is `ELEVATION_BANDED`. Nine bands over a 90-degree dome is one band per 10 degrees of elevation.
Default Value: 9

shadingBandsOnWall : boolean

Whether stripes paint the lateral wall as well as the range shell. Wall stripes are concentric iso-range rings out from the sensor, matching the shell's circular bands. Default is false (bands on the range shell only).
Default Value: false

shadingBandSpectrum : boolean

Elevation bands walk the RF spectrum ramp (blue->red) instead of the two-color zebra. Requires ELEVATION_BANDED volume shading.

showEnvironmentIntersection : boolean

Whether the volume paints a conforming contact edge where it meets terrain/objects (the occlusion cut), instead of ending on a bare fragment discard. Requires Sensor#stopAtOcclusion and Sensor#showViewshed.
Default Value: false

showVolume : boolean

Whether the sensor's VOLUME — its body in space — is drawn.

Orthogonal to Sensor#showViewshed, which gates the ground raster, with Sensor#show the master switch over both. STK treats the sensor body and its coverage analysis as independent toggles and the emitter demos need the same, so that showing the volume does not take the coverage raster down with it. Closes the gap filed as `orbpro-sensor-volume-visibility-toggle`, which demos had been working around by setting Sensor#color to transparent — a workaround that cannot express itself at all once the volume is a gain-banded lobe.

Default Value: true

sphericalCap : boolean

Whether to use spherical cap for the sensor. When true (default), the sensor shows a dome at the range boundary and detection uses spherical distance (dist < range). When false, the cone is visually open-ended and detection uses a planar boundary perpendicular to boresight (z < range in local coordinates).
Default Value: true
Gets or sets the split direction used for side-by-side comparison rendering.

stopAtOcclusion : boolean

Whether to clip the sensor volume at terrain/geometry occlusion points. When true and viewshed is enabled, the sensor volume will stop rendering at terrain and geometry that blocks the line of sight. Requires viewshed to be enabled. Default is true. Note: Changing this requires rebuilding the sensor geometry.

terrainDetail : number|undefined

The terrain detail level within the sensor's viewshed area. Value from 1-8, where 1 is highest detail and 8 is lowest. Set to undefined to use the global terrain LOD setting. Lower values require more GPU/CPU but provide more accurate viewshed.

terrainDetailMode : string

The terrain detail distance mode within the sensor's viewshed area. "distance" refines terrain based on distance from the sensor, while "forced" caps far-footprint terrain distance for stable high-detail terrain.
See:

viewshedDepthBias : number

Gets or sets the depth-comparison bias used by viewshed visibility tests. Expressed in normalized depth units relative to the shadow-map reference distance of 10,000 km. Default 1e-7. Larger values eliminate the per-pixel "zebra" banding caused by shadow-map quantization at the cost of fine-scale occlusion detail; smaller values preserve detail but may reintroduce banding. Tunable at runtime — no rebuild needed.

viewshedDirty : boolean

Whether the viewshed needs to be re-rendered. Automatically set to true when position, orientation, or intersection settings change. Set this to true or call Sensor#refreshViewshed to force an update.

viewshedOnTerrain : boolean

Whether the viewshed's ground raster paints the globe. When false the sensor's occlusion cascades still render — the volume keeps clipping at terrain/objects — but the viewshed leaves the globe's receive pipeline, freeing its fragment-texture-unit budget (the globe pass fits about two viewshed receivers).
Default Value: true

viewshedPositiveLinkFootprint : object|undefined

Optional terrain-analysis-backed positive-link footprint overlay for viewshed terrain shading.

viewshedQualityAngleExponent : number

Gets or sets the boresight-falloff exponent used by the coverage-quality heat map.

viewshedQualityDistanceExponent : number

Gets or sets the distance-falloff exponent used by the coverage-quality heat map.

viewshedQualityHighColor : Color

Gets or sets the high-quality color used by the coverage-quality heat map.

viewshedQualityLowColor : Color

Gets or sets the low-quality color used by the coverage-quality heat map.

viewshedQualityMediumColor : Color

Gets or sets the medium-quality color used by the coverage-quality heat map.

viewshedRfAtmosphericLossDbPerKm : number

Gets or sets the atmospheric attenuation rate used by RF viewshed visualization.
Legacy alias for `viewshedRfNegativeMarginColor`.

viewshedRfContourColor : Color

Colour of the intermediate RF link-margin contour lines.

viewshedRfContourIntervalDb : number

Contour (isoline) interval in dB for the RF link-margin overlay. Zero disables contours. The lines are computed in the material from the same texture sample as the fill, so they update with the raster and cost nothing per solve — unlike a CPU-side GeoJSON contour pass, which rebuilds geometry every time the emitter moves.
Default Value: 0.0

viewshedRfContourWidthPx : number

Screen-space width, in pixels, of the RF link-margin contour lines.
Default Value: 1.0

viewshedRfContourZeroColor : Color

Colour of the zero-margin contour — the link-closure boundary, which is the one isoline the analysis is actually about.

viewshedRfFrequency : number

Gets or sets the RF frequency used by RF viewshed visualization.
Legacy alias for `viewshedRfPositiveMarginColor`.

viewshedRfLinkMarginFootprint : object|undefined

Optional terrain-analysis-backed projected RF link-margin raster.

viewshedRfNegativeMarginColor : Color

Gets or sets the negative link-margin color used by RF terrain overlays.

viewshedRfOccludedLossDb : number

Gets or sets the occlusion penalty applied in RF viewshed visualization.

viewshedRfPositiveMarginColor : Color

Gets or sets the positive link-margin color used by RF terrain overlays.

viewshedRfThresholdDb : number

Gets or sets the RF path-loss threshold.

viewshedRfTransitionWidthDb : number

Gets or sets the transition band around the RF threshold.
Gets or sets the viewshed visualization mode.

The legacy numeric view of Sensor#shaderMode. Assigning a mode that maps to a registered shader updates the named selection too, which is what lets footprint helpers keep assigning numbers.

volumeShading : string

How the sensor VOLUME is shaded — see SensorVolumeShading. `GAIN_BANDED` replaces the flat translucent body with the antenna's radiation pattern: radius scaled by gain, surface banded through the gain ramp with contour lines.
Default Value: SensorVolumeShading.FLAT

Methods

static Cesium.Sensor.createCoverageRequestFromEntity(options)object

Builds a sensor-coverage module request from an OrbPro Sensor graphics object attached to a propagated entity. The module owns footprint and swath projection; this helper only samples the entity's propagated state and carries sensor semantics into the request.
Name Type Description
options object Options.
Name Type Default Description
entity Entity Entity with conicSensor or rectangularSensor.
startTime JulianDate Start time.
stopTime JulianDate Stop time.
grid object Coverage grid definition.
sampleCount number 9 optional Number of propagated samples.
figureOfMerit string "percent_coverage" optional Figure of merit.
colorMap string "orbpro_coverage" optional Color map name.
Returns:
JSON-serializable coverage request.

static Cesium.Sensor.debugEvaluateSDF(sensor, point)object

Debug method to evaluate SDF for a specific point against a sensor. This uses the already-loaded WASM backend, avoiding import path issues.
Name Type Description
sensor Sensor The sensor instance to debug.
point Cartesian3 Point in world coordinates.
Returns:
Debug info about the SDF evaluation.

static Cesium.Sensor.debugWasmState(sensor)object

Debug method to get WASM sensor state for a specific sensor. This uses the already-loaded WASM backend, avoiding import path issues.
Name Type Description
sensor Sensor The sensor instance to debug.
Returns:
Debug info about the sensor's WASM state.

static Cesium.Sensor.ensureWasmReady()Promise.<boolean>

Ensures the WASM backend is loaded and ready for sensor operations. Call this once before creating any sensors that will use containsPoint().
Returns:
Resolves to true when WASM is ready.
Throws:
  • Error : If WASM backend fails to initialize.
Example:
await Cesium.Sensor.ensureWasmReady();
const sensor = new Cesium.Sensor({ ... });
sensor.containsPoint(point); // Now works

static Cesium.Sensor.isWasmReady()boolean

Checks if the WASM backend is currently initialized and ready.
Returns:
True if WASM is ready for use.

applyViewshedLinkMarginConfiguration(configuration)

Apply projected RF link-margin visualization settings in one update.
Name Type Description
configuration object RF link-margin configuration.

applyViewshedProbabilityConfiguration(configuration)

Name Type Description
configuration object RF link-margin configuration.

applyViewshedQualityConfiguration(configuration)

Apply coverage-quality heat-map settings in one update.
Name Type Description
configuration object Coverage-quality visualization configuration.

applyViewshedRfConfiguration(configuration)

Apply RF viewshed visualization settings in one update.
Name Type Description
configuration object RF viewshed configuration.

containsPointGeometrically(point)boolean

Tests geometric containment only. This intentionally excludes body occlusion, terrain occlusion, and shadow-map visibility so higher-level access logic can layer those concerns independently.
Name Type Description
point Cartesian3 Point in world coordinates.
Returns:
True if the point is geometrically inside the sensor volume.

debugContainsPoint(point)object

Debug method to compare JS and WASM containsPoint results. Call this to diagnose mismatches between JS and WASM implementations.
Name Type Description
point Cartesian3 Point in world coordinates.
Returns:
Debug info comparing JS and WASM results.

disableShaderMode(mode)Sensor

Refuse a shader mode on this sensor.

A refusal is stronger than a selection. Anything that later assigns the refused mode — a footprint helper clearing its raster, a control panel, a default — resolves to SensorShaderMode.NONE and the sensor draws no overlay instead of painting the refused shader. That is what makes an RF sensor safe: it can never fall back to a plain visibility raster wearing RF colors while its solve is in flight.

Name Type Description
mode string A SensorShaderMode name.
Returns:
This sensor, for chaining.
Example:
sensor.disableShaderMode(Cesium.SensorShaderMode.VIEWSHED);

enableShaderMode(mode)Sensor

Withdraw a refusal added by Sensor#disableShaderMode.
Name Type Description
mode string A SensorShaderMode name.
Returns:
This sensor, for chaining.

evaluateGeometricContainmentSdf(point)number|undefined

Evaluates the geometric signed-distance function for this sensor when a handle-backed WASM containment primitive is available.
Name Type Description
point Cartesian3 Point in world coordinates.
Returns:
Signed distance in meters, or undefined when a non-SDF containment path is active.

getEntitiesInVolume(entities, time, options)Array.<Entity>

Gets entities inside the sensor volume.
Name Type Description
entities EntityCollection Entity collection to check.
time JulianDate Time to evaluate positions.
options object optional Options object.
Name Type Default Description
occlusionAware boolean false optional If true and viewshed is enabled, entities must also be visible (not occluded by terrain) to be included.
Returns:
Entities inside the sensor volume.

getPointsInVolume(points, options)Array.<number>

Gets indices of points inside the sensor volume (batch operation).
Name Type Description
points Array.<Cartesian3> Array of points to test.
options object optional Options object.
Name Type Default Description
occlusionAware boolean false optional If true and viewshed is enabled, points must also be visible (not occluded by terrain) to be included.
Returns:
Indices of points inside the sensor.

hasAccess(targetPosition, options)boolean

Tests whether this sensor has access to a target position using a multi-tier filtering pipeline ordered from cheapest to most expensive: 1. Range check (<0.001ms) 2. Body occlusion via WASM (~0.005ms) or JS EllipsoidalOccluder (~0.01ms fallback) 3. FOV containment via WASM (~0.1ms) 4. Terrain occlusion via GPU readback (~1ms, opt-in)
Name Type Description
targetPosition Cartesian3 World-space target position.
options object optional Options.
Name Type Default Description
bodyOcclusion boolean true optional Check Earth body occlusion.
terrainOcclusion boolean false optional Check terrain occlusion (GPU, expensive).
ellipsoid Ellipsoid Ellipsoid.WGS84 optional Ellipsoid for body occlusion (JS fallback only).
Returns:
True if the sensor has access to the target.

isShaderModeEnabled(mode)boolean

Whether a shader mode is permitted on this sensor. Says nothing about whether it currently has the data to render — see Sensor#effectiveShaderMode for that.
Name Type Description
mode string A SensorShaderMode name.
Returns:
False when refused.
Manually triggers a viewshed shadow map update. Use this when objects in the sensor's field of view have moved and you want to refresh the occlusion analysis. The viewshed automatically updates when the sensor position or orientation changes, but objects moving within the FOV won't trigger an update.
Example:
// Force refresh when a building in the FOV was added/moved:
sensor.refreshViewshed();
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.