mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
snippets: get_distance_global
This commit is contained in:
@@ -20,6 +20,15 @@ def get_distance(x1, y1, z1, x2, y2, z2):
|
||||
|
||||
---
|
||||
|
||||
Функция для приблизительного определения расстояния (в метрах) между двумя глобальными координатами (широта/долгота):
|
||||
|
||||
```python
|
||||
def get_distance_global(lat1, lon1, lat2, lon2):
|
||||
return math.hypot(lat1 - lat2, lon1 - lon2) * 1.113195e5
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Взлет и ожидание окончания взлета:
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user