Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Gauge Tick Marks

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
User avatar
mike_b
Posts: 14
Joined: Tue 27 Dec 2011 4:32 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Georgetown, Kentucky, USA

Gauge Tick Marks

Post by mike_b »

Hi,

I have just upgraded to Cumulus MX. The web pages look great! I am confused by the tick marks on some of the gauges. On the wind speed gauge there are 10 tick marks between each 5 MPH reading. For example, there are 10 tick marks between 0 and 5 MPH. Why are there 10 tick marks rather than 5?

Thank you,
Mike
Mike
f4phlyer
Posts: 144
Joined: Sun 13 Feb 2011 7:12 pm
Weather Station: Davis Vantage Pro 2
Operating System: RaspBerry Pi Win 10 OSx
Location: Spring, Texas USA
Contact:

Re: Gauge Tick Marks

Post by f4phlyer »

Mike,
A picture is worth a thousand words, do you have a site?
retreat at augusta pines weather
CumulusMX on Raspberry π rPi5
http://augusta-pines-weather.com / CumulusMX 4.0.0 build:4020
WeatherUnderground KTXSPRIN538
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: Gauge Tick Marks

Post by jlmr731 »

My guess is that it is a standard gauge layout package, if you look at the other gauges they also have the same amount of tick's like temp humidity ...

yes wind is only whole numbers so just have to look past the extra lines in the gauge.
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Gauge Tick Marks

Post by mcrossley »

Tick marks are a nightmare to get right. The SteelSeries gauges try and use "sensible" values for the minor/major tick spacing's, but they sometimes appear a bit odd to us humans. The code is untouched from the original supplied by Gerrit - which in turn is based on a pretty standard routine you will find in other packages too. I have tried tweaking it a couple of times in the past, but whilst I could improve it in some situations it would be worse in others.

If anyone can come up with a better scheme I'd be happy to look at it. Currently the code looks like this...

Code: Select all

    function calcNiceNumber(range, round) {
        var exponent = Math.floor(Math.log10(range)),   // exponent of range
            fraction = range / Math.pow(10, exponent),  // fractional part of range
            niceFraction;                               // nice, rounded fraction

        if (round) {
            if (1.5 > fraction) {
                niceFraction = 1;
            } else if (3 > fraction) {
                niceFraction = 2;
            } else if (7 > fraction) {
                niceFraction = 5;
            } else {
                niceFraction = 10;
            }
        } else {
            if (1 >= fraction) {
                niceFraction = 1;
            } else if (2 >= fraction) {
                niceFraction = 2;
            } else if (5 >= fraction) {
                niceFraction = 5;
            } else {
                niceFraction = 10;
            }
        }
        return niceFraction * Math.pow(10, exponent);
    }

User avatar
mike_b
Posts: 14
Joined: Tue 27 Dec 2011 4:32 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Georgetown, Kentucky, USA

Re: Gauge Tick Marks

Post by mike_b »

Thanks for the information everyone. I now understand that there are always 10 tick marks between major number values in the gauges. My visual perception says something isn't right, but as jlmr731 said, I will look past it.
Mike
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: Gauge Tick Marks

Post by jlmr731 »

Nice Fraction lol
I guess for the wind gauge would it be possible to use only nice numbers, no ticks between? As i see it it would be the only gauge that needs tweaked if at all.
Locked