<*-CSTDLIB  *>
<*+NOHEADER *>
<*+M2EXTENSIONS *>
DEFINITION MODULE ["C"] navigation;

FROM SYSTEM IMPORT CARD16, CARD8;

PROCEDURE NAVIGATION_PerformClosedFormPositionSolution_FromPseuodrangeMeasurements(
   p1,          (* 1st raw pseudorange measurement [m] *)
   p2,          (* 2nd raw pseudorange measurement [m] *)
   p3,          (* 3rd raw pseudorange measurement [m] *)
   p4,          (* 4th raw pseudorange measurement [m] *)
   prc_satclk1, (* 1st satellite clock corrections for psuedoranges [m] *)
   prc_satclk2, (* 2nd satellite clock corrections for psuedoranges [m] *)
   prc_satclk3, (* 3rd satellite clock corrections for psuedoranges [m] *)
   prc_satclk4, (* 4th satellite clock corrections for psuedoranges [m] *)
   x1,          (* 1st satellite X coordinates, WGS84 ECEF [m] *)
   x2,          (* 2nd satellite X coordinates, WGS84 ECEF [m] *)
   x3,          (* 3rd satellite X coordinates, WGS84 ECEF [m] *)
   x4,          (* 4th satellite X coordinates, WGS84 ECEF [m] *)
   y1,          (* 1st satellite Y coordinates, WGS84 ECEF [m] *)
   y2,          (* 2nd satellite Y coordinates, WGS84 ECEF [m] *)
   y3,          (* 3rd satellite Y coordinates, WGS84 ECEF [m] *)
   y4,          (* 4th satellite Y coordinates, WGS84 ECEF [m] *)
   z1,          (* 1st satellite Z coordinates, WGS84 ECEF [m] *)
   z2,          (* 2nd satellite Z coordinates, WGS84 ECEF [m] *)
   z3,          (* 3rd satellite Z coordinates, WGS84 ECEF [m] *)
   z4:LONGREAL;          (* 4th satellite Z coordinates, WGS84 ECEF [m] *)
VAR latitude,   (* The computed geodetic latitude [rad] *)
   longitude,  (* The computed geodetic longitude [rad] *)
   height,     (* The computed geodetic height [m] *)
   rx_clock_bias:LONGREAL (* The computed receiver clock bias [m] *)
):INTEGER;

END navigation.
