clientraw.text problem

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

clientraw.text problem

Post by gm4jjj »

I am evaluating meteohub on my Eee PC running it in a VM.

I am currently trying out iWDL which is an iPhone Web Application that uses the WDL data files that WDL uploads.

I noticed a couple of minor problems in clientraw.txt:

1. The sign of the longitude is wrong, it should be - for EAST, according to the clientraw.txt info I have found.

2. The separator between the stationname and the time is an underscore where it should be a hyphen.

Example of meteohub generated clientraw.txt, note GM4JJJ_21:50 should be GM4JJJ-21:50

Note -3.484444 should be 3.484444

Code: Select all

12345 8.6 8.2 68 2.7 93 1010.0 1.00 1.00 1.00 0.00 0.02 19.0 37 - 20 - - 0 0.0 - - - - - - - - - 21 50 01 GM4JJJ_21:50 0 - 21 01 - - - - - - - -1.1 1.0 5.1 1.9 20 _ 0 8.9 11.4 10.0 9.2 9.5 10.2 7.1 9.4 6.9 6.0 5.2 6.6 7.5 7.4 7.7 7.9 7.4 6.3 4.6 3.9 19.1 1.7 400 21/01/2010 3.0 -0.1 3.5 -3.0 - 8.9 11.4 10.0 9.2 9.5 10.2 7.1 9.4 6.9 6.0 2.6 2.9 3.1 3.1 3.2 4.1 4.6 4.4 4.9 3.9 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 5.1 1.9 2.7 14.8 0 _ _ 112.5 _ 0 - - - - - - - - 19.1 13.5 - 1015.0 1010.0 15.7 _ _ - - 1.7 -0.7 0.0 2010 _ 0 0 0 68 90 90 113 113 113 113 113 113 113 - - 8.6 - 56.066111 -3.484444 - 93.0 69.0 - - !!C10.37Of!!
Note also that the convention for longitude on Wunderground is - for West, the way that meteohub formats it, this may be where the error came from.
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

Hello again, any comment on the problem with sign of longitude being wrong for clientraw.txt?

We have a work around in iWDL for the iPhone as the javascript can be modified, but for WDL we are stuck, so it would be nice if you could fix this in Meteohub - many thanks.
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:clientraw.text problem

Post by YJB »

You can hardcode this yourself and verify if it is working (it works in my case, but I don't have access to your application of course):

!! At your own risk !!

Make a fallback copy:
cp /home/meteohub/clientraw.conf /home/meteohub/clientraw.conf.org

modify the following file:
/home/meteohub/clientraw.conf
find
[actual_station_longitude_decimal:-]
and replace with
-[actual_station_longitude_decimal:-]

Make sure that you do not change the structure of the file, also no space between "-" and [actual_station_longitude_decimal:-]

(adding the "-" sign should only be done for those EAST of GMT)
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

YJB wrote:You can hardcode this yourself and verify if it is working (it works in my case, but I don't have access to your application of course):

!! At your own risk !!

Make a fallback copy:
cp /home/meteohub/clientraw.conf /home/meteohub/clientraw.conf.org

modify the following file:
/home/meteohub/clientraw.conf
find
[actual_station_longitude_decimal:-]
and replace with
-[actual_station_longitude_decimal:-]

Make sure that you do not change the structure of the file, also no space between "-" and [actual_station_longitude_decimal:-]

(adding the "-" sign should only be done for those EAST of GMT)
But I am WEST of Greenwich and WDL expects that I should be a positive longitude not negative, can that be remedied?
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:clientraw.text problem

Post by YJB »

Sorry I overlooked that.

I was going to say to use
{math* -1 [actual_station_longitude_decimal:-]}

but that doesn't give the right result, since it returns a float of 2 decimals.

To get you going I would suggest to replace
[actual_station_longitude_decimal:-]
with
3.484444

This hardcodes the value in the config, and should be ok as long as you are not moving the station to a different location
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

Thanks very much I used 3.84444 as I am west and that is the correct convention for WDL. - I also changed the _ to a - between Station name and time to make it compatible with iWDL for the iPhone.
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

Just updated to 4.6a and it overwrote that conf file :-(

Should have backed it up somewhere but didn't. - Have now though!
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

Only problem is that the config file is overwritten after a reboot of meteohub :(

Looks like we really need a proper fix by the author.

Edit: I was wrong - a reboot of meteohub does not overwrite the config.

However this should still be fixed properly so that we don't have to hack the config file to get the correct location showing.
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

4.6c has fixed the sign of the longitude OK - thanks
.
However we still have the other problem:

2. The separator between the stationname and the time is an underscore where it should be a hyphen.

Any chance that can be rolled into the next update please?
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:clientraw.text problem

Post by YJB »

From TOPIC: Re:Update 4.6c:

will all be part of next update.
gm4jjj
Expert Boarder
Expert Boarder
Posts: 108
Joined: Mon Jan 18, 2010 3:53 pm
Location: Dunfermline, Fife UK

Re:clientraw.text problem

Post by gm4jjj »

Thanks.

Actually today I found that there is still a problem with the Longitude in 4.6c :(

The method you have used is only returning a value with 2 decimal places

To get accurate map position we need more precision ( 6 places)
like 3.484444

{math* [actual_station_longitude_decimal:0] -1} does not give that.
Post Reply