MD11 LOC CAP

ICAO Annex 10 Vol. 1 Ch. 3
MD System Schematics 22-12-1 Sheet 5 of 7/8

RWYHDG = 260 (slider from 0 to 360, step 1)
LOCPOS = Intersect(xAxis, yAxis)
c = Circle(LOCPOS, 100000)
LOCPOS_{D}: (sin(RWYHDG°), cos(RWYHDG°))
RWYLEN = 13123 (slider from 1640 to 20000, step 1)
POINT_{T}: ((-RWYLEN) * LOCPOS_{D})
POINT_{B}: ((-(RWYLEN + 3500)) * LOCPOS_{D})
USEPOINTB: RWYLEN < 3937
REFWIDTH = 352.27272727272725 (slider from -5 to 500)
C = Point(If[USEPOINTB, POINT_{B}, POINT_{T}], Vector[(((-REFWIDTH) * cos(RWYHDG°)), (REFWIDTH * sin(RWYHDG°)))])
H = Point(If[USEPOINTB, POINT_{B}, POINT_{T}], Vector[((REFWIDTH * cos(RWYHDG°)), ((-REFWIDTH) * sin(RWYHDG°)))])
LOCWIDTH_{A} = Angle(C, LOCPOS, H)
REFMAXANG = 0.05235987755982988 rad
A = If(LOCWIDTH_{A} > 6°, Point[If[USEPOINTB, POINT_{B}, POINT_{T}], Vector[((REFWIDTH / tan(REFMAXANG) * sin(RWYHDG°)), (REFWIDTH / tan(REFMAXANG) * cos(RWYHDG°)))]], LOCPOS)
SPD = 170 (slider from 0 to 300, step 1)
POS = Point(c)
ACTRK = 170 (slider from 0 to 360, step 1)
POS_{D}: POS + (SPD / 0.592484 * (sin(ACTRK°), cos(ACTRK°)))
LOCTRK = Line(LOCPOS, LOCPOS_{D})
h = OrthogonalLine(POS, LOCTRK)
i = OrthogonalLine(POS_{D}, h)
G = Intersect(h, i)
INT: Distance[G, LOCTRK] < Distance[POS, LOCTRK]
xTrack = Vector(POS, G)
D: POS + (sin(ACTRK°), cos(ACTRK°))
TRK = Ray(POS, D)
track = Vector(POS, POS_{D})
hTrack = Vector(G, POS_{D})
LOCDEVRATE = If(INT, (Length[xTrack] * (-1)), Length[xTrack])
LEFTRIGHT: (-((x(LOCPOS) * (y(LOCPOS_{D}) - y(POS))) + (x(LOCPOS_{D}) * (y(POS) - y(LOCPOS))) + (x(POS) * (y(LOCPOS) - y(LOCPOS_{D}))))) > 0
LOCDEV = If(LEFTRIGHT, Distance[POS, LOCTRK], (Distance[POS, LOCTRK] * (-1)))
MAXLOCDIST: (-151903 * LOCPOS_{D})
INTC = Intersect(Line[POS, POS_{D}], LOCTRK)
γ = Angle(If[USEPOINTB, POINT_{B}, POINT_{T}], A, POS)
f = OrthogonalLine(If[USEPOINTB, POINT_{B}, POINT_{T}], LOCTRK)
j = OrthogonalLine(MAXLOCDIST, LOCTRK)
l = Line(A, C)
k = Line(A, H)
I = Intersect(k, j)
J = Intersect(l, j)
runway = Segment(LOCPOS, POINT_{T})
LOCWIDTH = Angle(C, A, H)
d3, maxlocdist, a, j_1 = Polygon(A, J, MAXLOCDIST)
d4, g, a_3, i_1 = Polygon(A, I, MAXLOCDIST)
BLUE_{TRKDELTA} = Max(Min[RWYHDG - ACTRK, 90], -90)
BLUE_{TRKDELTANORM}: ((abs(BLUE_{TRKDELTA}) * 0.2)) / 90
GAIN = 1.58 (slider from 1 to 3, step 0.01)
BLUE_{TRKDELTAGAIN}: BLUE_{TRKDELTANORM} + (GAIN * 0.8)
BLUE_{LOCDIS}: (abs(LOCDEV) * 0.065)
BLUE_{TRKDELTARATE}: (BLUE_{TRKDELTAGAIN} * LOCDEVRATE)
BLUE_{PREVALUE}: BLUE_{LOCDIS} + BLUE_{TRKDELTARATE}
BLUE_{VALUE}: (abs(LOCDEV) * BLUE_{PREVALUE})
MAXLOCDIST' = Rotate(MAXLOCDIST, 10°, LOCPOS)
α = Angle(MAXLOCDIST, LOCPOS, MAXLOCDIST')
MAXLOCDIST'_{1} = Rotate(MAXLOCDIST, -10°, LOCPOS)
β = Angle(MAXLOCDIST'_{1}, LOCPOS, MAXLOCDIST)
d1, m, locpos, maxlocdist'_{1} = Polygon(LOCPOS, MAXLOCDIST'_{1}, MAXLOCDIST)
d2, n, p, maxlocdist' = Polygon(LOCPOS, MAXLOCDIST', MAXLOCDIST)
MINLOCDIST: (-109370 * LOCPOS_{D})
MINLOCDIST' = Rotate(MINLOCDIST, 35°, LOCPOS)
δ = Angle(MINLOCDIST, LOCPOS, MINLOCDIST')
MINLOCDIST'_{1} = Rotate(MINLOCDIST, -35°, LOCPOS)
ε = Angle(MINLOCDIST'_{1}, LOCPOS, MINLOCDIST)
d5, minlocdist'_{1}, q, minlocdist = Polygon(LOCPOS, MINLOCDIST, MINLOCDIST'_{1})
d6, minlocdist', r, s = Polygon(LOCPOS, MINLOCDIST, MINLOCDIST')
r_{TURN}: SPD^(2) / ((11.26 * tan(25°)))
t_{TURN}: abs(RWYHDG - ACTRK) / 3
Text4: "Distance to THS = " + ((Distance[POS, LOCPOS] - RWYLEN) / 6076.12) + " nmi
Distance INTC to THS = " + ((Distance[INTC, LOCPOS] - RWYLEN) / 6076.12) + " nmi
Distance to INTC = " + (Distance[POS, INTC]) + " ft
Delta TRK = " + (abs(RWYHDG - ACTRK)) + "°
LOC width = " + LOCWIDTH + "
LOC deviation = " + (If[γ > 180°, 360° - γ, γ]) + "
LOC displacement rate= " + LOCDEVRATE + " ft/s
LOC displacement = " + LOCDEV + " ft
LOC DDM = " + (If[If[γ > 180°, 360° - γ, γ] ≤ 10°, Min[(If[γ > 180°, 360° - γ, γ] / (LOCWIDTH / 2) * 0.155), 0.18], 0.155]) + "
BLUE OK = " + (BLUE_{VALUE} < 0) + "
RED OK = " + (abs(LOCDEV) < 500 ∧ abs(LOCDEVRATE) < 25) + ""
t_{INTC}: Distance[POS, INTC] / (SPD / 0.592484)