LinksPoint GPS Toolkit Reference
SirfSwitchToNMEA
Examples 1 | Examples 2 | SiRF Specific functions
Reconfigures a SiRF receiver to use NMEA protocol
Examples 1
// Palm OS
       case SwitchProtocolButton:
        {
            GPSPROTOCOL gpProtocol = GpsGetProtocol();
            switch (gpProtocol)
            {


                case GPSPROTOCOL_SIRF:

                    {
                        // Switch Protocol
                        SirfSwitchToNMEA(1, 1, 1, 3, 1, 1, 4800);

                        // Force message checking
                        GpsCheckForData(NULL, NULL);

                        // Wait 3 secs. for command processing
                        SysTaskDelay(SysTicksPerSecond() * 3);
                        GpsSetBaudRate(4800);
                        GpsSetProtocol(GPSPROTOCOL_NMEA);
                    }
                    break;
            }

        }
Examples 2
// Windows based platforms
       case SwitchProtocolButton:
        {
            GPSPROTOCOL gpProtocol = GpsGetProtocol();
            switch (gpProtocol)
            {


                case GPSPROTOCOL_SIRF:

                    {
                        // Switch Protocol
                        SirfSwitchToNMEA(1, 1, 1, 3, 1, 1, 4800);

                        // Wait 3 secs. for command processing
                        Sleep(3000);
                        GpsSetBaudRate(4800);
                        GpsSetProtocol(GPSPROTOCOL_NMEA);

                    }
                    break;
            }

        }
Parameters
Parameters Description
long lGLL Latitude, longitude, UTC time of position fix, and status
long lGSA GPS receiver operating mode, satellites used in the position solution, and DOP values
long lGSV Number of GPS satellites in view, satellite ID numbers, elevation, azimuth, and SNR values
long lRMC Time, date, position, course, and speed data
long lVTG Course and speed information relative to ground
unsigned short usBaudRate Baud rate
Return Value
Returns GPSERROR_NONE on success or GPSERROR_CONFIG on failure.
Remarks
  • In Trickle Power mode, the update rate is specified by the user. When the receiver is switched to NMEA protocol, the message update rate is also required. The resulting update rate is the product of the Trickle Power update rate and the NMEA update rate (i.e. if the Trickle Power update rate is 2 seconds and the NMEA update rate is 5 seconds, the product update rate is 10 seconds).

  • CAUTION: GpsSetBaudRate MUST be used to change the baud rate on the host to match the baud rate on the receiver, otherwise communications could be lost.

 

See Example 1 for Palm OS or Example 2 for Windows based platforms.
Group
Declaration
GPSERROR GPSAPI SirfSwitchToNMEA(long lGGA, long lGLL, long lGSA, long lGSV, long lRMC, long lVTG, unsigned short usBaudRate);
File
sirfapi.h
Links
Copyright ©1998-2005 Links Point Inc.