WindsonicSensor#

class lsst.ts.ess.common.sensor.WindsonicSensor(log, num_channels=0)#

Bases: BaseSensor

GILL Windsonic 2-D Sonic Anemometer Sensor.

Perform protocol conversion for a Gill Windsonic 2-D Sonic Anemometer.

Parameters:
  • log (logger) – The logger for which to create a child logger.

  • num_channels (int, default: 0)

Attributes Summary

Methods Summary

extract_telemetry(line)

Extract the wind telemetry from a line of Sensor data.

Attributes Documentation

default_direction_str: str = '999'#
default_speed_str: str = '9999.9990'#
end_character = '\x03'#
good_status: str = '00'#
start_character: str = '\x02'#
telemetry_pattern = re.compile('^\x02Q,(?P<direction>\\d{3})?,(?P<speed>\\d{3}\\.\\d{2}),M,(?P<status>\\d{2}),\x03(?P<checksum>[\\da-fA-F]{2})\r\n$')#
unit_identifier: str = 'Q'#
windspeed_unit: str = 'M'#

Methods Documentation

async extract_telemetry(line)#

Extract the wind telemetry from a line of Sensor data.

Parameters:

line (str) – A line of comma separated telemetry as described in the doc string of this class.

Returns:

A list of 2 floats containing the telemetry as measured by the sensor: the wind speed and direction.

Return type:

list