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  DGPS-driver.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 51 of file DGPS-driver.h.

#define DGPS_CMD_ANGR   0x0A

Fetch angle travelled since last request

Definition at line 52 of file DGPS-driver.h.

#define DGPS_CMD_DIST   0x08

Fetch distance to destination

Definition at line 50 of file DGPS-driver.h.

#define DGPS_CMD_HEAD   0x07

Fetch heading in degrees

Definition at line 49 of file DGPS-driver.h.

#define DGPS_CMD_LAT   0x02

Fetch Latitude

Definition at line 46 of file DGPS-driver.h.

#define DGPS_CMD_LONG   0x04

Fetch Longitude

Definition at line 47 of file DGPS-driver.h.

#define DGPS_CMD_SLAT   0x0B

Set latitude of destination

Definition at line 53 of file DGPS-driver.h.

#define DGPS_CMD_SLONG   0x0C

Set longitude of destination

Definition at line 54 of file DGPS-driver.h.

#define DGPS_CMD_STATUS   0x01

Status of satellite link: 0 no link, 1 link

Definition at line 45 of file DGPS-driver.h.

#define DGPS_CMD_UTC   0x00

Fetch UTC

Definition at line 44 of file DGPS-driver.h.

#define DGPS_CMD_VELO   0x06

Fetch velocity in cm/s

Definition at line 48 of file DGPS-driver.h.

#define DGPS_I2C_ADDR   0x06

Barometric sensor device address

Definition at line 43 of file DGPS-driver.h.


Function Documentation

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

Definition at line 71 of file DGPS-driver.h.

int DGPSreadDistToDestination ( tSensors  link )

Distance to destination in meters

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

Definition at line 215 of file DGPS-driver.h.

int DGPSreadHeading ( tSensors  link )

Read the current heading in degrees

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

Definition at line 148 of file DGPS-driver.h.

long DGPSreadLatitude ( tSensors  link )

Read the current location's latitude in decimal degree format

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

Definition at line 118 of file DGPS-driver.h.

long DGPSreadLongitude ( tSensors  link )

Read the current location's longitude in decimal degree format

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

Definition at line 128 of file DGPS-driver.h.

int DGPSreadRelHeading ( tSensors  link )

Angle to destination

Parameters:
linkthe DGPS port number
Returns:
heading in degrees

Definition at line 158 of file DGPS-driver.h.

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

Definition at line 98 of file DGPS-driver.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 169 of file DGPS-driver.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:
DGPS-test1.c.

Definition at line 108 of file DGPS-driver.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 138 of file DGPS-driver.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 181 of file DGPS-driver.h.


Variable Documentation

Array to hold I2C reply data

Definition at line 69 of file DGPS-driver.h.

Array to hold I2C command data

Definition at line 68 of file DGPS-driver.h.