forked from UC-Davis-SSS-ADCS-Software/efos
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathADCS.h
More file actions
89 lines (77 loc) · 1.74 KB
/
Copy pathADCS.h
File metadata and controls
89 lines (77 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**@file ADCS.h
*
* @brief Intellisat's interface to the ADCS software.
*
* @author Jacob Tkeio (jacobtkeio@gmail.com)
*
* @date 7/30/2023
*/
#ifndef ADCS_H
#define ADCS_H
#include "adcs_math/matrix.h"
typedef enum {
ADCS_DETUMBLE,
ADCS_INITIAL_DETUMBLE,
ADCS_HDD_EXP_ANGVEL,
ADCS_HDD_EXP_TRIAD,
ADCS_HDD_EXP_RAMP,
ADCS_TESTING,
ADCS_COILS_TESTING,
ADCS_HDD_TESTING,
ADCS_ROTISSERIE
} adcs_mode; // TODO: full list
typedef enum {
ADCS_MAIN_SUCCESS,
ADCS_MAIN_UNKNOWN,
ADCS_MAIN_ECLIPSE,
ADCS_MAIN_HDD_ERR,
ADCS_MAIN_IMU_ERR,
ADCS_MAIN_DETUMBLE_ERR,
ADCS_MAIN_COILS_TESTING_ERR,
ADCS_ROTISSERIE_ERR
} adcs_main_status; // TODO: full list
typedef enum{
GET_ATTITUDE_SUCCESS,
GET_ATTITUDE_NO_TLE,
GET_ATTITUDE_POS_LOOKUP_ERROR,
GET_ATTITUDE_IGRF_TIME_ERROR,
GET_ATTITUDE_TRIAD_ERROR,
GET_ATTITUDE_EPOCH_FAILURE,
GET_ATTITUDE_MAG_FAILURE,
GET_ATTITUDE_CSS_FAILURE
} adcs_get_attitude_status;
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
/**@brief Command ADCS to run a mode.
*
* Blocks during mode execution.
*
* @param mode The mode to run.
*
* @return The mode's status code.
*/
adcs_main_status ADCS_MAIN(adcs_mode mode);
/**@brief Ask ADCS to recommend a mode to run.
*
* @return The recommended mode.
*/
adcs_mode ADCS_recommend_mode();
/**
* @brief Checks to see if currently in eclipse
*
* @return 0 or 1 depending on if it is not or is in eclipse respectively
*/
int ADCS_is_in_eclipse();
/**
* @brief Get the current attitude
*
* @param attitude Return-by-reference ptr to attitude matrix
*
* @return Status code
*/
adcs_get_attitude_status ADCS_get_attitude(mat3 *attitude);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif // ADCS_H