|
|
2008-09-05
, 10:33
|
|
Posts: 7 |
Thanked: 0 times |
Joined on Sep 2007
|
#12
|
Some GPS devices support both NMEA and a proprietary "binary" format that can be accessed only via their software. And for some of those kinds of devices, the amount of data available via NMEA is less than the amount of data available via their binary format. It sucks, but unfortunately it's a fact of life. :/
$GPGGA,102551.000,5029.1071,N,01718.6271,E,1,07,1.3,218.1,M,42.9,M,,0000*5A $GPRMC,102551.000,A,5029.1071,N,01718.6271,E,0.00,,050908,0,A*6E
|
|
2008-09-05
, 11:39
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#13
|
|
|
2008-09-05
, 11:43
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#14
|
|
|
2008-09-05
, 14:57
|
|
Posts: 348 |
Thanked: 61 times |
Joined on Dec 2007
|
#15
|
|
|
2008-09-05
, 16:55
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#16
|
On my N800 with OS2008, the GPS info shows everything - speed, altitude, satellite information, etc. It's not Maemo Mapper, it's either your GPS receiver or your OS.
|
|
2008-09-25
, 08:42
|
|
Posts: 7 |
Thanked: 0 times |
Joined on Sep 2007
|
#17
|
|
|
2008-09-25
, 17:23
|
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#18
|
|
|
2009-09-15
, 10:27
|
|
Posts: 4 |
Thanked: 4 times |
Joined on Sep 2009
|
#19
|
| The Following User Says Thank You to yurihua For This Useful Post: | ||
|
|
2009-09-16
, 16:18
|
|
Posts: 4 |
Thanked: 4 times |
Joined on Sep 2009
|
#20
|


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len);
int
main()
{
char buf[64];
int fd=open("/dev/rfcomm0", O_RDWR);
set_gps(fd, 1, 0, 1, buf, 64); /* GLL @ 1 Hz */
set_gps(fd, 2, 0, 5, buf, 64); /* GSA @ 0.2 Hz */
set_gps(fd, 3, 0, 1, buf, 64); /* GSV @ 1 Hz*/
set_gps(fd, 5, 0, 1, buf, 64); /* VTG @ 1 Hz */
}
/*
* fd: the file to write
* msg_type: NMEA Query/Rate control msg type: 1-9
* See above post for details in 'NMEA Reference Manual', Chapter
* 2, '103-Query/Rate Control'.
* mode: query or setRate: 0=setRate, 1=Query
* rate: off=0, max=255, unit: second
* buf: output buffer
* buf_len: output buffer len
*/
void set_gps(int fd, int msg_type, int mode, int rate, char *buf, int buf_len)
{
char *sptr=0;
char *ptail=0;
int csum=0;
int buf_tmp_size=0;
memset(buf, 0, buf_len);
snprintf(buf, buf_len, "%s,0%d,0%d,0%d,01*", "$PSRF103", msg_type, mode, rate);
/* calculate the check sum ... */
sptr=buf+1; /*skip the $*/
buf_tmp_size=strlen(buf);
ptail=buf+buf_tmp_size;
while(*sptr && *sptr != '*')
csum ^= *sptr++;
snprintf(ptail, buf_len-buf_tmp_size, "%x\r\n", csum);
printf("%s", buf);
write(fd, buf, strlen(buf));
}
| The Following User Says Thank You to yurihua For This Useful Post: | ||
It may be that Maemo-mapper uses a different NMEA sentances to extract the speed/track data and therefore ignores your outputs?