gnssEnableType (Function)

Top  Previous  Next

Architecture:

NX32 / NX32L

Device support:

MX2 turbo/encore/warp, CX1 warp(-c) mk2, NX-200, NX-900, LX2, LX5

Firmware version:

4.00 / 1.40.00


This function is used to enable and disable the different positioning systems.

By default all the relevant positioning systems are enabled and used to determine the position returned by gnssFix and gpsFix.

 
Before calling this function the GNSS receiver must be turned ON by a call to gpsPower() or gpsPowerLP.

 

Note: Not all GNSS receivers supports all the possible positioning systems and some GNSS receivers do not support all the combinations of positioning systems, see the technical manual for further details.

 

gnssGetEnabledSystems can be used to check which systems are currently enabled.

 

If a receiver does not support all the possible combinations, it may be necessary to use gnssEnableType to enable or disable multiple systems before the currently used systems change.

 

Input:

type: SINT (0..2, Default 0)

0

GPS

1

GLONASS

2

GALILEO

3

BeiDou

 

enable : BOOL (Default: ON)

Enables/disables the positioning system.

 

Returns: INT

0

- Success

-1

- GNSS module not powered or not supported.

-2

- Invalid parameter, type is not supported with this receiver.

-3

- Error performing action.

 

Declaration:

FUNCTION gnssEnableType : INT;
VAR_INPUT
  type   : SINT;
  enable : BOOL;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Disable GLONASS
  gnssEnableType(type := 1, enable := OFF);
  ...
END;
 
END_PROGRAM;