I've added the code for 3 sensors: barometer, IR and ultrasonic. All of them are working fairly well, except for minor accuracy issues. The error results in about 1 m inaccuracy (barometer and ultrasonic sensors), which is not perfect, but OK for keeping it up at roughly the same level in the air.