ridiculous amounts of decimals behind my comma?

Post Reply
User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Thu Nov 08, 2018 2:47 pm

Hi, all

Can someone tell me what's this when i take a look at my stationfeed?
08 Nov 2018 15:39:01 +0100","temperature":13.4000000000000003552713678800500929355621337890625,"relative_humidity":64,"pressure":1020.5,"wind_speed":1.899999999999999911182158029987476766109466552734375,"wind_gust":1.600000000000000088817841970012523233890533447265625,"apparent_temperature":12.300000000000000710542735760100185871124267578125,"dewpoint":6.70000000000000017763568394002504646778106689453125,"rain_rate":0,"bearing_degrees":129,"wind_direction":"SE","solar_radiation":33,"UV":0,"temperature_indoor":21.199999999999999289457264239899814128875732421875,"humidity_indoor":52,"sunshine_hours":4.4000000000000003552713678800500929355621337890625,

Staccermaccer,
Image

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Fri Nov 09, 2018 4:15 pm

Hello,

Anyone….?
Image

User avatar
Mauro
Advisor
Advisor
Posts: 54
Joined: Tue Oct 30, 2018 4:41 pm
Station model: Davis Vantage Pro2 Plus
Software: Meteohub

Re: ridiculous amounts of decimals behind my comma?

Post by Mauro » Fri Nov 09, 2018 6:38 pm

Hello Staccermaccer!
It seems that your data in xml format are ok

Code: Select all

<?xml version="1.0"?>
<weather>
  <station>
    <name>Weather in Ekeren and Port of Antwerp</name>
    <location>Antwerpen</location>
    <latitude>51.2806</latitude>
    <longitude>4.4208</longitude>
    <model>Davis Pro2 Plus</model>
    <software>WD</software>
  </station>
  <units>
    <temperature_units>C</temperature_units>
    <pressure_units>hPa</pressure_units>
    <wind_speed_units>km/h</wind_speed_units>
    <precipitation_units>mm</precipitation_units>
    <solar_radiation_units>W/m2</solar_radiation_units>
  </units>
  <current_conditions>
    <UNIX_timestamp>1541788141</UNIX_timestamp>
    <local_time>09.11.2018 19.29</local_time>
    <date_time>2018-11-09T19:29:01+01:00</date_time>
    <rfc_time>Fri, 09 Nov 2018 19:29:01 +0100</rfc_time>
    <temperature>10.1</temperature>
    <relative_humidity>83.0</relative_humidity>
    <pressure>1008.5</pressure>
    <wind_speed>1.9</wind_speed>
    <wind_gust>4.8</wind_gust>
    <apparent_temperature>9.1</apparent_temperature>
    <dewpoint>7.3</dewpoint>
    <rain_rate>0.0</rain_rate>
    <bearing_degrees>141</bearing_degrees>
    <wind_direction>SE</wind_direction>
    <solar_radiation>0</solar_radiation>
    <UV>0.0</UV>
    <temperature_indoor>21.4</temperature_indoor>
    <humidity_indoor>53.0</humidity_indoor>
    <sunshine_hours>2.3</sunshine_hours>
    <leaf_wetness1>15</leaf_wetness1>
    <temperature_sensor1>0.0</temperature_sensor1>
    <soil_temperature1>0.0</soil_temperature1>
    <temperature_sensor2>0.0</temperature_sensor2>
    <humidity_sensor2>0.0</humidity_sensor2>
    <soil_temperature2>0.0</soil_temperature2>
    <temperature_sensor3>0.0</temperature_sensor3>
    <humidity_sensor3>0.0</humidity_sensor3>
    <soil_temperature3>0.0</soil_temperature3>
    <leaf_wetness4>0</leaf_wetness4>
    <temperature_sensor4>0.0</temperature_sensor4>
    <humidity_sensor4>0.0</humidity_sensor4>
    <soil_temperature4>0.0</soil_temperature4>
    <temperature_sensor5>0.0</temperature_sensor5>
    <humidity_sensor5>0.0</humidity_sensor5>
    <temperature_sensor6>0.0</temperature_sensor6>
    <humidity_sensor6>0.0</humidity_sensor6>
    <temperature_sensor7>0.0</temperature_sensor7>
    <humidity_sensor7>0.0</humidity_sensor7>
    <temperature_sensor8>0.0</temperature_sensor8>
    <humidity_sensor8>0.0</humidity_sensor8>
  </current_conditions>
  <today>
    <date>2018-11-09</date>
    <temperature_average>8.65</temperature_average>
    <temperature_max>13.7</temperature_max>
    <temperature_min>5.8</temperature_min>
    <humidity_average>83.39</humidity_average>
    <humidity_max>90.6</humidity_max>
    <humidity_min>72.0</humidity_min>
    <pressure_average>1013.00</pressure_average>
    <pressure_max>1017.7</pressure_max>
    <pressure_min>1008.5</pressure_min>
    <dewpoint_average>5.92</dewpoint_average>
    <dewpoint_max>8.7</dewpoint_max>
    <dewpoint_min>3.9</dewpoint_min>
    <apparent_temperature_average>7.46</apparent_temperature_average>
    <apparent_temperature_max>12.8</apparent_temperature_max>
    <apparent_temperature_min>4.4</apparent_temperature_min>
    <wind_speed_average>1.43</wind_speed_average>
    <wind_gust_max>18.5</wind_gust_max>
    <precipitation>0.0</precipitation>
    <rain_rate_max>0.0</rain_rate_max>
    <solar_radiation_average>56</solar_radiation_average>
    <solar_radiation_max>373</solar_radiation_max>
  </today>
</weather>
The json data are indeed a little problematic:

Code: Select all

{"station":{"name":"Weather in Ekeren and Port of Antwerp","location":"Antwerpen","latitude":51.28059999999999973852027324028313159942626953125,"longitude":4.4207999999999998408384271897375583648681640625,"model":"Davis Pro2 Plus","software":"WD"},"units":{"temperature_units":"C","pressure_units":"hPa","wind_speed_units":"km\/h","precipitation_units":"mm","solar_radiation_units":"W\/m2"},"current_conditions":{"UNIX_timestamp":1541788261,"local_time":"09.11.2018 19.31","date_time":"2018-11-09T19:31:01+01:00","rfc_time":"Fri, 09 Nov 2018 19:31:01 +0100","temperature":10.0999999999999996447286321199499070644378662109375,"relative_humidity":83,"pressure":1008.5,"wind_speed":1.899999999999999911182158029987476766109466552734375,"wind_gust":1.600000000000000088817841970012523233890533447265625,"apparent_temperature":9.0999999999999996447286321199499070644378662109375,"dewpoint":7.29999999999999982236431605997495353221893310546875,"rain_rate":0,"bearing_degrees":140,"wind_direction":"SE","solar_radiation":0,"UV":0,"temperature_indoor":21.39999999999999857891452847979962825775146484375,"humidity_indoor":52,"sunshine_hours":2.29999999999999982236431605997495353221893310546875,"leaf_wetness1":15,"temperature_sensor1":0,"soil_temperature1":0,"temperature_sensor2":0,"humidity_sensor2":0,"soil_temperature2":0,"temperature_sensor3":0,"humidity_sensor3":0,"soil_temperature3":0,"leaf_wetness4":0,"temperature_sensor4":0,"humidity_sensor4":0,"soil_temperature4":0,"temperature_sensor5":0,"humidity_sensor5":0,"temperature_sensor6":0,"humidity_sensor6":0,"temperature_sensor7":0,"humidity_sensor7":0,"temperature_sensor8":0,"humidity_sensor8":0},"today":{"date":"2018-11-09","temperature_average":8.6500000000000003552713678800500929355621337890625,"temperature_max":13.699999999999999289457264239899814128875732421875,"temperature_min":5.79999999999999982236431605997495353221893310546875,"humidity_average":83.3900000000000005684341886080801486968994140625,"humidity_max":90.599999999999994315658113919198513031005859375,"humidity_min":72,"pressure_average":1012.990000000000009094947017729282379150390625,"pressure_max":1017.700000000000045474735088646411895751953125,"pressure_min":1008.5,"dewpoint_average":5.92999999999999971578290569595992565155029296875,"dewpoint_max":8.699999999999999289457264239899814128875732421875,"dewpoint_min":3.899999999999999911182158029987476766109466552734375,"apparent_temperature_average":7.45999999999999996447286321199499070644378662109375,"apparent_temperature_max":12.800000000000000710542735760100185871124267578125,"apparent_temperature_min":4.4000000000000003552713678800500929355621337890625,"wind_speed_average":1.4299999999999999378275106209912337362766265869140625,"wind_gust_max":18.5,"precipitation":0,"rain_rate_max":0,"solar_radiation_average":56,"solar_radiation_max":373}}
Can I suggest to change from json to xml format?
I don't know this particular plugin. So take my tip with the necessary benefit of the doubt. ;)
Enjoy your day!

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Fri Nov 09, 2018 7:32 pm

Hi,

Thank you for your answer!

It's not alone in my json-file i am getting also ridicilous numbers on my site, see example in attachment...

Staccermaccer,


PS: Since a day or two i can't reach my Admin-pages too!
Attachments
plot1.png
plot1.png (23.76 KiB) Viewed 13243 times
Image

User avatar
Mauro
Advisor
Advisor
Posts: 54
Joined: Tue Oct 30, 2018 4:41 pm
Station model: Davis Vantage Pro2 Plus
Software: Meteohub

Re: ridiculous amounts of decimals behind my comma?

Post by Mauro » Fri Nov 09, 2018 7:59 pm

You're welcome Staccermaccer :)
Assuming that here a help from Jachym would be useful (I'm just a novice), the problem seems to be found further back in the data management flow.
You should take a look at the database to see if this abnormal data is also there.
In the positive case, the source of the data must be checked, since the cause of the problem would be necessary before the database itself (WU, meteohub, metehobridge, etc.).
Meanwhile, I believe that an analysis of the data contained in the database is the first step.
Enjoy your day!

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Sat Nov 10, 2018 11:37 am

Hi,

This is an excerpt of my database, seems to be OK or am i missing something…

Any suggestions of course welcome!

Staccermaccer,
Attachments
database.png
database.png (59 KiB) Viewed 13224 times
Image

User avatar
Mauro
Advisor
Advisor
Posts: 54
Joined: Tue Oct 30, 2018 4:41 pm
Station model: Davis Vantage Pro2 Plus
Software: Meteohub

Re: ridiculous amounts of decimals behind my comma?

Post by Mauro » Sat Nov 10, 2018 12:46 pm

Hi!
The database looks fine I guess.
It's necessary to go back an other step and check how the data are presented by the originator (WU, meteohub, meteobridge, etc.)
For example, an analysis of the clientraw.txt or other specific data files could be a good idea.

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Sat Nov 10, 2018 1:45 pm

Example from clientraw:

12345 0.3 0.9 145 12.2 87 1001.0 4.3 8.1 79.6 0.038 10.000 20.7 60 0.0 2 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 15 28 07 Weather_in_Ekeren_and_Port_of_Antwerp-15:28:07 0 0 10 11 0 0 0 0 0 0 0 12.2 13.6 13.4 9.7 2 Rain -0.3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 18.3 10.1 865.8 10/11/2018 14.8 9.9 13.4 8.3 0.0 3 3 5 4 2 3 3 3 3 1 12.7 12.7 12.6 12.6 12.5 12.4 12.4 12.3 12.3 12.3 2.5 2.5 2.5 2.8 3.0 3.0 3.0 4.1 4.1 4.3 13.4 9.7 12.2 10.1 0 --- --- 166 0 0 0.0 0.0 0 0 0 0 0 84.0 21.3 19.9 14.8 1005.4 999.9 18 07:55 07:55 11.8 7.9 10.4 7.6 1 2018 2018 -1 1 -1 192 169 183 186 178 159 182 176 181 140 15.0 255.0 2.1 11.1 51.0 -4.0 4.3 88 79 0 00:02 0 0 0 0 0 0 66.7 12:38 00:00 !!CWD_console_17.5!!
Image

User avatar
Mauro
Advisor
Advisor
Posts: 54
Joined: Tue Oct 30, 2018 4:41 pm
Station model: Davis Vantage Pro2 Plus
Software: Meteohub

Re: ridiculous amounts of decimals behind my comma?

Post by Mauro » Sat Nov 10, 2018 6:29 pm

Use this parser to analyze your clientraw.txt file.

https://www.tnetweather.com/wdparserold/index.php

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Sun Nov 11, 2018 7:26 am

Hi,

I think i have found the culprit, several months ago i switched from Cumulus software to Weather Display software. There was still a cronjob running to fetch parameters for Cumulus, i deleted that cronjob and now it seems to be working like it should be!

Thanks for all the help!

PS: still have one problem though, i can't login to my Admin pages..

Staccermaccer,
Image

User avatar
Mauro
Advisor
Advisor
Posts: 54
Joined: Tue Oct 30, 2018 4:41 pm
Station model: Davis Vantage Pro2 Plus
Software: Meteohub

Re: ridiculous amounts of decimals behind my comma?

Post by Mauro » Sun Nov 11, 2018 8:57 am

Hi!
Great job!

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by Jachym » Tue Nov 13, 2018 6:32 pm

Hi,
this most likely due to Javascript calculations. For some reasons of how it works, it sometimes makes these ridiculous numbers when converting units (doing some sort of calculation in general). It is very unpredictable, so far I wasnt able to find how to fix this, but there are many questions about it on the internet. I tried using the toFixed command in JS, but with no luck either.

User avatar
staccermaccer
Observer
Observer
Posts: 23
Joined: Wed Aug 30, 2017 10:36 am
Location: Antwerrp
Station model: Davis pro plus II
Software: WD, CUMULUS
Contact:

Re: ridiculous amounts of decimals behind my comma?

Post by staccermaccer » Mon Nov 26, 2018 8:38 pm

Hi, Jachym

No probs, i still have some decimals here and there, but still can't get the CO2 block to work, any idea's on that perhaps?

Staccermaccer,
Image

Post Reply