Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions | Variables

GPS Sensor
[Dexter Industries]

Files

file  dexterind-gps.h
 

Dexter Industries GPS Sensor driver.


Defines

#define DGPS_I2C_ADDR   0x06
#define DGPS_CMD_UTC   0x00
#define DGPS_CMD_STATUS   0x01
#define DGPS_CMD_LAT   0x02
#define DGPS_CMD_LONG   0x04
#define DGPS_CMD_VELO   0x06
#define DGPS_CMD_HEAD   0x07
#define DGPS_CMD_DIST   0x08
#define DGPS_CMD_ANGD   0x09
#define DGPS_CMD_ANGR   0x0A
#define DGPS_CMD_SLAT   0x0B
#define DGPS_CMD_SLONG   0x0C

Functions

bool DGPSreadStatus (tSensors link)
long DGPSreadUTC (tSensors link)
long DGPSreadLatitude (tSensors link)
long DGPSreadLongitude (tSensors link)
int DGPSreadVelocity (tSensors link)
int DGPSreadHeading (tSensors link)
int DGPSreadRelHeading (tSensors link)
int DGPSreadTravHeading (tSensors link)
bool DGPSsetDestination (tSensors link, long latitude, long longitude)
int DGPSreadDistToDestination (tSensors link)
long _DGPSreadRegister (tSensors link, unsigned byte command, int replysize)

Variables

tByteArray DGPS_I2CRequest
tByteArray DGPS_I2CReply

Detailed Description

Dexter Industries dGPS Sensor driver


Define Documentation

#define DGPS_CMD_ANGD   0x09

Fetch angle to destination

Definition at line 52 of file dexterind-gps.h.

#define DGPS_CMD_ANGR   0x0A

Fetch angle travelled since last request

Definition at line 53 of file dexterind-gps.h.

#define DGPS_CMD_DIST   0x08

Fetch distance to destination

Definition at line 51 of file dexterind-gps.h.

#define DGPS_CMD_HEAD   0x07

Fetch heading in degrees

Definition at line 50 of file dexterind-gps.h.

#define DGPS_CMD_LAT   0x02

Fetch Latitude

Definition at line 47 of file dexterind-gps.h.

#define DGPS_CMD_LONG   0x04

Fetch Longitude

Definition at line 48 of file dexterind-gps.h.

#define DGPS_CMD_SLAT   0x0B

Set latitude of destination

Definition at line 54 of file dexterind-gps.h.

#define DGPS_CMD_SLONG   0x0C

Set longitude of destination

Definition at line 55 of file dexterind-gps.h.

#define DGPS_CMD_STATUS   0x01

Status of satellite link: 0 no link, 1 link

Definition at line 46 of file dexterind-gps.h.

#define DGPS_CMD_UTC   0x00

Fetch UTC

Definition at line 45 of file dexterind-gps.h.

#define DGPS_CMD_VELO   0x06

Fetch velocity in cm/s

Definition at line 49 of file dexterind-gps.h.

#define DGPS_I2C_ADDR   0x06

Barometric sensor device address

Definition at line 44 of file dexterind-gps.h.


Function Documentation

long _DGPSreadRegister ( tSensors  link,
unsigned byte  command,
int  replysize 
)

Definition at line 72 of file dexterind-gps.h.

int DGPSreadDistToDestination ( tSensors  link )

Distance to destination in meters

Parameters:
linkthe DGPS port number
Returns:
distance to destination in meters

Definition at line 213 of file dexterind-gps.h.

int DGPSreadHeading ( tSensors  link )

Read the current heading in degrees

Parameters:
linkthe DGPS port number
Returns:
current heading in degrees

Definition at line 146 of file dexterind-gps.h.

long DGPSreadLatitude ( tSensors  link )

Read the current location's latitude in decimal degree format

Parameters:
linkthe DGPS port number
Returns:
current latitude
Examples:
dexterind-gps-test1.c.

Definition at line 116 of file dexterind-gps.h.

long DGPSreadLongitude ( tSensors  link )

Read the current location's longitude in decimal degree format

Parameters:
linkthe DGPS port number
Returns:
current longitude
Examples:
dexterind-gps-test1.c.

Definition at line 126 of file dexterind-gps.h.

int DGPSreadRelHeading ( tSensors  link )

Angle to destination

Parameters:
linkthe DGPS port number
Returns:
heading in degrees

Definition at line 156 of file dexterind-gps.h.

bool DGPSreadStatus ( tSensors  link )
Examples:
dexterind-gps-test1.c.

Definition at line 96 of file dexterind-gps.h.

int DGPSreadTravHeading ( tSensors  link )

Angle travelled since last request, resets the request coordinates on the GPS sensor, sends the angle of travel since the last call

Parameters:
linkthe DGPS port number
Returns:
heading in degrees

Definition at line 167 of file dexterind-gps.h.

long DGPSreadUTC ( tSensors  link )

Read the time returned by the GPS in UTC.

Parameters:
linkthe DGPS port number
Returns:
the time in UTC
Examples:
dexterind-gps-test1.c.

Definition at line 106 of file dexterind-gps.h.

int DGPSreadVelocity ( tSensors  link )

Read the current velocity in cm/s

Parameters:
linkthe DGPS port number
Returns:
current velocity in cm/s

Definition at line 136 of file dexterind-gps.h.

bool DGPSsetDestination ( tSensors  link,
long  latitude,
long  longitude 
)

Set the destination coordinates

Parameters:
linkthe DGPS port number
latitudedestination's latitude in decimal degrees
longitudedestination's longitude in decimal degrees
Returns:
true if no error occured, false if it did

Definition at line 179 of file dexterind-gps.h.


Variable Documentation

Array to hold I2C reply data

Definition at line 70 of file dexterind-gps.h.

Array to hold I2C command data

Definition at line 69 of file dexterind-gps.h.