BA 1451 then AT 801 at Heathrow
Edinburgh → London → Casablanca
Timetable, London time
17:30BA 1451 from Edinburgh at the gate
17:10AT 801 to Casablanca leaves the gate
23 h 40 apart on the timetable, overnight
AT 801 leaves 23 h 40 after BA 1451 arrives on the timetable: more than half a day, so not a connection we count.