![Yoctopuce Yocto-GPS User Manual Download Page 131](http://html1.mh-extra.com/html/yoctopuce/yocto-gps/yocto-gps_user-manual_3415557131.webp)
f.
calibrateFromPoints
(
ValuesBefore, ValuesAfter
)
;
f.
get_module
()
.
saveToFlash
()
;
You will find, in the
Examples\Prog-Calibration
directory of the Delphi, VB, and C# libraries, an
application allowing you to test the effects of the 1 to 5 point calibration.
Arbitrary interpolation
It is also possible to compute the interpolation instead of letting the module do it, in order to calculate
a spline interpolation, for instance. To do so, you only need to store a callback in the API. This
callback must specify the number of calibration points it is expecting.
public
static
double
CustomInterpolation3Points
(
double
rawValue,
int
calibType,
int
[]
parameters,
double
[]
beforeValues,
double
[]
afterValues
)
{
double
result;
// the value to be corrected is rawValue
// calibration points are in beforeValues and afterValues
result = ....
// interpolation of your choice
return
result;
}
YAPI.
RegisterCalibrationHandler
(
3
, CustomInterpolation3Points
)
;
Note that these interpolation callbacks are global, and not specific to each function. Thus, each time
someone requests a value from a module which contains in its flash memory the correct number of
calibration points, the corresponding callback is called to correct the value before returning it,
enabling thus a perfectly transparent measure correction.
17. Advanced programming
www.yoctopuce.com
125
Summary of Contents for Yocto-GPS
Page 1: ...Yocto GPS User s guide...
Page 2: ......
Page 6: ...22 Characteristics 557 Blueprint 559 Index 561...
Page 10: ...4 www yoctopuce com...
Page 14: ...8 www yoctopuce com...
Page 18: ...12 www yoctopuce com...
Page 22: ...16 www yoctopuce com...
Page 38: ...32 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 54: ...48 www yoctopuce com...
Page 72: ...66 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 122: ...116 www yoctopuce com...
Page 132: ...126 www yoctopuce com...
Page 564: ...22 Characteristics 558 www yoctopuce com...
Page 565: ......
Page 566: ......