.. default-domain:: cs .. highlight:: csharp .. namespace:: KRPC.Client.Services.ScanSat Service ======= .. class:: 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. .. property:: bool Available { get; } Whether SCANsat is available. :Game Scenes: All .. function:: double Coverage(SpaceCenter.CelestialBody body, ScanType 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. :parameters: * **body** -- The body. * **type** -- The scan types. :Game Scenes: Space Center, Flight, Tracking Station .. function:: bool IsCovered(SpaceCenter.CelestialBody body, double latitude, double longitude, ScanType type) 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. :parameters: * **body** -- The body. * **latitude** -- The latitude, in degrees. * **longitude** -- The longitude, in degrees. * **type** -- The scan types. :Game Scenes: Space Center, Flight, Tracking Station .. function:: double? Elevation(SpaceCenter.CelestialBody body, double latitude, double longitude) 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. :parameters: * **body** -- The body. * **latitude** -- The latitude, in degrees. * **longitude** -- The longitude, in degrees. :Game Scenes: Space Center, Flight, Tracking Station .. function:: double? Slope(SpaceCenter.CelestialBody body, double latitude, double longitude) 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. :parameters: * **body** -- The body. * **latitude** -- The latitude, in degrees. * **longitude** -- The longitude, in degrees. :Game Scenes: Space Center, Flight, Tracking Station .. function:: string Biome(SpaceCenter.CelestialBody body, double latitude, double longitude) 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. :parameters: * **body** -- The body. * **latitude** -- The latitude, in degrees. * **longitude** -- The longitude, in degrees. :Game Scenes: Space Center, Flight, Tracking Station .. function:: double? ResourceAbundance(SpaceCenter.CelestialBody body, double latitude, double longitude, string resource) 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. :parameters: * **body** -- The body. * **latitude** -- The latitude, in degrees. * **longitude** -- The longitude, in degrees. * **resource** -- The name of the resource. See :prop:`ScanSat.Resources `. :Game Scenes: Space Center, Flight, Tracking Station .. function:: System.Collections.Generic.IList Anomalies(SpaceCenter.CelestialBody body) The anomalies on a body found by either anomaly scan. :parameters: * **body** -- The body. :Game Scenes: Space Center, Flight, Tracking Station .. property:: System.Collections.Generic.IList Resources { get; } The names of the resources SCANsat maps. Empty if SCANsat's resource scanning is off. :Game Scenes: All .. function:: byte[] Map(SpaceCenter.CelestialBody body, MapType type, int width = 720, MapProjection projection = MapProjection.Rectangular, bool color = true, string resource = "", StdLib.ImageFormat format = StdLib.ImageFormat.PNG, int quality = 75) 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. :parameters: * **body** -- The body. * **type** -- The type of map. * **width** -- The width of the image in pixels, between 360 and 1440. * **projection** -- The projection. * **color** -- Whether the map is in color, or in grayscale. * **resource** -- The name of a resource to overlay, or an empty string for none. See :prop:`ScanSat.Resources `. * **format** -- The format of the image. * **quality** -- The quality of a JPEG image, from 1 to 100. :Game Scenes: Space Center, Flight, Tracking Station .. function:: Scanner Scanner(SpaceCenter.Part part) The scanner on a part. Throws an exception if the part has no SCANsat scanner. :parameters: * **part** -- The part. :Game Scenes: Flight .. function:: System.Collections.Generic.IList Scanners(SpaceCenter.Vessel vessel) The SCANsat scanners on a vessel. :parameters: * **vessel** -- The vessel. :Game Scenes: Flight .. property:: bool BackgroundScanning { get; } Whether scanners scan while their vessel is not the active vessel. A setting of SCANsat. :Game Scenes: All .. property:: bool DaylightCheck { get; } Whether scanners that need light stop scanning in darkness. A setting of SCANsat. :Game Scenes: All .. property:: bool InstantResourceScan { get; } Whether the stock orbital survey fills the high resolution resource scan of a body at once. A setting of SCANsat. :Game Scenes: All .. property:: bool StockResourceScan { get; } Whether the stock resource scanners work. A setting of SCANsat. :Game Scenes: All .. property:: bool BiomeLock { get; } Whether resource abundances are approximate until a surface sample is taken in the biome. A setting of SCANsat. :Game Scenes: All .. property:: bool RequireNarrowBand { get; } Whether a narrow-band scanner is needed on the vessel for exact resource abundances. A setting of SCANsat. :Game Scenes: All .. enum:: 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. :std:ref:`csharp-client-flags` shows how to combine its values. .. enumerator:: None No scan types. .. enumerator:: AltimetryLoRes Low resolution altimetry, the terrain height in steps of 500 meters. .. enumerator:: AltimetryHiRes High resolution altimetry, the terrain height and slope. .. enumerator:: VisualLoRes Low resolution visual imaging. .. enumerator:: VisualHiRes High resolution visual imaging. .. enumerator:: Biome Biomes. .. enumerator:: Anomaly The positions of anomalies. .. enumerator:: AnomalyDetail The positions and names of anomalies, from close range. .. enumerator:: ResourceLoRes Low resolution resource abundance, in steps of 5%. .. enumerator:: ResourceHiRes High resolution resource abundance. .. enumerator:: Altimetry Both altimetry scans. .. enumerator:: Visual Both visual scans. .. enumerator:: Anomalies Both anomaly scans. .. enumerator:: Resources Both resource scans. .. enumerator:: All Every scan type. .. struct:: Anomaly An anomaly found by either anomaly scan. See :meth:`ScanSat.Anomalies `. .. function:: Anomaly(string name, double latitude, double longitude) Construct a Anomaly from the values of its fields. .. property:: string Name { get; } The name of the anomaly, or ``null`` until the anomaly detail scan covers it. .. property:: double Latitude { get; } The latitude of the anomaly, in degrees. .. property:: double Longitude { get; } The longitude of the anomaly, in degrees.