(self, location, relative=None)
| 122 | time.sleep(1) |
| 123 | |
| 124 | def goto(self, location, relative=None): |
| 125 | self._log("Goto: {0}, {1}".format(location, self.altitude)) |
| 126 | |
| 127 | if relative: |
| 128 | self.vehicle.simple_goto( |
| 129 | LocationGlobalRelative( |
| 130 | float(location[0]), float(location[1]), |
| 131 | float(self.altitude) |
| 132 | ) |
| 133 | ) |
| 134 | else: |
| 135 | self.vehicle.simple_goto( |
| 136 | LocationGlobal( |
| 137 | float(location[0]), float(location[1]), |
| 138 | float(self.altitude) |
| 139 | ) |
| 140 | ) |
| 141 | self.vehicle.flush() |
| 142 | |
| 143 | def get_location(self): |
| 144 | return [self.current_location.lat, self.current_location.lon] |
no test coverage detected