2 // functions to support precision landing
7 #if AC_PRECLAND_ENABLED
9 void Copter::init_precland()
11 // scheduler table specifies 400Hz, but we can call it no faster
12 // than the scheduler loop rate:
13 copter
.precland
.init(MIN(400, scheduler
.get_loop_rate_hz()));
16 void Copter::update_precland()
18 // alt will be unused if we pass false through as the second parameter:
19 return precland
.update(rangefinder_state
.alt_cm_glitch_protected
,
20 rangefinder_alt_ok());