Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

dayfile.txt question

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

dayfile.txt question

Post by beteljuice »

The beteljuice was playing with data from other peoples dayfile.txt when a problem was encountered. Doing math with pressure values was giving silly results, also one of the 'donors' was reporting to two decimal places.

OK, the two dec places is a Davis / new thing (screws up some of my old formats :bash: ), and the math problem is a PHP thing where sometimes it loses the plot with precision (although it only seemed to be happening with the pressure values :roll: )

The upshot is that I made a comparitive test bed:

beteljuice test bed comparing donor dayfile.txt(s)


Donor: Ray Proudfoot (892 records)

First entry: 17 fields, Decimal = "." seperator = ","
09/05/09,11.0,54,12:36,6.6,23:55,14.6,12:31,1021.4,12:00,1021.17,12:31,0.00,00:00,0.00,13.4,1.1
Last Entry: 42 fields
17/10/11,39.0,181,18:10,7.2,23:51,14.4,13:35,1001.60,19:05,1018.90,00:00,3.29,19:18,0.25,11.3,218.5,19.0,18:39,71,17:51,94,20:24,0.000,0.0,14.4,13:35,11.1,14:02,4.6,23:35,0.19,20:14,5.6,23:35,10.6,19:19,5.7,23:59,198,7.0,0.0

sample: baro max - baro min , math check:
27/07/10 (max) 1017.61 minus 1015.62 (min) = 1.99
28/07/10 (max) 1017.75 minus 1015.99 (min) = 1.76
29/07/10 (max) 1017.07 minus 1015.85 (min) = 1.22
30/07/10 (max) 1015.99 minus 1009.21 (min) = 6.78
31/07/10 (max) 1010.67 minus 1009.21 (min) = 1.4599999999999
01/08/10 (max) 1015.92 minus 1010.30 (min) = 5.62
02/08/10 (max) 1018.32 minus 1015.75 (min) = 2.5700000000001
03/08/10 (max) 1018.09 minus 1010.26 (min) = 7.83
04/08/10 (max) 1010.33 minus 1005.90 (min) = 4.4300000000001
05/08/10 (max) 1013.35 minus 1009.28 (min) = 4.0700000000001
06/08/10 (max) 1013.28 minus 1009.28 (min) = 4


Donor: Ron (nitrx) (667 records)

First entry: 42 fields, Decimal = "," seperator = ";"
19-12-09;6,1;360;22:45;-9,5;19:27;-4,7;13:00;1003,6;00:00;1010,2;15:59;0,0;00:00;0,0;-7,3;44,3;;;;;;;;;;;;;;;;;;;;;;;;;
Last Entry: 42 fields
16-10-11;4,6;100;13:43;0,4;05:59;15,4;13:50;1021,1;14:08;1027,7;14:33;50,4;11:22;0,0;6,0;29,1;3,8;13:44;54;14:53;100;12:30;0,00;0,0;17,7;13:50;16,9;13:55;-1,6;05:59;4,2;12:17;0,4;05:59;11,6;12:21;-0,1;04:59;192;12,9;0,0

sample: baro max - baro min , math check:
16-11-10 (max) 1023.1 minus 1019.2 (min) = 3.9
17-11-10 (max) 1021.0 minus 1009.0 (min) = 12
18-11-10 (max) 1011.9 minus 1008.2 (min) = 3.6999999999999
19-11-10 (max) 1015.5 minus 1011.4 (min) = 4.1
20-11-10 (max) 1015.8 minus 1012.5 (min) = 3.3
21-11-10 (max) 1012.9 minus 1009.2 (min) = 3.6999999999999
22-11-10 (max) 1009.7 minus 1004.6 (min) = 5.1
23-11-10 (max) 1005.5 minus 1003.9 (min) = 1.6
24-11-10 (max) 1005.7 minus 1003.7 (min) = 2
25-11-10 (max) 1004.0 minus 1001.6 (min) = 2.4
26-11-10 (max) 1005.6 minus 1003.4 (min) = 2.2


Donor: robynfali (323 records)

First entry: 19 fields, Decimal = "." seperator = ","
17/11/10,23.5,180,23:37,0.0,00:00,9.1,23:58,0.0,00:00,1013.3,17:06,0.0,00:00,0.0,8.2,41.6,9.2,23:39
Last Entry: 42 fields
15/10/11,20.6,225,13:10,0.5,21:05,16.8,15:51,1027.8,21:05,1033.0,00:00,0.0,00:00,0.0,14.4,285.6,17.9,01:06,65,11:25,76,17:36,0.00,16.1,16.8,15:51,14.3,16:07,-4.5,21:05,0.0,00:00,-3.5,21:05,11.5,16:01,-3.2,21:05,199,3.9,0.0

sample: baro max - baro min , math check:
27/04/11 (max) 1030.0 minus 1027.4 (min) = 2.5999999999999
28/04/11 (max) 1027.6 minus 1021.3 (min) = 6.3
29/04/11 (max) 1021.5 minus 1014.3 (min) = 7.2
30/04/11 (max) 1015.9 minus 1011.9 (min) = 4
01/05/11 (max) 1015.1 minus 1011.6 (min) = 3.5
02/05/11 (max) 1017.4 minus 1013.7 (min) = 3.6999999999999
03/05/11 (max) 1020.1 minus 1017.3 (min) = 2.8000000000001
04/05/11 (max) 1021.7 minus 1018.1 (min) = 3.6
05/05/11 (max) 1018.7 minus 1013.6 (min) = 5.1
06/05/11 (max) 1013.8 minus 1010.3 (min) = 3.5
07/05/11 (max) 1010.7 minus 1005.3 (min) = 5.4000000000001

The interesting thing (and possible coding nightmare) is the variable number of fields.
However; Rons (Nitrx) data has the correct number of fields throughout !

So .........

Does this mean that if dayfile.txt exists Cumulus appends to it, and if it is deleted then it is rebuilt from scratch ? (Or possibly when using the editor ?)

(Apologies to the 'donors' for lifting their data :oops: )
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: dayfile.txt question

Post by steve »

beteljuice wrote:Does this mean that if dayfile.txt exists Cumulus appends to it, and if it is deleted then it is rebuilt from scratch ? (Or possibly when using the editor ?)
It only gets rebuilt (or new records inserted) when told to do so by using the Cumulus editor (new in 1.9.2). So a particular line can have any number of fields up to the current number, which is 42. Or more than 42, I guess; Cumulus would just ignore the spurious extra fields.

Note that it's not just the new Cumulus editor which can introduce variable length lines and 'null' fields, other methods of editing the file (e.g. Toolbox) have been doing this for some time, which is why I changed Cumulus to cope with it in the first place.
Steve
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: dayfile.txt question

Post by beteljuice »

Would it worthwhile 'new' releases backing up the existing dayfile.txt and forcing a rebuild to ensure a uniform number of fields ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: dayfile.txt question

Post by steve »

No, because the rebuild can't be perfect because all of the required data isn't necessarily there. It's a 'better than nothing' facility to create dayfile.txt entries where for whatever reason they don't already exist.
Steve
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: dayfile.txt question

Post by beteljuice »

Ah well .... I feel a new php script coming on ,,,,,,,, :shock:
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: dayfile.txt question

Post by steve »

I've just spotted a bug in the 'create missing' facility; it doesn't create all of the entries. Specifically, it doesn't create any entries for this year, or for previous years where the month is the same as the current month, or the day is the same as today!
Steve
Post Reply