Service#
This service provides the scan data, scanners and maps of SCANsat.
Note
The readouts at a position return null where the scans they need have not
covered it, as the maps of the mod show nothing there.
- ScanSat.getAvailable()#
Whether SCANsat is available.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.coverage(body, type)#
The fraction of a body covered by scan types, between 0 and 1. For a combination, the mean coverage of its scan types, so 1 only once every one of them is complete. SCANsat reports at most 0.999 until the coverage is complete. Throws an exception if no scan types are given.
- Arguments:
body (
SpaceCenter.CelestialBody) – The body.type (
ScanSat.ScanType) – The scan types.
- Return type:
number- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.isCovered(body, latitude, longitude, type)#
Whether at least one of the scan types covers a position on a body. For a combination, this is
truewhere any one of its scan types covers the position, and not only where all of them do. Throws an exception if no scan types are given.- Arguments:
body (
SpaceCenter.CelestialBody) – The body.latitude (
number) – The latitude, in degrees.longitude (
number) – The longitude, in degrees.type (
ScanSat.ScanType) – The scan types.
- Return type:
boolean- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.elevation(body, latitude, longitude)#
The height of the terrain relative to sea level at a position, in meters, or
nullif no altimetry scan covers it. It is negative over the sea floor. With low resolution altimetry only, the height is rounded toward zero to a multiple of 500 meters.- Arguments:
body (
SpaceCenter.CelestialBody) – The body.latitude (
number) – The latitude, in degrees.longitude (
number) – The longitude, in degrees.
- Return type:
numberornull- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.slope(body, latitude, longitude)#
The terrain slope at a position, in degrees, or
nullif high resolution altimetry does not cover it. The slope is averaged over points 5 meters apart.- Arguments:
body (
SpaceCenter.CelestialBody) – The body.latitude (
number) – The latitude, in degrees.longitude (
number) – The longitude, in degrees.
- Return type:
numberornull- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.biome(body, latitude, longitude)#
The name of the biome at a position, or
nullif the biome scan does not cover it. Throws an exception if the body has no biomes.- Arguments:
body (
SpaceCenter.CelestialBody) – The body.latitude (
number) – The latitude, in degrees.longitude (
number) – The longitude, in degrees.
- Return type:
stringornull- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.resourceAbundance(body, latitude, longitude, resource)#
The abundance of a resource at a position, between 0 and 1, or
nullif no resource scan covers it. With the low resolution scan only, the abundance is rounded down to a multiple of 0.05. Throws an exception if SCANsat’s resource scanning is off, or SCANsat does not map the resource.- Arguments:
body (
SpaceCenter.CelestialBody) – The body.latitude (
number) – The latitude, in degrees.longitude (
number) – The longitude, in degrees.resource (
string) – The name of the resource. SeeScanSat.getResources().
- Return type:
numberornull- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.anomalies(body)#
The anomalies on a body found by either anomaly scan.
- Arguments:
body (
SpaceCenter.CelestialBody) – The body.
- Return type:
ArrayofScanSat.Anomaly- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.getResources()#
The names of the resources SCANsat maps. Empty if SCANsat’s resource scanning is off.
- Property:
Read-only, cannot be set
- Return type:
Arrayofstring
- ScanSat.map(body, type[, width[, projection[, color[, resource[, format[, quality]]]]]])#
A map of a body from the scan data, as an image. The map is half as high as it is wide. Building it takes several game frames. Throws an exception if SCANsat cannot render the map, as when its visual maps are switched off.
- Arguments:
body (
SpaceCenter.CelestialBody) – The body.type (
ScanSat.MapType) – The type of map.width (
number) – The width of the image in pixels, between 360 and 1440. Defaults to720.projection (
ScanSat.MapProjection) – The projection. Defaults toScanSat.MapProjection.rectangular.color (
boolean) – Whether the map is in color, or in grayscale. Defaults totrue.resource (
string) – The name of a resource to overlay, or an empty string for none. SeeScanSat.getResources(). Defaults to"".format (
StdLib.ImageFormat) – The format of the image. Defaults toStdLib.ImageFormat.png.quality (
number) – The quality of a JPEG image, from 1 to 100. Defaults to75.
- Return type:
Uint8Array- Game Scenes:
Space Center, Flight, Tracking Station
- ScanSat.scanner(part)#
The scanner on a part. Throws an exception if the part has no SCANsat scanner.
- Arguments:
part (
SpaceCenter.Part) – The part.
- Return type:
- Game Scenes:
Flight
- ScanSat.scanners(vessel)#
The SCANsat scanners on a vessel.
- Arguments:
vessel (
SpaceCenter.Vessel) – The vessel.
- Return type:
ArrayofScanSat.Scanner- Game Scenes:
Flight
- ScanSat.getBackgroundScanning()#
Whether scanners scan while their vessel is not the active vessel. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.getDaylightCheck()#
Whether scanners that need light stop scanning in darkness. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.getInstantResourceScan()#
Whether the stock orbital survey fills the high resolution resource scan of a body at once. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.getStockResourceScan()#
Whether the stock resource scanners work. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.getBiomeLock()#
Whether resource abundances are approximate until a surface sample is taken in the biome. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ScanSat.getRequireNarrowBand()#
Whether a narrow-band scanner is needed on the vessel for exact resource abundances. A setting of SCANsat.
- Property:
Read-only, cannot be set
- Return type:
boolean
- class ScanSat.ScanType()#
A set of scan types. Each scan type has its own coverage of a body.
Note
The values may be combined. A flags enumeration. Flags Enumerations shows how to combine its values.
- ScanType.none#
No scan types.
- ScanType.altimetryLoRes#
Low resolution altimetry, the terrain height in steps of 500 meters.
- ScanType.altimetryHiRes#
High resolution altimetry, the terrain height and slope.
- ScanType.visualLoRes#
Low resolution visual imaging.
- ScanType.visualHiRes#
High resolution visual imaging.
- ScanType.biome#
Biomes.
- ScanType.anomaly#
The positions of anomalies.
- ScanType.anomalyDetail#
The positions and names of anomalies, from close range.
- ScanType.resourceLoRes#
Low resolution resource abundance, in steps of 5%.
- ScanType.resourceHiRes#
High resolution resource abundance.
- ScanType.altimetry#
Both altimetry scans.
- ScanType.visual#
Both visual scans.
- ScanType.anomalies#
Both anomaly scans.
- ScanType.resources#
Both resource scans.
- ScanType.all#
Every scan type.
- class ScanSat.Anomaly(fields)#
An anomaly found by either anomaly scan. See
ScanSat.anomalies().- Anomaly.name#
The name of the anomaly, or
nulluntil the anomaly detail scan covers it.- Type:
stringornull
- Anomaly.latitude#
The latitude of the anomaly, in degrees.
- Type:
number
- Anomaly.longitude#
The longitude of the anomaly, in degrees.
- Type:
number