In the last days I have done some code refinements to the Metar injections which I'll explain here.
Metar Information
In my recent post, I have shared few sites that publish historical Metar information.
For one of them I wrote a simple perl script that re-write the data into x-plane readable format. I'll share the script once this feature will be available.
You can also prepare your own custom Metar file. Just check the outcome in X-Plane.
Implementation in the plugin
I decided to implement the Metar feature as follow:
- There is NO global Metar definition.
- In Global Settings, when defining Metar file, it will be copied to "first" step only, and only if there is no "Metar" definition in that step.
- If you only define custom metar file in first step, its definition won't be changed in second or third step if there is no new metar definition. It won't be forced either.
- "metar_file", will need to be defined in every step, if you want different Metar information.
- In order to force custom Metar file in ALL steps, you will need to define same Metar file in each step, and flag the "force_custom_metar_file" checkbox in the Mission-X Editor.
- You can disable the "Force custom Metar File" in the "options" screen. This was mainly meant for designer and not for the casual simmer.
If you decide to "disable custom metar" injection, you need to know that once you "un-checked" it it will not immediately inject the last Metar, in some cases. I suggest to enable/disable this option before testing the adventure. - New global settings option were added:
- (optional) Define "metar" folder in your "custom mission folder".
It will fallback to "custom mission folder" if no folder name will be given (just like sound folder). - Metar element has been added with the following attributes:
- file_name: your custom metar file name.
- force_custom_metar_file: receive "1" (true) or "0" (false).
- file_name: your custom metar file name.
- (optional) Define "metar" folder in your "custom mission folder".
- Step settings of Metar element is same as in the Global Settings.
Example:
<metar file_name="metar01.txt force_custom_metar_file="0" />
I am still testing and tweaking the custom metar, and I'll write my insight later.
Saar