Read the angle of gimbal

Does someone know a way, that i can read the angle of a camera gimbal, that i can write it in the EXIF of my image files? Maybe with pixhawk input or with another solution?