Need help coming up with an equation for a bend angle calculation

Click For Summary
SUMMARY

The discussion focuses on calculating the bend angle of a tube using distance measurements from a laser. The user requires a formula to convert distance to angle with a resolution of 0.05 degrees, specifically using the equation angle=atan2d((100-x), 311) + 90, where x is the distance from the laser to the tube in millimeters. The user clarified that the horizontal distance is 100mm at 90 degrees and the vertical distance is approximately 311mm. The distinction between atan and atan2d is also noted, with the former providing results in radians and the latter in degrees.

PREREQUISITES
  • Understanding of trigonometric functions, specifically atan and atan2
  • Familiarity with angle measurement in degrees and radians
  • Basic knowledge of geometry related to angles and distances
  • Experience with online graphing calculators like Desmos
NEXT STEPS
  • Research the use of atan2 and atan2d functions in programming languages
  • Learn how to implement trigonometric calculations in your specific controller environment
  • Explore alternative methods for angle calculation without using atan2d
  • Investigate the principles of laser distance measurement and its applications in angle determination
USEFUL FOR

This discussion is beneficial for engineers, hobbyists, and developers working on projects involving laser measurements and angle calculations, particularly those with limited mathematical background.

nddwind
Messages
5
Reaction score
0
Apologies if this is the wrong forum.

I have an application where I need to measure the bend angle of a tube and display the resulting angle on a screen. I am using a laser mounted in a fixed location which reports distance back to my controller, (scaled to millimeters.) I am measuring from 92 degrees to 88degrees with 90 degrees being nominal. Is there a formula for converting a distance measurement to an angle? I am aiming to achieve .05degree resolution, so 90.05degrees, 90.1, 90.15, etc.. At first I thought that because the distance and range that I was measuring was so short I could use a simple linear equation to scale my distance to an angle but it seems that the rate of change between each degree is much higher than I thought. Also if it helps I'm about 18 inches away from the bend radius.

I am pretty terrible at math, and I'm not even sure if this would be described as a differential equation that I am looking for.

I've attached a picture if it helps.

Thank you for your time.
 

Attachments

  • Laser_Measurement.gif
    Laser_Measurement.gif
    5.1 KB · Views: 189
Mathematics news on Phys.org
More information is needed. Is 18 inches the horizontal distance from the laser to the tube at ##90\deg##? What is the vertical distance from the tube pivot point to the laser intersection point?
 
Vertical distance from pivot point to the point on the tube that the laser hits is roughly 311mm, horizontal distance is 100mm from tube at 90 degrees. (the 18inches I provided was way off)

Thank you
 
Try angle=atan2d((100-x), 311) + 90, where x=distance from laser to tube in mm and the angle is less than 90 when the distance is greater than 100.
 
Thank you for the reply, how would I use atan2d, or how could I enter that equation into a online calculator like desmos
 
Think I got it, thank you
 
Is there another way to write the atan2d function? Or write the equation you gave without using the atan2d function? My controller doesn't have that math option

Thanks for all the help

My controller does has atan and atan2 instructions
 
Last edited:
I believe the only difference between atan2 and atan2d is the first is in radians and the second is in degrees
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
910
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K