Ke Ao Teensy Flight Software
The software on the Teensy in the Ke Ao cubesat.
|
The satellite's Inertial Measurement Unit (IMU). More...
#include <artemis_devices.h>
Classes | |
struct | imubeacon |
The IMU beacon structure. More... | |
Public Member Functions | |
int32_t | setup (void) |
Sets up I2C connection to IMU. | |
int32_t | read (uint32_t uptime) |
Reads IMU and generates a packet on both RFM23 and Astrodev queues. | |
Public Attributes | |
Adafruit_LSM6DSOX * | imu = new Adafruit_LSM6DSOX() |
The satellite's Inertial Measurement Unit (IMU).
An instance of the Adafruit LSM6DSOX Inertial Measurement Unit (IMU) object.
int32_t Artemis::Devices::IMU::read | ( | uint32_t | uptime | ) |
Reads IMU and generates a packet on both RFM23 and Astrodev queues.
uptime | The time, in milliseconds, that the Teensy has been powered on. |
The IMU is only polled if it has been set up.
A packet and IMU beacon are created. The beacon is given an identification value.
The accelerometer and gyroscope are polled for their most recent measurements. These measurements are then saved in the IMU beacon.
The packet's header information is filled out, identifying the originator node, destination node, and packet type. The beacon is then copied into the payload of the packet. The packet is then copied into the RFM23 and Astrodev queues for transmission.
int32_t Artemis::Devices::IMU::setup | ( | void | ) |
Sets up I2C connection to IMU.
The I2C connection is initiated.
If it fails, the function returns with an error value.
The range of the accelerometer is set. Possible options are:
The range of the gyroscope is set. Possible options are:
The data rates of the accelerometer and gyroscope are set. Possible options are: