Line data Source code
1 : #include "mode.h" 2 : #include "Plane.h" 3 : 4 16 : bool ModeCircle::_enter() 5 : { 6 : // the altitude to circle at is taken from the current altitude 7 16 : plane.next_WP_loc = plane.current_loc; 8 : 9 16 : return true; 10 : } 11 : 12 20131 : void ModeCircle::update() 13 : { 14 : // we have no GPS installed and have lost radio contact 15 : // or we just want to fly around in a gentle circle w/o GPS, 16 : // holding altitude at the altitude we set when we 17 : // switched into the mode 18 20131 : plane.nav_roll_cd = plane.roll_limit_cd / 3; 19 20131 : plane.update_load_factor(); 20 20131 : plane.calc_nav_pitch(); 21 20131 : plane.calc_throttle(); 22 20131 : } 23 :