METAR weather station based on AN3518 - check it out!

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

METAR weather station based on AN3518 - check it out!

2,838 次查看
vier_kuifjes
Senior Contributor I
Hello fellow coldfire users,

I created a small weather station based on application note AN3518 written by Eric Gregori, and which runs on the M52233DEMO board. What it does is to download the actual (aviation) weather data from a given location (hard coded in the program) and display this data in readable form on the LCD display. There are a couple of sample images of my prototype with a screen shot in the attached ZIP file. This ZIP file also contains the complete source of the project and a schematic diagram of the complete setup.

The program may need some adaptation to the location where you live. First, you will probably use a different weather location than the one currently used in the program. You'll have to change the ICAO code and the location name, both of which are located in the source file metar_reader.c. A complete list of all ICAO codes can be found here:
http://adds.aviationweather.gov/metars/stations.txt

The time stamps used inside METAR data use universal time. This is most likely not the time at your location. The program uses a conversion routine that adjusts the universal time to the local time, but is written for my personal location (GMT+1) and also takes daylight savings into account. You may want to change that routine to reflect your own time zone. The routine that does this is called adjustDateTime and is also located in metar_reader.c.

Then there is another important note: you NEED to change the MAC address of the board to avoid everyone to use the same MAC address, which is not allowed! Change the MAC address to the address of an old network card for instance. The MAC address is located in the file ifec.c. I intentionally put an error in that source file, at the point where the MAC address is located. That way you can easily find what to change.

This version of the program only displays the current weather readings on the display. I also have a version of the program available that also displays forecasts. The display of that version is somewhat different as it needs to display much more data. It uses a scrolling text display. If people are interested in this I may publish that too.

There's another thing... I am currently trying to implement a relative humidity readout based on air and dewpoint temperature. But this requires floating point math and the use of the EXP function. I'm still struggling with this as it always results in linker errors. If anyone can help, please do!

And there's more: It may be required to use CodeWarrior 6.4 to successfully compile the program. I have tried using CW7 in the past and it compiled file, but for some reason it didn't run as expected. If you know the solution, I'll be glad to know it!

Success! - Marc

P.S. the source and documentation are available in attachment.



Message Edited by Marc VDH on 2008-07-20 05:31 PM

Message Edited by Marc VDH on 2008-07-20 05:32 PM

 

iniche_metar_v1_1_en1.zip

Message Edited by t.dowe on 2009-10-21 02:00 AM
标签 (1)
0 项奖励
回复
5 回复数

1,406 次查看
vier_kuifjes
Senior Contributor I
This file is version 3.1.011 of the METAR/TAF reader for the Coldfire 52233DEMO board with LCD attached. The program downloads METAR (actual weather) and TAF (forecast) data from the internet and displays it on the LCD, as shown in the Windows simulation program of my previous post.

Have fun with it!

- Marc
iMETAF_v3.1.011_en.zip
Message Edited by t.dowe on 2009-10-21 02:06 AM
0 项奖励
回复

1,406 次查看
vier_kuifjes
Senior Contributor I

Attached to this message you can find the Windows simulation program of version V3 of the METAR weather station. This version not only displays the actual weather, but also decodes and displays weather forecasts.

I haven't translated this version of the coldfire program to English yet, but as soon as I have this available I'll put it on line for downloading too.

 

METAF_V3_en.zip

Message Edited by t.dowe on 2009-10-21 02:05 AM
0 项奖励
回复

1,406 次查看
vier_kuifjes
Senior Contributor I

OK, here's the Windows simulation program of the 52233DEMO weather station. (attached)

It shows exactly what comes on the 52233DEMO LCD screen and has the additional capability of allowing you to chose which location to display.

The available locations are those from the ADDS web site. Some of them do not appear to work though, and may result in incorrect display of information. The list of available locations is in the file LIST2.PRN. There's hundreds of locations in there. This file is in a basic text format, so you may edit out most and keep only those of interest.

 

iMETAR_V1.3.zip

Message Edited by t.dowe on 2009-10-21 02:04 AM
0 项奖励
回复

1,406 次查看
vier_kuifjes
Senior Contributor I

In the mean time the program has evolved to version 1.3 (attached).
The main difference is the source of the metar data being used, and the protocol used to obtain the data, which now uses the HTTP POST command instead of GET.

The RH (relative humidity) readout has been implemented now too.

I also have a simulation program for Windows that shows exactly what is shown on the LCD connected to the 52233DEMO board. I will post that too later on but I first have to translate it into English.

 

 

iMETAR_v1.3.001_en.zip

Message Edited by t.dowe on 2009-10-21 02:02 AM
0 项奖励
回复

1,406 次查看
vier_kuifjes
Senior Contributor I
In the mean time I found out that it should work fine when compiled with CW7.0
The original application note AN3518 from Eric Gregori did not run when compiled with CW7.0, but AN3518 is based on an older version of Coldfire Lite whereas I used the most recent version I could find on the Freescale web site.
0 项奖励
回复