The video below shows a quadrotor following bilinear interpolated SRTM elevation data. Pitch, roll, yaw are controlled manually.
Barometer and elevation readings are zero'ed at start.
The baro setpoint is set to a safety distance of elevation + 7m.
There are basically three Linux processes involved in this: The GPS publisher passes latitude/longitude data to the elevation map lookup service, which publishes elevation data to the autopilot. This communication is implemented using ZeroMQ. The GPS and autpilot services are implemented in C, while the elevation map is implemented in Python.
The interpolation of SRTM data can be found here:
Note: There are some "jumps" in the altitude, which are caused by wind gusts or lateral movement commands, affecting the imperfect altitude controller. Some more tuning is required here.