Some facts about my decoding suite of PHP scripts:
# - My scripts are now compatible with all PHP versions from 5.4.0 to 7.1.15
# - This project was essentially a challenge I set myself with the aim of learning much more about PHP (I am entirely self-taught)
#- Essentially, this was my major project for July to November 2017
, PaulMy has been using the suite continuously since 7 November 2017, my suite was logging any initial failures to understand particular unanticipated METAR content for his choice of Canada and USA airports at
and more complicated difficulties were logged at http://www.komokaweather.com/metar/fail ... _metar.log
# - Most updates since this posting was originally made have been improvements based on something in those logs. I now have many other activities to fit in, so any recent updates will have been tested less well than the original script in November 2017.
# - The lack of any similar live running by anyone elsewhere means I must rely on my own testing to refine the script for airports outside Canada/USA. I can test my decoder against METAR issued by around 220 different aerodromes around the world,
but I do not have the time to do lots of testing and a key point about METAR is what is issued at the time of my testing may be totally different to what is issued one hour/day/week/month later! I have tested against a couple of thousand issues, but that represents a drop in the ocean compared to the number actually issued since I started in July 2017.
# - The aim of my project was to output British English explanations of everything contained in any METAR issued by any airport anywhere in the world. I have not been able to find any other decoder that does not specialise in a sub-set of METAR content. Indeed, the WMO states it is impossible to write a computer programme than can decode any more than the basic METAR and that probably accounts for why I have not found any other decoder as ambitous as mine.
# - I can guarantee that not
everything that will ever be included in a METAR will be recognized by my decoder. However, I have probably gone further than is reasonable in covering a very wide range of possible METAR element combinations, including much misformed content.
# - It remains possible that unexpected content might confuse my suite and could cause a crash, but I do believe I have anticipated as much content as I can. Remember, the TAC format for METAR that my suite addresses is not precisely specified and in some places almost any text may be found.
# - I deliberately experiment with a wide variety of php functions to try them out and the suite may not be using the most efficient design
# - I have learnt a lot about METAR as issued in every country in the world, see PDF paper that I have produced in zip.
# - That paper also describes how ICAO and WMO are forcing abandonment of METAR in TAC format of traditional alphanumerical characters I mentioned in earlier post
# - My suite decodes METARs still using the Traditional Alphanumeric Characters format, not those in the newer digital format, and it is possible that the TAC format will be abandoned by 2020 rendering my suite obsolete!
# - The outputs are in some cases, long phrases, because they are clear or precise explanations, in no cases do I output just the numbers. The explanatory text is fixed, so a user can in their own web page strip off unwanted parts of the text if they are able to write program code.
# - As just one example, when reporting air presures I differentiate between sea level pressure (SLP) and pressure at other altitudes, rival decoders just quote a pressure reading and you cannot tell whether that is SLP or an altimeter reading at a different level. It is difficult to decide which terms are too technical, because some people know more than others, but I am not aiming at meteorologists nor those who want just numbers, but at those who want enough to understand what the report is saying!
# - The expectation is that the suite will be used by those wanting to augment (or make comparisions) outputs from their personal weather stations with information from nearby airports, and I expect that users will choose to display only a subset of the information available in the output array, but hopefully all you might want is available.
# - For USA I am decoding specifications in both Civil and Air Force handbooks as there are some differences, and although both books specify a sequence to be followed, in practice USA content I have found in the Remarks Group in live METAR has both inconsistent sequencing and a free format for much of the abbreviated codes; I don't rely on any particular sequencing, but the free format aspect means that USA Remarks decoding, like that in other countries, may sometimes fail, although fortunately this happens very rarely.
For testing my suite, I have developed and revised many web pages that call my decoder. I don't know what design you as a user want, nor which parts of my output array you want to have displayed, so I don't provide any display facility in the zip. Read the sources for the two web pages I produced for 'PaulMy ' at http://www.komokaweather.com/metar/meta ... ar_display
and http://www.komokaweather.com/metar/meta ... isplay-alt
. Remove the queryString (question mark onwards) to see the relevant page in action.
The PDF in the zip discusses all available outputs, but many will be seen on one or other of those web pages.
All the suite scripts, including those mentioned below as being available on Paul's site, and the two folders with images as used on his web pages, are available in the zip which includes the PDF paper that explains all the files in the zip and how to use them. If a particular file, or files, has/have been updated recently, the version on Paul's site and the latest version in the zip might have slight discrepancies.
The top level script of my decoder can be read at http://www.komokaweather.com/metar/meta ... ecodeMETAR
The script at the next level down is read at http://www.komokaweather.com/metar/meta ... _sub_funct
The optional script for decoding the Remarks Group is at http://www.komokaweather.com/metar/meta ... eMETAR_Rmk
. It optionally calls further scripts for Canada and USA, although because these are not loaded at the start, sources can only be viewed once they are loaded, use either http://www.komokaweather.com/metar/deco ... AR_Can_Rmk
or http://www.komokaweather.com/metar/deco ... AR_USA_Rmk
Incidentally, to view PHP sources written by me, the queryString attribute can be 'sce', 'src', or 'viewSource' and although I vary between the three attributes in examples above, you can choose any one and use it in all places.
I've not been highlighting when I issue changes in this thread because only Paul is testing my suite in live running conditions, and there have been no extra downloads. If there is no more unanticipated content at his local airports, there will be no futher updates to my suite.