![]() |
N4 Flight Software N4
Flight software used for the N4 flight computers
|
necessary miscellaneous defines for various tasks and functions More...
#include <Arduino.h>
Go to the source code of this file.
Macros | |
#define | MQTT 0 |
#define | XBEE 0 |
#define | BAUDRATE 115200 |
#define | GPS_BAUD_RATE 9600 |
#define | XBEE_BAUD_RATE 9600 |
#define | DEBUGGING 1 |
#define | LOG_TO_MEMORY 0 |
#define | DEBUG_TO_TERMINAL 0 |
#define | debug(x) |
#define | debugln(x) |
#define | debugf(x, y) |
#define | MPU_ADDRESS 0x68 |
#define | MPU_ACCEL_RANGE 16 |
#define | GYRO_RANGE 1000 /* 1000 deg/s */ |
#define | WIRE_SEND_STOP 0 |
#define | GREEN_LED_PIN 15 |
#define | RED_LED_PIN 4 |
#define | BUZZER_PIN 33 |
#define | SET_TEST_MODE_PIN 14 |
#define | SET_RUN_MODE_PIN 13 |
#define | SD_CS_PIN 26 |
#define | REMOTE_SWITCH 27 |
#define | SETUP_DELAY 300 |
#define | TASK_DELAY 10 |
#define | ALTITUDE 1525.0 |
#define | LAUNCH_DETECTION_THRESHOLD 10 |
#define | LAUNCH_DETECTION_ALTITUDE_WINDOW 20 |
#define | APOGEE_DETECTION_THRESHOLD 5 |
#define | MAIN_EJECTION_HEIGHT 1000 |
#define | DROGUE_EJECTION_HEIGHT |
#define | SEA_LEVEL_PRESSURE 101325 |
#define | BASE_ALTITUDE 1417 |
#define | STACK_SIZE 1024 |
#define | ALTIMETER_QUEUE_LENGTH 10 |
#define | GYROSCOPE_QUEUE_LENGTH 10 |
#define | GPS_QUEUE_LENGTH 24 |
#define | TELEMETRY_DATA_QUEUE_LENGTH 10 |
#define | FILTERED_DATA_QUEUE_LENGTH 10 |
#define | FLIGHT_STATES_QUEUE_LENGTH 1 |
#define | CONSUME_TASK_DELAY 10 |
#define | MQTT_PORT 1883 |
#define | BROKER_IP_ADDRESS_LENGTH 20 |
#define | MQTT_TOPIC_LENGTH 10 |
#define | CALLIBRATION_READINGS 200 |
#define | GPS_TX 17 |
#define | GPS_RX 16 |
#define | MB_SIZE_DIVISOR 1048576 |
#define | FORMAT_SPIFFS_IF_FAILED 1 |
#define | PREFLIGHT_BIT 0 |
#define | POWERED_FLIGHT_BIT 1 |
#define | APOGEE_BIT 2 |
#define | STATE_CHANGE_DELAY 20 |
Variables | |
const char | MQTT_SERVER [30] = "192.168.1.125" |
const char | MQTT_TELEMETRY_TOPIC [30] = "n4/flight-computer-1" |
const char | MQTT_ARMING_TOPIC [30] = "n4/commands" |
necessary miscellaneous defines for various tasks and functions
#define ALTIMETER_QUEUE_LENGTH 10 |
length of the altimeter queue
#define APOGEE_DETECTION_THRESHOLD 5 |
value in meters for detecting apogee
#define BASE_ALTITUDE 1417 |
this value is the altitude at rocket launch site - adjust accordingly tasks constants
#define BROKER_IP_ADDRESS_LENGTH 20 |
length of broker ip address string
#define CALLIBRATION_READINGS 200 |
number of readings to take while calibrating the sensor
#define debug | ( | x | ) |
#define DEBUG_TO_TERMINAL 0 |
allow create task that prints data to terminal. Set to 0 before flight
#define debugf | ( | x, | |
y ) |
#define DEBUGGING 1 |
allow debugging to terminal. Set to 0 pre flight to disable serial terminal printing and improve speed
#define debugln | ( | x | ) |
#define DROGUE_EJECTION_HEIGHT |
height to eject the drogue chute - ideally it should be at apogee
#define FILTERED_DATA_QUEUE_LENGTH 10 |
length of the filtered data queue
#define FLIGHT_STATES_QUEUE_LENGTH 1 |
length of the flight states queue
#define GPS_BAUD_RATE 9600 |
baud rate for the GPS module. Change accordingly
#define GPS_QUEUE_LENGTH 24 |
length of the gps queue
#define GPS_RX 16 |
GPS RX pin
#define GPS_TX 17 |
GPS TX pin
#define GYROSCOPE_QUEUE_LENGTH 10 |
length of the gyroscope queue
#define LAUNCH_DETECTION_ALTITUDE_WINDOW 20 |
Window in meters where we register a launch
#define LAUNCH_DETECTION_THRESHOLD 10 |
altitude in meters, above which we register that we have launched
#define LOG_TO_MEMORY 0 |
allow data logging to memory. Set to 1 to log data to external flash memory. Must be set during flight
#define MAIN_EJECTION_HEIGHT 1000 |
height to eject the main chute
#define MQTT 0 |
< To select the telemetry transfer method used
< note: u can use wifi and xbee at the same time, so both of these handles can be set
< at the same time set this to 1 if using MQTT for telemetry transfer
#define MQTT_PORT 1883 |
MQTT broker port
#define MQTT_TOPIC_LENGTH 10 |
length of mqtt topic string
#define SEA_LEVEL_PRESSURE 101325 |
sea level pressure to be used for altitude calculations
#define SET_RUN_MODE_PIN 13 |
Pin to set the flight computer to RUN mode
#define SET_TEST_MODE_PIN 14 |
Pin to set the flight computer to TEST mode
#define STACK_SIZE 1024 |
task stack size in words
#define TASK_DELAY 10 |
Flight data constants
#define TELEMETRY_DATA_QUEUE_LENGTH 10 |
length of the telemetry data queue
#define XBEE 0 |
set to 1 if using XBEE for telemetry transfer
#define XBEE_BAUD_RATE 9600 |
baud rate for the XBEE HP module. Change accordingly