Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    Sun position plugin

    Windy Plugins
    16
    45
    9819
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jacobsjo
      jacobsjo Photographer | Premium last edited by jacobsjo

      Hello,

      this is a plugin plugin that gives shows sun and moon position on the map and gives details about sunset and sunrise times as well as other sun and moon details. It is called windy-plugin-sun-position. To use the plugin on mobile, go directly to www.windy.com/plugins to open the plugin page (does not work in the app)

      Version 0.3.0 adds moon details and options to disable astronomical details or blue/golden hour times

      To open the display, right-click on the map (or tap and hold on mobile), then select "Sun Position". Then open a weather picker to see the sun dial and the details on the left.

      Dial

      The dial displays the current sun and moon azimuth on the map using a black line from the picker position. Additionally, dashed lines show the azimuth of sunrise and sunset and dotted lines show the azimuth of moonrise and moonset. Clicking on the sunrise, sunset, moonrise and moonset lines will set the current time to the respective time.

      Sun dial

      Detail pane

      The detail pane on the left shows the time of astronomical, nautical, and civil dusk and dawn; start and end of blue and golden hour and solar noon. Moonrise and moonset times are also added to the timeline. Below, a diagram of the sun and moon altitudes over time is displayed. Below that, details about the current sun and moon position are shown.

      On the top of the detail pane it is possible to enable and disable individual displays. The telescope toggles visibility of astronomical sun details (astronomical and nautical dawn and dusk). The camera toggles visibility of blue and golden hour times. The moon toggles visibility of moon details.

      Sun detail pane

      Changelog

      V0.1.0

      Original release

      V0.1.1

      Fixed timezone issues:

      • Displays times in timezone of position selected (instead of local timezone of user)
      • When Windy setting to display all times in UTC is selected, displays all times in UTC

      V0.2.0

      • The hook has been changed from the Overlay layers menu to the context-menu.
      • Displays only times that exist: If the sun does not go far enough below the horizon, astronomical dawn and dusk might not exist and the entire night is astronomical twilight. In this (and more extreme) cases the non-existent times are hidden
      • The plugin now works on mobile (thanks @rittels for the help)
      • Fixed some delay issues that resulted from the timezone-lookup

      V0.3.0

      • reworked detail phase
      • included details about the moon
      • fixed blue hour times
      • redesigned current sun position display
      • added options to disable moon, astronomical details and photography details separately
      • added footnote with links to plugin pages

      V0.3.1

      • desktop sidebar hotfix (broken by change on windy)

      V0.3.2

      • fixed plugin loading issue (broken by change on windy)
      • changed timezone lookup to tz-lookup package
      • added query string

      V0.3.3

      • fixed plugin loading issue (broken by change on windy)

      V0.3.4

      • fixed issue finding location (broken by change on windy)
      M gortahork 2 Replies Last reply Reply Quote 15
      • jmh2002
        jmh2002 Moderator Mariners - Seafarers Sailor last edited by

        Oh, nice, thank you :) I'll be giving this a try.

        WINDY is everywhere :)

        1 Reply Last reply Reply Quote 1
        • S
          stitch Meteorologist | Premium last edited by

          @jacobjo said in Sun position plugin:

          windy-plugin-sun-position

          Hi Jacob,

          Am I right is saying the times related to the solar time bar (on the left) are based on local computer time?

          Could you include an input option to set a Universal Time Coord (UTC) ie, for Sydney Aust +10, which will then convert all times to UTC in the solar time bar.
          This would then allow me to move the cursor around the world and attain the relevant solar rise/set times in UTC time as opposed to the local (computer time).

          Otherwise, handy plugin....thx.

          jacobsjo 1 Reply Last reply Reply Quote 0
          • S
            stitch Meteorologist | Premium last edited by

            just following up on my post above with an example below

            solar.jpg

            1 Reply Last reply Reply Quote 0
            • jacobsjo
              jacobsjo Photographer @stitch | Premium last edited by

              Hi @stitch ,

              I have just published a new version (v0.1.1) that fixes this problem. Now, times are displayed in the timezone of the position selected. If you want to see the times in UTC, you need to enable the "Display all times in UTC" option (zuluMode) in the windy settings.

              Jochen

              rittels 1 Reply Last reply Reply Quote 4
              • rittels
                rittels Code contributor @jacobsjo | Premium last edited by rittels

                @jacobjo

                Very cool plugin!!

                for mobile: hook to "contextmenu" //menu doesnt work????
                and remove class "plugin-mobile-fullscreen" from config.js. //you then have the left pane and not full screen.
                or you can use your own class for mobile: classNameMobile: 'this-is-other-class'

                jacobsjo 1 Reply Last reply Reply Quote 2
                • ivo
                  ivo Administrator last edited by

                  THIS ROCKS THANK YOU

                  1 Reply Last reply Reply Quote 1
                  • jacobsjo
                    jacobsjo Photographer @rittels | Premium last edited by

                    @rittels I am not sure how plugins work on mobile. I do not even find the place where you load plugins!? If I directly enter windy.com/plugins into the address bar, I can load the plugin (and also via windy.com/dev), but I can't find the hook in the menu on the right... If I use the contextmenu hook, it does work on mobile but I would prefer to keep it in the menu.

                    Also, without the "plugin-mobile-fullscreen" the left pane is too large for mobile (having the picker behind the pane). Ideally, I would like to be able to open and close the full-screen page from the script. Is this possible?

                    rittels 1 Reply Last reply Reply Quote 0
                    • rittels
                      rittels Code contributor @jacobsjo | Premium last edited by

                      @jacobjo

                      Unfortunately, the contextmenu seems to be the only way to open the plugin on mobile.

                      It is possible to:

                      this.open()
                      this.close()
                      

                      You can style the mobile plugin content so that the upper half of the screen is open, to see the picker. Picker is fixed on mobile at 180px. so maybe:

                      .my-mobile-plugin-div{
                         position:absolute;
                         top:220px;
                         bottom:0px;
                         width:100% !important;
                      }
                      

                      hope it helps.

                      1 Reply Last reply Reply Quote 2
                      • jacobsjo
                        jacobsjo Photographer | Premium last edited by

                        I have just released version 0.2.0 of the plugin. It hides the times that do not exist in the detail pane and now supports the mobile page (see changelog in the post on top). To facilitate mobile usage the hook to access the plugin has changed from the Overlay menu to the context menu. Simply right-click the map (or tap and hold on mobile) and click on "Sun Position" to open the plugin

                        1 Reply Last reply Reply Quote 2
                        • M
                          marco 1v @jacobsjo last edited by

                          @jacobjo

                          Hello

                          The plugin on my phone doesn’t work because when I download it it says it’s still on the version 0.1.0

                          jacobsjo 1 Reply Last reply Reply Quote 0
                          • jacobsjo
                            jacobsjo Photographer @marco 1v | Premium last edited by

                            @marco-1v Ehm, I am not sure how that could happen. Maybe some caching problem? That seems to be more of a bug inside windy. Try to specify the version by entering windy-plugin-sun-position@0.2.0 as the plugin name

                            Besides that, I have made a mistake such that is shows that it is on version 0.1.1 while it is actually on version 0.2.0 (and 0.1.0 if it is actually on version 0.1.1).

                            1 Reply Last reply Reply Quote 1
                            • jacobsjo
                              jacobsjo Photographer | Premium last edited by

                              I have just released version 0.3.0 of the plugin! This update adds details about the moon position. The moon position is shown on the map similar to the sun position. Additional dotted lines show the moonrise and moonset directions. The detail pane also includes the moonrise and moonset times and some details about the current position of the moon. The moon display can be hidden by clicking the moon button the top of the details pane.

                              Furthermore, I have added options to hide some sun details, grouped by Astronomical and Photography. Astronomical shows astronomical, nautical and civil twilight times and Photography shows blue and golden hour times. Both groups can be enabled together, showing all times as before the update (nautical twilight was wrongly labeled blue hour before the update, while blue hour really is part of the civil twilight).

                              1 Reply Last reply Reply Quote 3
                              • jacobsjo
                                jacobsjo Photographer | Premium last edited by

                                I've just released version 0.3.1 to fix the sidebar issue caused by windy changes.

                                Gkikas LGPZ 1 Reply Last reply Reply Quote 3
                                • Gkikas LGPZ
                                  Gkikas LGPZ Moderator @jacobsjo last edited by

                                  @jacobsjo
                                  A question: at noon I see the azimuth at zero degrees. Is it correct?

                                  73b353e6-5c31-4e0c-aafd-20adba3ad241-εικόνα.png

                                  I thought the azimuth defined as
                                  a horizontal angle measured clockwise from the north
                                  not from the local meridian.

                                  Gkikas LGPZ idefix37 2 Replies Last reply Reply Quote 1
                                  • Gkikas LGPZ
                                    Gkikas LGPZ Moderator @Gkikas LGPZ last edited by

                                    ... a second thought ... are you in the southern hemisphere?

                                    1 Reply Last reply Reply Quote 0
                                    • idefix37
                                      idefix37 Sailor Moderator @Gkikas LGPZ last edited by idefix37

                                      @Gkikas-LGPZ
                                      It could be because in Astronomy the azimuth may refer to the South, instead of North (but I am not an astronomy specialist). The South reference was used in former times, but today this is not clear because sometime it refers to North and sometime still to South....
                                      https://en.m.wikipedia.org/wiki/Azimuth
                                      -See Astronomy section-
                                      With this plugin if you take a point far in south hemisphere at near 12:00Z, you see the azimuth of the sun close to 180°. It varies from 180° to -180°, not from 0° to 360°, as shown in this example (-172°):
                                      https://community.windy.com/topic/9017/sun-position-plugin/5
                                      So it’s different from what is used in navigation technic.

                                      Gkikas LGPZ 1 Reply Last reply Reply Quote 1
                                      • Gkikas LGPZ
                                        Gkikas LGPZ Moderator @idefix37 last edited by

                                        @idefix37 I think this makes things clearer
                                        https://en.wikipedia.org/wiki/Solar_azimuth_angle

                                        idefix37 1 Reply Last reply Reply Quote 1
                                        • idefix37
                                          idefix37 Sailor Moderator @Gkikas LGPZ last edited by idefix37

                                          @Gkikas-LGPZ
                                          This is the best link that explains this convention.
                                          BTW in traditional astronavigation or celestial navigation, the solar azimuth is measured from the north...

                                          1 Reply Last reply Reply Quote 1
                                          • O
                                            Oilyan last edited by

                                            Dear jacobsjo,
                                            I am trying to install sun position plugin, but despite it says that plugin was installed, it does not appear menu. i tried it on my laptop (windows) and iPhone. Do you have an idea what might be the problem?
                                            Thanks!
                                            Olga

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
                                            NodeBB & contributors, OSM & contributors, HERE maps
                                            Terms and Conditions     Privacy Policy