Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Smooth out gps path on map (QLocation), how to ?



  • Hi
    I have recorded some route and I have gps data (lat,lon) for a number of points on that route (every 30 seconds).
    I would like to display this route on a QML map and make it smooth. Problem is that gps data vary with every point so displayed path is rough.
    My idea is to take some points from that route (like every minute) and use RouteQuery with multiple addWaypoint and use it for RouteModel to display route along these points, so it should prepare smooth route for me, but there will be a lot of waypoints in this query (I'm using MapBox)
    Is there a better way to do this ?

    Best,
    Marek



  • Idea with multiple wayPoints does not work, to many wayPoints...



  • @Marek said in Smooth out gps path on map (QLocation), how to ?:

    I would like to display this route on a QML map and make it smooth

    Have you try your app displaying a live GPS feed?
    If so then you may want to use your log file as source, take a look at this article.



  • @Pablo-J-Rogina Thanks for answering my question but I don't think this would help
    I have my gps coordinates what would be benefit of using live gps feed ?
    I'm using MapPolyline to create and display route taken by someone, but sometimes gps in phone gives odd values a few meters off, from time to time, so displayed path is not smooth as it is when I request routeModel from external provider with a couple of waypoints.
    Best,
    Marek



  • @Marek said in Smooth out gps path on map (QLocation), how to ?:

    I have my gps coordinates what would be benefit of using live gps feed ?

    To check how your QML map application plays "smoothly" with some other GSP data source other than your data log file.



  • @Pablo-J-Rogina its about a method you draw the line on the map. I know two:

    1. create MapPolyline
    2. use routeModel
      However RouteModel is using MapPolyline internally so it is only the question of accuracy of gps data and I don't have control over this.
      I have 1000 gps points, I could use them in groups, 20 points to single MapBox query, retrieve gps points returned by MapBox and create my MapPolyline from these points. But it looks to me like some awkward idea.

    Best,
    Marek


Log in to reply