<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def update(self, deltat=1.0):
        '''fly in long curves'''
        DNFZ.update(self, deltat)
        if (self.distance_from_home() > gen_settings.region_width or
            self.getalt() < self.ground_height() or
            self.getalt() > self.ground_height() + 1000):
            self.randpos()
            self.randalt()