RocketLogger 2.1.0
calibration.h
Go to the documentation of this file.
32#ifndef CALIBRATION_H_
33#define CALIBRATION_H_
34
35#include <stdint.h>
36
37#include "rl.h"
38
40#define RL_CALIBRATION_FILE_MAGIC 0x434C5225
42#define RL_CALIBRATION_FILE_VERSION 0x02
44#define RL_CALIBRATION_FILE_HEADER_LENGTH 0x10
45
54} __attribute__((packed));
55
60
66 uint32_t file_magic;
68 uint16_t file_version;
70 uint16_t header_length;
75} __attribute__((packed));
76
81
86
91
101int calibration_load(void);
102
107
108#endif /* CALIBRATION_H_ */
void calibration_reset_offsets(void)
Definition: calibration.c:45
int calibration_load(void)
Definition: calibration.c:57
struct rl_calibration __attribute__((packed))
void calibration_reset_scales(void)
Definition: calibration.c:51
#define RL_CHANNEL_COUNT
Number of RocketLogger analog channels.
Definition: rl.h:56
uint16_t file_version
File version number.
Definition: calibration.h:68
uint64_t calibration_time
Timestamp of the measurements used for calibration generation.
Definition: calibration.h:72
rl_calibration_t data
The actual calibration data.
Definition: calibration.h:74
uint32_t file_magic
File magic constant.
Definition: calibration.h:66
uint16_t header_length
Total size of the header in bytes.
Definition: calibration.h:70
double scales[RL_CHANNEL_COUNT]
Channel scales.
Definition: calibration.h:53
int offsets[RL_CHANNEL_COUNT]
Channel offsets (in bit)
Definition: calibration.h:51