-
Notifications
You must be signed in to change notification settings - Fork 0
Software
The transmitter uses the following sensors to gather data:
-
VL53L0X: Time-of-flight sensor
-
BMP388: Pressure sensor
-
LSM6DS33: Accelerometer, gyroscope, and magnetometer
SkyNet has two parts. The hardware side of things: the onboard transmitter, and the receiver, are written in C++ like standard Arduino. The ground software is written in JavaScript(& HTML/CSS) using nodeJS wrapped in the electron framework.
- On board, the transmitter interface with sensory via I2C, collects data, then sends the data in a package via LoRa following the package format.
- The receiver reads the data package and then appends the package RSSI, then prints it out via serial.
- The ground software reads the serial printout, prases it into a JSON struct, then plots and displays the data.
The program logic is implemented in the loop function. The function executes continuously and performs the following tasks:
-
Initialize the program and sensors using the setup function.
-
Check the current state of the transmitter and perform appropriate actions based on the state:
IDLE
: Check if the rocket should be armed and send sensory states. If receive arm commands, change the state to ARMED.ARMED
: Check if the rocket has launched. If launched, change the state to LAUNCHED.LAUNCHED
: Gather data from sensors and transmit it wirelessly to the ground station. Check if the rocket has landed. If landed, change the state to RECOVERY.RECOVERY
: Send GPS coordinates and wait for recovery. -
Wait for a specified amount of time before rerunning the loop.
Data mostly floats and is sent byte by byte using a uint8_t array for the LoRa library to transmit. Then the transmitted data is reconstructed back to float. ToF data is the only exception and is uint8_t. The package payload size is 49 bytes.
Raw Package Format:
tof_data, bmp.temperature, bmp.pressure, bmp.readAltitude(SEALEVELPRESSURE_HPA), accel_event.acceleration.x, accel_event.acceleration.y, accel_event.acceleration.z, gyro_event.gyro.x, gyro_event.gyro.y, gyro_event.gyro.z, mag_event.magnetic.x, mag_event.magnetic.y, mag_event.magnetic.z
Plus Receiver Addition
Package RSSI