Line pointing towards specific location. Worldmap GPSD

Hey!
I am currently building a gps tracker :

[
    {
        "id": "edd053d57a890bfa",
        "type": "gpsd",
        "z": "1bfea58c27520ad5",
        "name": "",
        "hostname": "localhost",
        "port": "2947",
        "tpv": true,
        "sky": true,
        "info": false,
        "device": false,
        "gst": false,
        "att": true,
        "x": 130,
        "y": 400,
        "wires": [
            [
                "2b73428fbe98e7cc",
                "909c0fc218f24b91",
                "afa924e8cd09b5d9",
                "256a2efdb683a1ba",
                "4470c68ef5843a91",
                "cc0512b5b772ea7d",
                "a06bc5439a0e432c",
                "6c52e3028e3485a2",
                "39b2902a54cf76f3"
            ]
        ]
    },
    {
        "id": "4470c68ef5843a91",
        "type": "function",
        "z": "1bfea58c27520ad5",
        "name": "",
        "func": "msg.payload = {\n    name:\"\",\n    color: \"rgb(0,32,91)\",\n    icon : \"fa-crosshairs\",\n    iconColor : \"rgb(0,32,91)\",\n    iconSize : 500,\n    dasharray : \"30 20\",\n    lat : msg.payload.lat,\n    lon : msg.payload.lon,\n    \n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 400,
        "y": 400,
        "wires": [
            [
                "c0838482385fd77c",
                "136616a1efc48c37"
            ]
        ]
    },
    {
        "id": "c0838482385fd77c",
        "type": "worldmap-tracks",
        "z": "1bfea58c27520ad5",
        "name": "",
        "depth": "5",
        "layer": "combined",
        "smooth": false,
        "x": 630,
        "y": 400,
        "wires": [
            [
                "136616a1efc48c37"
            ]
        ]
    },
    {
        "id": "136616a1efc48c37",
        "type": "ui_worldmap",
        "z": "1bfea58c27520ad5",
        "group": "0a1f43e2696f8d80",
        "order": 5,
        "width": 0,
        "height": 0,
        "name": "",
        "lat": "",
        "lon": "",
        "zoom": "18",
        "layer": "OSMC",
        "cluster": "17",
        "maxage": "",
        "usermenu": "show",
        "layers": "hide",
        "panit": "true",
        "panlock": "false",
        "zoomlock": "false",
        "hiderightclick": "false",
        "coords": "deg",
        "showgrid": "true",
        "allowFileDrop": "false",
        "path": "/worldmap",
        "overlist": "DR,CO,RA,DN,HM",
        "maplist": "OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW",
        "mapname": "",
        "mapurl": "",
        "mapopt": "",
        "mapwms": false,
        "x": 640,
        "y": 440,
        "wires": []
    },
    {
        "id": "0a1f43e2696f8d80",
        "type": "ui_group",
        "name": "GNSS Tracker",
        "tab": "eb8313f9cc4c2238",
        "order": 1,
        "disp": false,
        "width": "20",
        "collapse": false,
        "className": ""
    },
    {
        "id": "eb8313f9cc4c2238",
        "type": "ui_tab",
        "name": "GNSS Tracker",
        "icon": "fa-map-o",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

It is really simple so far. so if you have a look at it, it gets the location through gpsd and displays the driven path.

Now I was wandering if there is a possibility to display a line pointing towars a specific Lat- and Longitude even if your GNSS receiver is moving?

Thanks in advance!

normally we try to draw a leader line in the direction the device is heading based on the speed. However you can override this by setting your own msg.payload.bearing and msg.payload.length - so yes if you calculate the bearing to the lat lon required based on your current position you can draw whatever line you want.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.