summaryrefslogtreecommitdiff
path: root/recipes-navigation
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-navigation')
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch33
1 files changed, 16 insertions, 17 deletions
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch b/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch
index 09f20b4..7ae2a7c 100644
--- a/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch
+++ b/recipes-navigation/gpsd/gpsd-3.20/0007-add-gll-vtg.patch
@@ -1,39 +1,38 @@
-From c8a23e6f4223ce1bba8b5863943c7bf5fe88383c Mon Sep 17 00:00:00 2001
+From 7ed7a9063a65b16b90ea03465a83cbbd16e3abb4 Mon Sep 17 00:00:00 2001
From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
-Date: Wed, 9 Dec 2020 15:28:05 +0200
+Date: Wed, 9 Dec 2020 18:51:48 +0200
Subject: [PATCH] add GLL and VTG to 'gpspipe -r' output in binary mode
---
- pseudonmea.c | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
+ pseudonmea.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
diff --git a/pseudonmea.c b/pseudonmea.c
-index 444be3d..c789adb 100644
+index 444be3d..398511b 100644
--- a/pseudonmea.c
+++ b/pseudonmea.c
-@@ -168,6 +168,21 @@ void gpsd_position_fix_dump(struct gps_device_t *session,
+@@ -168,6 +168,20 @@ void gpsd_position_fix_dump(struct gps_device_t *session,
* Differential base station ID */
(void)strlcat(bufp, ",", len);
nmea_add_checksum(bufp);
+ //$GNGGA,103527.00,4957.22994,N,03618.97862,E,1,12,0.89,180.3,M,17.0,M,,*4B
+ //$GNGLL,4957.22997,N,03618.97858,E,103526.00,A,A*7B
++ //we use the same values as in GGA sentence
+ char *bufgll = &bufp[strlen(bufp)];
+ (void)snprintf(bufgll, len,
+ "$GPGLL,%s,%c,%s,%c,%s,%c,A,",
-+ degtodm_str(session->gpsdata.fix.latitude, "%09.4f",
-+ lat_str),
++ lat_str,
+ ((session->gpsdata.fix.latitude > 0) ? 'N' : 'S'),
-+ degtodm_str(session->gpsdata.fix.longitude, "%010.4f",
-+ lon_str),
++ lon_str,
+ ((session->gpsdata.fix.longitude > 0) ? 'E' : 'W'),
+ time_str,
-+ fixquality == FIX_QUALITY_INVALID?'V':'A'
++ session->gpsdata.status ? 'A' : 'V'
+ );
+ nmea_add_checksum(bufgll);
}
}
-@@ -180,6 +195,7 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
+@@ -180,6 +194,7 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
char lat_str[BUF_SZ];
char lon_str[BUF_SZ];
char speed_str[BUF_SZ];
@@ -41,7 +40,7 @@ index 444be3d..c789adb 100644
char track_str[BUF_SZ];
char var_str[BUF_SZ];
char *var_dir = "";
-@@ -219,6 +235,26 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
+@@ -219,6 +234,26 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
time2_str,
var_str, var_dir);
nmea_add_checksum(bufp);
@@ -55,14 +54,14 @@ index 444be3d..c789adb 100644
+ //6 = Fixed text 'N' indicates that speed over ground in in knots
+ //7 = Speed over ground in kilometers/hour
+ //8 = Fixed text 'K' indicates that speed over ground is in kilometers/hour
++ //we use the same values as in RMC sentence
+ char *bufvtg = &bufp[strlen(bufp)];
+ (void)snprintf(bufvtg, len,
+ "$GPVTG,%s,T,%s,M,%s,N,%s,K,A,",
-+ f_str(session->gpsdata.fix.track, "%.3f", track_str),
++ track_str,
+ track_str,//it is not Magnetic track, but may be it is enough
-+ f_str(session->gpsdata.fix.speed * MPS_TO_KNOTS, "%.4f",
-+ kspeed_str),
-+ f_str(session->gpsdata.fix.speed, "%.4f", speed_str)
++ speed_str,
++ f_str(session->gpsdata.fix.speed, "%.4f", kspeed_str)
+ );
+ nmea_add_checksum(bufvtg);
}