-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglidedistance
More file actions
76 lines (63 loc) · 1.87 KB
/
glidedistance
File metadata and controls
76 lines (63 loc) · 1.87 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import geometry2d
rectangle(-80 0 80 14)
def scale = 500000
def glideRatio = 9
#draw glide distance for the given altitude
def glide(ratio as Number) = {
line(0 12.5 0 14)
line(0 10 0 2)
#N.B ! CHANGE THE "repeat to" value to adjust extent
repeat 1 to 14 using i {
def alt as Number = 1000 * 305 / scale
def xValue1 = ratio * alt * i - 1
def xValue2 = ratio * alt * i
def decrease1 = alt * -1 * i - 1
def decrease2 = alt * -1 * i
#right side
line(xValue1 decrease1 + 10 xValue2 decrease2 + 10)
line(xValue2 decrease2 + 10 xValue2 10)
line(xValue2 12.5 xValue2 14)
#500 tic
def ctrX as Number = ((xValue2 - xValue1) / 2) + xValue1
line(ctrX 13 ctrX 14)
#left side
line(xValue1 * -1 decrease1 + 10 xValue2 * -1 decrease2 + 10)
line(xValue2 * -1 decrease2 + 10 xValue2 * -1 10)
line(xValue2 * -1 12.5 xValue2 * -1 14)
#500 tic
def ctrX as Number = ((xValue2 - xValue1) / 2) + xValue1
line(ctrX * -1 13 ctrX * -1 14)
}
}
#run!
glide(glideRatio)
text(-0.5 10.6 2.5 "0")
text(3 10.6 2.5 "1000")
text(9 10.6 2.5 "2000")
text(14.5 10.6 2.5 "3000")
text(20 10.6 2.5 "4000")
text(25.5 10.6 2.5 "5000")
text(31 10.6 2.5 "6000")
text(36 10.6 2.5 "7000")
text(42 10.6 2.5 "8000")
text(47 10.6 2.5 "9000")
text(52 10.6 2.5 "10000")
text(58 10.6 2.5 "11000")
text(64 10.6 2.5 "12000")
text(70 10.6 2.5 "13000")
text(-2.5 - 5 10.6 2.5 "1000")
text(-8.5 - 5 10.6 2.5 "2000")
text(-14 - 5 10.6 2.5 "3000")
text(-19.5 - 5 10.6 2.5 "4000")
text(-25 - 5 10.6 2.5 "5000")
text(-30.5 - 5 10.6 2.5 "6000")
text(-35.5 - 5 10.6 2.5 "7000")
text(-41 - 5 10.6 2.5 "8000")
text(-46.5 - 5 10.6 2.5 "9000")
text(-52 - 5 10.6 2.5 "10000")
text(-58 - 5 10.6 2.5 "11000")
text(-64 - 5 10.6 2.5 "12000")
text(-70 - 5 10.6 2.5 "13000")
text(2 2 3 "GLIDE DISTANCE PER 1000 FT")
text(2 4 3 "RATIO: 1:9")
text(-30 2 3 "CHART SCALE: 1:500.000")