Skip to content

[Help Wanted]: Intercompatibility LocationFilterPolicy and KalmanProfile #1636

@frankvollebregt

Description

@frankvollebregt

Required Reading

  • Confirmed

Plugin Version

5.0.4

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

Google Pixel 6

Device operating-systems(s)

Android 16

What do you require assistance about?

I migrated to v5 and was trying to get started with the new advanced filters (very nice to have available from the package!)

But as it turns out, there seem to be some (undocumented/unclear) incompatibilities.

Specifically:

  1. When I set the policy to passThrough, useKalman is always set to true
  2. When I set the policy to conservative, useKalman is always set to true
  3. When, in case 1. or 2. I disable useKalman, the policy is automatically set to adjust
  4. When, in case 1 or 2. I adjust the kalmanProfile, the policy is automatically set to adjust

Note that I am doing these changes by using a "sparse" update of the config (which has always worked perfectly for me in the past)

await bg.BackgroundGeolocation.setConfig(
  bg.Config(
    geolocation: bg.GeoConfig(
      filter: bg.LocationFilter(useKalman: false),
    ),
  ),
);

What I think may be happening is the whole filter is overridden at once, instead of the single property that I'm trying to adjust, essentially resetting back to adjust and default every time. I think this is unexpected, because for the bg.HttpConfig for example, I can update a single property (autoSync) without affecting the rest of my HttpConfig (in this case it is actually a bug and not just a "help wanted"/"documentation" issue)

If this is expected behavior, perhaps the flowchart/documentation can be adjusted to reflect this, because from the documentation it currently looks like there are 3 policies times 4 Kalman configurations = 12 combinations of these two parameters, but in reality only a few of them seem cross-compatible.

[Optional] Plugin Code and/or Config

[Optional] Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions