I am implementing 3D live tracking using a SceneView with the JS API.
The app (flyxc.app) display the live track and some markers for messages and pilots:

The app uses a GraphicsLayer for the tracks and the markers and a GraphicsLayer 'on-the-ground' for track shadows.
One issue I have is that some markers and the tracks could be rendered below the ground while I would like their elevation to never be below the ground.
I guess one way to solve this would be to use the ElevationSampler and compute the maximum of (fix altitude, sampled ground altitude). However it doesn't seem trivial: it probably should take the resolution of the sampler into account and recompute the sampled ground altitude when it changes.
If someone at Arcgis reads this, do you think a 'clamp-to-ground' mode would make sense in addition to the other available modes ? Or maybe there is an other robust way to achieve that ?
Thanks for your help and the great API,
Vic