%%HP: T(3)A(D)F(.);
@ Program to convert
@ angle/bearing and distance
@ to delta Eastings & Northings
@ Bearing in DMS must be on level 2 of the stack
@ Distance must be on level 1 of the stack
@ P\->R converts this stack to Delta E, N
@ Delta Easting is returned on level 2
@ Delta Northing is returned on level 1

@ Rename this program P\->R on the HP48

\<<

@ Ensure degrees mode is set
DEG

@ Swap bearing & distance on stack
SWAP 

@ Convert bearing to decimal degrees
HMS\-> 

@ Set calculator in polar mode
CYLIN

@ Create 2D vector of distance & bearing
\->V2

@ Set calculator in Rectangular mode
@ this converts bearing & distance to
@ delta easting & northing
RECT

@ Return vector to stack
V\->

@ Swap stack
SWAP

@ Delta Easting displayed on level 2
@ Delta Northing displayed on level 1
\>>



