mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
Feature/generator (#13)
* Create README.md * Update README.md * Update README.md * Update README.md * .. * .. * .. * .. * .. * .. * .. * added many ui options * stable * release candidate
This commit is contained in:
17
Generator/RotorOpsUtils.py
Normal file
17
Generator/RotorOpsUtils.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user