Tuesday, December 27, 2022

once and for all

Had another go at the weather feeder text box.

When playing with Backyard EOS on 23 Dec '22, I ran into a glitch with the text file edits.

Was confused for a while until I carefully set the length for the city field. Thought I had this all sorted from some digging around back on 14 Apr '20. {ed: Oops, had forgotten about the little observation made on 23 Apr '21.}

Got me thinking that if too long, if is read nulls from the file, it would cause it to fail.

So, did some testing today. And confirmed that. The length parameter can be less though it will truncate; but it cannot be more.

Here's the content of the final file I made:

made by bla on 2:39 PM 27/12/2022
Temp Humidity City
         1         2         3         4
1234567890123456789012345678901234567890
-003.8 068 The Elevator, Ontario

And learned (re-affirmed) some interesting stuff... I discovered the last line of the file is critical. It must have the air temperature, the relative humidity, and the city or location name.

Previously, I have made a 2-line file with the "Temp Humidity City" headings and then the data on the second row.

When I put my "made by" at the end, that data showed in the Weather Center in BYE. Whoops.

Moving the modification notes to the top was A-OK; those data were ignored. Again, this was something noted over a year ago... Last line must be weather and location data. Line above is ignored. Got it.

Today's other discovery was that MANY lines may precede the last line. So I added the ruler! And edited on documentation. {ed: I've since added a warning note inside the file and other handy documentation.}

Tested in Backyard EOS v 3.1.18 on Windows XP on John Repeat Dance.

No comments: