I would love to play with this but I'm not sure how to compile this.I pushed a prototype branch if someone wants to play with it. I did not have time to really test this yet, I'll join binaries if anyone's interested.
From Lua: vi:get_groundcontactpenetration(idx), with idx the touchdown point number. It returns a number (double), negative if the point is under the surface.
This will be slow if you have a large number of points to check.
I presume it should be accessed in the clbk_poststep so the physics has been run.