SensHub - Data recorder/server/labeler for frame-based sensors
Purpose
SensHub is a data acquisition, server, and labeler software for frame-based sensors.
Key features
- Connection to any serial (RFCOMM, USB or physical serial port) frame-based sensor
- File storage of individual sensor data
- Three online merge methods to combine data from multiple sensor into a single data stream (most recent sample, rate-controlled read-out, and window-based resampling)
- Offline merge to combine data from multiple sensor into a single data stream after the recording
- TCP server to access sensor data remotely
- Keyboard labeling to mark relevant events in the sensor data streams
- Exhaustive online visualization of the connection and incoming data status, and of the buffers for online data merge.
Typical usage pattern
A typical workflow comprises the following steps:
- Define work directory: Define the work directory. File path are relative to the work directory.
- Data sources set-up: Define the sensors to acquire in the left pane. See setting-up data sources.
- Merge output set-up: For each merge methods indicate the file in which the data is stored, or the port on which the data is served (if none are specified the merger is inactive).
- Merge parameters set-up: Define the merge sample rate (all mergers), the latency (for RC and TS merger) and the rate-control parameters (for the RC merger).
- Labeling: Define in which file the label data must be stored.
- File/TCP parameters: Define wether NAN are allowed (not-a-number, when no data is received or a sensor is detected), alternatively repeat last sample.
- Start/stop recording:
- Resample and merge: once the reference points allow a satisfying alignment the signals can be resampled and merged in a single file, or the reference points and link equations can be exported to use in another program. See section Resample.
Setting-up data sources
Data sources are specified by the following:
- Device, of the format /path/to/device/or/comportnumber:bitrate
- Device frame format. See Frame format.
- File (relative to the working directory) in which to store the sensor data.
- Packet counter: none, 8 bit, or 16 bit
- Channel on which the packet counter is available
- Number of packets to regenerate when a discontinuity is detected in the packet counter sequence. Regenerated packets are marked as 'not a number' but are useful for the online merge functionality. Select it to be approximately the input sample rate multiplied by 1-5 (i.e. packet regenerated when data is loss for less than 1-5 seconds). Longer data loss are considered to be long losses and are treated as disconnections.
Frame format
The format of the data source is either text or binary, and is described by a binary format string.
An empty binary format string means that the incoming data is plain text. Each line represents one sample and data are separated by one of space, tabulation, colon or semicolon.
Binary format consists of a HEADER followed by raw binary data.
To specify the data format and header the following format string is used: HEADER;C0FMT C1FMT C2FMT....[;checksum]
- HEADER: plain text header indicating start of data
- CxFMT: Format of the data channel x. The format is [-]c|s|S|i|I|b|B where c,s|S,i|I,b|B indicate an 8-bit, 16-bit, 32-bit, or n-bit channel.
s, i, b are little-endian. S, I and B are big-endian. The optional - prefix indicates a signed data channel.
- checksum: optional checksum. format is: x, f or F. f/F is a 16-bit Fletcher-16 checksum (little/big endian). x is an 8-bit longitudinal redundancy check.
License
This software is licensed under the terms of the GPL v.2 license.