Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kalman location service started location random coords #130

Open
isamirkhaan1 opened this issue Oct 5, 2023 · 2 comments
Open

Kalman location service started location random coords #130

isamirkhaan1 opened this issue Oct 5, 2023 · 2 comments

Comments

@isamirkhaan1
Copy link

isamirkhaan1 commented Oct 5, 2023

Hey,

I am using the Kalman Service to draw a route, in parallel, I'm also using the fucedlocation to draw another route. The purpose is to compare both paths and see which is more accurate.
For the last few hours, I've been getting weird random locations from the Kalman Service, which can be seen below.

Screenshot 2023-10-05 at 16 02 00

Here is the implementation

internal class MadLocationManager(
    private val context: Context
) : LocationServiceInterface {
    private lateinit var geoHashRTFilter: GeohashRTFilter

    init {
        ServicesHelper.addLocationServiceInterface(this)
    }

    override fun locationChanged(location: Location?) {
        location ?: return
        Log.i(TAG, "locationChanged: $location")

            RxBus.send(location)
        }
  
}

edit:
The issue doesn't happen on default settings. But if I change onlyGpsSensor from true to false and set provider to Settings.LocationProvider.FUSED

Settings(
        /* accelerationDeviation = */ Utils.ACCELEROMETER_DEFAULT_DEVIATION,
        /* gpsMinDistance = */ LOCATION_UPDATE_MIN_DISTANCE,
        /* gpsMinTime = */ X,
        /* positionMinTime = */ Utils.SENSOR_POSITION_MIN_TIME,
        /* geoHashPrecision = */ Utils.GEOHASH_DEFAULT_PREC,
        /* geoHashMinPointCount = */ Utils.GEOHASH_DEFAULT_MIN_POINT_COUNT,
        /* sensorFrequencyHz = */ Utils.SENSOR_DEFAULT_FREQ_HZ,
        /* logger = */ null,
        /* filterMockGpsCoordinates = */ true,
        /* onlyGpsSensor = */ true,
        /* useGpsSpeed = */ false,
        /* velFactor = */ Utils.DEFAULT_VEL_FACTOR,
        /* posFactor = */ Utils.DEFAULT_POS_FACTOR,
        /* provider = */ Settings.LocationProvider.GPS
    )

@Lezh1k
Copy link
Collaborator

Lezh1k commented Nov 3, 2023

Hello there.
Actually there is an error in java version now.
I recommend to try out version in lib_cpp branch (lib folder). But there is only C++ version of filter for now (with a quite simple API) .

@gfrancischini
Copy link

Hi @Lezh1k. We are experiencing (maybe) a similar issue. Most of our users does not seems to have this error but on couple of Samsung devices we see wrong coordinates in the middle of nowhere (like in the middle of the ocean)

Do. you think that it is related to the bug mentioned in your comment? is there a new version with this bug fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants