code: def update(self, deltat=1.0):
          '''fly a square circuit'''
          DNFZ.update(self, deltat)
          self.dist_flown += self.speed * deltat
          if self.dist_flown > self.circuit_width:
              self.desired_heading = self.heading + 90
              self.dist_flown = 0
          if self.getalt() < self.ground_height() or self.getalt() > self.ground_height() + 2000:
              self.randpos()
              self.randalt(f update(self, deltat=1.0):
          '''fly a square circuit'''
          DNFZ.update(self, deltat)
          self.dist_flown += self.speed * deltat
          if self.dist_flown > self.circuit_width:
              self.desired_heading = self.heading + 90
              self.dist_flown = 0
          if self.getalt() < self.ground_height() or self.getalt() > self.ground_height() + 2000:
              self.randpos()
              self.randalt()
docs: fly a square circuit