Scanner#
Scanner
A SCANsat scanner on a part. Obtained by calling POST /scan-sat/scanner or
POST /scan-sat/scanners.
A Scanner object is returned as {"id": ..., "class": ...}, its identifier and the name
of its own class. An argument is that object or the identifier alone. A path that acts on an
object takes the identifier as (id).
- GET /scan-sat/scanner/(id)/name#
Name of the PartModule. For example, “ModuleEngines”.
Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (string)
- GET /scan-sat/scanner/(id)/part#
The part that contains this module.
Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /scan-sat/scanner/(id)/config#
The static configuration of the module, as found in the part’s cfg file. This provides access to data that is not exposed as a field, such as the resources produced by a generator. Returns
nullif the module’s configuration node cannot be found.Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (SpaceCenter.ConfigNode)
- GET /scan-sat/scanner/(id)/field-list#
A list of all the fields of the module, including those not visible in the right-click menu of the part. Filter by
GET /space-center/part-field/(id)/visibleto get just the visible ones.Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (list<SpaceCenter.PartField>)
- GET /scan-sat/scanner/(id)/event-list#
A list of all the events of the module, including those not currently visible or active. Events are the clickable buttons visible in the right-click menu of the part. Filter by
GET /space-center/part-event/(id)/visibleandGET /space-center/part-event/(id)/activeto get just the ones shown in the menu.Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (list<SpaceCenter.PartEvent>)
- GET /scan-sat/scanner/(id)/action-list#
A list of all the actions of the module. These are the parts actions that can be assigned to action groups in the in-game editor.
Inherited from SpaceCenter.Module.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (list<SpaceCenter.PartAction>)
- GET /scan-sat/scanner/(id)/scan-types#
The scan types of the scanner.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (ScanSat.ScanType)
- GET /scan-sat/scanner/(id)/active#
Returns whether the scanner is switched on, and switches it on or off, as the buttons of the part do.
Note
A resource scanner only switches on when
GET /scan-sat/instant-resource-scanis off, orGET /scan-sat/stock-resource-scanis off.- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (bool)
- PUT /scan-sat/scanner/(id)/active#
Returns whether the scanner is switched on, and switches it on or off, as the buttons of the part do.
Note
A resource scanner only switches on when
GET /scan-sat/instant-resource-scanis off, orGET /scan-sat/stock-resource-scanis off.- Parameters:
id – The identifier of the Scanner object.
- Request JSON Object:
value (bool) – The new value.
- GET /scan-sat/scanner/(id)/field-of-view#
The field of view of the scanner at its best altitude, in degrees.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (float)
- GET /scan-sat/scanner/(id)/min-altitude#
The lowest altitude the scanner scans at, in meters.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (float)
- GET /scan-sat/scanner/(id)/best-altitude#
The lowest altitude for the full field of view, in meters.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (float)
- GET /scan-sat/scanner/(id)/max-altitude#
The highest altitude the scanner scans at, in meters.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (float)
- GET /scan-sat/scanner/(id)/requires-light#
Whether the scanner only scans in daylight, when
GET /scan-sat/daylight-checkis on.- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (bool)
- GET /scan-sat/scanner/(id)/state#
The state of the scanner.
- Parameters:
id – The identifier of the Scanner object.
- Response JSON Object:
value (ScanSat.ScannerState)
ScannerState
The state of a scanner. See GET /scan-sat/scanner/(id)/state.
Passed and returned as the name of one of its values:
"off"Switched off.
"out_of_range"Switched on, and outside its minimum and maximum altitudes.
"in_darkness"Switched on, and paused as it needs light and the ground below it is in darkness.
"in_range"Scanning between its minimum and best altitudes, with a reduced field of view.
"in_best_range"Scanning between its best and maximum altitudes, with its full field of view.