Obs_Calibration_Vector.hpp 1.39 KB
Newer Older
Achim Morschhauser's avatar
Achim Morschhauser committed
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
#ifndef INCLUDE_OBS_CALIBRATION_VECTOR_HPP_
#define INCLUDE_OBS_CALIBRATION_VECTOR_HPP_

#include <vector>

#include <data_obs_vector.hpp>
#include <data_obs_scalar.hpp>

#include <Obs_Calibration.hpp>

class Obs_Calibration_Vector: public Obs_Calibration {

	//
	// Private class variables
	//

private:

	/** The offset */
	double offset[3];
	/** The scale value */
	double scale[3];


	/** Non-zero calibration constants */
	char do_cal;

	/** ADC Offsets */
	std::vector<int> adc_offset;
	/** ADC scale values */
	std::vector<int> adc_scale;
	/** ADC configuration */
	std::vector<int> adc_config;

	//
	// Constructors
	//

public:

	/** Constructor with single values */
	Obs_Calibration_Vector(double offset=0, double scale=1);

	/** Constructor with vector values */
	Obs_Calibration_Vector(double* offset, double* scale);

	Obs_Calibration_Vector(double scale_X, double scale_Y, double scale_Z,
			double offset_X=0, double offset_Y=0, double offset_Z=0);


	//
	// Public Methods
	//

public:

	/** Calibrate the vector data */
	int calibrate(data_obs_vector* vdata);

	/** Calibrate the scalar data */
	int calibrate(data_obs_scalar* sdata);

	/** Get the calibration constants for the ADC */
	int get_adc_calibrate(int* offset, int* scale, int config);

	/** Add a calibration constant for the ADC */
	int add_adc_calibrate(int offset, int scale, int config);


};

#endif /* INCLUDE_OBS_CALIBRATION_VECTOR_HPP_ */