Phidget GPS
[Specific Phidgets]


Data Structures

struct  __GPSTime
struct  __GPSDate
struct  __GPSSatInfo
struct  __GPGGA
struct  __GPGSA
struct  __GPGSV
struct  __GPRMC
struct  __GPVTG
struct  __NMEAData

Typedefs

typedef struct __GPSTime GPSTime
typedef struct __GPSDate GPSDate
typedef struct __GPSSatInfo GPSSatInfo
typedef struct __GPGGA GPGGA
typedef struct __GPGSA GPGSA
typedef struct __GPGSV GPGSV
typedef struct __GPRMC GPRMC
typedef struct __GPVTG GPVTG
typedef struct __NMEAData NMEAData
typedef struct _CPhidgetGPS * CPhidgetGPSHandle

Functions

int CPhidgetGPS_create (CPhidgetGPSHandle *phid)
int CPhidgetGPS_getLatitude (CPhidgetGPSHandle phid, double *latitude)
int CPhidgetGPS_getLongitude (CPhidgetGPSHandle phid, double *longitude)
int CPhidgetGPS_getAltitude (CPhidgetGPSHandle phid, double *altitude)
int CPhidgetGPS_getHeading (CPhidgetGPSHandle phid, double *heading)
int CPhidgetGPS_getVelocity (CPhidgetGPSHandle phid, double *velocity)
int CPhidgetGPS_getTime (CPhidgetGPSHandle phid, GPSTime *time)
int CPhidgetGPS_getDate (CPhidgetGPSHandle phid, GPSDate *date)
int CPhidgetGPS_getPositionFixStatus (CPhidgetGPSHandle phid, int *fixStatus)
int CPhidgetGPS_getNMEAData (CPhidgetGPSHandle phid, NMEAData *data)
int CPhidgetGPS_set_OnPositionChange_Handler (CPhidgetGPSHandle phid, int(*fptr)(CPhidgetGPSHandle phid, void *userPtr, double latitude, double longitude, double altitude), void *userPtr)
int CPhidgetGPS_set_OnPositionFixStatusChange_Handler (CPhidgetGPSHandle phid, int(*fptr)(CPhidgetGPSHandle phid, void *userPtr, int status), void *userPtr)

Detailed Description

These calls are specific to the Phidget GPS object. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.

Typedef Documentation

typedef struct __GPSTime GPSTime

GPS Time in UTC.

typedef struct __GPSDate GPSDate

GPS Date in UTC.

typedef struct __GPSSatInfo GPSSatInfo

Satellite info - used in GSV sentence.

typedef struct __GPGGA GPGGA

NMEA GGA Sentence

typedef struct __GPGSA GPGSA

NMEA GSA Sentence

typedef struct __GPGSV GPGSV

NMEA GSV Sentence

typedef struct __GPRMC GPRMC

NMEA RMC Sentence

typedef struct __GPVTG GPVTG

NMEA VTG Sentence

typedef struct __NMEAData NMEAData

NMEA Data Structure. Contains a set of supported NMEA sentences.

typedef struct _CPhidgetGPS* CPhidgetGPSHandle

A Phidget GPS handle


Function Documentation

int CPhidgetGPS_create ( CPhidgetGPSHandle phid  ) 

Creates a Phidget GPS handle.

Parameters:
phid A pointer to an unallocated Phidget GPS handle.

int CPhidgetGPS_getLatitude ( CPhidgetGPSHandle  phid,
double *  latitude 
)

Gets the current latitude.

Parameters:
phid An attached phidget gps handle.
latitude The latitude.

int CPhidgetGPS_getLongitude ( CPhidgetGPSHandle  phid,
double *  longitude 
)

Gets the current longitude.

Parameters:
phid An attached phidget gps handle.
longitude The longitude.

int CPhidgetGPS_getAltitude ( CPhidgetGPSHandle  phid,
double *  altitude 
)

Gets the current altitude, in meters.

Parameters:
phid An attached phidget gps handle.
altitude The altitude.

int CPhidgetGPS_getHeading ( CPhidgetGPSHandle  phid,
double *  heading 
)

Gets the current heading, in degrees.

Parameters:
phid An attached phidget gps handle.
heading The heading.

int CPhidgetGPS_getVelocity ( CPhidgetGPSHandle  phid,
double *  velocity 
)

Gets the current velocity, in km/h.

Parameters:
phid An attached phidget gps handle.
velocity The velocity.

int CPhidgetGPS_getTime ( CPhidgetGPSHandle  phid,
GPSTime time 
)

Gets the current GPS time, in UTC.

Parameters:
phid An attached phidget gps handle.
time The GPS time.

int CPhidgetGPS_getDate ( CPhidgetGPSHandle  phid,
GPSDate date 
)

Gets the current GPS date, in UTC

Parameters:
phid An attached phidget gps handle.
date The GPS date.

int CPhidgetGPS_getPositionFixStatus ( CPhidgetGPSHandle  phid,
int *  fixStatus 
)

Gets the position fix status.

Parameters:
phid An attached phidget gps handle.
fixStatus The fix status.

int CPhidgetGPS_getNMEAData ( CPhidgetGPSHandle  phid,
NMEAData data 
)

Gets Raw NMEA Data. This function is only available in the C API, and cannot be used over the webservice. The NMEA data reference points to a structure which is updated dynamically as data comes in - if you wish to work with the data statically, you must make a local copy. This should be done from within a position change event handler to avoid the structure changing as you read it.

Parameters:
phid An attached phidget gps handle.
data The NMEA Data.

int CPhidgetGPS_set_OnPositionChange_Handler ( CPhidgetGPSHandle  phid,
int(*)(CPhidgetGPSHandle phid, void *userPtr, double latitude, double longitude, double altitude)  fptr,
void *  userPtr 
)

Sets a position change event handler. This is called when any of latitude, longitude, or altitude change.

Parameters:
phid A phidget gps handle.
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.

int CPhidgetGPS_set_OnPositionFixStatusChange_Handler ( CPhidgetGPSHandle  phid,
int(*)(CPhidgetGPSHandle phid, void *userPtr, int status)  fptr,
void *  userPtr 
)

Sets a position fix status change event handler. This is called when a position fix is aquired or lost.

Parameters:
phid A phidget gps handle.
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.


Generated on Wed Jan 5 12:08:42 2022 for Phidget21 by  doxygen 1.5.9