-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflightplanfunctions
More file actions
54 lines (46 loc) · 1.07 KB
/
Copy pathflightplanfunctions
File metadata and controls
54 lines (46 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#DRAW A CROSSWIND CALC COMPASS ROSE
def crossWindRose(landingRwyHdg as Number cX as Number cY as Number) = {
#RWY LINE
def x = cos(radians(landingRwyHdg - 90))
def y = sin(radians(landingRwyHdg - 90))
def x2 = x * 14
def y2 = y * 14
line(cX cY cX + x2 cY - y2)
line(cX cY cX - x2 cY + y2)
#PERPENDICULAR TO RWY LINE
def x3 = cos(radians(landingRwyHdg ))
def y3 = sin(radians(landingRwyHdg ))
def x4 = x3 * 9
def y4 = y3 * 9
line(cX cY cX + x4 cY - y4)
line(cX cY cX - x4 cY + y4)
#COMPASS ROSE TICKS
def deg(angle as Number extend as Number) = {
def x1 = cos(angle)
def y1 = sin(angle)
def x2 = cos(angle)
def y2 = sin(angle)
def mx1 = x1 * 11
def my1 = y1 * 11
def mx2 = x2 * extend
def my2 = y2 * extend
line(cX + mx1 cY + my1 cX + mx2 cY + my2)
}
deg(0 14)
deg(1.57 14)
deg(3.14 14)
deg(4.71 14)
deg(0.523 12)
deg(1.046 12)
deg(2.09 12)
deg(2.61 12)
deg(3.66 12)
deg(4.18 12)
deg(5.23 12)
deg(5.7 12)
circle(cX cY 12)
circle(cX cY 9)
circle(cX cY 6)
circle(cX cY 3)
}
crossWindRose(40 0 0)