A method of autonomously operating an aircraft, comprising: - a pre-flight training step comprising applying a machine learning algorithm on a training dataset to obtain a mapping function between aircraft states and actions comprising navigation and guidance commands; and - a real-time control step executed during a flight of an aircraft, the real-time control step comprising: repeatedly retrieving onboard sensor data; obtaining real-time aircraft states from the onboard sensor data; determining actions associated to the real-time aircraft states using the mapping function; and autonomously operating the aircraft by executing the determined actions on the aircraft; characterized in that the pre-flight training step comprises: retrieving recorded surveillance data of a plurality of flights corresponding to at least one aircraft type and at least one route, wherein the recorded surveillance data includes at least changes of an aircraft position comprising a latitude (φ), longitude (λ) and altitude (h) over time (t) for each flight; inferring aircraft intent expressed in AIDL format from the recorded surveillance data linked to the atmospheric conditions about the planned route on the day of operation; computing reconstructed trajectories using the inferred aircraft intent; and selecting, as the training dataset for the machine learning algorithm, a dataset comprising the inferred aircraft intent and the computed reconstructed trajectories of flights corresponding to a particular aircraft type and route. - a pre-flight training step comprising applying a machine learning algorithm on a training dataset to obtain a mapping function between aircraft states and actions comprising navigation and guidance commands; and - a real-time control step executed during a flight of an aircraft, the real-time control step comprising: repeatedly retrieving onboard sensor data; obtaining real-time aircraft states from the onboard sensor data; determining actions associated to the real-time aircraft states using the mapping function; and autonomously operating the aircraft by executing the determined actions on the aircraft; characterized in that the pre-flight training step comprises: retrieving recorded surveillance data of a plurality of flights corresponding to at least one aircraft type and at least one route, wherein the recorded surveillance data includes at least changes of an aircraft position comprising a latitude (φ), longitude (λ) and altitude (h) over time (t) for each flight; inferring aircraft intent expressed in AIDL format from the recorded surveillance data linked to the atmospheric conditions about the planned route on the day of operation; computing reconstructed trajectories using the inferred aircraft intent; and selecting, as the training dataset for the machine learning algorithm, a dataset comprising the inferred aircraft intent and the computed reconstructed trajectories of flights corresponding to a particular aircraft type and route. repeatedly retrieving onboard sensor data; obtaining real-time aircraft states from the onboard sensor data; determining actions associated to the real-time aircraft states using the mapping function; and autonomously operating the aircraft by executing the determined actions on the aircraft; retrieving recorded surveillance data of a plurality of flights corresponding to at least one aircraft type and at least one route, wherein the recorded surveillance data includes at least changes of an aircraft position comprising a latitude (φ), longitude (λ) and altitude (h) over time (t) for each flight; inferring aircraft intent expressed in AIDL format from the recorded surveillance data linked to the atmospheric conditions about the planned route on the day of operation; computing reconstructed trajectories using the inferred aircraft intent; and selecting, as the training dataset for the machine learning algorithm, a dataset comprising the inferred aircraft intent and the computed reconstructed trajectories of flights corresponding to a particular aircraft type and route.