Post Reply 
(71B) Easy Traverse Calculation
06-27-2016, 03:26 AM (This post was last modified: 08-26-2016 04:17 AM by Eddie W. Shore.)
Post: #1
(71B) Easy Traverse Calculation
Calculates the new point knowing the original coordinates, direction, and angle of travel. The angle 0° comes from due east and rotates counterclockwise.

Code:
Program TRAVEZ (216 bytes)


15 DEGREES
20 INPUT “INIT. EASTING:”;E
25 INPUT “INIT. NORHTING:”;N
30 D=0
40 INPUT “DISTANCE:”;I
45 INPUT “ANGLE:”;A
50 E=I*COS(A)+E
55 N=I*SIN(A)+N
57 D=D+I
60 DISP N;’,’;E
65 PAUSE
70 INPUT “DONE? (Y=1,N=0)”;X
75 IF X=0 THEN 40
90 DISP “TOTAL DIST:”;D
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)