Git Product home page Git Product logo

Comments (13)

farfromrefug avatar farfromrefug commented on July 18, 2024 1

@Lezh1k about the (0,0) coordinates. I was getting those too. For me the reason was that i was using an emulator without sensors. So i was only getting sdi from onLocationChange and so the KalmanFilter was never "initialized" with a Sensor event. I fixed it as explained here #52 (comment)

from mad-location-manager.

Lezh1k avatar Lezh1k commented on July 18, 2024

Hello. :)

Please try to set geohash default precision to 6 and geohash default min point count to 2.

from mad-location-manager.

adhithyagnair avatar adhithyagnair commented on July 18, 2024

Ok. I'll do it. And I have an other doubt, From the documentation and sample I found that we can filter the obtained location using
m_geoHashRTFilter.filter(location);

And the filtered location from it by executing the following code.
` List routeFilteredWithGeoHash = new ArrayList<>(m_geoHashRTFilter.getGeoFilteredTrack().size());

    for (Location loc : new ArrayList<>(m_geoHashRTFilter.getGeoFilteredTrack())) {
        routeFilteredWithGeoHash.add(new LatLng(loc.getLatitude(), loc.getLongitude()));
    }`

And I'm expecting the last location that I fed for filtering will be available as the last entry in this list (list here: routeFilteredWithGeoHash ). Is that correct?

Or there is anything more to it?

from mad-location-manager.

adhithyagnair avatar adhithyagnair commented on July 18, 2024

So I had a trial run based on this code and assumption, and this is the result. I took the same route (one in the question)

screen shot 2019-02-05 at 4 04 16 pm
screen shot 2019-02-05 at 4 04 48 pm

from mad-location-manager.

erlanamanatov avatar erlanamanatov commented on July 18, 2024

As far as I can see, you are saving KalmanFiltered locations in locationChanged() method, not GeohashRTFilter filtered. So I don't think, that you are losing a lot of data because of geohash precision and geohash min point count parameters.

from mad-location-manager.

adhithyagnair avatar adhithyagnair commented on July 18, 2024

I have tried both of them, for geoHashing along with the above mentioned code I have updated my locationChanged() method as

@Override public void locationChanged(Location location) { if (location != null ) { m_geoHashRTFilter.filter(location); List<LatLng> filteredLocation = getFilteredLocation(); if (!filteredLocation.isEmpty()) { int len = filteredLocation.size(); DataManager.getInstance(LocationService.this) .saveDeviceTracking(filteredLocation.get(len - 1).getLatitude(), filteredLocation.get(len - 1).getLongitude()); } } }

` public List getFilteredLocation() {
List routeFilteredWithGeoHash = new ArrayList<>(m_geoHashRTFilter.getGeoFilteredTrack().size());

    for (Location loc : new ArrayList<>(m_geoHashRTFilter.getGeoFilteredTrack())) {
        routeFilteredWithGeoHash.add(new LatLng(loc.getLatitude(), loc.getLongitude()));
    }
    return routeFilteredWithGeoHash;
}`

where LatLng is a POJO that I have created.

But even though the result is not so trust worthy.

from mad-location-manager.

Lezh1k avatar Lezh1k commented on July 18, 2024

I still can't understand what's happening.
Do you receive some wrong coordinates (like on this https://user-images.githubusercontent.com/30405024/52267760-e7da8300-295f-11e9-95b9-448b402939fa.png screen) ?
Or you don't receive wrong coordinates, but the route contains small amount of coordinates ?

Sorry, can't get it.
Also have you tried our example application on this route?

from mad-location-manager.

adhithyagnair avatar adhithyagnair commented on July 18, 2024

At first without using geohash I got only a few but correct coordinates.

Later I have used geohashing with precision to 6 and min point count to 2.
It has few more correct points compared to the first one, but surprisingly I'm getting some points from wrong coordinates -one from Africa :(

from mad-location-manager.

Lezh1k avatar Lezh1k commented on July 18, 2024

Now I got it. )) Thanks.

from mad-location-manager.

Lezh1k avatar Lezh1k commented on July 18, 2024

Seems you've got (0, 0) coordinate? I'll look at this today :)
What about our demo application ?

from mad-location-manager.

adhithyagnair avatar adhithyagnair commented on July 18, 2024

No, it is not (0,0) coordinate. I couldn't test with your demo app, I'll check it anyway.

from mad-location-manager.

Lezh1k avatar Lezh1k commented on July 18, 2024

I mean that there is (0, 0) somewhere compensated by Kalman filter.
Can you share your project? I'll try to reproduce :)

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

Check your GPS frequency I bet it's 1Hz or bellow and you are not having enough points GEOHASH_DEFAULT_MIN_POINT_COUNT for the precision GEOHASH_DEFAULT_PREC.

Try walking instead of driving a car.... lol

from mad-location-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.