Metar data is retreived using the asynclabs shield and is displayed using a simple client application. It loads the weather data from the www.weather.gov website. This has a short piece of text which can also be seen by a browser by clicking on this site. http://www.weather.gov/data/METAR/KLAX.1.txt

metar1

This is what the text looks like.This then is output to the arduino and then it looks like below. You can see some more text which can be eliminated by changing the program verbose to false.
As usual you have to change the SSID and passwod in the program.

metaroutput

[spoiler]

/*
 * A simple sketch that uses WiServer to get the hourly weather data from LAX and prints
 * it via the Serial API
 */

#include <WiServer.h>

#define WIRELESS_MODE_INFRA	1
#define WIRELESS_MODE_ADHOC	2

// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,0,129};	// IP address of WiShield
unsigned char gateway_ip[] = {192,168,0,1};	// router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0};	// subnet mask for the local network
const prog_char ssid[] PROGMEM = {"xxxxxxxxxxx"};		// max 32 bytes

unsigned char security_type = 1;	// 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"12345678"};	// max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,	// Key 0
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 1
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	// Key 2
				  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	// Key 3
				};

// setup the wireless mode
// infrastructure - connect to AP
// adhoc - connect to another WiFi device
unsigned char wireless_mode = WIRELESS_MODE_INFRA;

unsigned char ssid_len;
unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------

// Function that prints data from the server
void printData(char* data, int len) {

  // Print the data returned by the server
  // Note that the data is not null-terminated, may be broken up into smaller packets, and 
  // includes the HTTP header. 
  while (len-- > 0) {
    Serial.print(*(data++));
  } 
}

// IP Address for www.weather.gov  
uint8 ip[] = {140,90,113,200};

// A request that gets the latest METAR weather data for LAX
GETrequest getWeather(ip, 80, "www.weather.gov", "/data/METAR/KLAX.1.txt");

void setup() {
    // Initialize WiServer (we'll pass NULL for the page serving function since we don't need to serve web pages) 
  WiServer.init(NULL);

  // Enable Serial output and ask WiServer to generate log messages (optional)
  Serial.begin(57600);
  WiServer.enableVerboseMode(true);

  // Have the processData function called when data is returned by the server
  getWeather.setReturnFunc(printData);
}

// Time (in millis) when the data should be retrieved 
long updateTime = 0;

void loop(){

  // Check if it's time to get an update
  if (millis() >= updateTime) {
    getWeather.submit();    
    // Get another update one hour from now
    updateTime += 1000 * 60 * 60;
  }

  // Run WiServer
  WiServer.server_task();

  delay(10);
}

[/spoiler]

metar at rotterdam airport

Also in holland there is METAR data available from the knmi (the meteriological office) This is data from the airports around holland. My nearest airport is Rotterdam zestienhoven which can be found here. Rotterdam Airport Zestienhoven (06344, EHRD)The location is 51-57N    004-27E. So simply look for the  EHRD text and you have found the METAR  data for Rotterdam airport. The text looks as follows:

ZCZC
SA061855 EHRD     ROTTERDAM/THE HAGUE AIRPORT   NLD   -5 m.
METAR EHRD 061855Z AUTO 21006KT 170V240 9999 FEW035 BKN039 18/12
Q1004 TEMPO 21013KT 7000 -SHRA FEW030CB=

You can find the meaning of this on the following location. http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/METAR.pdf Some modifictions have also been made which can be found here. http://www.knmi.nl/waarschuwingen_en_verwachtingen/luchtvaart/METAR_NAT_AFWIJKINGEN_NOV2010.pdf So you can parse this data and look up what it means. Of course you could decode this using an arduino.
If only there was more time.

 

 

Leave a Comment