nav_algo.SailSensors module

Bases: object

This class contains the object of the ADC to be used by other classes for analog devices.

This function reads the ADC present on the I2C bus.

Parameters

gain (int) – The gain of the sensor input.

Bases: object

This class is used to create a new instance of an I2C sensor module for communication. It also contains functions to communicate with the module.

Sends a hexadecimal-command list to the desired component. The function then waits for and retrieves a response from the device with a length based on the parameters.

Parameters
  • send (list) – a list of bytes (sends this list of hexadecimal commands).

  • recieve (int) – the amount of bytes in a list to retrieve from the device.

Returns

a list of bytes with length of int recieve.

Return type

list

Sends a hexadecimal list to the desired component.

Parameters

msg (list) – list of bytes (needs to be a list of hexadecimal commands specific to the device).

Reads a block of data from the i2c device register.

Parameters
  • bytenumber (int) – the number of bytes you would like to read from the device’s register.

  • offset (int) – integer value for the byte offset of data collection from the register.

Writes a block of data from the i2c device register.

Parameters
  • msg (list) – list of bytes to send.

  • offset (int) – integer value for the byte offset of data collection from the register.

Bases: nav_algo.SailSensors.ADCDevice

SailAnemometer implements a class used to connect the component to it’s proper communication protocol. This class also implements functions to return raw data and turn on/off the sensors.

Returns the given voltage of the anemometer using the ADC.

Parameters

gain (int) – the multiplication value of the voltage

Bases: object

SailEncoder implements a class used to connect the component to it’s proper communication protocol. This class also implements functions to return raw data and turn on/off the sensors.

Bases: object

SailGPS implements a class used to connect the component to it’s proper communication protocol. This class also implements functions to return raw data and turn on/off the sensors.

Bases: nav_algo.SailSensors.I2CDevice

SailIMU implements a class used to connect the component to it’s proper communication protocol. This class also implements functions to return raw data and turn on/off the sensors.

Reads the IMU and returns a list of 12 bytes representing euler angles.

Bases: object

Superclass used to create a UARTDevice. Contians various functions for communication