I would argue (strongly) that the compensation should be a realtime HAL component.
This does make things more difficult as there is no file access from a realtime HAL component.
However, it would not be too unmanageable to pass a set of XYZ probe points in as a parameter array (max 4096 characters)
The main INI file could #INCLUDE a fixed filename for the height map
This file would be of the format
Code:
[HEIGHTMAP]=12,5,20 15,25,30....
Then the HAL file could use
loadrt height_compensation map=[HEIGHTMAP]
Which would (I think) pass the ile contents in at load time.
This is all a bit clunky, but it saves coding and setting up a shared memory area.
A better way would be to have a pair of components, userspace (probably C for data representation reasons, but Python could probably work too) and realtime which used a private shared memory area for the height data.
I think that the latter approach is what Probekins used. (but Probekins didn't really work, for other reasons)