Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import math
  2.  
  3. # Calculates the next point
  4. def next_point(dist, angle, curr_point):
  5. x1 = curr_point[0]
  6. y1 = curr_point[1]
  7. x2 = x1 + dist * math.sin(math.pi * angle / 180)
  8. y2 = y1 + dist * math.cos(math.pi * angle / 180)
  9. # Northing and Easting of the point
  10. return (x2, y2)
  11.  
  12. if __name__ == '__main__':
  13. e = 250680.81969401648 # Easting in meters
  14. n = 1693455.5250321052 # Northing in meters
  15. d = 400.05 # Distance in meters
  16. a = 311.933333 # Azimuth in degrees
  17. next_p = next_point(d, a, (e, n))
  18. print(next_p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement