Author Topic: Slow loading main index (Update usno.mil applications server is down fix below )  (Read 10025 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org

Quote
It's all mathematical notation.. not computer code :(
and would you expect anything different ;)
Quote
His area of interest is spherical and mathematical astronomy
https://en.wikipedia.org/wiki/Jean_Meeus


Paul
No, I didn't really expect any 'code' samples (and they'd likely been in Fortran, or more recently in Python) :)

I've put a small test program together to compare the results from the USNO to various weather packages, Jachym's functions, my own aging collection of functions to see how they match up for my lat,long, time.. now I can do further testing with high and low latitudes and see how that performs (just USNO+Jachym+my functions, that is).
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Interesting, the only significant difference really is the illumination, which however is slightly problematic because I noticed that many websites report this as illumination at noon, they only update it once per day. Same can go for the various SW. What surprises me though is the difference in the sunrise. Ken what function do you use, I used the built-in PHP function to do it, so it is then down to what angle you used. I think I used 90.5, which I found on the wiki to be the standard. Does that take into account some correction for the elevation?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
For the sun computation, I'm using the built-in (as of PHP 5.1.2) date_sun_info() function with accepts time,lat,long as arguments.  No other adjustments were made.

I'm still munging about with the code so it produces the same output data that the current USNO version uses.. be a bit longer.

As an aside, I think I see where the USNO DNS setup is it's own problem.  The authoritative DNS for usno.navy.mil is

Dig usno.navy.mil@208.67.222.222 ...
Non-authoritative answer
Recursive queries supported by this server
 Query for usno.navy.mil type=255 class=1
  usno.navy.mil SOA (Zone of Authority)
        Primary NS: psyche.usno.navy.mil
        Responsible person: hostmaster@usno.navy.mil
        serial:4037605289
        refresh:3600s (60 minutes)
        retry:1800s (30 minutes)
        expire:2147483647s (248550 days)
        minimum-ttl:3600s (60 minutes)

Dig psyche.usno.navy.mil@192.5.41.214 ...
Authoritative Answer
Recursive queries supported by this server
 Query for psyche.usno.navy.mil type=255 class=1
  psyche.usno.navy.mil A (Address) 192.5.41.214

so if that one server (psyche) has a DNS issue, the entire usno.navy.mil domain goes down.  Common best-practice for DNS uses two DNS servers, each on different subnets and not in the namespace of the zone they host.  Achilles heel with one server... sigh.
Also, when that DNS is down, then you can't send mail to hostmaster at usno.navy.mil -- since the MX records also cannot be found, that's why I sent the messages about the outage to hostmaster at navy.mil for followup.

 
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Ken,  just curious,  did you make any progress with this?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Still doing testing on and off.. haven't had much time the last weeks due to other commitments so I'm in 'fix it if it's broken now' mode because that's about all the time I have to spare.  Thanks again for putting the functions together .. I'm still doing USNO:yours:some-other scripts comparisons to see which matches the USNO data best.
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Sure, no problems, I completely understand that.

The question remains though which one is really the most accurate.

if yours, mine and USNO produce results that differ by seconds/1-2 minutes, the question is which one really is the correct one. It also depends what PHP and USNO considers to be "sunrise" and many other factors so I would not worry about the seconds too much.

if PHP can produce something that is within the 1 minute range, I would use it, because it is much more reliable and faster (and who knows, maybe even more accurate)

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Is this old problem back again? I just renamed the get-USNO-sunmoon.php to get-USNO-sunmoon-temp.php and it fixed my problem with slow page loading. This just started yesterday.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF