N4 Flight Software N4
Flight software used for the N4 flight computers
Loading...
Searching...
No Matches
defs.h File Reference

necessary miscellaneous defines for various tasks and functions More...

#include <Arduino.h>

Go to the source code of this file.

Macros

#define MQTT   1
 
#define XBEE   1
 
#define GPS_BAUD_RATE   9600
 
#define XBEE_BAUD_RATE   9600
 
#define DEBUGGING   1
 
#define LOG_TO_MEMORY   0
 
#define DEBUG_TO_TERMINAL   1
 
#define debug(x)
 
#define debugln(x)
 
#define debugf(x, y)
 
#define SETUP_DELAY   300
 
#define TASK_DELAY   10
 
#define MAIN_EJECTION_HEIGHT   1000
 
#define DROGUE_EJECTION_HEIGHT
 
#define SEA_LEVEL_PRESSURE   101325
 
#define BASE_ALTITUDE   1417
 
#define STACK_SIZE   2048
 
#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 MQTT_PORT   1882
 
#define BROKER_IP_ADDRESS_LENGTH   20
 
#define MQTT_TOPIC_LENGTH   10
 
#define CALLIBRATION_READINGS   200
 
#define GPS_TX   17
 
#define GPS_RX   16
 

Variables

const char MQTT_SERVER [20] = "192.168.78.19"
 
const char MQTT_TOPIC [20] = "n4/telemetry"
 

Detailed Description

necessary miscellaneous defines for various tasks and functions

Macro Definition Documentation

◆ ALTIMETER_QUEUE_LENGTH

#define ALTIMETER_QUEUE_LENGTH   10

length of the altimeter queue

◆ BASE_ALTITUDE

#define BASE_ALTITUDE   1417

this value is the altitude at rocket launch site - adjust accordingly tasks constants

◆ BROKER_IP_ADDRESS_LENGTH

#define BROKER_IP_ADDRESS_LENGTH   20

length of broker ip address string

◆ CALLIBRATION_READINGS

#define CALLIBRATION_READINGS   200

number of readings to take while calibrating the sensor

◆ debug

#define debug ( x)
Value:
Serial.print(x)

◆ DEBUG_TO_TERMINAL

#define DEBUG_TO_TERMINAL   1

allow create task that prints data to terminal. Set o 0 before flight

◆ debugf

#define debugf ( x,
y )
Value:
Serial.printf(x, y)

◆ DEBUGGING

#define DEBUGGING   1

allow debugging to terminal. Set to 0 pre flight to disable serial terminal printing and improve speed

◆ debugln

#define debugln ( x)
Value:
Serial.println(x)

◆ DROGUE_EJECTION_HEIGHT

#define DROGUE_EJECTION_HEIGHT

height to eject the drogue chute - ideally it should be at apogee

◆ FILTERED_DATA_QUEUE_LENGTH

#define FILTERED_DATA_QUEUE_LENGTH   10

length of the filtered data queue

◆ FLIGHT_STATES_QUEUE_LENGTH

#define FLIGHT_STATES_QUEUE_LENGTH   1

length of the flight states queue

◆ GPS_BAUD_RATE

#define GPS_BAUD_RATE   9600

baud rate for the GPS module. Change accordingly

◆ GPS_QUEUE_LENGTH

#define GPS_QUEUE_LENGTH   24

length of the gps queue

◆ GPS_RX

#define GPS_RX   16

GPS RX pin

◆ GPS_TX

#define GPS_TX   17

GPS TX pin

◆ GYROSCOPE_QUEUE_LENGTH

#define GYROSCOPE_QUEUE_LENGTH   10

length of the gyroscope queue

◆ LOG_TO_MEMORY

#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

◆ MAIN_EJECTION_HEIGHT

#define MAIN_EJECTION_HEIGHT   1000

height to eject the main chute

◆ MQTT

#define MQTT   1

< 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

◆ MQTT_PORT

#define MQTT_PORT   1882

MQTT broker port

◆ MQTT_TOPIC_LENGTH

#define MQTT_TOPIC_LENGTH   10

length of mqtt topic string

◆ SEA_LEVEL_PRESSURE

#define SEA_LEVEL_PRESSURE   101325

sea level pressure to be used for altitude calculations

◆ STACK_SIZE

#define STACK_SIZE   2048

task stack size in words

◆ TASK_DELAY

#define TASK_DELAY   10

Flight data constants

◆ TELEMETRY_DATA_QUEUE_LENGTH

#define TELEMETRY_DATA_QUEUE_LENGTH   10

length of the telemetry data queue

◆ XBEE

#define XBEE   1

set to 1 if using XBEE for telemetry transfer

◆ XBEE_BAUD_RATE

#define XBEE_BAUD_RATE   9600

baud rate for the XBEE HP module. Change accordingly

Variable Documentation

◆ MQTT_SERVER

const char MQTT_SERVER[20] = "192.168.78.19"

MQTT broker IP address