rdmtc / node-red-contrib-sun-position

This is a ultimate Node-Red Timer, Sun, Moon and Blind flow control.
Apache License 2.0
106 stars 25 forks source link

Introduce alternative azimuth coordinate system #430

Open nikipore opened 2 years ago

nikipore commented 2 years ago

Is your feature request related to a problem? Please describe. The layout of a typical house is rectangular, and the windows are recessed equidistantly from the facade. In this common setup, the parameterization of the many windows of a house by means of start azimuth and end azimuth is somewhat tedious.

Describe the solution you'd like In a house with rectangular layout, all windows – or at least subsets of windows – share the same

aperture angle = end azimuth – start azimuth

and the normal angles of all windows may be written as

heading = 90° n + global offset (n = 0, 1, 2, 3) 

Thus, I propose an alternative set of coordinates 0° <= heading, aperture < 360°, where

heading = (start azimuth + end azimuth) / 2

is the azimuth of the window's normal and

aperture = end azimuth – start azimuth

This would make a lot of calculations superfluous, in particular when tweaking the windows' apertures and the

global offset = azimuth of the "house's north"

It would also be nice (but I would be fine without this option) to be able to write heading as above, i.e. as -45° <= global offset < 45° and a heading = (N|E|S|W).

Describe alternatives you've considered Live with what we have now. It's tedious but it works.

Additional context N/A

nikipore commented 2 years ago

P.S. The parameterization (heading, left offset, right offset) used in node-red-contrib-blindcontroller is also fine.

Hypnos3 commented 2 years ago

Sorry, this take some time for implementation.

Your alternative coordinate system seems unnecessarily complicated to me, making it difficult for other users to understand.

My approach now would be the following (sorry for mixing german/english screenshots): having a select box, there the way how the start/end should be definable could be selectable. The Default will be the current behavior - this is needed for backward compatibility, because lot of users using the current settings: image

But you can switch to a parameterization (heading, left offset, right offset) like it is used in the node-red-contrib-blindcontroller node: image

Additionally you are able to configure custom angles in the configuration node: image

These user-defined angles can then be used instead of entering the number directly: image

image

image

This will be available in the next beta version, but it may take some time before it is released.

nikipore commented 2 years ago

Looks great. Predefined orientation angles plus offsets are a good solution. This will facilitate calibration quite a bit.