Service#

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

boolean getAvailable()#

Whether SCANsat is available.

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:
Game Scenes:

Space Center, Flight, Tracking Station

boolean 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 (SpaceCenter.CelestialBody) – The body.

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

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

  • type (ScanType) – The scan types.

Game Scenes:

Space Center, Flight, Tracking Station

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 (SpaceCenter.CelestialBody) – The body.

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

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

Game Scenes:

Space Center, Flight, Tracking Station

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 (SpaceCenter.CelestialBody) – The body.

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

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

Game Scenes:

Space Center, Flight, Tracking Station

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 (SpaceCenter.CelestialBody) – The body.

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

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

Game Scenes:

Space Center, Flight, Tracking Station

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:
Game Scenes:

Space Center, Flight, Tracking Station

java.util.List<Anomaly> anomalies(SpaceCenter.CelestialBody body)#

The anomalies on a body found by either anomaly scan.

Parameters:
Game Scenes:

Space Center, Flight, Tracking Station

java.util.List<String> getResources()#

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

byte[] map(SpaceCenter.CelestialBody body, MapType type, int width, MapProjection projection, boolean color, String resource, StdLib.ImageFormat format, int 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.

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 (boolean) – Whether the map is in color, or in grayscale.

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

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

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

Game Scenes:

Space Center, Flight, Tracking Station

Scanner scanner(SpaceCenter.Part part)#

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

Parameters:
Game Scenes:

Flight

java.util.List<Scanner> scanners(SpaceCenter.Vessel vessel)#

The SCANsat scanners on a vessel.

Parameters:
Game Scenes:

Flight

boolean getBackgroundScanning()#

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

boolean getDaylightCheck()#

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

boolean getInstantResourceScan()#

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

boolean getStockResourceScan()#

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

boolean getBiomeLock()#

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

boolean getRequireNarrowBand()#

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

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

public static final ScanType NONE#

No scan types.

public static final ScanType ALTIMETRY_LO_RES#

Low resolution altimetry, the terrain height in steps of 500 meters.

public static final ScanType ALTIMETRY_HI_RES#

High resolution altimetry, the terrain height and slope.

public static final ScanType VISUAL_LO_RES#

Low resolution visual imaging.

public static final ScanType VISUAL_HI_RES#

High resolution visual imaging.

public static final ScanType BIOME#

Biomes.

public static final ScanType ANOMALY#

The positions of anomalies.

public static final ScanType ANOMALY_DETAIL#

The positions and names of anomalies, from close range.

public static final ScanType RESOURCE_LO_RES#

Low resolution resource abundance, in steps of 5%.

public static final ScanType RESOURCE_HI_RES#

High resolution resource abundance.

public static final ScanType ALTIMETRY#

Both altimetry scans.

public static final ScanType VISUAL#

Both visual scans.

public static final ScanType ANOMALIES#

Both anomaly scans.

public static final ScanType RESOURCES#

Both resource scans.

public static final ScanType ALL#

Every scan type.

public class Anomaly#

An anomaly found by either anomaly scan. See ScanSat.anomalies(SpaceCenter.CelestialBody).

public Anomaly(String name, double latitude, double longitude)#

Construct a Anomaly from the values of its fields.

String getName()#

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

double getLatitude()#

The latitude of the anomaly, in degrees.

double getLongitude()#

The longitude of the anomaly, in degrees.