.. default-domain:: http .. highlight:: json Service ======= .. _http-ScanSat: 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. .. http:get:: /scan-sat/available Whether SCANsat is available. :resjson bool value: .. http: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. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson ScanSat.ScanType type: The scan types. :resjson double value: .. http:post:: /scan-sat/is-covered Whether at least one of the scan types covers a position on a body. For a combination, this is ``true`` where 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. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson double latitude: The latitude, in degrees. :reqjson double longitude: The longitude, in degrees. :reqjson ScanSat.ScanType type: The scan types. :resjson bool value: .. http:post:: /scan-sat/elevation The height of the terrain relative to sea level at a position, in meters, or ``null`` if 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. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson double latitude: The latitude, in degrees. :reqjson double longitude: The longitude, in degrees. :resjson double? value: .. http:post:: /scan-sat/slope The terrain slope at a position, in degrees, or ``null`` if high resolution altimetry does not cover it. The slope is averaged over points 5 meters apart. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson double latitude: The latitude, in degrees. :reqjson double longitude: The longitude, in degrees. :resjson double? value: .. http:post:: /scan-sat/biome The name of the biome at a position, or ``null`` if the biome scan does not cover it. Throws an exception if the body has no biomes. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson double latitude: The latitude, in degrees. :reqjson double longitude: The longitude, in degrees. :resjson string? value: .. http:post:: /scan-sat/resource-abundance The abundance of a resource at a position, between 0 and 1, or ``null`` if 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. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson double latitude: The latitude, in degrees. :reqjson double longitude: The longitude, in degrees. :reqjson string resource: The name of the resource. See :http:get:`/scan-sat/resources`. :resjson double? value: .. http:post:: /scan-sat/anomalies The anomalies on a body found by either anomaly scan. :reqjson SpaceCenter.CelestialBody body: The body. :resjson list value: .. http:get:: /scan-sat/resources The names of the resources SCANsat maps. Empty if SCANsat's resource scanning is off. :resjson list value: .. http: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. :reqjson SpaceCenter.CelestialBody body: The body. :reqjson ScanSat.MapType type: The type of map. :reqjson int32 width: The width of the image in pixels, between 360 and 1440. Optional, defaults to ``720``. :reqjson ScanSat.MapProjection projection: The projection. Optional, defaults to ``"rectangular"``. :reqjson bool color: Whether the map is in color, or in grayscale. Optional, defaults to ``true``. :reqjson string resource: The name of a resource to overlay, or an empty string for none. See :http:get:`/scan-sat/resources`. Optional, defaults to ``""``. :reqjson StdLib.ImageFormat format: The format of the image. Optional, defaults to ``"png"``. :reqjson int32 quality: The quality of a JPEG image, from 1 to 100. Optional, defaults to ``75``. :resjson bytes value: .. http:post:: /scan-sat/scanner The scanner on a part. Throws an exception if the part has no SCANsat scanner. :reqjson SpaceCenter.Part part: The part. :resjson ScanSat.Scanner value: .. http:post:: /scan-sat/scanners The SCANsat scanners on a vessel. :reqjson SpaceCenter.Vessel vessel: The vessel. :resjson list value: .. http:get:: /scan-sat/background-scanning Whether scanners scan while their vessel is not the active vessel. A setting of SCANsat. :resjson bool value: .. http:get:: /scan-sat/daylight-check Whether scanners that need light stop scanning in darkness. A setting of SCANsat. :resjson bool value: .. http: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. :resjson bool value: .. http:get:: /scan-sat/stock-resource-scan Whether the stock resource scanners work. A setting of SCANsat. :resjson bool value: .. http:get:: /scan-sat/biome-lock Whether resource abundances are approximate until a surface sample is taken in the biome. A setting of SCANsat. :resjson bool value: .. http:get:: /scan-sat/require-narrow-band Whether a narrow-band scanner is needed on the vessel for exact resource abundances. A setting of SCANsat. :resjson bool value: .. _http-ScanSat.ScanType: .. rubric:: 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. .. _http-ScanSat.Anomaly: .. rubric:: Anomaly An anomaly found by either anomaly scan. See :http:post:`/scan-sat/anomalies`. Passed and returned as an object with these fields: ``name`` (string?) The name of the anomaly, or ``null`` until the anomaly detail scan covers it. ``latitude`` (double) The latitude of the anomaly, in degrees. ``longitude`` (double) The longitude of the anomaly, in degrees.