USNO changes API to JSON.. get-USNO-sunmoon.php V2.00 available

Saratoga templates use get-USNO-sunmoon.php to gather sun/moon data for display on the ajax-dashboard and wxastronomy.php pages (for all weather software except Weather-Display).

The US Naval Observatory has announced they will discontinue providing the data in the way used by V1.x of the script after July 31, 2015 and instead are offering a JSON feed of the data. The V2.00 version of the script now uses the new JSON feed from them.

Template users: use the update tool with a query of (Base-, Plugin-, 29-Jul-2015) to get the updated script.

Best regards,
Ken

Thanks Ken for bringing this to our attention.
As there is no other source for moon-data when using some weather-programs, there are different scripts using the now nearly obsolete post-script.

For users having their own scripts, the API can be found at: http://aa.usno.navy.mil/data/docs/api.php

Wim

I don’t think the moon pic is correct…I did install the update yesterday. See attached…


2015-07-31_1027.png

Same with my parents site… http://www.fernwoodweather.com/wxastronomy.php

But my site is good.

Hi Dan,

Your astronomy page and mine look different, even though named the same. Mine has a good moon.

http://tiggrweather.net/wxastronomy.php

Just FYI…

I guess I must have messed something up…don’t know what…moon icon is still not right…why the update worked for some people and not others is a mystery…

For Weather-Display and the Saratoga template, the moon image on the wxastronomy.php page is created by Weather-Display (and not related to the get-USNO-sunmoon.php script, as that script is not used with WD). It is solely WD that generates the testtags.php moon data variables.

The get-USNO-sunmoon.php script is ONLY used with non-WD weather software with the Saratoga templates.

I’m confused; if jgillet http://tiggrweather.net/wxastronomy.php and mark’s mom 'n dad http://www.fernwoodweather.com/wxastronomy.php sites are both WD driven, why do they look so different ?

jgillet is running Weather-Display (10.377R-(b281)) and an alternative wxastronomy.php page (ASTRO: created by Rainer Finkeldeh) which does it’s own display of a moon image based on a set of stock images and WD’s %moonage% tag which has '‘Moon age: 15 days,21 hours,7 minutes,99%’.

Fernwood is running the stock wxastronomy.php page using Weather Display v10.37R-80 and the page displays the WD-generated moonicon.gif (which is incorrectly showing a quarter moon).

Neither site uses the get-USNO-sunmoon.php :slight_smile:

Thanks Ken, that explains everything :lol:

Thanks Ken.

Thanks Ken. Guess I need to think about upgrading from WD b81… :frowning:

Probably shouldn’t say this too loudly, Dan, or I’ll end up jinxing myself. However, have been running the new stuff since b262 with essentially no problems at all. BTW, it’s now up to b282.

FWIW…