mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
* Create README.md * Update README.md * Update README.md * Update README.md * .. * .. * .. * .. * .. * .. * .. * added many ui options * stable * release candidate
18 lines
322 B
Python
18 lines
322 B
Python
import math
|
|
import dcs
|
|
|
|
|
|
def getDistance(point1=dcs.Point, point2=dcs.Point):
|
|
x1 = point1.x
|
|
y1 = point1.y
|
|
x2 = point2.x
|
|
y2 = point2.y
|
|
dX = abs(x1-x2)
|
|
dY = abs(y1-y2)
|
|
distance = math.sqrt(dX*dX + dY*dY)
|
|
return distance
|
|
|
|
def convertMeterToNM(meters=int):
|
|
nm = meters / 1852
|
|
return nm
|