This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
124 lines (89 loc) · 4.75 KB
/
README
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# OpenStratos #
[![Build Status](https://travis-ci.org/OpenStratos/server.svg?branch=develop)](https://travis-ci.org/OpenStratos/server)
Balloon control software implemented in C++14. It will be in charge of the management of the
balloon and will communicate via SMS to the provided phone. It will initialize all needed
components, track and log position and software messages, detect launch, burst and landing and send
the landing position via SMS.
## Requirements ##
The software needs a working installation of WiringPi and a RaspiCam for the tests. It will perform
some basic tests if no Raspberry Pi is being used. It works with Adafruit Fona module, even though
it should work with other GSM modules. It also uses the Adafruit Ultimate GPS module. The following
software is needed to compile OpenStratos (apart from the WiringPi library):
* build-essential
* g++
* m4
* automake
* autoconf
## Compiling ##
For compilation, a *build.sh* script is provided, that should be run as is. It will compile the
tests of OpenStratos and run them. After that, the main program can be compiled using `make`.
Optional configuration arguments can be passed. The first optional configuration argument is the
*NO_SMS* flag. This prevents actual SMSs being sent, even if they are simulated. This way no charges
will be applied. For using this argument the directory should be cleaned with `make clean` and
then pass the *NO_SMS* flag to the configure script:
```
./configure CPPFLAGS="-DNO_SMS"
```
After that the usual `make` will compile the software. Note that the test do not send SMSs. The software itself comes with two built-in simulation modes:
### Normal Simulation ###
In this mode, a simple simulation is made, with a length of about 45 minutes. It will run through
all the main stages of the program. For using this mode the directory should be cleaned with
`make clean` and then pass the *SIM* flag to the configure script:
```
./configure CPPFLAGS="-DSIM"
```
It can be combined with the *NO_SMS* flag:
```
./configure CPPFLAGS="-DSIM -DNO_SMS"
```
After that, the software can be compiled using `make`.
### Realistic Simulation ###
In this mode, a complete realistic simulation is made, that will last for about 5 hours. It will
realistically simulate the times in a 35 km height balloon. It will be similar to the normal
simulation, the only change will be in the timing. For using this mode the directory should be
cleaned with `make clean` and then pass the *REAL_SIM* flag to the configure script:
```
./configure CPPFLAGS="-DREAL_SIM"
```
It can be combined with the *NO_SMS* flag:
```
./configure CPPFLAGS="-DREAL_SIM -DNO_SMS"
```
After that, the software can be compiled using `make`. The result of combining the two simulation
flags will be an error when building the main program. For testing it will have no effect.
### Debug Mode ###
The software has a small debug mode, that prints from *stdio* some logs that occur before the log
file is created. It also enables serial logging, that will log everything that happens in the
serial. This has a moderate overhead and should not be used in production. GSM and GPS loggers log everything they send and receive. This is only needed to debug if something goes wrong with the
serial. For using this mode the directory should be cleaned with `make clean` and then pass the
*DEBUG* flag to the configure script:
```
./configure CPPFLAGS="-DDEBUG"
```
It can be combined with the *NO_SMS* flag or/and one of the simulation flags:
```
./configure CPPFLAGS="-DREAL_SIM -DNO_SMS -DDEBUG"
./configure CPPFLAGS="-DSIM -DDEBUG"
./configure CPPFLAGS="-DNO_SMS -DDEBUG"
```
### No power off mode ###
For some testing there is no need to reboot or shut down the system in failures. For this, the
software provides the no power off mode, that will prevent the software from shutting the
Raspberry Pi down. For using this mode the directory should be cleaned with `make clean` and
then pass the *NO_POWER_OFF* flag to the configure script:
```
./configure CPPFLAGS="-DNO_POWER_OFF"
```
It can be combined with the *NO_SMS* flag, the *DEBUG* flag or/and one of the simulation flags:
```
./configure CPPFLAGS="-DREAL_SIM -DNO_SMS -DDEBUG -DNO_POWER_OFF"
./configure CPPFLAGS="-DSIM -DDEBUG -DNO_POWER_OFF"
./configure CPPFLAGS="-DNO_SMS -DDEBUG -DNO_POWER_OFF"
```
## License ##
This software is licensed under the GNU General Public License version 3. You can use, copy, modify
the software as long as all the derivative work is published under the same license. A copy of the license can be found in the *[COPYING](COPYING)* file of the repository where a detailed explanation
of the copying rights can be found.
## Contributing guidelines ##
The guidelines to contribute to this repository can be found in the
[contribution guidelines](contributing.md) file of the repository.