Page 1 of 1

Longititude and Latitude not saving in the Cumulus.ini

Posted: Sat 14 Sep 2019 5:05 am
by ai5u
Howdy,

I've been a faithful Cumulus 1 user since 2012. I finally migrated over to Cumulus MX after 2 different weather stations and 3 different micro-computers running XP and Win 7. All transitions and updates of Cumulus 1 thru Cumulus MX went smoothly without a hitch :D

One oddity I'm experiencing now, with Cumulus MX, is my location (longitude & latitude) is not saving properly in my Cumulus.ini. I've tried editing the .ini file several times and even tried numerus attempts to enter it into the MX interface template. It just won't save after properly after each shut-down and re-boot. My actual weather station location gets bumped to the South by about 1000 ft. and the MX template keeps reverting from xx degrees xx min. 10 sec. to 9 sec. I am also unable to change/correct the decimal coordinates either. These keep reverting/changing too.

Any Ideas

Thanks

Tim

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Sat 14 Sep 2019 2:35 pm
by PaulMy
Hi Tim,
I've just found somewhat similar, but in a very small difference
I run both Cumulus1 and CumulusMX.

Cumulus1 Settings Lat 42° 57' 36". Then the same in cumulus.ini and as 42.96 in decimal
Cumulus1 Settings Lon W81° 26' 18". Then the same in cumulus.ini and as -81.43833 in decimal and that should be correct
and both of these stay the same in Cumulus1 Settings and cumulus.ini after closing and restarting Cumulus1

CumulusMX Settings Lat 42° 57' 36". Then the same in Cumulus.ini and as 42.96 in decimal
CumulusMX Settings Lon W81° 26' 18". Then the same in Cumulus.ini and as --81.43833 in decimal and that is correct.
However, after closing CumulusMX and restart the CumulusMX Settings show correct for Lat but for Lon W81° 26' 17" (instead of 18") but Cumulus.ini continues to be correct with W81° 26' 18"
I've tried it 3 times with re-Setting CumulusMX to 18" and then Save, stop and restart, all with the same result - Cumulus.ini is correct and Settings Lon goes back to 17".

The degree Lat/Lon at full seconds isn't very accurate compared to decimal, and maybe CumulusMX in the Settings has it rounded after a restart. Confusing though.

Enjoy,
Paul

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Sat 14 Sep 2019 3:49 pm
by HansR
@ai5u: could this have to do with own/grp assignments of the files? If the owner/group is different from the owner/group CMX is running from, I would imagine a problem saving the ini file. It could have occurred when transferring the ini under user pi and running Cumulus under root (as advised). The own/grp combination of the files CMX writes must be correct otherwise there will be no writing. As CMX is running as root (as advised) all files written to must be own/grp root.

@PaulMy: that could well be a standard rounding error. In my ini-file there are 13 digits and the 33 at the end of your longitude seems to indicate it should be repeating for 13 digits. In my CMX there is no rounding error or difference. But it would surprise me if CMX makes an entry in the ini with a different number of digits than with me.

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Sun 15 Sep 2019 1:14 am
by ai5u
I have complete administrative privilege's over the computer.

There is only but one Administrative profile within the computer, and no other profiles.

The directory in which each of my Cumulus installs are located is:

Computer -> Local Disk (C) -> Cumulus MX

Computer -> Local Disk (C) -> Cumulus

The original Cumulus.ini was copied from Cumulus to Cumulus MX for migration to MX.

This may hold the key to my answer:

Paul Said:
"The degree Lat/Lon at full seconds isn't very accurate compared to decimal, and maybe CumulusMX in the Settings has it rounded after a restart. Confusing though."
Still investigating my issue...

Thanks

Tim

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Sun 15 Sep 2019 10:13 am
by mcrossley
The slight differences are rounding errors due to storing the lat/long in the ini file as decimal strings.

Take Paul's example of W81° 26' 18"
This is stored as -81.438333333333333 (the default 15 significant figures), however that is not enough precision to reflect the 18", if you change the ini file to -81.43833333333333333333 then start CMX it will show 18" in the settings, however it will write back the value as -81.438333333333333 so you lose the extra precision immediately you save the settings, or CMX shuts down.

Possible fixes - store more significant digits in the ini file, or change to using a decimal variable type (which would default to 29 significant digits).

To be honest it's a slight quirk, the level of precision provided now is "good enough" imho.

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Sun 15 Sep 2019 1:15 pm
by PaulMy
Thanks for the explanation Mark.
To be honest it's a slight quirk, the level of precision provided now is "good enough" imho.
Agreed!

Enjoy,
Paul

Re: Longititude and Latitude not saving in the Cumulus.ini

Posted: Mon 16 Sep 2019 12:20 am
by ai5u
As I am anal-retentive to precise station location, I piddled around with the Cumulus MX .ini file for quite a while and here's what I found:

This fix, as with what mcrossley suggests, did the trick:

My dilemma was with latitude N:

.ini had originally stored as: 34.5861111111111

After much numerical experimentation - It settled to read my proper local now within 5 meters (Not 500 meters away anymore :o )

I finally and successfully narrowed it down to entering into the .ini : 34.5861222222222

Saved and stored with no loss

BINGO!

All is good now :D

Closeness only counts in horseshoes, hand-gernades and depth-charges :clap: