Enhanced template features

Discussion about generation of graphs and tables
Post Reply
User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Enhanced template features

Post by admin » Wed Apr 14, 2010 10:20 pm

I added these additional variables to be used in templates (and tables and cvs exports as well):
  • longitude, latitude
  • localtime, utctime
  • uploadlocaltime, uploadutctime
  • unarphasepercentage
  • lunarphasesegment
  • lunaragedays
  • lunarphasetext
  • lunarphaseicondaylengthstandardhours, daylengthcivilhours, daylengthnauticalhours
  • daylengthstandardtime, daylengthciviltime, daylengthnauticaltimesunrisestandardutctime, sunsetstandardutctime, sunrisestandardlocaltime, sunsetstandardlocaltime, sunriseciviltwilightutctime, sunsetciviltwilightutctime, sunriseciviltwilightlocaltime, sunsetciviltwilightlocaltime, sunrisenauticaltwilightutctime, sunsetnauticaltwilightutctime, sunrisenauticaltwilightlocaltime, sunsetnauticaltwilightlocaltime
  • moonriseutctime, moonsetutctime, moonriselocaltime, moonsetlocaltime
You find these introduced here: http://wiki.meteoplug.com/Define_Chart# ... and_Values

Examples of use:
[20100101000000_day1_misc_lunarphasetext]
[actual_day1_misc_sunrisestandardlocaltime]
New variables are defined as properties of a virtual sensor id named "misc". This virtual id does not retrieve data from database but computes results from given information like timestamp, etc.

When new charting engine does show problems with your existing graphs, please report to me and temporarily use "meteochart-v1.cgi" instead of "meteochart.cgi" for displaying graphs. "v1" is the old engine.

skyewright
Posts: 69
Joined: Tue Mar 16, 2010 12:05 pm
Location: Isle of Skye
Contact:

Re: Enhanced template features

Post by skyewright » Thu Apr 15, 2010 9:02 am

admin wrote:I added these additional variables to be used in templates (and tables and cvs exports as well):
That's great. Thank you. :)

Perhaps I have misunderstood something but localtime and utctime always seem to report the "actual" time, regardless of the timestamp used by a variable.

It would be very nice if the variable's own timestamp (including relative timestamp) could be reported, at least for localtime and utctime if not for the rest?
Last edited by skyewright on Thu Apr 15, 2010 1:45 pm, edited 1 time in total.
David

User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Re: Enhanced template features

Post by admin » Thu Apr 15, 2010 9:42 am

utctime, localtime, longitude, latitude do always report actual values regardless of the other given information in the variable. That might be a bit confusing, but I tried to keep all this in one parsing pateern. When more variables show up without relation to time resolutions and time frames, I might introduce a separate variable pattern for this.

There is one more misc variable "timestamp". There should report absolute time stamp that results from resolving relative time stamps. Please give these a try. I also updated the wiki accordingly.

skyewright
Posts: 69
Joined: Tue Mar 16, 2010 12:05 pm
Location: Isle of Skye
Contact:

Re: Enhanced template features

Post by skyewright » Thu Apr 15, 2010 10:08 am

admin wrote:utctime, localtime, longitude, latitude do always report actual values regardless of the other given information in the variable.
I can see the sense in that.
admin wrote:There is one more misc variable "timestamp". There should report absolute time stamp that results from resolving relative time stamps. Please give these a try. I also updated the wiki accordingly.
"timestamp" does exactly what I was looking for. Thank you. :D

PS. I notice that you''ve also added maindirtext and highdirtext for text directions (e.g. N, NW, etc.). Thanks for those too. :)
I've updated my Meteohub to Meteoplug template conversion example to make use of those.
David

Post Reply