Sensor#

class ansys.stk.core.stkobjects.Sensor#

Bases: ISTKObject, ILifetimeInformation, IDisplayTime, IProvideSpatialInfo

Class defining the Sensor class.

Overview#

set_pattern_type

Set the pattern type.

set_pointing_type

Set the sensor’s pointing type, using the SensorPointing enumeration.

set_pointing_external_file

Set the external pointing type.

reset_az_el_mask

Reset the az-el mask.

set_az_el_mask

Set the az-el mask type, using the AzElMaskType enumeration.

set_az_el_mask_file

Path and file name of az-el mask file.

set_location_type

Set the sensor’s location type, a member of the SensorLocation enumeration.

is_refraction_type_supported

Get a value indicating whether the specified type can be used.

get_stars_in_field_of_view

Return celestial bodies within the sensor’s field of view.

pattern_type

Criterion for defining the sensor pattern. A member of the SensorPattern enumeration.

pattern

Get data defining the sensor pattern.

pointing_type

The sensor’s pointing type. A member of the SensorPointing enumeration.

pointing

Get pointing data for the sensor.

az_el_mask

Get the az-el mask.

az_el_mask_data

Get az-el mask data for the sensor.

focal_length

Focal length used in defining sensor resolution. Uses SmallDistanceUnit Dimension.

detector_pitch

Detector pitch used in defining senor resolution. Uses SmallDistanceUnit Dimension.

refraction

Refraction method, a member of the SensorRefractionType enumeration.

graphics

Get the 2D Graphics properties for the sensor.

graphics_3d

Get the 3D Graphics properties for the sensor.

location_type

The location type being used by the sensor.

location_data

Get location data for the sensor. The sensor’s center point is invalid; all other points are valid choices for the location data.

access_constraints

Get constraints imposed on the sensor.

swath

Get the sensor’s swath.

refraction_supported_types

Return an array of valid choices.

refraction_model

Get a refraction model.

use_refraction_in_access

Flag controls whether refraction is applied when computing relative position in Access.

common_tasks

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.swath: Swath#

Get the sensor’s swath.

property Sensor.refraction_supported_types: list#

Return an array of valid choices.

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:

None

Sensor.set_pointing_type(self, pointing_type: SensorPointing) None#

Set the sensor’s pointing type, using the SensorPointing enumeration.

Parameters:

pointing_type : SensorPointing

Returns:

None

Sensor.set_pointing_external_file(self, sensor_pointing_file: str) None#

Set the external pointing type.

Parameters:

sensor_pointing_file : str

Returns:

None

Sensor.reset_az_el_mask(self) None#

Reset the az-el mask.

Returns:

None

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:

None

Sensor.set_az_el_mask_file(self, filename: str) None#

Path and file name of az-el mask file.

Parameters:

filename : str

Returns:

None

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:

None

Sensor.is_refraction_type_supported(self, model: SensorRefractionType) bool#

Get a value indicating whether the specified type can be used.

Parameters:

model : SensorRefractionType

Returns:

bool

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