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 _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

Calls specific to the Phidget GPS. See the product manual for more specific API details, supported functionality, units, etc.

Typedef Documentation

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 Thu May 3 14:03:28 2012 for Phidget21 by  doxygen 1.5.9