Rule-based systems such as Profium Sense get their rules from users who understand a business domain well enough to put some of the human intelligence in form that is understood by computers. Sometimes these rules come from years of experience and allow a business to excel against competition. Sometimes these rules come from the business environment in the form of laws and regulations.

This blog post examines regulative environments and how they can be used to distill formal rules that drive applications which make it easier for human beings to make correct decisions. Commercial and non-commercial flight operations in Europe are the source of inspiration for this story where national authorities (CAAs) such as Finavia in Finland have imposed rules for different types of civil air operations.

For example, if you are a pilot of a plane going to perform a non-commercial flight in Finland under Instrument Flight Rules (IFR), national rules dictate via OPS M1-5, OPS M1-7 and OPS M1-27 documents (among others) whether you can commence the flight in IFR, perform it under the IFR to the destination of your choice and whether you can proceed with an instrument approach to eventually land the plane. Rules in those documents require, for example, the following considerations:

First, you need to determine whether the weather at the departure airport is sufficient to take-off under IFR.

Second, you need to determine whether the weather at the destination airport is sufficient at the time of the arrival to land under IFR.

Third, you need to consider instrument approaches available at your primary destination, your alternate airports and even at the airport where you take off. For example, if you would like to perform a GPS based RNAV non-precision approach at the destination, a so-called RAIM check is needed. This check verifies satellites visible at the destination are not being serviced and that required precision of the GPS position can be guaranteed. Further, if such RNAV approach is to be carried out, the alternate airports must have other than GPS based approach available.

Fourth, the required fuel at take-off will need to carry you not only to the destination but to the furthest of the alternate airports and 45 minutes of final reserve.

Luckily these requirements are very objective in nature and they are based on hard facts and numbers. For example, for a non-auto-pilot equipped, IFR certified plane, the planning minimum to a destination with an ILS precision approach is 800 meters RVR. If the visibility in weather forecast is below this limit, a pilot may not commence the flight at all. If the forecast indicates a higher value such as 10 kilometers  but cloud base still below 2000 feet AGL, the flight plan must include one alternate airport. This in turn adds to the  minimum required fuel before take-off.

I spent a couple of hours encoding rules from these documents to Profium Sense. I added facts as N3 triples about airports and their available instrument approaches. I then added facts about current and forecast weather at various airports in Finland. This ended up being a manual exercise which I might automate in the future when I have the luxury of time.

I then encoded rules using the rule language supported by Profium Sense and got immediately visible results about what the regulations say about some arbitrary pilot currently at Helsinki-Malmi airport (EFHF) planning to fly under IFR with a single-engine aircraft to Mikkeli airport (EFMI).

For example, if the weather at Malmi airport has cloud base at 600 feet, the flight cannot start under IFR as the departure minima for Malmi require the RNAV A minimum of 670 feet. ATC in Mikkeli is not frequently open so again in order to fly IFR approach to Mikkeli would have to be performed at a specific time. And finally as Mikkeli does not have a meteorological service i.e. forecast available at all but only actual METAR weather, the regulations dictate two alternate airports must be included in the flight plan and those airports need to have ATC available and the amount of fuel needed again computed to the further of those two airports considering the direction and velocity during the diversion from Mikkeli to Helsinki-Vantaa (EFHK), for example.

This story has only scratched the surface when it comes to flying IFR in Finland. I might have to redo this exercise later in 2016 when new regulation called part-NCO sets new regulations in various European countries. That means the rules I’ve elaborated above will change and I hope it will not take long for me to update the rules to assist make safe flights in EASA governed countries.

I hope this article inspired you to write rules. Sometimes such rules are available in the regulatory environment where you run your everyday business.