gnssGetProfile (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

4.70 / 1.30.00


gnssGetProfile returns information about the the GPS/GNSS facilities available on the RTCU device.

 

Input:

index : SINT

This identifies which facility is being requested.

Possible values are:

_GNSS_SYS_GPS

- GPS navigation system is available.

_GNSS_SYS_GLONASS

- GLONASS navigation system is available.

_GNSS_SYS_GALILEO

- GALILEO navigation system is available.

_GNSS_FEAT_ANT

- Antenna detection is available.

_GNSS_FEAT_DR

- Dead Reckoning is available.

_GNSS_FEAT_PPP

- Precise Point Positioning is available.

 

Returns: DINT

The requested parameter

In case of TRUE/FALSE conditions, 0 (zero) will indicate FALSE and 1 (one) will indicate TRUE.

 

 

Declaration:

FUNCTION gnssGetProfile : DINT;
VAR_INPUT
  index : SINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
VAR
  ant_state : INT;
  ant_old   : INT;
END_VAR;
 
  gpsPower(power := ON);
 
BEGIN
  // Only check the antenna status if supported
  IF gnssGetProfile(index := _GNSS_FEAT_ANT) > 0 THEN
    ant_state := gpsGetAntennaStatus();
    IF ant_state <> ant_old THEN
        CASE ant_state OF
          0: DebugMsg(message := "Antenna : Power OFF");
          1: DebugMsg(message := "Antenna : Present");
          2: DebugMsg(message := "Antenna : Short-circuited");
          3: DebugMsg(message := "Antenna : Missing");
        END_CASE;
    END_IF;
    ant_old := ant_state;
  END_IF;
END;
END_PROGRAM;