Sensor#
- class ansys.stk.core.stkobjects.Sensor#
Bases:
ISTKObject
,ILifetimeInformation
,IDisplayTime
,IProvideSpatialInfo
Class defining the Sensor class.
Overview#
Set the pattern type. |
|
Set the sensor’s pointing type, using the SensorPointing enumeration. |
|
Set the external pointing type. |
|
Reset the az-el mask. |
|
Set the az-el mask type, using the AzElMaskType enumeration. |
|
Path and file name of az-el mask file. |
|
Set the sensor’s location type, a member of the SensorLocation enumeration. |
|
Get a value indicating whether the specified type can be used. |
|
Return celestial bodies within the sensor’s field of view. |
Criterion for defining the sensor pattern. A member of the SensorPattern enumeration. |
|
Get data defining the sensor pattern. |
|
The sensor’s pointing type. A member of the SensorPointing enumeration. |
|
Get pointing data for the sensor. |
|
Get the az-el mask. |
|
Get az-el mask data for the sensor. |
|
Focal length used in defining sensor resolution. Uses SmallDistanceUnit Dimension. |
|
Detector pitch used in defining senor resolution. Uses SmallDistanceUnit Dimension. |
|
Refraction method, a member of the SensorRefractionType enumeration. |
|
Get the 2D Graphics properties for the sensor. |
|
Get the 3D Graphics properties for the sensor. |
|
The location type being used by the sensor. |
|
Get location data for the sensor. The sensor’s center point is invalid; all other points are valid choices for the location data. |
|
Get constraints imposed on the sensor. |
|
Get the sensor’s swath. |
|
Return an array of valid choices. |
|
Get a refraction model. |
|
Flag controls whether refraction is applied when computing relative position in Access. |
|
Return an interface that exposes common tasks. |
Examples#
Sensor Body Mask
# Sensor sensor: Sensor object
if os.name == "nt":
installPath = r"C:\Program Files\AGI\STK 12"
else:
installPath = os.environ["STK_INSTALL_DIR"]
bmskPath = ["Data", "Resources", "stktraining", "text", "BodyMask_hga.bmsk"]
sensor.set_az_el_mask_file(os.path.join(installPath, *bmskPath))
Set Sensor Properties
# Sensor sensor: Sensor object
# Change pattern and set
sensor.common_tasks.set_pattern_rectangular(20, 25)
# Change pointing and set
sensor.common_tasks.set_pointing_fixed_az_el(90, 60, AzElAboutBoresight.ROTATE)
# Change location and set
sensor.set_location_type(SensorLocation.FIXED)
sensor.location_data.assign_cartesian(-0.0004, -0.0004, 0.004)
Attach a Sensor Object to a Vehicle
# Satellite satellite: Satellite object
sensor = satellite.children.new(STKObjectType.SENSOR, "MySensor")
Import detail#
from ansys.stk.core.stkobjects import Sensor
Property detail#
- property Sensor.pattern_type: SensorPattern#
Criterion for defining the sensor pattern. A member of the SensorPattern enumeration.
- property Sensor.pattern: ISensorPattern#
Get data defining the sensor pattern.
- property Sensor.pointing_type: SensorPointing#
The sensor’s pointing type. A member of the SensorPointing enumeration.
- property Sensor.pointing: ISensorPointing#
Get pointing data for the sensor.
- property Sensor.az_el_mask: AzElMaskType#
Get the az-el mask.
- property Sensor.az_el_mask_data: IAzElMaskData#
Get az-el mask data for the sensor.
- property Sensor.focal_length: float#
Focal length used in defining sensor resolution. Uses SmallDistanceUnit Dimension.
- property Sensor.detector_pitch: float#
Detector pitch used in defining senor resolution. Uses SmallDistanceUnit Dimension.
- property Sensor.refraction: SensorRefractionType#
Refraction method, a member of the SensorRefractionType enumeration.
- property Sensor.graphics: SensorGraphics#
Get the 2D Graphics properties for the sensor.
- property Sensor.graphics_3d: SensorGraphics3D#
Get the 3D Graphics properties for the sensor.
- property Sensor.location_type: SensorLocation#
The location type being used by the sensor.
- property Sensor.location_data: ILocationData#
Get location data for the sensor. The sensor’s center point is invalid; all other points are valid choices for the location data.
- property Sensor.access_constraints: AccessConstraintCollection#
Get constraints imposed on the sensor.
- property Sensor.refraction_model: IRefractionModelBase#
Get a refraction model.
- property Sensor.use_refraction_in_access: bool#
Flag controls whether refraction is applied when computing relative position in Access.
- property Sensor.common_tasks: SensorCommonTasks#
Return an interface that exposes common tasks.
Method detail#
- Sensor.set_pattern_type(self, pattern_type: SensorPattern) None #
Set the pattern type.
- Parameters:
pattern_type :
SensorPattern
- Returns:
- Sensor.set_pointing_type(self, pointing_type: SensorPointing) None #
Set the sensor’s pointing type, using the SensorPointing enumeration.
- Parameters:
pointing_type :
SensorPointing
- Returns:
- Sensor.set_pointing_external_file(self, sensor_pointing_file: str) None #
Set the external pointing type.
- Sensor.set_az_el_mask(self, az_el_mask_type: AzElMaskType) None #
Set the az-el mask type, using the AzElMaskType enumeration.
- Parameters:
az_el_mask_type :
AzElMaskType
- Returns:
- Sensor.set_location_type(self, location_type: SensorLocation) None #
Set the sensor’s location type, a member of the SensorLocation enumeration.
- Parameters:
location_type :
SensorLocation
- Returns:
- Sensor.is_refraction_type_supported(self, model: SensorRefractionType) bool #
Get a value indicating whether the specified type can be used.
- Parameters:
model :
SensorRefractionType
- Returns:
- Sensor.get_stars_in_field_of_view(self, epoch: Any) ICelestialBodyInformationCollection #
Return celestial bodies within the sensor’s field of view.
- Parameters:
epoch :
Any
- Returns:
ICelestialBodyInformationCollection