Index PHPmyEasyWeather PHPmyEasyWeather Homepage

Home
Demo
FAQ
Download
> Documentation
Contact
      

getMetarRVR

getMetarRVR -- return several Runway Visual Ranges out of METAR Code

Description

Array getMetarRVR (string $METAR, int $RUNWAY);

getMetarRVR returns information about the Runway Visiual Range for the given runway. It expects the number of the inquired runway as an integer ($RUNWAY) starting from 0 (for the first runway). If a specified runway is not quoted in $METAR or the METAR code is incorrect getMetarRVR will return false.

getMetarRVR returns an array with 6 elements and the following indexes:

  • "runway" for the name of the runway (in plain text e.g. "20L")
  • "min" for the minimum visual range of the runway measured in meters
  • "max" for the maximum visual range of the runway measured in meters
    if there is not distinguished between a minimum and a maximum range the indexes "min" and "max" will contain the same values.
  • "less" will be "yes" if the minimum (or the absolute) range is less than the indicated value, otherwise "no"
  • "more" will be "yes" if the maximum (or the absolute) range is more than the indicated value, otherwise "no"
  • "becomes" will contain one of the following options: "higher" if the visual range will increase, "lower" if it will decrease or "steady" if it will stay monotonic.

Example:

<?
include ("phpmyeasyweather.inc.php"); $METAR = "GCRR 280900Z 31011KT R20L/M0500V1000U R20R/M0700VP1500U FEW030 20/16 Q3016"; $RUNWAY = 0;
while ($foo = getMetarRVR ($METAR, $RUNWAY++)) { echo " runway " . $foo["runway"]; echo " minimum "; if ($foo["less"] == "yes") echo "less then "; echo $foo["min"]; echo " maximum "; if ($foo["more"] == "yes") echo "more then "; echo $foo["max"]; echo " becomes " . $foo["becomes"]; echo "<br>"; }
?>

will display all indicated runways as folows:

runway 20L minimum less then 500 maximum 1000 becomes higher
runway 20R minimum less then 700 maximum more then 1500 becomes higher
      

Previous Up Next