if (gear1 == 1 and gear2 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 4) {
if ((((n1_left >= 85) and (n1_right >= 85)) or (gs > 90 )) and flaps < 4 and (mode == "SRS")) {
setprop("/FMGC/status/phase", "1");
}
if ((alt >= 1500) and (alt <= cruisefl) and (phase == "1") and (phase != "4") and (mode != "SRS")) {
setprop("/FMGC/status/phase", "2");
}
if ((alt >= cruisefl) and (phase == "2") and (mode != "SRS")) {
setprop("/FMGC/status/phase", "3"); # for now cruise will be level 100 or above until the MCDU is ready
}
if ((alt <= cruisefl) and (phase == "3")) { # for now it will have to be when we begin descent.
setprop("/FMGC/status/phase", "4");
}
if (getprop("/FMGC/status/to-state") == 0 and flaps >= 4 and ((phase == "4") or (phase == "2"))) { # add man activation of approach phase in MCDU or DECEL when those things are simulated
setprop("/FMGC/status/phase", "5");
}
if ((phase == "5") and (state1 == "TOGA") and (state2 == "TOGA")) { # this is the only fully correct one to FCOM
setprop("/FMGC/status/phase", "6");
}
# forget transition from APP to climb for now because it would be too complex
if ((phase == "6") and ((vertmode == "G/A CLB") or (vertmode == "SPD CLB") or (vertmode == "CLB") or ((vertmode == "V/S") and (targetvs > 0)) or ((vertmode == "FPA") and (targetfpa > 0))) and (alt <= targetalt)) {