[Merge] lp:~osomon/qtubuntu-sensors/shield-against-nans into lp:qtubuntu-sensors

Olivier Tilloy olivier.tilloy at canonical.com
Wed Sep 24 10:10:10 UTC 2014


> While at it, is it correct to set the altitude to 0 and to copy over the
> timestamp?

Setting the altitude to 0 if no value is set seems fine to me. I just checked and the constructor of QGeoCoordinate sets altitude to NaN by default, so we’d better be covered and initialize it to 0 if unknown. In any case I also updated my oxide MR (https://code.launchpad.net/~osomon/oxide/geolocation-doesnt-like-nans/+merge/235667) to shield it against invalid altitudes too (better safe than sorry).

As for the timestamp, I’m not really sure it makes sense to check for NaN for the value returned by ua_location_position_update_get_timestamp(…). I would expect the timestamp to be a mandatory value set by the location plugin. Maybe Thomas can comment on this?
-- 
https://code.launchpad.net/~osomon/qtubuntu-sensors/shield-against-nans/+merge/235670
Your team Ubuntu Phablet Team is subscribed to branch lp:qtubuntu-sensors.



More information about the Ubuntu-reviews mailing list