Plaintext wind speed units - How to change

I have trouble finding out where to change the wind units for the translations of plaintext.txt.

We normally use “meters per second” in Sweden, but now it displays “kilometers per hour”. We use the “m/s” for short.

I use WXSIM 12.4.5 (have to much to do to get involved in the new beta), and I see that the plaintext.txt which comes direct from WXSIM shows units as kmh.

I reread the php-files and checked what the getBeaufort is doing, and where it is called) but obviusly I don’t understand where to change settings so it converts from kmh to m/s (mps?), and displays those new values along with the correct units tag.

Cheers,

Ingemar

Hi Ingemar,

The current plaintext-parser.php (Version 1.16 - 05-Feb-2009) and all prior versions do not make changes in the units displayed – it simply reports what was found in the plaintext.txt.

If you look at the main screen for WXSIM, in the lower left corner there are radio buttons for you to select the units for wind … change that, and exit WXSIM to save the setting. Restart WXSIM and run a forecast … the plaintext.txt should have the output in your selected wind units.

Best regards,
Ken

Hi and thanks Ken!

You know, I am in early retirment because of bad back pains, so sometimes I am so tired I cannot “think” - I was always on pain-killers I couldn’t do almost anything that takes a little bit of brains to do…

Well, I have had to reinstall WXSIM so many times, and I just forgot that WXSIM setting. - I wished there was only one place for all of the unit settings for all 3 programs.

Wouldn’t it be a good idea though, if changing the language you’d change the units too? I mean several countries use m/s while several of EU countries (but not all) use km/h, and then in the US you would use mph et c. Yeah, I know that there would be decimals to round off et c, but nothing that couldn’t be overcome by code. I admit it is a bit trickier than moving date number parts around.

Again,

Thanks for your always kind repsonses,

Ingemar

Hi Ingemar,

I have tried to NOT modify the data values in the plaintext.txt script (just provide translation lookups for the English words/phrases) so the units of measure are set by each station owner (in their WXSIM forecast run). It would be difficult to pick just the numbers and do selected conversion of units, especially if the site ran with rain UOM in inches … some of the forecasts read ‘half an inch’ or ‘less than a quarter of an inch’.

I’d rather stay with just doing the language lookup replacements … keeps the code much more simple :slight_smile:
And yes, moving the date parts was a tricky bit of code given all the different formats the WXSIM dates can appear in…

Best regards,
Ken

Hi Ken,

Yes of course your right, they are not just numbers…

Just a bit OT - I did contact Tom about having ISO date format also directly inside WXSIM, and hopefully he implements that. It is a bit tricky having a dedicated weather station computer, mostly serving the local area, and having to deal with either m/d/y or d/m/y when all local users expect y/m/d (and most users in the world expect that format). Having to have d/m/y affects some other program outputs. ---- If Tom implements ISO date, do you have a modified version of the script ready? :smiley:

Best regards,

Ingemar

Easy to do the ISO date (YYYY-MM-DDThh:mm:ss[-|+nnnn] ) with a change to the script, so when Tom makes it available, a replacement plaintext-parser.php will be available :slight_smile:

Best regards,
Ken