Convert Wind direction in degrees to Cardinal points

Is it a ui node?? I assumed that it wasn't looking at the repo.

The readme suggests that subsets are optional.

Apologies all round. I naturally assumed as Bart is Mr SVG that he was going the whole hog ! Yes. Looks fine as is

Oh my god, I got a heart attack this morning. Was thinking: had Garry requested a ui node, and is my english that bad :joy:

For the 4 main directions it is no problem, but for all other intermediate ones... I have ever never used those in Dutch ...

Should I perhaps change the default value of the dropdown, i.e. not all by default?

I have added another option, to select the conversion direction: from degree to cardinal (which is the default) or the other way around. The label is automatically updated, unless you specify a name in the node.

demo_cardinal

P.S. I have not added migration logic, so if you have already an existing node in your flow then this new "Direction" field will be empty. No use to add that for one or two test users...

Today working in the garden. See you later!

1 Like

Here is one :slight_smile:
No, in French West is Ouest and the abbreviation being O (W will not be understood by non english speakers). Luckily the other cardinals start with the same letter.

GV

Hi @greengolfer,
Thanks. If you would have interest to translate the table on my readme page (both colums), the I could create a french translation file...

| Nom    | LĆ©gende                |
| ------ | ---------------------- |
| N      | nord                   |
| N1/4E  | nord-quart-est         |
| NNE    | nord-nord-est          |
| NE1/4N | nord-est-quart-nord    |
| NE     | nord-est               |
| NE1/4E | nord-est-quart-est     |
| ENE    | est-nord-est           |
| E1/4N  | est-quart-nord         |
| E      | est                    |
| E1/4S  | est-quart-sud          |
| ESE    | est-sud-est            |
| SE1/4E | sud-est-quart-est      |
| SE     | sud-est                |
| SE1/4S | sud-est-quart-sud      |
| SSE    | sud-sud-est            |
| S1/4E  | sud-quart-est          |
| S      | sud                    |
| S1/4O  | sud-quart-ouest        |
| SSO    | sud-sud-ouest          |
| SO1/4S | sud-ouest-quart-sud    |
| SO     | sud-ouest              |
| SO1/4O | sud-ouest-quart-ouest  |
| OSO    | ouest-sud-ouest        |
| O1/4S  | ouest-quart-sud        |
| O      | ouest                  |
| O1/4s  | ouest-quart-nord       |
| ONO    | ouest-nord-ouest       |
| NO1/4O | nord-ouest-quart-ouest |
| NO     | nord-ouest             |
| NO1/4N | nord-ouest-quart-nord  |
| NNO    | nord-nord-ouest        |
| N1/4O  | nord-quart-ouest       |

Here you go. Not sure how you want it in github.
BTW, I also work in weather, and I have never heard of NbE. I found on wikipedia that in French it is "quart" (1/4) but it is never used AFAIK...

GV

1 Like

Thank you very much!!! I will add it to github...

I have never used this weather stuff before. Just developed this node to assist some users in this discussion ...
When I look on wikipedia the NBE means "north by east". In french that would correspond to "nord-quart-est", so I would expect NQE (instead of N1/4E)? And if the N1/4E in french is correct, theN I would expect the english version to be N1/4E also?

well the docs seems to say the English is NbE - but as I said I don't think anyone ever uses that... 16 points is enough.

I hate to be overly pedantic (my wife is laughing hysterically as I type this), but there are some issues of terminology here. (I can only speak to US/UK usage.) The only directions that are "cardinal" are N, S, E, and W, so the name of the node is not quite right, but I can't think of anything better. The conversions probably should be described as "degree to compass point" and "compass point to degree". Perhaps shorten "compass point" to "point" in the label.

The terms used for sets of compass points are a bit scrambled.
As noted, the cardinal directions are N, S, E, and W.
NE, SE, SW and NW are the inter-cardinals or ordinals.
The four cardinal directions plus the four inter-cardinals comprise the eight principal directions.
NNE, ENE, ESE, SSE, SSW, WSW, WNW, and NNW are inter-ordinal or secondary directions.
The eight principal directions plus the eight secondary directions comprise the usual 16-point compass rose.
So, the filters should be named accordingly, and it might help to note the number of compass points in each set:
"Full" is OK but could be Complete (32)
"Basic" should be Cardinal (4)
"Ordinal" should be Principal (8)
"Intercardinal" should be Principal + Secondary (16)

Not if you're asked to "box the compass." :sweat:

Hi Mike,
nice to see you are joining their discussion.

I have reused all the terminology from the cardinal-direction library, that I'm using under the cover. But your proposals make sense to me! But I wrote this node for all the blokes above, so they have to decide. Moreover I'm not native english speaking, so I'm not in a position to doubt about this. I write everything in English, to make sure that the english speaking people can sit back and relax :wink:

BTW These kind of sentences are always difficult to understand, and Google Translate always fails to give a decent translation. So not sure what you mean ...

I have rewritten my code yesterday evening (local version not on Github) to have only 16 points, so it is now much easier for people to send me translations for their own language. Is this a hypothetical case you are talking about? If the 16 points are enough (in real life cases), then I would like to keep it like that...

Agreed !! It is rather unlikely that we will be using nodered to pilot a submarine where the 32 directions might be useful. For "normal life" situation, 16 is, I think sufficient. It will also make the life of the translators much easier :slight_smile:

GV

1 Like

According to wikipedia (N. Ā¼ N. E. ā€” Wiktionnaire, le dictionnaire libre) it is really 1/4 (and not q) in French at least... But, as I said I don't really know. However, considering the follow up on the thread, I assume it is not really an issue any more.

GV

Let's hope so :wink:
Thanks for sharing your insights! It becomes easier to develop something, when you get feedback from people using it in real life ...

Only 16 points??...and I was so looking forward to using half & quarter points :rofl: :rofl:

Cue jokes about the ancient mariner....

2 Likes

Thanks, Bart. The time difference (and other events) can make it difficult to stay engaged.

I failed to look at the source code, so missed the fact that you were using this library. I'm sure the calculation is fine, but the terminology is wrong. The reference from @Paul-Reed is better, as is the Wikipedia article on points of the compass.

Sorry, it was just an aside to @dceejay, possibly an ancient mariner joke. Somehow, I assumed he is a recreational sailor or at least lives close enough to the coast to have heard the phrase. "Boxing the compass" is a part of traditional maritime training, where the sailor is asked to recite the points of the compass, generally 32 but sometimes 128, usually in clockwise order but sometimes in both directions. It's the only use I've made of half and quarter points in over 60 years of hanging around the water.

1 Like

Indeed. They no longer teach it at the UK naval academy, so I think itā€™s old enough for academic interest only.

Also if someone ever did do an SVG version for the UI I wouldnā€™t want it too crowded with points so that ir was still readable, and consistent with this node.

2 Likes

I passed my German Coastal waters boating licence many years ago, 16 points of the compass would not have been enough to pass the navigation part of the exam :slight_smile: