Calculating the speed of a crane (using pythagoras) with different x & y speeds

Click For Summary
SUMMARY

The discussion focuses on calculating the time it takes for a crane to move diagonally across a shelving rack using C++. The maximum speeds are defined as 40m/min in the x-direction and 12.5m/min in the y-direction. The user initially attempts to apply the Pythagorean theorem to time calculations, leading to confusion about its application. A more accurate method involves calculating the diagonal distance and speed using the formula t = d/v, resulting in a diagonal time of 0.17 minutes, which raised questions about its validity compared to individual directional times.

PREREQUISITES
  • Understanding of C++ programming
  • Knowledge of basic physics concepts, particularly speed and distance
  • Familiarity with the Pythagorean theorem
  • Ability to perform mathematical calculations involving square roots
NEXT STEPS
  • Research "C++ mathematical functions" for implementing calculations
  • Learn about "Pythagorean theorem applications in physics" for better understanding
  • Explore "C++ performance optimization techniques" for improving simulation speed
  • Study "kinematics in two dimensions" to grasp motion analysis better
USEFUL FOR

Software developers, particularly those working on simulations in C++, engineers involved in logistics and material handling, and anyone interested in applying physics to programming challenges.

Calico5
Messages
2
Reaction score
0
Hi,

Homework Statement



I'm designing a C++ program to simulate the operation of a steel processing warehouse. Part of my code requires me to calculate the time it takes for a crane to move certain distances (mainly diagonal ones) across a large shelving rack.

Homework Equations


The crane moves at different speeds in different directions.
Maximum x speed = 40m/min
Maximum y speed = 12.5m/min

I was thinking of using pythagoras theorem somehow to solves this (although its not required to be done this way) so:
c2 = a2 +b2

The Attempt at a Solution


I was thinking of using:

time = distance/speed

to calculate the time for each movement in x direction and y direction. Then using pythagoras theorem on the times to get the diagonal movement time. So an example would be:

14ybc5s.jpg


X-Time = 6/40 = 0.15min
Y-Time = 4/12.5 = 0.32min

Z-Time = SQRT(0.152+0.322) = 0.353min

Would that be correct? I am not sure if i can apply pythagoras theorem to time like that. Any Help is appreciated

Thanks
 
Physics news on Phys.org
Calico5 said:
Hi,

Homework Statement



I'm designing a C++ program to simulate the operation of a steel processing warehouse. Part of my code requires me to calculate the time it takes for a crane to move certain distances (mainly diagonal ones) across a large shelving rack.

Homework Equations


The crane moves at different speeds in different directions.
Maximum x speed = 40m/min
Maximum y speed = 12.5m/min

I was thinking of using pythagoras theorem somehow to solves this (although its not required to be done this way) so:
c2 = a2 +b2

The Attempt at a Solution


I was thinking of using:

time = distance/speed

to calculate the time for each movement in x direction and y direction. Then using pythagoras theorem on the times to get the diagonal movement time. So an example would be:

14ybc5s.jpg


X-Time = 6/40 = 0.15min
Y-Time = 4/12.5 = 0.32min

Z-Time = SQRT(0.152+0.322) = 0.353min

Would that be correct? I am not sure if i can apply pythagoras theorem to time like that. Any Help is appreciated

Thanks


I would use Pythagorean theorem on the velocity and distance. Then use t = d/v. You would find how far the crane moves along the diagonal, and if the x-y speeds are constant, how fast it is moving along the diagonal so you could calculate the time.
 
Thank you for the reply Apphysicist :)

Ahh right, i see. Tried out your method and got the following:

ZDistance = SQRT(42 + 62) = 7.211
ZSpeed = SQRT(402 + 12.52) = 41.907

t=d/v = 7.211/41.907 = 0.17min

That seems a bit quick doesn't it? given that the previous results were:
X-Time = 0.15min
Y-Time = 0.32min

i would have thought the pythagoras time would be closer to the slowest time. No?
 

Similar threads

Replies
3
Views
1K
Replies
5
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
20
Views
4K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K