Rangefinder logic

Hi all,
I have a few questions on how the rangefinders are integrated.

  • Is the altitude compensated by the attitude of the multicopter? If yes is there a way to disable it in case the rangefinder is mounted on a gimbal always pointing downward?
  • When a rangefinder is used, are all the altitude targets being referenced to the ground?