DEFINITION MODULE aprspos; (* get aprs position by OE5DXL *)

FROM SYSTEM IMPORT CAST, SHIFT, ADR, CARD8, FILL;
FROM aprsstr IMPORT POSITION;

CONST
      PI=3.1415926535;
      PI2=PI*2.0;
      RAD=PI2/360.0;
      FEET=0.3048;
      KNOTS=1.852;                             (* nautic miles *)
      WKNOTS=1.609;                            (* wx knots *)
      SKNOTS=1.609;                            (* stormdata knots *)
      ENCODEGPS="g";
      ENCODEMICE="m";
      ENCODECOMP="c";
      ENCODEGPSDAO="G";
      ENCODEMICEDAO="M";
      ENCODEAREA="A"; 
      ENCODEMULTILINE="L"; 
      EARTH=6370.0;
      AREASYMT="\";                            (* area object symbol table *)
      AREASYM="l";                             (* area object symbol *)


PROCEDURE rad(w:REAL):REAL;
PROCEDURE posvalid(pos:POSITION):BOOLEAN;
PROCEDURE distance(home,dist:POSITION):REAL;
PROCEDURE azimuth(home,dist:POSITION):REAL;
PROCEDURE GetPos(VAR pos:POSITION; VAR speed, course:CARDINAL; VAR altitude:INTEGER;
                 VAR symb,symbt:CHAR; buf:ARRAY OF CHAR; micedest, payload:CARDINAL;
                 VAR coment:ARRAY OF CHAR; VAR postyp:CHAR);
PROCEDURE GetSym(d:ARRAY OF CHAR; VAR symb, symt:CHAR);   (* symbol out of destination call *)
PROCEDURE wgs84s(lat, long, nn:REAL; VAR x,y,z:REAL);   (* km *)
PROCEDURE wgs84r(x,y,z:REAL; VAR lat, long, heig:REAL);   (* km *)

END aprspos.
