Page 15 of 34
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 12:41 pm
by Solorize
Ron:
Can you confirm if the data on "main screen" is displaying correct values? or are they multiplied by 10 as well?
i.e. is it just the graphs that are displaying the incorrect values?
Kapo:
LOL, I would wait and see if I can find a way to get it working within the software to avoid reinstalling your OS.
Steve:
As a fellow programmer, could I check with you how you would handle the values that I read in from the Realtime.txt file.
(I know you program in another language, but I am hoping that you would use data types in a similar manner to me in VB.Net).
i.e
Which "data type" would you read the values into.
Say the Temperature value, which for arguments sake is
6.2, would you assign a variable as a SINGLE or DOUBLE data type or another type for this type of data?
i.e (in VB.NET I would assign the variables as below)
CurrentTemperature As Single
or
CurrentTemperature As Double
As currently I have it as a DOUBLE data type. (which works OK on my PC but not on Ron's)
Any advice would be appreciated

Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 1:11 pm
by nitrx
Solorize wrote:Ron:
Can you confirm if the data on "main screen" is displaying correct values? or are they multiplied by 10 as well?
i.e. is it just the graphs that are displaying the incorrect values?
Hi Mark they are mutiplied by 10 see attachment the valus of rain to ( had some rain) the only values which are not multiplied is humidity and cloudhheight .
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 1:43 pm
by steve
Solorize wrote:As a fellow programmer, could I check with you how you would handle the values that I read in from the Realtime.txt file.
(I know you program in another language, but I am hoping that you would use data types in a similar manner to me in VB.Net).
i.e
Which "data type" would you read the values into.
Say the Temperature value, which for arguments sake is 6.2, would you assign a variable as a SINGLE or DOUBLE data type or another type for this type of data?
I am not consistent, and sometime I use a double and sometimes a single, the only difference being the precision. It wouldn't normally make a difference when you were just converting the string "6.2" into a floating point number.
While I know a bit about .NET, I'm afraid I know very little about VB and how it handles conversions. But I
would expect there to be a problem with reading the values from realtime.txt on a PC which uses a decimal comma, as realtime.txt uses a decimal point. But that conflicts with what Ron is seeing.
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:01 pm
by mcrossley
nitrx wrote:
Hi Mark they are mutiplied by 10 see attachment the valus of rain to ( had some rain) the only values which are not multiplied is humidity and cloudhheight .
Which are normally integer values?
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:11 pm
by nitrx
mcrossley wrote:nitrx wrote:
Hi Mark they are mutiplied by 10 see attachment the valus of rain to ( had some rain) the only values which are not multiplied is humidity and cloudhheight .
Which are normally integer values?
Yep I think so
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:14 pm
by steve
Ron, what does your system use for a thousands separator?
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:20 pm
by nitrx
steve wrote:Ron, what does your system use for a thousands separator?
A point as thousands separator.
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:24 pm
by steve
nitrx wrote:A point as thousands separator.
Right, here's my theory: On Ron's system, the decimal point effectively gets stripped out of "14.5", for example, because his system thinks it's just a thousands separator and is hence irrelevant. So for "14.5" he gets the result 145.
On Kapo's system, the thousands separator is actually a space. So "14.5" stays as it is, and his system can't convert that to a number because it doesn't know what the decimal point is.
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:32 pm
by nitrx
Good theory Steve
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:33 pm
by mcrossley
Yep, so need to use the "CultureInfo.InvariantCulture" when processing the realtime.txt file then?
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 2:50 pm
by steve
mcrossley wrote:Yep, so need to use the "CultureInfo.InvariantCulture" when processing the realtime.txt file then?
Yes, I think so.
var number = Double.Parse(itemFromRealtime, System.Globalization.CultureInfo.InvariantCulture)
or whatever the syntax is in VB.
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 6:53 pm
by Solorize
Thankyou Steve and Mcrossley for your input into this problem
it is very much appreciated
I will have a go at reading the values in using the "CultureInfo.InvariantCulture"
within my code (I will have to as you say double check the syntax for VB.Net).
And hopefully this will sort out the errors.
I may not get much of a chance tonight to look over the code as shattered
from work and the other half was not happy that I spent most of Sunday
up in the study re-coding rather than helping her look after our little one
But as soon as I have the code revised I will post another test version
up here.
Thanks again.
Mark
Re: Cumulus RealTime Data Grabber - Tool
Posted: Mon 15 Apr 2013 8:53 pm
by Solorize
OK, I couldn't help it I just had to sort out the code tonight otherwise I would be
thinking about it while trying to get to sleep LOL.
So I have edited the code to use the
CultureInfo.InvariantCulture
See below snippet of the code showing the syntax for a couple of the variables I have changed:
Code: Select all
CumulusOutsideTemp = Double.Parse(strArr(2), System.Globalization.CultureInfo.InvariantCulture) ' outside temperature
CumulusRelativeHumidity = Double.Parse(strArr(3), System.Globalization.CultureInfo.InvariantCulture) 'relative humidity
Hopefully now this will sort out the errors
Ron and Kapo:
Could you download this new test version and let me know if it works, if not can you let me know where it errors.
ver. 1.4.3c_testing.zip
Now i'm off to bed

dreaming that I have hopefully managed to get it working LOL
Thanks
Mark
Re: Cumulus RealTime Data Grabber - Tool
Posted: Tue 16 Apr 2013 9:18 am
by nitrx
Hi Mark hope you've slept well

I've runned the version 143c results are over here
http://apeldoorn.hollandweather.net/latest/ ( static info) it seems that almost everything is fine except the 3D graphs on the main screen these are still multiplied by 10 I've had no rain atm but I think this is ok.
I wil run it now for some hours I think we get rain and I hope that the the pressure drops below 1013 hpa (well for the programm not for the weather)
Thanks for figuring out ( the programm hasn't crashed by now on my system)
Ron
Re: Cumulus RealTime Data Grabber - Tool
Posted: Tue 16 Apr 2013 9:35 am
by kapo
Hi Mark!!!
I should not sell these machines out and start as Lacemaker ....
CRTDG works fine!!!!
only thing is that compass dosen`t work, and that`s because in my Cumulus those points are in finnish... but it is`nt big problem...
Grabber itself seems to work:
Grabber