Author Topic: Sum/Moon Graphic  (Read 5734 times)

0 Members and 2 Guests are viewing this topic.

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 222
    • Weather Doc's Weather
Re: Sum/Moon Graphic
« Reply #75 on: September 01, 2024, 10:03:47 AM »
I didn't know WD had any impact on the astronomy page. I'll have to look into WD settings, I guess. I had been trying to change WD setting back to the way I had them before I moved from VA, but the .ini and/or reg got messed up and I've not been successful fixing it [yet].

Offline tman1991

  • Member
  • *
  • Posts: 48
    • http://frogville.us
Re: Sum/Moon Graphic
« Reply #76 on: September 01, 2024, 11:50:19 AM »
I believe thats from WD - Web Files/Web Page Setup/Web Files Setup #1/ tick the "upload extra moon details".


https://frogville.us/wxastronomy.php


Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 222
    • Weather Doc's Weather
Re: Sum/Moon Graphic
« Reply #77 on: September 01, 2024, 01:09:00 PM »
Yeah, I checked - it's unticked and the uploads were and are off, yet it keeps uploading a new moonicon.gif. Guess I'll have to dig into it more when I have time.

Offline zeppline

  • Senior Member
  • **
  • Posts: 85
    • Las Vegas Weather Guy
Re: Sum/Moon Graphic
« Reply #78 on: September 01, 2024, 01:10:58 PM »
I found the problem there is a line in settings, ($jploc = './jpgraph-4.4.2-src-only/';  // relative location of jpgraph library) that I had to change from 4.4.1 to the new jpgraph location. Is running OK.  Thanks for your help. Joe


Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 222
    • Weather Doc's Weather
Re: Sum/Moon Graphic
« Reply #79 on: September 01, 2024, 01:58:00 PM »

I think that you changed the Data font/color from yellow on black to black on white and that's causing WD to use a white surround on the moon image.

Is that Data font/color changed in WD?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #80 on: September 01, 2024, 04:29:08 PM »
I don't know.  I didn't find that screen in WD.. how did you open that tab??

I based my opinion on the view for your moondetail1.gif which shows white background and black text.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 222
    • Weather Doc's Weather
Re: Sum/Moon Graphic
« Reply #81 on: September 02, 2024, 10:24:18 AM »
I don't know.  I didn't find that screen in WD.. how did you open that tab??

I based my opinion on the view for your moondetail1.gif which shows white background and black text.

That was a screen capture from https://wxdoc.info/wxastronomy.php.

In WD it seems to be created via Control Panel → Internet File Creation & Uploads → File #31 Extra Moon Details. Then click "Set" that opens the window below.

 [ You are not allowed to view attachments ]

You can see that moon detail graphic in the upper right side of the window - I don't know how or where it is generated. Also the "Use these setting" switch is "Off".

And the Extra moon details and Moon icon files shouldn't be created nor uploaded since they have red dots:

 [ You are not allowed to view attachments ]

I don't know how or why WD keeps uploading these three image files.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #82 on: September 02, 2024, 11:10:27 AM »
Thanks.

Here's what mine show:

 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #83 on: September 02, 2024, 01:57:23 PM »
Here's a brief in-flight progress report on an upcoming 3.60 release of sunposa.php:
1) it supports display of southern hemisphere locations and Alaska/Hawaii (by remapping 0..360 Azimuth to -180..+180 for the JPGraph requirement that only ascending X values be used, and switching from Line to ScatterPlot graphs)
2) incorporates test locations around the world with displays of what is being used (so it's easier for me to debug)
3) external programs to gather USNO sun/moon for the day and the Jun 21, Sep 21 and Dec 21 official values to compare with what the sunposa generates via calculations.
4) configurable max Elevation and default color for the legends

So the problem I'm debugging right now is the Solstice and Equinox calcs v.s. USNO .. the calcs aren't even close (and at some time offsets even when close), so using (3) above to grind through that issue.  When it's resolved, I'll issue a 3.60 version on GitHub.

Happy Labor Day (to all who celebrate).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sum/Moon Graphic
« Reply #84 on: September 02, 2024, 02:09:25 PM »
You're a glutton for punishment, Ken. . . Happy Labor Day, indeed  [tup]

On the subject of southern hemisphere I did notice that /moonimg contains NH-moon00.gif to NH-moon28.gif, but SH only goes up to SH-moon27.gif  :?
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #85 on: September 02, 2024, 02:43:51 PM »
Forgot to add.. auditing the moonimg graphics is also on the list.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sun/Moon Graphic
« Reply #86 on: September 02, 2024, 07:20:48 PM »
Have to admit it's difficult to show detail in a 50px image. . .  ;)

Would an svg be any better?
« Last Edit: September 02, 2024, 07:24:43 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Online Conchobair

  • Member
  • *
  • Posts: 30
  • www.midkerry-weather.com
    • MidKerry Weather
Re: Sum/Moon Graphic
« Reply #87 on: September 03, 2024, 01:57:23 AM »
Many thanks for these scripts, they add some great extras to our web sites...  Ive noticed on mine that i appear to be missing the text part  http://www.midkerry-weather.com/wxastronomy.php

Everything seems to be there when i do the debug

Code: [Select]
sunposa.php Version 3.50 - 28-Aug-2024
..debug=y debugging output for sunposa.php.  PHP version 8.0.26

  Status of needed built-in PHP functions:
  function 'imagecreatefrompng()'  is available
  function 'imagecreatefromgif()'  is available
  function 'imagecreatetruecolor()'  is available
  function 'imagecolortransparent()'  is available
  function 'imagettfbbox()'  is available
  function 'imagettftext()'  is available
  function 'gregoriantojd()'  is available
  function 'curl_init()'  is available
  function 'curl_setopt()'  is available
  function 'curl_exec()'  is available
  function 'curl_error()'  is available
  function 'curl_getinfo()'  is available
  function 'curl_close()'  is available

  Settings used:  lat='52.10635', lon='-9.89714', tz='Europe/Dublin', cacheFileDir='./cache/'
  jpgraph location='./jpgraph-4.4.2-src-only/'
  Using internal calculations for moon data.
  moon image cache './cache/jpmoon.png exists. Updated 2024-09-03 06:55:08
  sun  image NASA  './cache/tempImg.gif exists.  Updated 2024-09-03 06:55:08
  sun  image cache './cache/jpsun.png exists.  Updated 2024-09-03 06:55:08

  GD Library is available and has these capabilities:
    GD Version: bundled (2.1.0 compatible)
    FreeType Support: true
    FreeType Linkage: with freetype
    GIF Read Support: true
    GIF Create Support: true
    JPEG Support: true
    PNG Support: true
    WBMP Support: true
    XPM Support: true
    XBM Support: true
    WebP Support: true
    BMP Support: true
    TGA Read Support: true
    JIS-mapped Japanese Font Support: false

Just missing the additional text bit below the picture

Offline griffo42

  • Contributor
  • ***
  • Posts: 106
    • Carina Weather
Re: Sun/Moon Graphic
« Reply #88 on: September 03, 2024, 03:38:47 AM »
If it helps in the process for sorting out southern hemisphere issues, the times for sun and moon daily events shown on my site: kstwx.net/index.php -->Almanac -->Sun/Moon Almanac match up with the data on timeanddate.com.
https://www.kstwx.net/index.php
Davis Vantage Pro2 Model #6152AU
CumulusMX latest version
Saratoga Weather World template Cumulus plugin
Carina Weather, Brisbane.

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sum/Moon Graphic
« Reply #89 on: September 03, 2024, 06:07:44 AM »
Just missing the additional text bit below the picture

That's only produced by Weather Display.
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Online Conchobair

  • Member
  • *
  • Posts: 30
  • www.midkerry-weather.com
    • MidKerry Weather
Re: Sum/Moon Graphic
« Reply #90 on: September 03, 2024, 06:17:40 AM »
 [tup] ah that would explain it then

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sum/Moon Graphic
« Reply #91 on: September 03, 2024, 06:28:52 AM »
When it's resolved, I'll issue a 3.60 version on GitHub.

Trivial suggestion: spell out "Sun azimuth", as is done with Sun and Moon "elevation"?
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #92 on: September 03, 2024, 11:17:46 AM »
Suggestion noted.. Only English uses the 'Sun AZ' abbreviation .. all other languages use the long format.
I'll add it to the list...

I've been off on a 'side quest' to get better moonimg images.  Here's what I've done so far:

I grabbed images from NASA for a full month of views at 3 hour intervals in a mp4 file.
Source URL for the MP4 file:

  https://svs.gsfc.nasa.gov/4310/

Credit: NASA's Scientific Visualization Studio
Visualizer: Ernie Wright (USRA)

It was downloaded as media1.mp4, then processed by

   https://mp4-to-gif.utils.com/

to create an animated GIF, then the animated GIF was processed by

  https://ezgif.com/split

to extract the individual 1920x1080 frames as separate images.

The images were renamed from 'frame_nnn_delay-m.mms.gif' to 'moon_nnn.gif'
where 'nnn' is the frame number.

Per NASA docs:
  This short looping animation shows a complete cycle of lunar phases.
  The view is geocentric, lunar north up.
  The frames are at intervals of 3 hours, with a total length of 236 frames representing a synodic month of 29.5 days.
  To find the frame number corresponding to a particular age in days, use the formula

  frame number = ( days × 8 ) + 1

Then using that formula, days=0..29 images were selected and reprocessed by PHP GD to produce the ,/moonimg/
50x50 transparent gif images (using gen-moon-images.php)

Note: the Southern Hemisphere images were created by rotating the Northern Hemisphere images by 180 degrees.
See https://earthsky.org/moon-phases/do-we-all-see-the-same-moon-phase/ for why this works.

The comparison of the old v.s. new images is attached.

As an aside, I noticed the original Bashewa moon images were based on the Southern Hemisphere moon view for the Northern Hemisphere and rotated for the Southern Hemisphere.  The NASA source images are all Northern Hemisphere.

I'll release the updated images with the 3.60 release.

Wrapping up the side quest.. now back to debugging the solstice/equinox graphs.

« Last Edit: September 03, 2024, 11:51:58 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sum/Moon Graphic
« Reply #93 on: September 03, 2024, 11:31:23 AM »
The comparison of the old v.s. new images is attached.

Wow!
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #94 on: September 03, 2024, 11:56:21 AM »
Ok, y'all can play with the new images if you like.  Unpack the attached into your moonimg/ directory and upload for a completely new set.
Too bad that today is New Moon.. so what you'll see is the black circle.. have to wait a few days to see the crescent start.
« Last Edit: September 03, 2024, 11:59:25 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline broadstairs

  • Forecaster
  • *****
  • Posts: 929
Re: Sum/Moon Graphic
« Reply #95 on: September 03, 2024, 12:40:42 PM »
Ok, y'all can play with the new images if you like.  Unpack the attached into your moonimg/ directory and upload for a completely new set.
Too bad that today is New Moon.. so what you'll see is the black circle.. have to wait a few days to see the crescent start.

Ken you have been busy!

Stuart
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

Offline Vasco

  • Forecaster
  • *****
  • Posts: 502
    • PWS
Re: Sum/Moon Graphic
« Reply #96 on: September 03, 2024, 01:54:56 PM »
Ok, y'all can play with the new images if you like.  Unpack the attached into your moonimg/ directory and upload for a completely new set.

I see we also got a bonus: WxSpace. I presume all these scripts are just uploaded, and wxspace.php added to flyout-menu?
« Last Edit: September 03, 2024, 02:58:24 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline meteosanjuan

  • Contributor
  • ***
  • Posts: 109
    • Meteosanjuan
Re: Sum/Moon Graphic
« Reply #97 on: September 03, 2024, 03:32:27 PM »
I already knew that for a clumsy like me it wasn't going to work the first time. I have unzipped respecting the folder order as is on my website.
I have configured some parameters according to the readme and weather display according to Ken's image, but I cannot see Sun/Moon Graphic

https://www.meteosanjuan.com/wxastronomy.php

https://www.meteosanjuan.com/sunposa.php?debug=y

Multiple errors are generated
Maybe it's because of the folder configuration on my server.
Please help. Thank you

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #98 on: September 03, 2024, 03:54:56 PM »
I already knew that for a clumsy like me it wasn't going to work the first time. I have unzipped respecting the folder order as is on my website.
I have configured some parameters according to the readme and weather display according to Ken's image, but I cannot see Sun/Moon Graphic

https://www.meteosanjuan.com/wxastronomy.php

https://www.meteosanjuan.com/sunposa.php?debug=y

Multiple errors are generated
Maybe it's because of the folder configuration on my server.
Please help. Thank you
Simple.. you used your national format (comma decimal) for lat and long (lat='37,360883', lon='-6,030507')
For PHP, you have to use period decimal format (lat='37.360883', lon='-6.030507')
Change that in Settings.php
Quote
$SITE['latitude']        = '37,360883';    //North=positive, South=negative decimal degrees
$SITE['longitude']        = '-6,030507';  //East=positive, West=negative decimal degrees
to
Quote
$SITE['latitude']        = '37.360883';    //North=positive, South=negative decimal degrees
$SITE['longitude']        = '-6.030507';  //East=positive, West=negative decimal degrees
That will also fix any issues with wxquake.php (and other scripts that use maps)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9545
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Sum/Moon Graphic
« Reply #99 on: September 03, 2024, 04:14:42 PM »
Ok, y'all can play with the new images if you like.  Unpack the attached into your moonimg/ directory and upload for a completely new set.

I see we also got a bonus: WxSpace. I presume all these scripts are just uploaded, and wxspace.php added to flyout-menu?


wxspace.php ?? -- that's not in my sunposa distribution, but the images could be used anywhere the moon graphic (based on moon age in days) is needed.

For those who are likely with too much time on their hands, I have posted the FULL SIZE 999x997 gif images
here:  https://saratoga-weather.org/moonimg-lg.zip  (11.4MB .zip)
and the full set of NASA images (1920x1080) non-transparent/black background
here:  https://saratoga-weather.org/moonimg-NASA.zip  (43MB zip)
and the new moonimg set
here:  https://saratoga-weather.org/moonimg.zip (137KB .zip)
Enjoy!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP