1. A method of operating a gas turbine engine, the gas turbine engine having a combustor, a control system, variable compressor vanes, at least one compressor bleed valve, a shaft and an anti-icing device, the method comprising: detecting impacts of particles on a surface of the gas turbine engine or a surface of an associated aircraft; recording the impacts; comparing the impacts of the particles with one or more stored impacts; wherein the one or more stored impacts correspond to unfavorable weather conditions; and the one or more stored impacts correspond to one or more impacts of rain drops, hail stones, ice particles or ice crystals; determining if the impacts of the particles matches the one or more stored impacts; and sending a signal to the control system for the gas turbine engine to adjust at least one of a position of the variable compressor vanes, a position of the at least one compressor bleed valve, a speed of rotation of the shaft, or to provide anti-icing, in order to provide sufficient surge margin for a compressor, to prevent combustor flame out, to prevent damage to compressor rotor blades, or to prevent damage to compressor stator vanes, respectively, such that the gas turbine engine operates in a safe mode of operation when it is determined that the impacts of the particles matches the one or more stored impacts.