Finding best times to see a sunrise or moonrise behind Mt. Hood

The unimaginatively named “hoodRise” tool was created to allow one to find unique and awesome views of sunrise / moonrise events over Mt. Hood.  The user is free to choose any location using a Google Map and the tool will determine the best days over the next year for these events.  Here is an example choosing a  location near the Sandy River on the Ramona Falls trail:

Note that times are shown in the user’s local time zone – in this case I ran the app in the CST, so actual times in the PST will be 2 hours less.

There are many applications, both free and paid, that can determine paths of the sun, moon, stars etc. based on a geographical location and a date.  I wanted to look at this from the reverse perspective – given a geographical location, what are the best days to see a sun or moon rise or set?

Although I don’t live in Oregon anymore, I decided to use Mt. Hood as a feature of interest to examine this further.  Calculations of sun and moon rise times is a pretty standard exercise, but these typically assume the observer and his horizon are at sea level.  For my experiment, I needed to correct for both the observer’s elevation as well as the elevation of the target (in this case, Mt. Hood).  Further, I needed to correct for distance between the observer and target to account for the earth’s curvature (which will reduce the apparent elevation distance between the two).  Atmospheric refraction had to be taken in to consideration as well – at sunrise, the actual sun is located “beneath” the horizon but due to refraction the apparent altitude becomes positive compared to the horizon.  This refraction varies by altitude angle, so needs to be accurately calculated based on the observer’s angle to his target.  Lastly, in the case of the moon parallax has to be considered.

Luckily, there are libraries out there that handle the bulk of the messy calculations.  For this experiment, I’ve used SunCalc.js to find actual sun/moon locations and then just applied my corrections using some relatively simple trigonometry.

In addition to identifying these times, my next plan was to come up with a way of actually visualizing these events against the apparent horizon.  I started laying out an algorithm that could use google maps elevation data swept across paths from the observer’s perspective to build a pseudo-POV.  Luckily, before getting too far along I stumbled upon the amazing PeakFinder website and realized that someone had already created this and made it better than my coding skills could have hoped to accomplish.  Even better, they provide an API that allows dynamically creating embedded iframes based on inputs such as lat/lng, time of day, heading, etc.

In the hoodRise tool, whenever the user chooses their desired observer location in the Google Map an additional PeakFinder frame will pop up providing the POV of that location looking toward Mt. Hood.  Current position of the moon and sun will be shown if they are in the field of view, and their paths for the entire day are also shown.

Going back to the Ramona Falls trail example above, the below PeakFinder frame will display for this location showing the sun position on March 25, 2017 at 8:26am.  For comparison, if we calculate the sunrise for this latitude/longitude using standard tools we find a 7:00am sunrise, which is nearly an hour and a half ahead of our actual sunrise once terrain is accounted for.

Predicted view of March 25, 2017 sunrise near Mt. Hood

Anyone at that location on that date is in for quite a treat (assuming the sky is clear!).    To view this location in the full featured version of the PeakFinder website, click here.

At this point the tool is usable, but more enhancements are planned (adding sunset/moonset, adding more possible target locations, improving moon accuracy).  Also, there is no real error checking so if you drop the observer in unreasonable locations, like in the ocean, results are unpredictable and unrealistic.

If anyone successfully uses this tool I’d love to see photos!

Leave a Reply

Your email address will not be published. Required fields are marked *