#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include "BBC/GPS.h"
Defines | |
| #define | SL_ERROR -1 |
| Error on a serial line operation. | |
| #define | PREAMBLE (( '@' << 24) | ('@' << 16) | ('E' << 8) | ('q' << 0)) |
| Internal constant for @Eq. | |
| #define | POSTAMBLE (('\r' << 8) | ('\n' << 0)) |
| Internal constant for CR LF. | |
Functions | |
| int | set_baud_rate (int fd, int rate) |
| Sets the BAUD rate. More... | |
| int | set_raw_mode (int fd) |
| Sets the serial line into raw mode. More... | |
| int | flush_stream (int fd) |
| Flushs the serial line. More... | |
| unsigned int | cvt2 (const unsigned char *beg) |
| Converts 2 digit string to a number, base 10. More... | |
| GPS_status | GPS_verify (const unsigned char buf[GPS_K_PM_MBF_SIZE]) |
| Performs rudimentary checks on the GPS record. More... | |
| int | GPS_checksum_verify (const unsigned char buf[GPS_K_PM_MBF_SIZE]) |
| Verifies the checksum for the GPS record. More... | |
| int | GPS_init (int fd) |
| Initializes the GPS device. More... | |
| int | GPS_open (const char *dev_name) |
| Opens a file descriptor to the GPS device. More... | |
| int | GPS_read (int fd, unsigned char buf[GPS_K_PM_MBF_SIZE]) |
| Reads the GPS message. More... | |
| int | GPS_rate_set (int fd, int rate) |
| Sets the update frequency. More... | |
| time_t | GPS_utc_get (const unsigned char buf[GPS_K_PM_MBF_SIZE]) |
| Converts a position message in Motorola Binary Format to a UTC time. The precision is seconds. More... | |
|
|
Converts 2 digit string to a number, base 10.
|
|
|
Flushs the serial line.
|
|
|
Verifies the checksum for the GPS record.
|
|
|
Initializes the GPS device.
|
|
|
Opens a file descriptor to the GPS device.
|
|
||||||||||||
|
Sets the update frequency.
|
|
||||||||||||
|
Reads the GPS message.
|
|
|
Converts a position message in Motorola Binary Format to a UTC time. The precision is seconds.
|
|
|
Performs rudimentary checks on the GPS record.
|
|
||||||||||||
|
Sets the BAUD rate.
|
|
|
Sets the serial line into raw mode.
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001