Using a rangefinder to maintain constant elevation during flight

I’d like to use a rangefinder to maintain a constant distance to the ground during flight of the 3dr Solo. I’d like to stay about 1.5 to 2 meters from the ground, and search in a grid pattern over a 10 or 100 m^2 area.

I’d like to use this laser altimeter, and modify the guided flight script so that a 3dr flies in a simple grid patter, maintaining a 2m distance to the ground using the altimeter.

Where should I start on implementing this? Is it possible using arducopter or dronekit-python? Any help is much appreciated. Thanks!