Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.19.3 (build 3196) - 25 July 2022

Legacy Cumulus 1 release v1.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 interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

converting degrees to approximate compass points

Talk about anything that doesn't fit elsewhere - PLEASE don't put Cumulus queries in here!
Post Reply
geoffw
Posts: 540
Joined: Fri 08 May 2009 3:12 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Pembrokeshire West Wales UK
Contact:

converting degrees to approximate compass points

Post by geoffw »

Converting degrees to approximate compass points in a spreadsheet. Has any clever clogs got a formula I can insert in the spreadsheet (Excel) I am using to store my raw Dayfile.txt?
Geoff
Image
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: converting degrees to approximate compass points

Post by daj »

See this topic

https://cumulus.hosiene.co.uk/viewtopic.p ... 214&p=9782

You should be able to work out an Excel formula from the various suggestions
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
Gina
Posts: 1885
Joined: Sat 21 Feb 2009 12:41 pm
Weather Station: Nothing working ATM - making one
Operating System: OS X, Linux Mint, Win7 & XP
Location: Devon UK

Re: converting degrees to approximate compass points

Post by Gina »

The FO type weather station produces an integer for wind direction. I use this code to convert to compass points

Code: Select all

# convert wind direction integer to string
wind_dir_text = [
    'N', 'NNE', 'NE', 'ENE',
    'E', 'ESE', 'SE', 'SSE',
    'S', 'SSW', 'SW', 'WSW',
    'W', 'WNW', 'NW', 'NNW',
    ]
This is basically just a list of strings
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: converting degrees to approximate compass points

Post by daj »

Geoff

Here it is in Excel. I had to wait until I was in the office this morning to write it as I do not have Excel at home

=CHOOSE(INT(MOD(((cell *100) +1125),36000)/2250)+1,"N", "NNE", "NE", "ENE", "E","ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW")

All you need change in the 'cell' reference in Excel

This is based on a 16 point cardinal point compass, which is what Cumulus uses too
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
geoffw
Posts: 540
Joined: Fri 08 May 2009 3:12 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Pembrokeshire West Wales UK
Contact:

Re: converting degrees to approximate compass points

Post by geoffw »

Thanks , Gina & Dave for your responses ........

As I'm a bit 'thick' I'll stick with Daves Excel formula that works fine in my spreadsheet. I wish I had the knowledge and courage to tackle the PHP database to store historic data..... :bash:
Geoff
Image
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: converting degrees to approximate compass points

Post by daj »

Kevin has a really simple solution which works very well. All you need to do is get your dayfile uploaded to your website each day (You can even automate this with 'Toolbox' or other solutions)

https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=2419

When you feel ready we can help you through it
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
geoffw
Posts: 540
Joined: Fri 08 May 2009 3:12 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Pembrokeshire West Wales UK
Contact:

Re: converting degrees to approximate compass points

Post by geoffw »

daj wrote:When you feel ready we can help you through it
Thanks Dave, I appreciate the offer .........
Geoff
Image
Post Reply