Calculating direction of travel on a clock face

In summary, The individual is seeking confirmation on a set of formulas they have created in Excel to calculate the direction they are facing after traveling a certain distance in a specific direction. They have used the atan2() function and a series of nested if statements to calculate the angle and convert it to a clock direction. They are seeking validation on the accuracy of their formulas.
  • #1
medelec35
4
0
This is not a a school or college question, it is just for my interest.

Homework Statement



suppose I travel 605 meters North , then travel 673 meters West.
I have calculated shortest distance of Sq Root(605^2 + 673^2) = 905 meters

What I am now trying to calculate is direction to face as if standing on a clock.
e.g. calculate angle e.g 140 Deg, then convert that to 10 o'clock = NW
I and applying this to excel that's why I'm after a formula.


Homework Equations



360-(ARCTAN(605/673))/30 = 10 o'clock. ARCTAN was used because of TAN = OPP/ADJ

The Attempt at a Solution



although this formula worked in this case, I would like to know if fluke or proven in every case.

Thank you in advance for any assistance given.
 
Physics news on Phys.org
  • #2
Welcome to PF.

Well, you can do that. But isn't it only useful with granularity of 30° increments.

In your case your angle is 42° from the horizontal, but might be expressed as 48° West of North. That lies inconveniently between 30° and 60° West of North. So is your direction then to be given as 8° clockwise of 10 O'clock or 22° Counter-Clockwise of 11 O'clock?
 
  • #3
Thank you for your reply.
Good point.
I was thinking that north will always be 12 o'clock = 0 deg for this I would need an if statement for excel (assuming deg is in cell A1) e.g =IF(A1/30=0,12,A1/30)
east will always be 3 o'clock = 90 deg = 90/30 = 3 o'clock
south will always be six o'clock = 180 deg = 180/30 = 6 = 6 o'clock
NE will probably be be 10.30 = 315 deg? 315/30=10.50. Int 10.50= 10. (10.50-10)*60 =30 therefore time = 10.30
Etc.

So I may have to amend my formula but not sure what to yet, so degrees will always correct .

30 was used because hour hand moves 30 deg each hour

Doesn’t the deg calculation depend on the quadrant?
Going N then E would be in a different quadrant to going S then E
 
Last edited:
  • #4
medelec35 said:
Doesn’t the deg calculation depend on the quadrant?
Going N then E would be in a different quadrant to going S then E

Yes. The sign is important. +x,+y = 1 - 3, +x,-y = 4 - 6, etc.

Degrees from a reference is not ambiguous.

Clever those mariners.
 
  • #5
I believe I have worked out the answer.

In excell if two distances are stored in cells J16 and J11
then if direction is NW then use (ATAN(J16/J11)*180/PI())
If direction is SE then use 180-(ATAN(J16/J11)*180/PI())
If direction is SW then use 270-(ATAN(J16/J11)*180/PI())
If direction is NW then use 360-(ATAN(J16/J11)*180/PI())
I have used a nested if statement to use correct formula. Its a fairly large formula, so won't show it, since will not know what is in all other cells.
Then
Hour = deg/30
minutes = INT(((deg/30)-INT(deg/30))*60)
So if hand on a clock was adjusted to same time as answer, if you faced same direction as hour hand, then in theory you be facing correct way.
Could some one please let me know if all above formulas are correct?
Thank you.
 
  • #6
ps. You should generaly use atan2() rather than atan(), it handles the infinity properly.
But be careful Excel's atan2() function has the arguments the opposite way around to everyone else.

There is also a degrees() function to handle the rad-deg conversion
 
  • #7
Thanks for that.
In your opinion would all the formulas work in practice? I have tried 1 out but was a case of nearly bit not quiet there. A result of 3:39 should of been 2 something.
After trying a few more, most work ok.
I'm just after formula confirmation but with atan2() instead?
 

1. How do you calculate the direction of travel on a clock face?

To calculate the direction of travel on a clock face, you need to first determine the starting point and the ending point. Then, you can count the number of hours between the two points. If the number of hours is less than 6, the direction of travel is clockwise. If the number of hours is more than 6, the direction of travel is counterclockwise.

2. What is the starting point on a clock face?

The starting point on a clock face is the hour hand's position before it starts moving towards the ending point. This can be any hour on the clock face, depending on the time you are calculating the direction of travel for.

3. How do you determine the ending point on a clock face?

The ending point on a clock face is the final position of the hour hand after it has moved a certain number of hours in a specific direction. This can be any hour on the clock face, depending on the starting point and the number of hours traveled.

4. Can the direction of travel on a clock face be determined without counting the number of hours?

Yes, the direction of travel on a clock face can also be determined by looking at the position of the hour hand. If the hour hand is moving towards the right side of the clock face, the direction of travel is clockwise. If the hour hand is moving towards the left side of the clock face, the direction of travel is counterclockwise.

5. How does daylight saving time affect the calculation of direction of travel on a clock face?

Daylight saving time does not affect the calculation of direction of travel on a clock face. The hour hand still moves in the same direction, regardless of whether daylight saving time is in effect or not. However, the starting and ending points may change as the hour hand may be in a different position due to the time change.

Similar threads

Replies
1
Views
5K
  • Special and General Relativity
Replies
3
Views
2K
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
7
Views
2K
  • Science and Math Textbooks
Replies
19
Views
17K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top