# Need to create a simulated route on node red

**URL:** <https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963>\
**Category:** Dashboard\
**Created:** [10 June 2021 08:12 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963 "2021-06-10T08:12:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffazul64](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@ffazul64](https://discourse.nodered.org/u/ffazul64)\
**Post date:** [10 June 2021 08:12 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963/1 "2021-06-10T08:12:16Z")

</div>

I have the following coordinates which i want to plot periodically one after the other on world maps at an interval of 10 seconds one after the other. At a time only one coordinate should show on the map.  
Any help would be appreciated.  
3.131642793965682, 101.65111593162418  
3.131537809594334, 101.65140507041673  
3.1312944366930315, 101.65145764110629  
3.1310987839274307, 101.65139312253274  
3.1308816570350233, 101.65122346258008  
3.1307528124841864, 101.6510800879722  
3.1306716881228427, 101.6510251277055  
3.130695548227894, 101.65104902347346  
3.1306096518471627, 101.65091998632637  
3.1305500015786314, 101.65073359933612  
3.130492737317644, 101.6506380162642  
3.130485579284798, 101.65056632896027  
3.1304092269314165, 101.65044446054357  
3.130320944515891, 101.65047074588834  
3.1303304885611785, 101.6505137582707

---

<div class="post-metadata">

**Author:** ![ffazul64](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@ffazul64](https://discourse.nodered.org/u/ffazul64)\
**Post date:** [10 June 2021 08:13 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963/2 "2021-06-10T08:13:36Z")

</div>

Following is my flow. I want to simulate a person walking along the coordinates mentioned in the Original post.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5fa6a820b267842c77da462c2c5466a3bea84b6.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 June 2021 12:36 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963/3 "2021-06-10T12:36:38Z")

</div>

If you save those to a simple text file then you could do something like this (you will need to change the file node to point to your file location)

```auto
[{"id":"ab58e4265487e05b","type":"inject","z":"64eed394.c7935c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":120,"y":640,"wires":[["3a6070de389e51a1"]]},{"id":"3a6070de389e51a1","type":"file in","z":"64eed394.c7935c","name":"","filename":"/tmp/points.txt","format":"lines","chunk":false,"sendError":false,"encoding":"none","x":300,"y":640,"wires":[["5427f59508fd1d6a"]]},{"id":"5427f59508fd1d6a","type":"delay","z":"64eed394.c7935c","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":500,"y":640,"wires":[["3e5be3673b1aa360"]]},{"id":"4d8c7195b67d9b07","type":"debug","z":"64eed394.c7935c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":700,"wires":[]},{"id":"3e5be3673b1aa360","type":"csv","z":"64eed394.c7935c","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"lat,lon","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":670,"y":640,"wires":[["8a414e7f6f155664"]]},{"id":"8a414e7f6f155664","type":"template","z":"64eed394.c7935c","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"name\":\"Fred\", \"lat\":{{payload.lat}}, \"lon\":{{payload.lon}}, \"icon\":\"fa-male\" }","output":"json","x":800,"y":640,"wires":[["4d8c7195b67d9b07","e3f5f112.39baa"]]}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/99423994d513f3112d2628a8a168e62b123a2456.png)

---

<div class="post-metadata">

**Author:** ![ffazul64](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@ffazul64](https://discourse.nodered.org/u/ffazul64)\
**Post date:** [10 June 2021 13:04 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963/4 "2021-06-10T13:04:47Z")

</div>

Thank you, that seems to do the job 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 July 2021 13:04 UTC](https://discourse.nodered.org/t/need-to-create-a-simulated-route-on-node-red/46963/5 "2021-07-10T13:04:52Z")

</div>

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