gpsUpdateFreq (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i (not available on the MX2), CX1, SX1, MX2 turbo/encore/warp, NX-200, LX2

Firmware version:

3.10 / 1.40.00


This function sets the frequency at which new positions can be read from a SuperGPS-based device.

 

Using an update frequency of more than 1 position per. second requires that the system speed is minimum set to Fast (24 Mhz).
 

Note:
When using gpsEnableNMEA it must be ensured that the baud-rate used on the serial port is set sufficiently high to cope with the update frequency.

Operating at mode=2 (4 positions per. second) will only forward data to a connected NMP in every 2nd call to gpsFix.
This function can not be used if the GPS in in low power mode.
 

Input:

mode : SINT (Default: 0)

0 = Standard mode (max. 1 position per second).

1 = Fast mode (max. 2 positions per second).

2 = Fastest mode (max. 4 positions per second).

 

Returns: INT

0

- Success.

1

- Frequency update is not supported.

2

- GPS power is OFF.

3

- Illegal parameter.

4

- System speed is not supported or gpsPowerLP is used.

5

- General error.

 

Declaration:

FUNCTION gpsUpdateFreq : INT;
VAR_INPUT
  mode : SINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
gpsPower(power := ON);
gpsUpdateFreq(mode := 2);
..
 
BEGIN
END;
END_PROGRAM;