OSDN Git Service

Add smallest displacement feature to FLP HAL
authorDavid Christie <dnchrist@google.com>
Wed, 8 Apr 2015 22:30:55 +0000 (15:30 -0700)
committerDavid Christie <dnchrist@google.com>
Wed, 8 Apr 2015 22:30:55 +0000 (15:30 -0700)
Change-Id: I73d5391be3640d5f5c9a1cbee3ed36beec9c1df0

include/hardware/fused_location.h

index 5c7821c..ff64aef 100644 (file)
@@ -228,6 +228,23 @@ typedef struct {
      * seconds.
      */
     int64_t period_ns;
+
+    /**
+     * The smallest displacement between reported locations in meters.
+     *
+     * If set to 0, then you should report locations at the requested
+     * interval even if the device is stationary.  If positive, you
+     * can use this parameter as a hint to save power (e.g. throttling
+     * location period if the user hasn't traveled close to the displacement
+     * threshold).  Even small positive values can be interpreted to mean
+     * that you don't have to compute location when the device is stationary.
+     *
+     * There is no need to filter location delivery based on this parameter.
+     * Locations can be delivered even if they have a displacement smaller than
+     * requested. This parameter can safely be ignored at the cost of potential
+     * power savings.
+     */
+    float smallest_displacement_meters;
 } FlpBatchOptions;
 
 #define FLP_RESULT_SUCCESS                       0