Main Content

read

Gather latest reading from UAV sensor

Description

[isUpdated,t,sensorReadings] = read(sensor) gathers the simulated sensor output sensor readings from the latest update of the UAV platform associated with the specified sensor sensor. The function returns an indicator isUpdated of whether the reading was updated at the simulation step in the scenario with timestamp t.

Input Arguments

collapse all

UAV sensor added to a platform in a scenario, specified as a uavSensor object.

Output Arguments

collapse all

Sensor reading update indicator, returned as a logical 0 (false) or 1(true). If the sensor reading updated at the current simulation step, the function returns this argument as true.

Data Types: logical

Timestamp of the generated sensor reading, returned as a scalar in seconds.

Data Types: double

Simulated sensor readings, which depends on the type of sensor specified in the sensor input argument. See the Usage syntax for the appropriate insSensor, gpsSensor, or uavLidarPointCloudGenerator System object™.

Version History

Introduced in R2020b