.. default-domain:: http .. highlight:: json Scanner ======= .. _http-ScanSat.Scanner: .. rubric:: Scanner A SCANsat scanner on a part. Obtained by calling :http:post:`/scan-sat/scanner` or :http:post:`/scan-sat/scanners`. | Base class: :ref:`SpaceCenter.Module ` 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)``. .. http:get:: /scan-sat/scanner/(id)/name Name of the PartModule. For example, "ModuleEngines". Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson string value: .. http:get:: /scan-sat/scanner/(id)/part The part that contains this module. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson SpaceCenter.Part value: .. http: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 ``null`` if the module's configuration node cannot be found. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson SpaceCenter.ConfigNode value: .. http: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 :http:get:`/space-center/part-field/(id)/visible` to get just the visible ones. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson list value: .. http: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 :http:get:`/space-center/part-event/(id)/visible` and :http:get:`/space-center/part-event/(id)/active` to get just the ones shown in the menu. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson list value: .. http: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 :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Scanner ` object. :resjson list value: .. http:get:: /scan-sat/scanner/(id)/scan-types The scan types of the scanner. :param id: The identifier of the :ref:`Scanner ` object. :resjson ScanSat.ScanType value: .. http: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 :http:get:`/scan-sat/instant-resource-scan` is off, or :http:get:`/scan-sat/stock-resource-scan` is off. :param id: The identifier of the :ref:`Scanner ` object. :resjson bool value: .. http: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 :http:get:`/scan-sat/instant-resource-scan` is off, or :http:get:`/scan-sat/stock-resource-scan` is off. :param id: The identifier of the :ref:`Scanner ` object. :reqjson bool value: The new value. .. http:get:: /scan-sat/scanner/(id)/field-of-view The field of view of the scanner at its best altitude, in degrees. :param id: The identifier of the :ref:`Scanner ` object. :resjson float value: .. http:get:: /scan-sat/scanner/(id)/min-altitude The lowest altitude the scanner scans at, in meters. :param id: The identifier of the :ref:`Scanner ` object. :resjson float value: .. http:get:: /scan-sat/scanner/(id)/best-altitude The lowest altitude for the full field of view, in meters. :param id: The identifier of the :ref:`Scanner ` object. :resjson float value: .. http:get:: /scan-sat/scanner/(id)/max-altitude The highest altitude the scanner scans at, in meters. :param id: The identifier of the :ref:`Scanner ` object. :resjson float value: .. http:get:: /scan-sat/scanner/(id)/requires-light Whether the scanner only scans in daylight, when :http:get:`/scan-sat/daylight-check` is on. :param id: The identifier of the :ref:`Scanner ` object. :resjson bool value: .. http:get:: /scan-sat/scanner/(id)/state The state of the scanner. :param id: The identifier of the :ref:`Scanner ` object. :resjson ScanSat.ScannerState value: .. _http-ScanSat.ScannerState: .. rubric:: ScannerState The state of a scanner. See :http: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.