It is currently September 21st, 2020, 12:28 pm

AstroCalendar, MultiCalendar and WorldClock

Post your work-in-progress and completed skins to share and discuss.
buckb
Posts: 43
Joined: February 12th, 2018, 12:47 am

AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

AstroCalendar

AstroCalendar is based on Smurfier's "Lua Calendar" and Stone's "Moon II DST" skins. I am grateful that they shared their work.

AstroCalendar has several different modes of operation. In addition to showing "Events" that the user has defined, AstroCalendar can also display:
  • Sunrise and Sunset times and azimuths
  • Solar Noon time and elevation
  • Equinox and Solstice dates
  • Moonrise and Moonset times and azimuths
  • Lunar meridian transit and phase information
  • Lunar primary phase and apogee/perigee information
  • Rises, sets, meridian transits, and position information for the planets and named stars
To configure AstroCalender, edit AstroCalender.ini and set the various "optionXYZ" variables accordingly. There are three groups of configuration variables:
  • variables to configure the display format of the calendar
  • variables to configure the observer's latitude and longitude
  • variables to configure the observer's local time zone
If you set optionManualTimezone=0, the PC's time zone is determined automatically. No other time zone variables need be configured. If you set optionManualTimezone=1, then you can define the local time zone however you wish. Manual time zone configuration, coupled with the appropriate latitude and longitude, causes AstroCalendar to calculate astronomical information as if the PC were located at the given location.

AstroCalendar's Astro.lua dofile is designed to handle the multiple rise/set events that can occur at high latitudes. Configure the skin for "McMurdo Station, Antarctica" or "Alert, Nunavut" and watch how the Sun and Moon appear to observers at those locations.

AstroCalendar has the following controls:
  • Click on the arrows to move the calendar backward or forward one month or year at a time
  • Click on the currently-displayed Month and Year label to return to the current month and year
  • Click on the currently-displayed mode label to cycle to the next calendar mode (starting with "Events")
  • Right-click on the currently-displayed mode label to cycle through submodes of the current mode
  • Click on a day number to open a detailed information panel
  • Click on the detailed information panel to dismiss it
  • Use the "Custom skin actions" menu to choose the object of interest when in "Astro" mode
AstroCalendar.jpg

MultiCalendar

MultiCalendar displays a year of AstroCalendars at once. Handy when you need to see more than just one month at a time. MultiCalendar's controls and displayed information are minor variations on the controls for AstroCalendar. AstroCalendar will activate MultiCalendar if you double-click on AstroCalendar's currently-displayed Month and Year label, though you may need to edit MultiCalendar's config name in the AstroCalendar.ini.
MultiCalendar.jpg

WorldClock

Finally, I have included a WorldClock skin with two variants. This skin demonstrates how to use the Timezone.lua dofile to manage multiple local time zones. The variant that shows a day/night icon uses the Astro.lua dofile from AstroCalendar to calculate sunrise and sunset times for the specified location. Note that Astro.lua is overkill for simple sunrise/sunset at lower latitudes.
WorldClock.jpg

At this time, I know of one limitation in AstroCalendar. On days when Daylight Saving Time begins or ends, rise and set events that happen in the early hours before the time changes will be incorrect. This is because Astro.lua assumes that the time zone offset for a given day is the same all day long. This assumption is incorrect on the DST transition days.


--buckb
You do not have the required permissions to view the files attached to this post.
Last edited by buckb on September 7th, 2020, 4:38 pm, edited 2 times in total.
buckb
Posts: 43
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

I forgot to mention that the astronomical calculations performed by AstroCalendar are implemented in a series of Lua dofiles. The dofiles have been written to be self-contained, with no external dependencies. Integration into other skins should be relatively easy.

Each dofile has a few comments at the beginning describing the function(s) available. Refer to Calendar.lua for example use of the these functions.


--buckb
User avatar
CyberTheWorm
Posts: 728
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: AstroCalendar, MultiCalendar and WorldClock

Post by CyberTheWorm »

Nice job, I was starting to make a skin for astronomy. I only got as far as the Julian Date
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: AstroCalendar, MultiCalendar and WorldClock

Post by eclectic-tech »

Very nice work buckb :thumbup: Thanks for sharing! :rosegift:

:17readbook I will definitely look into using your dofiles in some of my future skins (with proper credit for sharing these!) :great:
buckb
Posts: 43
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

eclectic-tech wrote: :17readbook I will definitely look into using your dofiles in some of my future skins (with proper credit for sharing these!) :great:
I hope you find something useful. I'd be happy to help if you have any questions or find any bugs.


--buckb
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

A while ago I also wrote a somehow similar calendar skin and due to this, I'd like to make a few comments / have a few questions:
  • How do I add an event (Astro calendar and MultiCalendar)? I mean I'd like to add an event for (let's say) May 15. How do I do this?
  • Also, how do I add / change a setting in the WorldClock skin? For example I'd like to change the time of Pago Pago with something else. Is it possible?
  • There would be a good idea to have a setting to can easily start the week on Monday (again both Calendar skins). Each user could make his own setting, after his preferences (in many countries / languages, the week starts on Monday).
  • Would be great to unify the three configs into one single. Some resources are used by all three. There is no need to have those files three times in three different configs.
  • Also would be a good idea to use the usualy folder structure in building of the configs (eg adding the @Resources folder). Lately this is almost a requirement in building skins.
  • The bets thing, which I appreciate most is the fact that the needed calculations are made locally (if I'm not wrong). Many skins I saw before downloaded the information from internet, very few calculates locally those info. :17good :17good :17good Congratulations therefore!!!
buckb
Posts: 43
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

balala wrote:A while ago I also wrote a somehow similar calendar skin and due to this, I'd like to make a few comments / have a few questions:]
Hi balala. Thanks for the comments. The skins I have posted do not have configuration user interfaces. Instead, users must edit the .ini files directly. This is by design on my part. I develop skins for my own use and so don't need a user-friendly configuration mechanism. But I also want to give back to the community, so I still post what I have developed in case someone might find something of use. I guess I am targeting other skin developers more than end users.
How do I add an event (Astro calendar and MultiCalendar)? I mean I'd like to add an event for (let's say) May 15. How do I do this?
Look in the "eventfiles" subdirectory. Edit the .xml files found there. The format is mostly as Smurfier developed for the Lua Calendar skin, but is missing many of Lua Calendar's more advanced event options.
Also, how do I add / change a setting in the WorldClock skin? For example I'd like to change the time of Pago Pago with something else. Is it possible?
Yes, you can change the locations used by WorldClock1 and WorldClock2. As mentioned above, I have no configuration UIs, so you must edit the .ini files directly. WorldClock2 has all the clock configurations declared up front in the [Variables] section. WorldClock1 has the clock configurations inline with the Measure declarations. Less friendly, but more obvious as to how the Lua scripts work.
There would be a good idea to have a setting to can easily start the week on Monday (again both Calendar skins). Each user could make his own setting, after his preferences (in many countries / languages, the week starts on Monday).
Edit Calendar.ini or MultiCalendar.ini and set scriptStartOnMondays=1. As with much of the "Events" mode, this option and code is based on Smurfier's Lua Calendar options and code.
Would be great to unify the three configs into one single. Some resources are used by all three. There is no need to have those files three times in three different configs.
You are right about the redundant script files and configuration. However, I felt standalone skins would make it easier for someone else to see what is going on and grab something of interest.
Also would be a good idea to use the usualy folder structure in building of the configs (eg adding the @Resources folder). Lately this is almost a requirement in building skins.
Yeah, that's just me being obstinate. I prefer the flatter folder structure. It saves me an entire mouse click!
The bets thing, which I appreciate most is the fact that the needed calculations are made locally (if I'm not wrong). Many skins I saw before downloaded the information from internet, very few calculates locally those info.
Yes, all calculations are done locally. The Lua files that implement the calculations contain comments regarding the origination of the code and/or algorithms.


--buckb
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

buckb wrote:Hi balala. Thanks for the comments. The skins I have posted do not have configuration user interfaces. Instead, users must edit the .ini files directly. This is by design on my part. I develop skins for my own use and so don't need a user-friendly configuration mechanism. But I also want to give back to the community, so I still post what I have developed in case someone might find something of use. I guess I am targeting other skin developers more than end users.


Look in the "eventfiles" subdirectory. Edit the .xml files found there.
Yep, I found this solution. But I thought of a settings skin. Now I understood why there is no a such skin / tool.
buckb wrote:Yes, you can change the locations used by WorldClock1 and WorldClock2. As mentioned above, I have no configuration UIs, so you must edit the .ini files directly. WorldClock2 has all the clock configurations declared up front in the [Variables] section. WorldClock1 has the clock configurations inline with the Measure declarations. Less friendly, but more obvious as to how the Lua scripts work.
Yep, I succeeded editing the needed variables, but I still think it would be a good idea to include a .inc file with the needed variables. This way the two skins could use the same variables in common and the settings / editings should have to be made just once.
buckb wrote:Edit Calendar.ini or MultiCalendar.ini and set scriptStartOnMondays=1. As with much of the "Events" mode, this option and code is based on Smurfier's Lua Calendar options and code.
Very good! I didn't figure this out by myself, but it definitely work.
buckb wrote:You are right about the redundant script files and configuration. However, I felt standalone skins would make it easier for someone else to see what is going on and grab something of interest.
No more comments here. This is your decision, as the author of the skins.
buckb wrote:Yeah, that's just me being obstinate. I prefer the flatter folder structure. It saves me an entire mouse click!
Right, again, this is your decision.
buckb wrote:Yes, all calculations are done locally. The Lua files that implement the calculations contain comments regarding the origination of the code and/or algorithms.
Yes, as I said, this is the best, in my opinion. I always prefer the local calculations, against downloading them.

Congratulations again, this skin(s) are great, as same as your previous "An Orrery for Rainmeter", which I also appreciated much.
buckb
Posts: 43
Joined: February 12th, 2018, 12:47 am

Re: AstroCalendar, MultiCalendar and WorldClock

Post by buckb »

balala wrote:Yep, I succeeded editing the needed variables, but I still think it would be a good idea to include a .inc file with the needed variables. This way the two skins could use the same variables in common and the settings / editings should have to be made just once.
Good suggestion. Thanks.



--buckb
User avatar
balala
Rainmeter Sage
Posts: 11372
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: AstroCalendar, MultiCalendar and WorldClock

Post by balala »

Usually seem a good idea if you have two or more skins into a single config, to create a file and include it into all skins, where the settings used in common by the skins would be saved. This way all the skins would work with the same shared settings. Eg the skins of the WorldClock config could have the same locations set up.