daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top