## Thursday, January 10, 2013

### Answer: When will the sun hit the beach?

The solution isn’t as simple as you might think…  As is always the case with a question like this, you’ve got to be sure to check the ground truth of the place.  In this case, if you go to Wailea beach on Google Maps or Google Earth, you’ll quickly find out that there’s a BIG mountain to the east of the beach.  That’s Haleakala, and at 10,023 ft (3,055 m), it could cast an early morning shadow on the western side of Maui.

Guess what?  It does.

So solving the challenge isn’t as easy as just doing a query for:

[ sunrise Wailea Beach ]

or using one of the sunrise calculators that are out there.  In this case, what I did was the following.
(Note to the reader:  Even if you don’t care for the math part, follow along.  I’ll show you how make even the math really simple.)
1.  First, check to see if we need to take the mountains into account.

Haleakalā is big, it’s REALLY big.  Here, I used Google Earth to fly down to Wailea Beach and look due east to quickly check and see if I need to worry about this.

... and a real-life shot (with buildings and trees) to give a sense of perspective.

That massif means the sun won’t actually hit the beach until it comes up over the mountain ridgetop!  So, to solve this question really means figuring out when the sun will clear the top of the mountain.  And to figure THAT out, we need to figure out the angle from the horizon to the ridge of the mountain.  (Because once we know THAT angle, we can figure out how long it will take the sun to climb above the ridgeline.)

Here’s a diagram of what I mean.  To figure out the angle Θ we need to know the height of the mountain if you look due east from the beach and the distance from the beach to there.  In other words, we need to know the elevation and distance of the mountaintop to the beach.

2.  How do we get the elevation and distance information?

There are at least three ways.

(A) Use Google Maps and Terrain View
(B) Use Google Earth and "Elevation Profile"
(C) Use Google Earth's "Show Sunlight" Tool.

Here's how they work.

A.  Use Google Maps and Terrain View.  One way to get the data we need is to draw a line due east from Wailea Beach and then look on Google Maps in Terrain view to find the tallest point on that line by reading the contour elevations.

Here, I’ve gone to Wailea Beach in Google Maps, then used My Maps (and then “Create a Map”) to draw a single line from Wailea Beach eastward.

I then switched into Terrain view on Maps to see what the contour lines would say.

If you zoom in enough, you can see that the highest contours on this line are around 7700 feet—it’s a little hard to read on the map, but I was able to use my classical map-reading skills to read it off.

The Maps “Create a Map” told me that the distance from Wailea Beach to the ridgeline is 8.5 miles.  So I could calculate the angle now.

But I want to show you ANOTHER way to get this elevation + distance information as well by using Google Earth.

B.  Use Google Maps, Create a Path, then use "Show Elevation Profile."   If you fly to Wailea Beach in Google Earth, you can then create a path in Earth and ask for the elevation profile along that path.

Here’s how to get this information this way...

First, on your Google Earth view of Wailea Beach, use the path tool to define a path from the beach to the top of the ridge.  (It's just a straight line with two points.)  I’m going to call that path “East from Wailea.”  The Path tool is under the "Add" menu in Google Earth.

(Note that this is very similar to what I did in Maps.)

Now, once you’ve created the line, you can right-click (or Control-Click on a Mac) and selection “Show Elevation Profile.”

That will then create the elevation profile along the path you’ve defined.  Since your path “East from Wailea” is the line that the sun will shine, you can get the elevation and distance easily—by looking at the chart, you can see the top of the ridge is 7692 feet and 8.78 miles away.

NOW we know almost everything we need.  Let’s make a simple chart with our information:

We just need to figure out what Θ is.  This just takes a little trig.  To need to figure out  the angle we need the trig relationship for that angle.  YOU might remember what that identity is off the top of your head, but I wanted to be sure, so I did a quick search for:

[ trig identities ]

and found a number of nice pages that explained to me that what I needed was something like the tangent function.  The tangent of an angle, I was reminded, is:

opposite / adjacent = tan ( Θ )

So, in this diagram, the side "opposite" our desired angle is just the elevation (or the height) of the mountain. To change the elevation (which I know in feet) into miles,  I just convert the elevation from feet into miles using Google Convert, that is, do the query like this:

[ 7692 feet  in miles ]

… or 1.45 miles.  NOW I can do compute the tangent.  More Google Calculator

1.45 / 8.78 = tan ( Θ )
1.45 / 8.78 = 0.1651

But remember that what I really  want is the ANGLE with 0.1651 as the tangent.  So back to Google Calculator, and plug in the numbers:

[ arctan (0.1651) ]

…. and  we get  0.16362  -- but remember THAT’S in RADIANS!

[ 0.16362 radians in degrees ]

and we find that the angle we've been trying to compute all along is  9.3749 degrees.

SO NOW… to figure out when the sun will hit the beach, we have to find the sunrise time with a simple:

[ sunrise Wailea ]

and find that it rises at 7:04AM.

Okay.  Now by doing a small computation, you can figure out that the sun moves about 0.27 degrees / minute in Hawai’i these days (given that the sunrise is at 7:04 and sunset is at 6:00PM).

Last step—how many minutes will it take the sun to climb 9.3749 degrees?

9.3749 / 0.27 =  34.7 minutes

So… now we have our answer.

If then sun rises at 7:04, then sun should hit the beach 34.7 minutes later,  at 7:39AM, Hawai'i time.

Finale:  Since I’m actually *here* in Maui, I went out to the beach this morning and took the following picture of the sun coming over the ridge at…. 7:42.

Three minutes off.   I'll take that as success.  I attribute it to inexactness in my drawing the line from Wailea.  At that point on the ridge, the line is dropping quickly.  If I measured just a bit too off the actual place (rather than due east), that would account for the 3 minute discrepancy.

C.  Use Google Earth "Sunlight Tool"   A third option is to use the "Sunlight Tool" that's built-into Google Earth.

To use the tool, you fly to the place of interest (Wailea), and then move the slider along until you see the sunlight hit your point of interest.

The big problem with this method is that it's not very exact.  You can see that the sunlight hits Wailea beach well after sunrise, but it's hard to tell precisely when the sun comes over the ridge.  It's a great general tool, but not really precise enough for our purposes.

BIG KAHUNA LESSON FOR THE DAY:  As I've said before, when you start doing your research, search for tools to help out with your task.  In this case, it's not hard to search for the elevation profile tool in Google Earth.  All you need to do is to conceive of the idea that there just might be a tool for your task.  Then search for it.  In this case, I searched for:

[ Google Earth elevation tool ]

and I found several blog posts about it.  I honestly didn't know it was there when I initially asked this question.  Now I'm a little bit smarter, and have a power tool for future projects.

Search on!

1. Thanks Dr. Russell. I learn a lot with this Challenge, again!

I had an idea about "how" to find the answer in real life and honestly I couldn´t find a way and the tools to do it searching.

It is like you said I am a little bit smarter thanks to you and yor SearchResearch page. Thank You!

Have a great day and enjoy your trip.

2. Nice post!
Just wanted to say that atmospheric refraction also plays a role in locating the position of the sun. Some photography tools will account for this (The Photographer's Ephemeris). There will be approximately a 28 arcminute difference which is almost a 2 minute time difference.

1. There are actually a couple of factors I didn't take into account -- this diffraction is one, another is the north/south-movement of the sun on the horizon throughout the year. I'll do a follow-up post later on these other factors.

3. Well, I hate to point this out, but it's even MORE complicated than this.

The assumption that the sunrise is due east is wrong. The direction depends on the latitude and time of year.

Searching on [direction of sunrise] leads to sites like this http://www.sollumis.com/ or http://www.timeanddate.com/worldclock/astronomy.html?n=103&month=1&year=2013&obj=sun&afl=-1&day=1 which tell me that the direction of the sunrise this morning at Wailea beach is/will be about 113 degrees or roughly southeast.

Going through the google earth steps indicates that the actual elevation of the terrain in the direction of sunrise given by this page is more like 1.7 degrees which gives a delay of 6.29 minutes after 'official' sunrise.

I'm not entirely sure how this correlates to your observations, but

I remember being in San Francisco some years ago at the cable car turn around near Ghiradelli square as the Sun was setting over the Marin headlands, which boggled my mind, why was it setting in the northwest? The Sun's latitude lies between the tropics of Capricorn and Cancer so it had to be south of San Francisco. I then realized that I was viewing the sun along a great circle route.

So the actual compass direction is affected by the great circle. This time of year the Sun is hanging out about as far south as it goes, since we're only about three weeks since the winter solstice.

I would have assumed that those sunrise calculators would take the great circle effect into account, but maybe not.

1. Rick - you're absolutely right. This is another one of those factors. Both www.soluumis.com and suncalc.com give this additional information. More on this in a bit.

(And I like your story about SF and the sunset. It STILL frobs my brain when I'm driving NORTH on 101 to SF and see the sun setting directly in front of me. There are subtle shifts at work here.)

2. Such a good point.
Thanks to both Daniel's well documented and educational piece and Rick's spotless follow up.

4. This is one of the best Search Research articles I've read. I hope the new Advanced Search class will cover similar research skills.

5. That's cool and everything, but you completely neglect twilight, which results in sunlight hitting the beach much earlier.

Perhaps you noticed that it wasn't pitch black while you were setting up your camera? That is known as twilight and is a result of sunlight being scattered by the upper atmosphere.

Perhaps another lesson is to clearly define the target information before commencing a search, i.e., when does "direct" sunlight hit the beach.

1. In the search challenge I said "... what time will the sunlight hit the beach sand there tomorrow morning, January 10th, 2013?"

Perhaps I should have said something more explicit such as "When will the first ray of light strike the beach sand..." I thought I was being clear and implying direct sunlight, not backscattered twilight effects.

I'll try to be even more precise in the future!

6. One note on the sunlight tool...

If you zoom in to Google Earth, you end up in what's called "ground-level view". As if you were actually standing in that location.

Then when you turn on the sunlight tool and start to "look around" you will see the giant orb in the sky.

Then start the timer and you will see the sun's path in regard to the terrain.

1. That's an excellent point. I'll include this in a follow-up as well.

2. Never knew this was in GE. We face the sunrise locations all year. This facility was right on for this morning.
Also did not know about the GE path profile. Also right on.
This is an excellent puzzle again this week. I'd could not follow the trig steps not even in high school

jon

7. I live in the shadow of a mountain and the position and length of the shadow varies considerably with the seasons. I also have a western view and the position of the sun at sunset shows the same great variation that commenters have noted. Life experiences and observations will have a bearing on how the answer is approached. In the negative, these can be biases and filters that actually hamper a solution. I probably have more examples of how to go off-track during a search than examples that proceed in a direct path.

Now, if you had asked us, "Where in the world was Daniel M Russell on Thursday, Jan 10, 2013 at 7:42 am?" Well, that would be easy. Wailea Beach Park, Maui

Here's how I figured it out. Careful reading. It was in the first line of the question, complete with the lat lon. In the answer, the time, 7:42 am, was stamped on the photo of the sun rising over the mountain.

Now that you have made us all jealous that you are in Maui and we aren't, do try to have some fun while you are there. Here's your assignment. Go to the same beach just before sunset. Look west. Tell us if the Green Flash is real. Bonus points if you get a photo!

Mahalo

8. I am going to work through your steps as a learning exercise. I must admit the math was intimidating since its too many years since I have needed it. While this is easy for some I suspect others like myself were overwhelmed. For those of us who plan to take your advanced search class do you have any advice for us. Could we have plugged these numbers into an app for example? I also realized from this exercise that perhaps if I had researched Garmin or Magellan I may have been able to find some assistance i.e. use whatever tools, like you said. Thanks for the challenge.

9. Just saw this post that reminded me of this challenge.

Using Google Earth to predict light conditions