LinksPoint GPS Toolkit Reference
SirfPollEphemeris
Examples | SiRF Specific functions | See Also
Polls for ephemeris data from a SiRF receiver
Examples
    // check if ephemeris is available for usSVID
    GPSSATELLITES GpsSatellites;
    GpsGetSatellites(&GpsSatellites);
        // sat struct  is channel based so find SVID
    for (int i = 0; i < NUM_OF_CHANNELS; i++)
    {
        if (GpsSatellites.gsSatellite[i].usID == usSvid)
        {
            if(GpsSatellites.gsSatellite[i].fEphemerisAvailable != GPS_TRUE)
            {
                fEphemerisAvailable = GPS_TRUE;
                                SirfPollEphemeris(usSvid);
                break;
            }
        }
    }
Parameters
Parameters Description
ulSvid Range 0 to 32.
Return Value
Returns GPSERROR_NONE on success or GPSERROR_POLL on failure.
Remarks
  • A value of 0 requests all available ephemeris records, otherwise the ephemeris of the ulSvid is requested.

  • First check if ephemeris is valid, then poll, and then use SirfGetEphemeris to retrieve the data. If ephemeris is valid, the fEphemerisAvailable field of the GPSSATELLITE struct will be set.
See Also
Group
Declaration
GPSERROR GPSAPI SirfPollEphemeris(unsigned short usSVID);
File
sirfapi.h
Links
Copyright ©1998-2005 Links Point Inc.