summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShoji Keita <awaittrot@shjk.jp>2022-11-05 15:35:55 +0900
committerShoji Keita <awaittrot@shjk.jp>2022-11-06 11:10:28 +0900
commit36c5206db195d04d8f54fda460d12d1adc372183 (patch)
tree84c85893b8dc8eb97469f643b71b198179083ac5
parent3f71a67b248c32b9c3db4003901ec52a67f987af (diff)
downloadgeoclue-36c5206db195d04d8f54fda460d12d1adc372183.tar.gz
mozilla: add speed field
-rw-r--r--src/gclue-mozilla.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gclue-mozilla.c b/src/gclue-mozilla.c
index 1a51bc2..8d17cb3 100644
--- a/src/gclue-mozilla.c
+++ b/src/gclue-mozilla.c
@@ -399,7 +399,7 @@ gclue_mozilla_create_submit_query (GClueMozilla *mozilla,
const char *url, *nick, *radiotype;
gsize data_len;
GList *iter;
- gdouble lat, lon, accuracy, altitude;
+ gdouble lat, lon, accuracy, altitude, speed;
guint64 time_ms;
gint64 mcc, mnc;
GClueConfig *config;
@@ -457,6 +457,12 @@ gclue_mozilla_create_submit_query (GClueMozilla *mozilla,
json_builder_add_double_value (builder, altitude);
}
+ speed = gclue_location_get_speed (location);
+ if (speed != GCLUE_LOCATION_SPEED_UNKNOWN) {
+ json_builder_set_member_name (builder, "speed");
+ json_builder_add_double_value (builder, speed);
+ }
+
json_builder_end_object (builder); /* position */
if (mozilla->priv->wifi) {