Recent Posts

Pages: [1] 2 3 ... 10
1
Dear WeatherCat observers of the seasons turning,

Northern California has been mostly under the control of high pressure ridges.  This has resulted in warm and dry conditions lasting longer than you would expect for being this late in October.  However, a storm to our North did bring in the marine layer enough to create this scene behind my anemometer this morning:

 

Alas, the overall pattern continues.  Warmer is more the norm than otherwise and no rain expected for at least two weeks.

Such are da' conditions that prevail . . . .

Cheers, Edouard
2
Dear Reinhard, X-Air, and WeatherCat scripters,

this topic is dedicated to our famous AppleScripter Edouard.  ::)
Can you help me out this problem:
The all new supersonic snow sensor measures in mm (variable x). Is there a possibility to round this variable beneath 5 down and above 5 up? So for example if "x" records 73 the script should tell 70, on the other side if it records 77 it should output 80. The thought behind is that I would not record every millimeter, but only every centimeter.
How can I format the "x" to do this?

This is an old problem that goes all the way back to FORTRAN (at least).  The simplest solution is use a trick about how computers convert real numbers into integers.  Basically you want to round the number to the next highest power of ten.  Here is a solution that assumes you want the output to be literally in cm instead of mm:

Code: [Select]
set snow_mm to 77

set snow_cm to (snow_mm + 5) / 10 as integer

If you want the result to be 80 instead of 8, multiply the variable snow_cm by 10 and that will be the answer you are looking for.

The trick is that when you convert a value to an integer it simply drops any decimal that might have been there.  When I divide by 10 I convert the number from an integer to a floating point number.  Before dividing by 10, I add 5.  That shifts everything by effectively 1/2.  If the value was 74, it becomes 79.   When I divide by 10 it becomes 7.9.  However when converting to an integer the floating point is simply dropped, so when it converts 7.9 to an integer it simply becomes 7.  On the other hand, suppose the value was 76.  Add 5 to get that it becomes 81.  Divide by 10 it becomes 8.1.  However once again everything after the decimal point is dropped.  That leaves you with the 8 cm that you were aiming for.

I hope that's clear.  You can paste the code into your script editor and play around with it for yourself.

Cheers, Edouard  [cheers1]
3
Dear John, X-Air and WeatherCat clock watchers,

British Summer Time comes to an end this weekend and the clocks go back one hour.

I presume WeatherCat will tell my Davis Vantage Pro2 about this?
I can find nothing in any of the settings to check this is so!

Or does the Vantage do it itself?

Your Davis console is supposed to adjust automatically for Daylight savings in Europe.  That is what my 9 year old Davis console manual reports.  You might check your manual to confirm.

In addition, you can have WeatherCat automatically keep your Davis console at the correct time.  The Internet has a very exact timekeeping protocol that is much better than the internal clock of the console.  If you want WeatherCat to perform this service you need to set this option on the WeatherCat station options.  You'll find instructions on how to do this on page 70 of the current WeatherCat manual.

Let us know if that solves your concerns.

Cheers, Edouard
4
WeatherCat General Discussion / Re: AppleScript - Help needed ...
« Last post by xairbusdriver on Today at 09:33:48 PM »
I think your number can be in the hundreds, if I remember your description of your sensor. If it goes above 999, you'll need to add another "if then" below.

I think the AppleScript term you need is "round" plus a 'direction'. In this case, it looks like the "to nearest" would work the way you want.

The pseudo code:
Code: [Select]
snowRAW = your raw sensor number [753mm]
if (snowRAW >99) {
   snowCent = snowRAW / 100 [75.3]
} else { [if snowRAW was 56mm, for example]
   snowCent = snowRAW / 10 [5.6]
}
snowFinal = round to nearest(snowCent)
In the first case it should be 75. In the second case it should be 6.

However, I don't use AppleScript, so I have no idea if this is how it works. I'm sure there is a more efficient method that the AS expert can provide.
5
WeatherCat General Discussion / AppleScript - Help needed ...
« Last post by wurzelmac on Today at 07:24:15 PM »
Hello,
this topic is dedicated to our famous AppleScripter Edouard.  ::)
Can you help me out this problem:
The all new supersonic snow sensor measures in mm (variable x). Is there a possibility to round this variable beneath 5 down and above 5 up? So for example if "x" records 73 the script should tell 70, on the other side if it records 77 it should output 80. The thought behind is that I would not record every millimeter, but only every centimeter.
How can I format the "x" to do this?
 :-[

Thanks in advance,
6
WeatherCat General Discussion / Re: British Summer Time
« Last post by xairbusdriver on Today at 05:59:04 PM »
I suspect WC simply uses the computer settings for time. Different nations have different laws about "Daylight Savings" dates. And most computers use a some automatic time-keeping service.
7
WeatherCat General Discussion / British Summer Time
« Last post by wx-watch on Today at 02:53:50 PM »
British Summer Time comes to an end this weekend and the clocks go back one hour.

I presume WeatherCat will tell my Davis Vantage Pro2 about this?
I can find nothing in any of the settings to check this is so!

Or does the Vantage do it itself?

How does WeatherCat cope with an hour of "overlapping data"

John
8
WeatherCat Releases / Re: WeatherCat Version 3.0.2 Now Available
« Last post by Steve on Today at 12:26:44 AM »
It seems, Mojave, 3.02, and Fusion Drive is something most of us with this problem have in common. I moved back to 3.0.1, let the files download, and then tried 3.0.2 again. That worked. ButI expect that the next time I have a backlog of info on the dat logger, it will lock up again.
9
Dear CCWxWatcher, Stu, Blick, and WeatherCat cautious sys-admins,

For this reason, many of us duplicate the com.trixology.weathercat.plist file (once you know it is good) and store it for a future need to replace the old one. It is much easier to have a good working copy of that file than to have to go back in and remember to put all of your settings back the way you want them. This will NOT help you this time, because you need to make sure you have a good plist file first.

There is no guarantees, but if you run Time Machine (or some other backup software that can retrieve a single file,) you could try replacing com.trixology.weathercat.plist with an older version of this file before your problems started.  That is a lot less hassle than having to put all your preferences back into WeatherCat.  I also have made a separate backup copy of the com.trixology.weathercat.plist file because this happening more often since macOS 10.10 Yosemite.

If you attempt to restore this file from backup, you must still follow Blick's instructions to the letter.  If you don't, you will simply have macOS put back the corrupted information into the file you had gone to so much trouble to restore from backup.

Cheers, Edouard
10
WeatherCat Releases / Re: WeatherCat Version 3.0.2 Now Available
« Last post by jennajon on Yesterday at 07:10:18 PM »
Just updated to Mojave with the same non-progressing bar with 3.0.2 after waiting over a hour.
Restored back to 3.0.0 and yes, progress bar did not move, but it finished downloading data quickly.
Then updated to 3.0.2 from within program. Seems to be running ok now, but of course there is no back data at this point.
If it happens again, I will try and capture a log file of the crash and go back to 3.0.1

Before updating I had NO problems with 3.0.2. *sighs*

 [interesting]

PS. Also Fusion Drive in my bigMac

i had some comm problems, *have no idea WHY* and 3.0.2 started playing up again; so i reverted back to 3.0.1.
Things seem to be ok ....but am remaining on 3.0.1 for the forseeable future.
Pages: [1] 2 3 ... 10