N4 Flight Software
N4
Flight software used for the N4 flight computers
Loading...
Searching...
No Matches
defs.h
Go to the documentation of this file.
1
5
6
#ifndef DEFS_H
7
#define DEFS_H
8
9
#include <Arduino.h>
10
14
#define MQTT 1
15
#define XBEE 1
16
17
#define GPS_BAUD_RATE 9600
18
#define XBEE_BAUD_RATE 9600
19
20
/* debug parameters for use during testing - set to 0 for production */
21
#define DEBUGGING 1
22
#define LOG_TO_MEMORY 0
23
#define DEBUG_TO_TERMINAL 0
24
25
#if DEBUGGING
26
#define debug(x) Serial.print(x)
27
#define debugln(x) Serial.println(x)
28
#define debugf(x, y) Serial.printf(x, y)
29
#else
30
#define debug(x)
31
#define debugln(x)
32
#define debugf(x, y)
33
#endif
// DEBUG
34
35
/* end of debug parameters */
36
37
/* timing constant */
38
#define SETUP_DELAY 300
39
#define TASK_DELAY 10
40
42
#define LAUNCH_DETECTION_THRESHOLD 5
43
#define LAUNCH_DETECTION_ALTITUDE_WINDOW 20
44
#define APOGEE_DETECTION_THRESHOLD 5
45
#define MAIN_EJECTION_HEIGHT 1000
46
#define DROGUE_EJECTION_HEIGHT
47
#define SEA_LEVEL_PRESSURE 101325
48
#define BASE_ALTITUDE 1417
49
51
#define STACK_SIZE 1024
52
#define ALTIMETER_QUEUE_LENGTH 10
53
#define GYROSCOPE_QUEUE_LENGTH 10
54
#define GPS_QUEUE_LENGTH 24
55
#define TELEMETRY_DATA_QUEUE_LENGTH 10
56
#define FILTERED_DATA_QUEUE_LENGTH 10
57
#define FLIGHT_STATES_QUEUE_LENGTH 1
58
#define CONSUME_TASK_DELAY 10
59
60
/* MQTT constants */
61
//const char MQTT_SERVER[30] = "192.168.1.101";
62
// const char MQTT_SERVER[30] = "broker.emqx.io";
63
const
char
MQTT_SERVER[30] =
"192.168.1.113"
;
64
const
char
MQTT_TOPIC[30] =
"n4/flight-computer-1"
;
/* make this topic unique to every rocket */
65
#define MQTT_PORT 1883
66
67
#define BROKER_IP_ADDRESS_LENGTH 20
68
#define MQTT_TOPIC_LENGTH 10
69
70
/* WIFI credentials */
71
// const char* SSID = "Galaxy"; /*!< WIFi SSID */
72
// const char* PASSWORD = "luwa2131"; /*!< WiFi password */
73
74
#define CALLIBRATION_READINGS 200
75
76
#define GPS_TX 17
77
#define GPS_RX 16
78
79
#define MB_SIZE_DIVISOR 1048576
80
81
82
83
#define PREFLIGHT_BIT 0
84
#define POWERED_FLIGHT_BIT 1
85
#define APOGEE_BIT 2
86
87
#define STATE_CHANGE_DELAY 50
88
89
#endif
// DEFS_H
90
n4-flight-software
include
defs.h
Generated by
1.13.1