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.
- GET /scan-sat/available#
Whether SCANsat is available.
- Response JSON Object:
value (bool)
- POST /scan-sat/coverage#
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.
- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
type (ScanSat.ScanType) – The scan types.
- Response JSON Object:
value (double)
- POST /scan-sat/is-covered#
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.- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
type (ScanSat.ScanType) – The scan types.
- Response JSON Object:
value (bool)
- POST /scan-sat/elevation#
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.- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
- Response JSON Object:
value (double?)
- POST /scan-sat/slope#
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.- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
- Response JSON Object:
value (double?)
- POST /scan-sat/biome#
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.- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
- Response JSON Object:
value (string?)
- POST /scan-sat/resource-abundance#
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.- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
resource (string) – The name of the resource. See
GET /scan-sat/resources.
- Response JSON Object:
value (double?)
- POST /scan-sat/anomalies#
The anomalies on a body found by either anomaly scan.
- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
- Response JSON Object:
value (list<ScanSat.Anomaly>)
- GET /scan-sat/resources#
The names of the resources SCANsat maps. Empty if SCANsat’s resource scanning is off.
- Response JSON Object:
value (list<string>)
- POST /scan-sat/map#
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.
- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
type (ScanSat.MapType) – The type of map.
width (int32) – The width of the image in pixels, between 360 and 1440. Optional, defaults to
720.projection (ScanSat.MapProjection) – The projection. Optional, defaults to
"rectangular".color (bool) – Whether the map is in color, or in grayscale. Optional, defaults to
true.resource (string) – The name of a resource to overlay, or an empty string for none. See
GET /scan-sat/resources. Optional, defaults to"".format (StdLib.ImageFormat) – The format of the image. Optional, defaults to
"png".quality (int32) – The quality of a JPEG image, from 1 to 100. Optional, defaults to
75.
- Response JSON Object:
value (bytes)
- POST /scan-sat/scanner#
The scanner on a part. Throws an exception if the part has no SCANsat scanner.
- Request JSON Object:
part (SpaceCenter.Part) – The part.
- Response JSON Object:
value (ScanSat.Scanner)
- POST /scan-sat/scanners#
The SCANsat scanners on a vessel.
- Request JSON Object:
vessel (SpaceCenter.Vessel) – The vessel.
- Response JSON Object:
value (list<ScanSat.Scanner>)
- GET /scan-sat/background-scanning#
Whether scanners scan while their vessel is not the active vessel. A setting of SCANsat.
- Response JSON Object:
value (bool)
- GET /scan-sat/daylight-check#
Whether scanners that need light stop scanning in darkness. A setting of SCANsat.
- Response JSON Object:
value (bool)
- GET /scan-sat/instant-resource-scan#
Whether the stock orbital survey fills the high resolution resource scan of a body at once. A setting of SCANsat.
- Response JSON Object:
value (bool)
- GET /scan-sat/stock-resource-scan#
Whether the stock resource scanners work. A setting of SCANsat.
- Response JSON Object:
value (bool)
- GET /scan-sat/biome-lock#
Whether resource abundances are approximate until a surface sample is taken in the biome. A setting of SCANsat.
- Response JSON Object:
value (bool)
- GET /scan-sat/require-narrow-band#
Whether a narrow-band scanner is needed on the vessel for exact resource abundances. A setting of SCANsat.
- Response JSON Object:
value (bool)
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, passed and returned as a list of the names of its values:
"none"No scan types.
"altimetry_lo_res"Low resolution altimetry, the terrain height in steps of 500 meters.
"altimetry_hi_res"High resolution altimetry, the terrain height and slope.
"visual_lo_res"Low resolution visual imaging.
"visual_hi_res"High resolution visual imaging.
"biome"Biomes.
"anomaly"The positions of anomalies.
"anomaly_detail"The positions and names of anomalies, from close range.
"resource_lo_res"Low resolution resource abundance, in steps of 5%.
"resource_hi_res"High resolution resource abundance.
"altimetry"Both altimetry scans.
"visual"Both visual scans.
"anomalies"Both anomaly scans.
"resources"Both resource scans.
"all"Every scan type.
Anomaly
An anomaly found by either anomaly scan. See POST /scan-sat/anomalies.
Passed and returned as an object with these fields:
name(string?)The name of the anomaly, or
nulluntil the anomaly detail scan covers it.latitude(double)The latitude of the anomaly, in degrees.
longitude(double)The longitude of the anomaly, in degrees.