PX4 Firmware
PX4 Autopilot Software http://px4.io
temp_comp_params_baro.c
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright (c) 2017 PX4 Development Team. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name PX4 nor the names of its contributors may be
16  * used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  ****************************************************************************/
33 
34 /**
35  * @file temp_comp_params_baro.c
36  *
37  * Parameters required for temperature compensation of barometers.
38  *
39  * @author Paul Riseborough <gncsolns@gmail.com>
40  */
41 
42 /**
43  * Thermal compensation for barometric pressure sensors.
44  *
45  * @group Thermal Compensation
46  * @min 0
47  * @max 1
48  * @boolean
49  */
50 PARAM_DEFINE_INT32(TC_B_ENABLE, 0);
51 
52 /* Barometer 0 */
53 
54 /**
55  * ID of Barometer that the calibration is for.
56  *
57  * @group Thermal Compensation
58  * @category system
59  */
60 PARAM_DEFINE_INT32(TC_B0_ID, 0);
61 
62 /**
63  * Barometer offset temperature ^5 polynomial coefficient.
64  *
65  * @group Thermal Compensation
66  * @category system
67  */
68 PARAM_DEFINE_FLOAT(TC_B0_X5, 0.0f);
69 
70 /**
71  * Barometer offset temperature ^4 polynomial coefficient.
72  *
73  * @group Thermal Compensation
74  * @category system
75  */
76 PARAM_DEFINE_FLOAT(TC_B0_X4, 0.0f);
77 
78 /**
79  * Barometer offset temperature ^3 polynomial coefficient.
80  *
81  * @group Thermal Compensation
82  * @category system
83  */
84 PARAM_DEFINE_FLOAT(TC_B0_X3, 0.0f);
85 
86 /**
87  * Barometer offset temperature ^2 polynomial coefficient.
88  *
89  * @group Thermal Compensation
90  * @category system
91  */
92 PARAM_DEFINE_FLOAT(TC_B0_X2, 0.0f);
93 
94 /**
95  * Barometer offset temperature ^1 polynomial coefficients.
96  *
97  * @group Thermal Compensation
98  * @category system
99  */
100 PARAM_DEFINE_FLOAT(TC_B0_X1, 0.0f);
101 
102 /**
103  * Barometer offset temperature ^0 polynomial coefficient.
104  *
105  * @group Thermal Compensation
106  * @category system
107  */
108 PARAM_DEFINE_FLOAT(TC_B0_X0, 0.0f);
109 
110 /**
111  * Barometer scale factor - X axis.
112  *
113  * @group Thermal Compensation
114  * @category system
115  */
116 PARAM_DEFINE_FLOAT(TC_B0_SCL, 1.0f);
117 
118 /**
119  * Barometer calibration reference temperature.
120  *
121  * @group Thermal Compensation
122  * @category system
123  */
124 PARAM_DEFINE_FLOAT(TC_B0_TREF, 40.0f);
125 
126 /**
127  * Barometer calibration minimum temperature.
128  *
129  * @group Thermal Compensation
130  * @category system
131  */
132 PARAM_DEFINE_FLOAT(TC_B0_TMIN, 5.0f);
133 
134 /**
135  * Barometer calibration maximum temperature.
136  *
137  * @group Thermal Compensation
138  * @category system
139  */
140 PARAM_DEFINE_FLOAT(TC_B0_TMAX, 75.0f);
141 
142 /* Barometer 1 */
143 
144 /**
145  * ID of Barometer that the calibration is for.
146  *
147  * @group Thermal Compensation
148  * @category system
149  */
150 PARAM_DEFINE_INT32(TC_B1_ID, 0);
151 
152 /**
153  * Barometer offset temperature ^5 polynomial coefficient.
154  *
155  * @group Thermal Compensation
156  * @category system
157  */
158 PARAM_DEFINE_FLOAT(TC_B1_X5, 0.0f);
159 
160 /**
161  * Barometer offset temperature ^4 polynomial coefficient.
162  *
163  * @group Thermal Compensation
164  * @category system
165  */
166 PARAM_DEFINE_FLOAT(TC_B1_X4, 0.0f);
167 
168 /**
169  * Barometer offset temperature ^3 polynomial coefficient.
170  *
171  * @group Thermal Compensation
172  * @category system
173  */
174 PARAM_DEFINE_FLOAT(TC_B1_X3, 0.0f);
175 
176 /**
177  * Barometer offset temperature ^2 polynomial coefficient.
178  *
179  * @group Thermal Compensation
180  * @category system
181  */
182 PARAM_DEFINE_FLOAT(TC_B1_X2, 0.0f);
183 
184 /**
185  * Barometer offset temperature ^1 polynomial coefficients.
186  *
187  * @group Thermal Compensation
188  * @category system
189  */
190 PARAM_DEFINE_FLOAT(TC_B1_X1, 0.0f);
191 
192 /**
193  * Barometer offset temperature ^0 polynomial coefficient.
194  *
195  * @group Thermal Compensation
196  * @category system
197  */
198 PARAM_DEFINE_FLOAT(TC_B1_X0, 0.0f);
199 
200 /**
201  * Barometer scale factor - X axis.
202  *
203  * @group Thermal Compensation
204  * @category system
205  */
206 PARAM_DEFINE_FLOAT(TC_B1_SCL, 1.0f);
207 
208 /**
209  * Barometer calibration reference temperature.
210  *
211  * @group Thermal Compensation
212  * @category system
213  */
214 PARAM_DEFINE_FLOAT(TC_B1_TREF, 40.0f);
215 
216 /**
217  * Barometer calibration minimum temperature.
218  *
219  * @group Thermal Compensation
220  * @category system
221  */
222 PARAM_DEFINE_FLOAT(TC_B1_TMIN, 5.0f);
223 
224 /**
225  * Barometer calibration maximum temperature.
226  *
227  * @group Thermal Compensation
228  * @category system
229  */
230 PARAM_DEFINE_FLOAT(TC_B1_TMAX, 75.0f);
231 
232 /* Barometer 2 */
233 
234 /**
235  * ID of Barometer that the calibration is for.
236  *
237  * @group Thermal Compensation
238  * @category system
239  */
240 PARAM_DEFINE_INT32(TC_B2_ID, 0);
241 
242 /**
243  * Barometer offset temperature ^5 polynomial coefficient.
244  *
245  * @group Thermal Compensation
246  * @category system
247  */
248 PARAM_DEFINE_FLOAT(TC_B2_X5, 0.0f);
249 
250 /**
251  * Barometer offset temperature ^4 polynomial coefficient.
252  *
253  * @group Thermal Compensation
254  * @category system
255  */
256 PARAM_DEFINE_FLOAT(TC_B2_X4, 0.0f);
257 
258 /**
259  * Barometer offset temperature ^3 polynomial coefficient.
260  *
261  * @group Thermal Compensation
262  * @category system
263  */
264 PARAM_DEFINE_FLOAT(TC_B2_X3, 0.0f);
265 
266 /**
267  * Barometer offset temperature ^2 polynomial coefficient.
268  *
269  * @group Thermal Compensation
270  * @category system
271  */
272 PARAM_DEFINE_FLOAT(TC_B2_X2, 0.0f);
273 
274 /**
275  * Barometer offset temperature ^1 polynomial coefficients.
276  *
277  * @group Thermal Compensation
278  * @category system
279  */
280 PARAM_DEFINE_FLOAT(TC_B2_X1, 0.0f);
281 
282 /**
283  * Barometer offset temperature ^0 polynomial coefficient.
284  *
285  * @group Thermal Compensation
286  * @category system
287  */
288 PARAM_DEFINE_FLOAT(TC_B2_X0, 0.0f);
289 
290 /**
291  * Barometer scale factor - X axis.
292  *
293  * @group Thermal Compensation
294  * @category system
295  */
296 PARAM_DEFINE_FLOAT(TC_B2_SCL, 1.0f);
297 
298 /**
299  * Barometer calibration reference temperature.
300  *
301  * @group Thermal Compensation
302  * @category system
303  */
304 PARAM_DEFINE_FLOAT(TC_B2_TREF, 40.0f);
305 
306 /**
307  * Barometer calibration minimum temperature.
308  *
309  * @group Thermal Compensation
310  * @category system
311  */
312 PARAM_DEFINE_FLOAT(TC_B2_TMIN, 5.0f);
313 
314 /**
315  * Barometer calibration maximum temperature.
316  *
317  * @group Thermal Compensation
318  * @category system
319  */
320 PARAM_DEFINE_FLOAT(TC_B2_TMAX, 75.0f);
PARAM_DEFINE_FLOAT(TC_B0_X5, 0.0f)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Definition: integration.cpp:8
PARAM_DEFINE_INT32(TC_B_ENABLE, 0)
Thermal compensation for barometric pressure sensors.