navFix (Functionblock) |
Top Previous Next |
The navFix function block is used to query the current position and time from the connected navigation device. The navFix works similar to the gpsFix function block except for the fact that the information comes from the connected navigation device.
This function is especially suited for the AX9 series that does not have an on-board GPS receiver to use for positioning. All values returned by navFix() are in the WGS-84 datum.
Note: this function is not supported on the NMP.
Note regarding decimal minutes: The value returned in Decimal minutes, both latdecmin and londecmin, are assumed to be 4 digits long. This means that for the position 55 Deg, 51.3 Min North is returned as latdeg=55 latmin=51 and latdecmin=3000, and the position 55 Deg, 52.0076 North is returned as latdeg=55 latmin=52 latdecmin=76.
Input: None.
Output: mode : SINT; 0 = No info available. 1 = Fix not available. 2 = 2D position fix. 3 = 3D position fix. 4 = 3D position fix with SBAS correction.
linsec : DINT Linsec for timestamps received from the GPS receiver. This is the same as the separate year, month, day, minute, and second but expressed as a linsec. Also see clockLinsecToTime().
year : INT Year (absolute).
month : SINT Month (1..12).
day : SINT Date (1..31).
hour : SINT Hour (0..23).
minute : SINT Minute (0..59).
second : SINT Second (0..59).
latitude : DINT Latitude expressed in a DINT. Negative is South (ddmm.mmmm (multiplied by 10000)).
latsouth : BOOL Direction of latitude (TRUE is South, FALSE is North).
latdeg : SINT Latitude Degress (0..90).
latmin : SINT Latitude Minutes (0..59).
latdecmin : INT Latitude Decimal Minutes (0..9999). This value is assumed to be 4 digits with the leading zeros removed (see note regarding decimal minutes above).
longitude : DINT Longitude expressed in a DINT. Negative is West (dddmm.mmmm (multiplied by 10000)).
lonwest : BOOL Direction of longitude (TRUE is West, FALSE is East).
londeg : INT Longitude Degress (0..180).
lonmin : SINT Longitude Minutes (0..59).
londecmin : INT Longitude Decimal Minutes (0..9999). This value is assumed to be 4 digits with the leading zeros removed (see note regarding decimal minutes above).
height : INT Height in meters over Mean Sea Level.
Declaration: FUNCTION_BLOCK navFix;
Example: INCLUDE rtcu.inc |