Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
cosmos-defs.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2015 by Interstel Technologies, Inc.
3 * and Hawaii Space Flight Laboratory.
4 *
5 * This file is part of the COSMOS/core that is the central
6 * module for COSMOS. For more information on COSMOS go to
7 * <http://cosmos-project.com>
8 *
9 * The COSMOS/core software is licenced under the
10 * GNU Lesser General Public License (LGPL) version 3 licence.
11 *
12 * You should have received a copy of the
13 * GNU Lesser General Public License
14 * If not, go to <http://www.gnu.org/licenses/>
15 *
16 * COSMOS/core is free software: you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public License
18 * as published by the Free Software Foundation, either version 3 of
19 * the License, or (at your option) any later version.
20 *
21 * COSMOS/core is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * Refer to the "licences" folder for further information on the
27 * condititons and terms to use this software.
28 ********************************************************************/
29 
36 
37 #ifndef _COSMOS_DEFS_H
38 #define _COSMOS_DEFS_H 1
39 
40 #include <map>
41 #include <vector>
42 #include <list>
43 #include <queue>
44 
50 #define COSMOS_MAX_DATA 1024
52 #define COSMOS_MAX_NAME 40
54 
59 enum PIECE
60 {
75  PIECE_TYPE_COUNT,
76  PIECE_TYPE_NONE=UINT16_MAX
77 };
78 
80 
81 
85 enum NODE_TYPE : uint16_t
86 {
87  NODE_TYPE_SATELLITE=0,
88  NODE_TYPE_GROUNDSTATION=1,
89  NODE_TYPE_MOC=2,
90  NODE_TYPE_VEHICLE=3,
91  NODE_TYPE_UAV=4,
92  NODE_TYPE_TARGET=5,
93  NODE_TYPE_BALLOON=6,
94  NODE_TYPE_SHIP=7,
95  NODE_TYPE_DATA=8,
96  NODE_TYPE_COMPUTER=9,
97  NODE_TYPE_SUN=10,
98  NODE_TYPE_MOON=11,
99  NODE_TYPE_MARS=12,
100  NODE_TYPE_LOCATION=13,
101  NODE_TYPE_TESTBED=14,
102  NODE_TYPE_SQUARE=15,
103  NODE_TYPE_CIRCLE=16,
104  NODE_TYPE_COUNT,
105  NODE_TYPE_NONE=UINT16_MAX
106 };
107 
110 enum NODE_FLAG : uint16_t
111 {
112  NODE_FLAG_NONE=0,
113  NODE_FLAG_CHARGING=0x0001,
114  NODE_FLAG_LAUNCHED=0x0002,
115  NODE_FLAG_DEPLOYED=0x0004,
116  NODE_FLAG_BOOTCHECK=0x0008,
117  NODE_FLAG_ALL=UINT16_MAX
118 };
119 
121 
125 
135 // Bits 0-12
136 
138 #define EVENT_FLAG_WARNING 0x0e00
140 #define EVENT_SCALE_WARNING 0x0200
142 #define EVENT_FLAG_ALARM 0x0180
144 #define EVENT_SCALE_ALARM 0x0080
146 #define EVENT_FLAG_PRIORITY 0x0070
148 #define EVENT_SCALE_PRIORITY 0x0010
150 #define EVENT_FLAG_COLOR 0x000f
152 #define EVENT_SCALE_COLOR 0x0001
153 
154 // bits 13-16
155 
157 #define EVENT_FLAG_COUNTDOWN 0x1000
159 #define EVENT_FLAG_EXIT 0x2000
161 #define EVENT_FLAG_PAIR 0x4000
163 #define EVENT_FLAG_ACTUAL 0x8000
164 
165 // bits 17-19
166 
168 #define EVENT_FLAG_CONDITIONAL 0x10000
170 #define EVENT_FLAG_REPEAT 0x20000
172 #define EVENT_FLAG_TRUE 0x40000
174 #define EVENT_FLAG_SOLO 0x80000
175 
177 
181 
187 #define EVENT_TYPE_REQUEST 0x1001
188 
190 
191 
192 //Physical Events
193 #define EVENT_TYPE_PHYSICAL 0x1000
194 #define EVENT_TYPE_LATA 0x1101
195 #define EVENT_TYPE_LATD 0x1102
196 #define EVENT_TYPE_LATMAX 0x1110
197 #define EVENT_TYPE_LATMIN 0x1120
198 #define EVENT_TYPE_APOGEE 0x1201
199 #define EVENT_TYPE_PERIGEE 0x1202
200 #define EVENT_TYPE_UMBRA 0x1206
201 #define EVENT_TYPE_PENUMBRA 0x1208
202 
203 //Ground Station Events
204 #define EVENT_TYPE_GS 0x1400
205 #define EVENT_TYPE_GS5 0x1401
206 #define EVENT_TYPE_GS10 0x1402
207 #define EVENT_TYPE_GSMAX 0x1404
208 
209 //
210 #define EVENT_TYPE_TARG 0x1800
211 #define EVENT_TYPE_TARGMIN 0x1801
212 
213 //Command Events
214 #define EVENT_TYPE_COMMAND 0x2000
215 #define EVENT_TYPE_BUS 0x2100
216 #define EVENT_TYPE_EPS 0x2110
217 #define EVENT_TYPE_ADCS 0x2120
218 #define EVENT_TYPE_PAYLOAD 0x2400
219 #define EVENT_TYPE_SYSTEM 0x2800
220 
221 //Log Events
222 #define EVENT_TYPE_LOG 0x4000
223 
224 //Message Events
225 #define EVENT_TYPE_MESSAGE 0x8000
226 
227 
228 
230 
234 #define PANEL_TYPE_EPS 1
235 #define PANEL_TYPE_ADCS 2
236 #define PANEL_TYPE_OBCS 3
237 #define PANEL_TYPE_COMM 4
238 #define PANEL_TYPE_PLOAD 5
239 #define PANEL_TYPE_TCS 6
240 #define PANEL_TYPE_PROP 7
242 
246 #define PHYSICS_MODE_ACTUAL 0
247 #define PHYSICS_MODE_LVLH 1
248 #define PHYSICS_MODE_SURFACE 2
250 
252 #define COSMOSMCAST "225.1.1.1"
253 
254 #endif
PIECE
Definition: cosmos-defs.h:60
@ PIECE_TYPE_INTERNAL_PANEL
Internal Panel: n vertices and a thickness.
Definition: cosmos-defs.h:64
@ PIECE_TYPE_EXTERNAL_PANEL
External Panel: n vertices and a thickness, subject to external forces.
Definition: cosmos-defs.h:62
@ PIECE_TYPE_DIMENSIONLESS
Dimensionless:
Definition: cosmos-defs.h:72
@ PIECE_TYPE_CYLINDER
Cylinder: 3 points and a wall thickness, first end, second end, point on radius of second end.
Definition: cosmos-defs.h:68
@ PIECE_TYPE_CONE
Cone: same as Cylinder except first end is a point.
Definition: cosmos-defs.h:74
@ PIECE_TYPE_SPHERE
Sphere: 2 points and a wall thickness; center and point on surface.
Definition: cosmos-defs.h:70
@ PIECE_TYPE_BOX
Box: 8 vertices defining 2 parallel sides and a wall thickness, first set curled pointing out,...
Definition: cosmos-defs.h:66