.. default-domain:: js .. highlight:: js .. module:: ScanSat :no-index: Scanner ======= .. class:: Scanner A SCANsat scanner on a part. Obtained by calling :func:`ScanSat.scanner` or :func:`ScanSat.scanners`. .. method:: getPart() The part containing this scanner. :Property: Read-only, cannot be set :rtype: :class:`SpaceCenter.Part` :Game Scenes: Flight .. method:: getScanTypes() The scan types of the scanner. :Property: Read-only, cannot be set :rtype: :class:`ScanSat.ScanType` :Game Scenes: Flight .. method:: getActive() setActive(value) Returns whether the scanner is switched on, and switches it on or off, as the buttons of the part do. :Property: Can be read or written :rtype: ``boolean`` :Game Scenes: Flight .. note:: A resource scanner only switches on when :func:`ScanSat.getInstantResourceScan` is off, or :func:`ScanSat.getStockResourceScan` is off. .. method:: getFieldOfView() The field of view of the scanner at its best altitude, in degrees. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. method:: getMinAltitude() The lowest altitude the scanner scans at, in meters. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. method:: getBestAltitude() The lowest altitude for the full field of view, in meters. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. method:: getMaxAltitude() The highest altitude the scanner scans at, in meters. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. method:: getRequiresLight() Whether the scanner only scans in daylight, when :func:`ScanSat.getDaylightCheck` is on. :Property: Read-only, cannot be set :rtype: ``boolean`` :Game Scenes: Flight .. method:: getState() The state of the scanner. :Property: Read-only, cannot be set :rtype: :class:`ScanSat.ScannerState` :Game Scenes: Flight .. class:: ScannerState The state of a scanner. See :meth:`ScanSat.Scanner.getState`. .. attribute:: off Switched off. .. attribute:: outOfRange Switched on, and outside its minimum and maximum altitudes. .. attribute:: inDarkness Switched on, and paused as it needs light and the ground below it is in darkness. .. attribute:: inRange Scanning between its minimum and best altitudes, with a reduced field of view. .. attribute:: inBestRange Scanning between its best and maximum altitudes, with its full field of view.