Need to get altitude info from barometer of pixhawk 2.1!

I am new to pixhawk. i am using pixhawk 2.1. i am planning to fly the drone in the chimney. For that purpose,i need to use the barometer for the altitude measurement. I am using pX4 firmware version 1.6.3. Please let me know which parameters do i need to set to get the altitude value from the barometer. I am getting pressure_alt around -79 . I don’t understand what is this value. Please let me the basic setup to get the barometer altitude working in the pixhawk. Thanks

So to answer your question,
You can get raw, unfiltered barometer output from the UORB topic:

#include <uORB/topics/sensor_combined.h>
sensor_combined.baro_alt_meter

This is raw barometer, unfiltered.

Alternatively, you can use the filtered GPS (or barometer, not 100% sure on this one) height from the UORB topics:

#include <uORB/topics/vehicle_global_position.h>
#include <uORB/topics/vehicle_local_position.h>

Hope this helps,