Commit 7d44e3c5 authored by Zeeshan Ali's avatar Zeeshan Ali

modem-gps: Expose altitude of location

parent 078ff5fd
......@@ -167,7 +167,7 @@ on_get_gps_nmea_ready (GObject *source_object,
MMModemLocation *modem_location = MM_MODEM_LOCATION (source_object);
MMLocationGpsNmea *location_nmea;
GeocodeLocation *location;
gdouble latitude, longitude, accuracy;
gdouble latitude, longitude, accuracy, altitude;
GError *error = NULL;
location_nmea = mm_modem_location_get_gps_nmea_finish (modem_location,
......@@ -187,12 +187,15 @@ on_get_gps_nmea_ready (GObject *source_object,
latitude = mm_location_gps_raw_get_latitude (priv->gps_raw);
longitude = mm_location_gps_raw_get_longitude (priv->gps_raw);
altitude = mm_location_gps_raw_get_altitude (priv->gps_raw);
g_clear_object (&priv->gps_raw);
accuracy = get_accuracy_from_nmea (source, location_nmea);
g_object_unref (location_nmea);
location = geocode_location_new (latitude, longitude, accuracy);
g_object_set (location, "altitude", altitude, NULL);
gclue_location_source_set_location (GCLUE_LOCATION_SOURCE (source),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment