Skip to content

Instantly share code, notes, and snippets.

@kuroneko
Created October 29, 2015 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuroneko/51e7ee4315791cf8e201 to your computer and use it in GitHub Desktop.
Save kuroneko/51e7ee4315791cf8e201 to your computer and use it in GitHub Desktop.
E6B-like functions for HP48
%%HP: T(0)A(D)F(.);
@ You may edit the T(0)A(D)F(.) parts.
@ The earlier parts of the line are used by Debug4x.
\<<
IF
DEPTH 1 <
THEN
#201 DOERR
END
'curTAS' STO
\>> 'TAS' STO
\<<
IF
DEPTH 2 <
THEN
#201 DOERR
END
'curWSPD' STO
'curWHDG' STO
\>> 'WV' STO
\<<
IF
DEPTH 2 <
THEN
#201 DOERR
END
SWAP
SIN
*
curTAS /
ASIN
\>> 'WCA' STO
\<<
IF
DEPTH 2 <
THEN
#201 DOERR
END
DUP2
WCA
COS
curTAS *
ROT ROT
SWAP
COS *
-
\>> 'GS' STO
\<<
IF
DEPTH 1 <
THEN
#201 DOERR
END
DUP
curWHDG - NEG
curWSPD
DUP2
WCA
ROT ROT
GS
ROT ROT
+
SWAP
\>> 'DTRK' STO
\<<
IF
DEPTH 2 <
THEN
#201 DOERR
END
SWAP /
60 *
\>> 'ETI' STO
\<<
IF
DEPTH 1 <
THEN
#201 DOERR
END
360 MOD
\>> 'ANGNORM' STO
\<<
IF
DEPTH 1 <
THEN
#201 DOERR
END
180 + ANGNORM
\>> 'RECIP' STO
{ TAS WV DTRK ETI RECIP ANGNORM } MENU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment