aboutsummaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-11-22 14:57:25 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-11-22 15:29:10 -0800
commitc594f767d6be434b7cdd09468e4736574aa77415 (patch)
tree0bf9356a464147c048f633fc70ebfad61122428f /binding
parent0cc78ea27bc2a67c47223d645ad9268d4f8d8598 (diff)
binding: gps: add tracking to event outputeel_4.99.3eel/4.99.34.99.3
Add tracking/heading value in degrees from true north for navigation applications Bug-AGL: SPEC-1068 Change-Id: I1798648bc1ea0076036f20f1312adef20b7ab1c1 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-gps-binding.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/binding/afm-gps-binding.c b/binding/afm-gps-binding.c
index 91b82cd..90d9155 100644
--- a/binding/afm-gps-binding.c
+++ b/binding/afm-gps-binding.c
@@ -101,6 +101,11 @@ static json_object *populate_json_data(json_object *jresp)
json_object_object_add(jresp, "speed", value);
}
+ if (data.set & TRACK_SET) {
+ value = json_object_new_double(data.fix.track);
+ json_object_object_add(jresp, "track", value);
+ }
+
if (data.set & TIME_SET) {
char time[30];
unix_to_iso8601(data.fix.time, (char *) &time, sizeof(time));