I feel fortunate to find monks who follow what I'm developing in perl, indeed make it possible to do so at a much greater rate than I could by myself. What I have been seeking is perl ways to figure out whether the sun is going to be on you at a given latitude, longitude, and elevation. These scripts have had the input values hard-coded at the beginning:

## important...no trailing zeroes else 301 error # weston 41.37,-83.65 my $lat = 41.37; my $long = -83.65; my $elev = .208; # 676 ft = .206 +.02 for observer #km $logger->info("$lat $long $elev");

Instead of running this script on my machine, I want to host it on my site, so that anyone who wants to see output from it may do so. I have to make the disappointing caveat that this script will be drawing from NOAA and therefore US-specific. I don't mean to exclude anyone; indeed, weather in the US is sometimes best-enjoyed as a spectator sport. (The price is right too!)

So, some output will be undefined depending on whether the input data are well-conditioned. Beyond the forecasts that I have been pulling up on threads like getting Sun info with Astro::Coord::ECI::Sun, I want to include just the general sun data from perl, beginning with something like:

# Set up observer's location my $loc = Astro::Coord::ECI->geodetic( deg2rad($lat), deg2rad($long), +$elev );

Now, for the page itself, I have now constructed many using perl and by scratch, but I would like to be able to do this with Mojo if the shoe fits right.

Q1) Does this sound like a good use for Mojo? If not, what are alternatives?

Q2) Given latitude and longitude, does anyone know a perl way to determine how high the ground/water is at that point?

Thanks for your comment.


In reply to creating a webpage to fetch/calculate weather data by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.