Service#

This service provides the scan data, scanners and maps of SCANsat.

Note

The readouts at a position return None where the scans they need have not covered it, as the maps of the mod show nothing there.

available#

Whether SCANsat is available.

Attribute:

Read-only, cannot be set

Return type:

bool

static 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.

Parameters:
Return type:

float

Game Scenes:

Space Center, Flight, Tracking Station

static is_covered(body, latitude, longitude, 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 (SpaceCenter.CelestialBody) – The body.

  • latitude (float) – The latitude, in degrees.

  • longitude (float) – The longitude, in degrees.

  • type (ScanType) – The scan types.

Return type:

bool

Game Scenes:

Space Center, Flight, Tracking Station

static elevation(body, latitude, longitude)#

The height of the terrain relative to sea level at a position, in meters, or None 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 (SpaceCenter.CelestialBody) – The body.

  • latitude (float) – The latitude, in degrees.

  • longitude (float) – The longitude, in degrees.

Return type:

float or None

Game Scenes:

Space Center, Flight, Tracking Station

static slope(body, latitude, longitude)#

The terrain slope at a position, in degrees, or None if high resolution altimetry does not cover it. The slope is averaged over points 5 meters apart.

Parameters:
  • body (SpaceCenter.CelestialBody) – The body.

  • latitude (float) – The latitude, in degrees.

  • longitude (float) – The longitude, in degrees.

Return type:

float or None

Game Scenes:

Space Center, Flight, Tracking Station

static biome(body, latitude, longitude)#

The name of the biome at a position, or None if the biome scan does not cover it. Throws an exception if the body has no biomes.

Parameters:
  • body (SpaceCenter.CelestialBody) – The body.

  • latitude (float) – The latitude, in degrees.

  • longitude (float) – The longitude, in degrees.

Return type:

str or None

Game Scenes:

Space Center, Flight, Tracking Station

static resource_abundance(body, latitude, longitude, resource)#

The abundance of a resource at a position, between 0 and 1, or None 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 (SpaceCenter.CelestialBody) – The body.

  • latitude (float) – The latitude, in degrees.

  • longitude (float) – The longitude, in degrees.

  • resource (str) – The name of the resource. See resources.

Return type:

float or None

Game Scenes:

Space Center, Flight, Tracking Station

static anomalies(body)#

The anomalies on a body found by either anomaly scan.

Parameters:

body (SpaceCenter.CelestialBody) – The body.

Return type:

list(Anomaly)

Game Scenes:

Space Center, Flight, Tracking Station

resources#

The names of the resources SCANsat maps. Empty if SCANsat’s resource scanning is off.

Attribute:

Read-only, cannot be set

Return type:

list(str)

static map(body, type[, width=720][, projection=MapProjection.rectangular][, color=True][, resource=''][, format=StdLib.ImageFormat.png][, 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 (SpaceCenter.CelestialBody) – The body.

  • type (MapType) – The type of map.

  • width (int) – The width of the image in pixels, between 360 and 1440.

  • projection (MapProjection) – The projection.

  • color (bool) – Whether the map is in color, or in grayscale.

  • resource (str) – The name of a resource to overlay, or an empty string for none. See resources.

  • format (StdLib.ImageFormat) – The format of the image.

  • quality (int) – The quality of a JPEG image, from 1 to 100.

Return type:

bytes

Game Scenes:

Space Center, Flight, Tracking Station

static scanner(part)#

The scanner on a part. Throws an exception if the part has no SCANsat scanner.

Parameters:

part (SpaceCenter.Part) – The part.

Return type:

Scanner

Game Scenes:

Flight

static scanners(vessel)#

The SCANsat scanners on a vessel.

Parameters:

vessel (SpaceCenter.Vessel) – The vessel.

Return type:

list(Scanner)

Game Scenes:

Flight

background_scanning#

Whether scanners scan while their vessel is not the active vessel. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

daylight_check#

Whether scanners that need light stop scanning in darkness. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

instant_resource_scan#

Whether the stock orbital survey fills the high resolution resource scan of a body at once. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

stock_resource_scan#

Whether the stock resource scanners work. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

biome_lock#

Whether resource abundances are approximate until a surface sample is taken in the biome. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

require_narrow_band#

Whether a narrow-band scanner is needed on the vessel for exact resource abundances. A setting of SCANsat.

Attribute:

Read-only, cannot be set

Return type:

bool

class 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.

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.

class Anomaly(name, latitude, longitude)#

An anomaly found by either anomaly scan. See anomalies().

name#

The name of the anomaly, or None until the anomaly detail scan covers it.

Return type:

str or None

latitude#

The latitude of the anomaly, in degrees.

Return type:

float

longitude#

The longitude of the anomaly, in degrees.

Return type:

float