README.md 2.53 KB
Newer Older
1
2
3
Sentiboard Utils
================

4
For potentially more up-to-date instructions, see the wiki: https://gitlab.senti.no/senti/sentiboard-utils/wikis/home
enfo's avatar
enfo committed
5

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Usage
=====

Loggers
-------

The logging system of the Sentiboard is intended to be installed as a service using the "systemd" system and service manager. When installed it is started with `sudo systemctl start data-logger` and stopped by `sudo systemctl stop data-logger`. When running, a screen session is created, and output from the logger can be seen by running `screen -r log-master`

The service by default starts `log_master.sh` (located at /home/odroid/loggers/log_master.sh) as the `odroid` user using the `odroid` group. These settings can be changed in the `logging-master.service`

`log_master.sh` then launches `sentiboard.sh` which again launches `sentiboard_logger.py` which copies from `/dev/ttySentiboard02` to a file structure under `~/data/`
The file-structure is as follows:
flight_XXX/sentiboard/sentiboard_XXXX/sensor_X

The "XXX" in "flight_XXX" is a number, increased every time log_master is launched. The "sentiboard" is the basename of "sentiboard.sh". Other loggers can be added in log_master's "LOGGER_PROGRAMS" variable, and the directory name will be the basename of the logger.
By default, `sentiboard_logger.py` will create "sentiboard_0000" and a new directory and write into that instead every 15 minutes. The sensor_X is the sensor index reported by the Sentiboard.

The service is installed by running `sudo systemctl enable logging-master.service` which registers the service with systemd and makes it automatically start up at system boot.

Converters
----------
enfo's avatar
enfo committed
27
28
29
30
31
32
33
### sb2numpy.py and sb2matlab.py

The sb2numpy.py	and sb2matlab.py scripts convert from Sentiboard data packages to NumPy and MATLAB respectively.
Usage:
```
python sb2matlab.py ~/data/flight_042/syncboard2/
```
34
35
36
37
38

### sentiboard_combiner.sh
By default, the Sentiboard logger creates a new set of sensor-files for every 15 minutes of logging. This is to reduce the risk of corrupting a single file with all the data.

To re-combine all these files into single files of each sensor types, the `converters/sentiboard_combiner.sh` can be used. If no outdir is provided, a sentiboard_combined subdirectory is created. Syntax:
enfo's avatar
enfo committed
39
```
40
41
42
43
44
45
46
47
48
converters/sentiboard_combiner.sh flight_XXX/sentiboard/ [outdir]
```


Settings
--------

The udev folder contains a file .rules file which maps the syncboard `/dev/ttyACM*` to `/dev/ttySentiboard*`. To enable this, simply copy the file to `/etc/udev/rules.d/`.

enfo's avatar
enfo committed
49
```
50
51
sudo cp udev/* /etc/udev/rules.d/
```