# Get coordinates of a satellite from http request

**URL:** https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441
**Category:** General
**Created:** [8 April 2020 08:31 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441 "2020-04-08T08:31:25Z")
**Posts on this page:** 13
**Page:** 2

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [8 April 2020 10:12 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/21 "2020-04-08T10:12:58Z")

</div>

Updated flow that solves the timestamp issue, and shows that the prepopulated values from the node config take precedence over any configuration set by the message object. If you check the code, it verifies it doesn't care about `msg.tle1` and `msg.tle2`.

```auto
[{"id":"d654e484.15bf58","type":"inject","z":"1f20f9bb.524146","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1220,"wires":[["4db729cd.98173"]]},{"id":"4db729cd.98173","type":"http request","z":"1f20f9bb.524146","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://celestrak.com/satcat/tle.php?CATNR=44109","tls":"","persist":false,"proxy":"","authType":"","x":150,"y":1280,"wires":[["b6d25ac1.e0c27"]]},{"id":"b6d25ac1.e0c27","type":"split","z":"1f20f9bb.524146","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":1340,"wires":[["dea2ab0.a701dd8"]]},{"id":"4e14cbcf.6e9724","type":"tle","z":"1f20f9bb.524146","satid":"BLUEWALKER 1 ","tle1":"1 44105U 19018AD 20099.11563392 .00001300 00000-0 43406-4 0 9998","tle2":"2 44105 97.4795 168.9341 0059630 107.2691 253.5087 15.31277171 57050","coordsys":"latlongdeg","name":"(TLE prefilled with BLUEWALKER 1 data)","x":240,"y":1540,"wires":[["b4494ddc.8d245"]]},{"id":"b4494ddc.8d245","type":"debug","z":"1f20f9bb.524146","name":"Message coming out of TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":220,"y":1600,"wires":[]},{"id":"dea2ab0.a701dd8","type":"switch","z":"1f20f9bb.524146","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":130,"y":1400,"wires":[["45092131.d93f58"],["5205a604.c26b3"],["721315d6.d00c4c"],["89f21cab.96098"]]},{"id":"45092131.d93f58","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"satid","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1340,"wires":[["1df4d812.287138"]]},{"id":"5205a604.c26b3","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tel1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1380,"wires":[["1df4d812.287138"]]},{"id":"721315d6.d00c4c","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tel2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1420,"wires":[["1df4d812.287138"]]},{"id":"1df4d812.287138","type":"join","z":"1f20f9bb.524146","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":1400,"wires":[["320515f8.80ca82"]]},{"id":"89f21cab.96098","type":"change","z":"1f20f9bb.524146","name":"set timestamp","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1460,"wires":[["1df4d812.287138"]]},{"id":"87d12307.e68de","type":"debug","z":"1f20f9bb.524146","name":"Message going into TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":1460,"wires":[]},{"id":"320515f8.80ca82","type":"change","z":"1f20f9bb.524146","name":"put timestamp back in payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"timestamp","tot":"msg"},{"t":"delete","p":"timestamp","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1460,"wires":[["4e14cbcf.6e9724","87d12307.e68de"]]}]

```

Edit:  
Flow that instead used `msg.tle1`/2 rather than `msg.tel1`/2, no difference in output

```auto
[{"id":"d654e484.15bf58","type":"inject","z":"1f20f9bb.524146","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1220,"wires":[["4db729cd.98173"]]},{"id":"4db729cd.98173","type":"http request","z":"1f20f9bb.524146","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://celestrak.com/satcat/tle.php?CATNR=44109","tls":"","persist":false,"proxy":"","authType":"","x":150,"y":1280,"wires":[["b6d25ac1.e0c27"]]},{"id":"b6d25ac1.e0c27","type":"split","z":"1f20f9bb.524146","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":1340,"wires":[["dea2ab0.a701dd8"]]},{"id":"4e14cbcf.6e9724","type":"tle","z":"1f20f9bb.524146","satid":"BLUEWALKER 1 ","tle1":"1 44105U 19018AD 20099.11563392 .00001300 00000-0 43406-4 0 9998","tle2":"2 44105 97.4795 168.9341 0059630 107.2691 253.5087 15.31277171 57050","coordsys":"latlongdeg","name":"(TLE prefilled with BLUEWALKER 1 data)","x":240,"y":1540,"wires":[["b4494ddc.8d245"]]},{"id":"b4494ddc.8d245","type":"debug","z":"1f20f9bb.524146","name":"Message coming out of TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":220,"y":1600,"wires":[]},{"id":"dea2ab0.a701dd8","type":"switch","z":"1f20f9bb.524146","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":130,"y":1400,"wires":[["45092131.d93f58"],["5205a604.c26b3"],["721315d6.d00c4c"],["89f21cab.96098"]]},{"id":"45092131.d93f58","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"satid","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1340,"wires":[["1df4d812.287138"]]},{"id":"5205a604.c26b3","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1380,"wires":[["1df4d812.287138"]]},{"id":"721315d6.d00c4c","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1420,"wires":[["1df4d812.287138"]]},{"id":"1df4d812.287138","type":"join","z":"1f20f9bb.524146","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":1400,"wires":[["320515f8.80ca82"]]},{"id":"89f21cab.96098","type":"change","z":"1f20f9bb.524146","name":"set timestamp","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1460,"wires":[["1df4d812.287138"]]},{"id":"87d12307.e68de","type":"debug","z":"1f20f9bb.524146","name":"Message going into TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":1460,"wires":[]},{"id":"320515f8.80ca82","type":"change","z":"1f20f9bb.524146","name":"put timestamp back in payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"timestamp","tot":"msg"},{"t":"delete","p":"timestamp","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1460,"wires":[["4e14cbcf.6e9724","87d12307.e68de"]]}]

```

Flow that has an empty TLE node instead (no output, all values NaN):

```auto
[{"id":"d654e484.15bf58","type":"inject","z":"1f20f9bb.524146","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1220,"wires":[["4db729cd.98173"]]},{"id":"4db729cd.98173","type":"http request","z":"1f20f9bb.524146","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://celestrak.com/satcat/tle.php?CATNR=44109","tls":"","persist":false,"proxy":"","authType":"","x":150,"y":1280,"wires":[["b6d25ac1.e0c27"]]},{"id":"b6d25ac1.e0c27","type":"split","z":"1f20f9bb.524146","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":1340,"wires":[["dea2ab0.a701dd8"]]},{"id":"4e14cbcf.6e9724","type":"tle","z":"1f20f9bb.524146","satid":"","tle1":"","tle2":"","coordsys":"latlongdeg","name":"(TLE not prepopulated)","x":180,"y":1540,"wires":[["b4494ddc.8d245"]]},{"id":"b4494ddc.8d245","type":"debug","z":"1f20f9bb.524146","name":"Message coming out of TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":220,"y":1600,"wires":[]},{"id":"dea2ab0.a701dd8","type":"switch","z":"1f20f9bb.524146","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":130,"y":1400,"wires":[["45092131.d93f58"],["5205a604.c26b3"],["721315d6.d00c4c"],["89f21cab.96098"]]},{"id":"45092131.d93f58","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"satid","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1340,"wires":[["1df4d812.287138"]]},{"id":"5205a604.c26b3","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1380,"wires":[["1df4d812.287138"]]},{"id":"721315d6.d00c4c","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1420,"wires":[["1df4d812.287138"]]},{"id":"1df4d812.287138","type":"join","z":"1f20f9bb.524146","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":1400,"wires":[["320515f8.80ca82"]]},{"id":"89f21cab.96098","type":"change","z":"1f20f9bb.524146","name":"set timestamp","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1460,"wires":[["1df4d812.287138"]]},{"id":"87d12307.e68de","type":"debug","z":"1f20f9bb.524146","name":"Message going into TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":1460,"wires":[]},{"id":"320515f8.80ca82","type":"change","z":"1f20f9bb.524146","name":"put timestamp back in payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"timestamp","tot":"msg"},{"t":"delete","p":"timestamp","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1460,"wires":[["4e14cbcf.6e9724","87d12307.e68de"]]}]

```

---

<div class="post-metadata">

### Author: ![JustSeen](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@JustSeen](https://discourse.nodered.org/u/JustSeen)
#### Post date: [8 April 2020 10:14 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/22 "2020-04-08T10:14:08Z")

</div>

Yes that's my problem.  
Moreover, it sends 4 data to TLE instead of 1.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 10:27 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/23 "2020-04-08T10:27:34Z")

</div>

Arugh, I just realized that I had prefilled in the TLE node and so I was getting false results (arugh).  
However this should be an easy PR to check for the inputs and use them in the node. Let me take a look.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 11:11 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/24 "2020-04-08T11:11:14Z")

</div>

All right I've got a fix for the code. If you want to try it out, go to the  
`.node-red/node_modules/node-red-contrib-satellites`  
folder and edit `satellites.js`  
go to line 76 which is ` var satellites = [];` and add the following

```auto
        // override tle1 if passed suitable value
            if ('satid' in msg) {
                if ( (typeof msg.satid === 'string') && (msg.satid.length < 1024) ) {
                    node.satid = msg.satid
                }
            }
        // override tle1 if passed suitable value
            if ('tle1' in msg) {
                if ( (typeof msg.tle1 === 'string') && (msg.tle1.length < 1024) ) {
                    node.tle1 = msg.tle1
                }
            }
        // override tle1 if passed suitable value
            if ('tle2' in msg) {
                if ( (typeof msg.tle2 === 'string') && (msg.tle2.length < 1024) ) {
                    node.tle2 = msg.tle2
                }
            }

```

Save the file and stop/start NR then try the second flow (using `msg.tle1/2`) that @afelix provided.

Let me know if it works for you.

---

<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: [8 April 2020 11:23 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/25 "2020-04-08T11:23:17Z")

</div>

Rather than use a split etc this may be a case where a simple function node can do it all much more cleanly. (Alongside the fix for the node itself)

---

<div class="post-metadata">

### Author: ![JustSeen](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@JustSeen](https://discourse.nodered.org/u/JustSeen)
#### Post date: [8 April 2020 11:30 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/26 "2020-04-08T11:30:29Z")

</div>

I'm sorry but i don't understand what i have to do in my flow.  
I changed the code as you said but i don't know what to change on NR.  
btw yes i used a split instead

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 11:32 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/27 "2020-04-08T11:32:16Z")

</div>

PR created for the node and an example also provided.  
@dceejay your right, the function would be simpler, but the split/join should be easier for someone new to understand.

I'll put together a flow with the function also.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 11:33 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/28 "2020-04-08T11:33:27Z")

</div>

Now try this flow that @afelix provided

```auto
[{"id":"d654e484.15bf58","type":"inject","z":"1f20f9bb.524146","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1220,"wires":[["4db729cd.98173"]]},{"id":"4db729cd.98173","type":"http request","z":"1f20f9bb.524146","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://celestrak.com/satcat/tle.php?CATNR=44109","tls":"","persist":false,"proxy":"","authType":"","x":150,"y":1280,"wires":[["b6d25ac1.e0c27"]]},{"id":"b6d25ac1.e0c27","type":"split","z":"1f20f9bb.524146","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":1340,"wires":[["dea2ab0.a701dd8"]]},{"id":"4e14cbcf.6e9724","type":"tle","z":"1f20f9bb.524146","satid":"BLUEWALKER 1 ","tle1":"1 44105U 19018AD 20099.11563392 .00001300 00000-0 43406-4 0 9998","tle2":"2 44105 97.4795 168.9341 0059630 107.2691 253.5087 15.31277171 57050","coordsys":"latlongdeg","name":"(TLE prefilled with BLUEWALKER 1 data)","x":240,"y":1540,"wires":[["b4494ddc.8d245"]]},{"id":"b4494ddc.8d245","type":"debug","z":"1f20f9bb.524146","name":"Message coming out of TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":220,"y":1600,"wires":[]},{"id":"dea2ab0.a701dd8","type":"switch","z":"1f20f9bb.524146","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":130,"y":1400,"wires":[["45092131.d93f58"],["5205a604.c26b3"],["721315d6.d00c4c"],["89f21cab.96098"]]},{"id":"45092131.d93f58","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"satid","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1340,"wires":[["1df4d812.287138"]]},{"id":"5205a604.c26b3","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1380,"wires":[["1df4d812.287138"]]},{"id":"721315d6.d00c4c","type":"change","z":"1f20f9bb.524146","name":"","rules":[{"t":"set","p":"tle2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1420,"wires":[["1df4d812.287138"]]},{"id":"1df4d812.287138","type":"join","z":"1f20f9bb.524146","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":1400,"wires":[["320515f8.80ca82"]]},{"id":"89f21cab.96098","type":"change","z":"1f20f9bb.524146","name":"set timestamp","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1460,"wires":[["1df4d812.287138"]]},{"id":"87d12307.e68de","type":"debug","z":"1f20f9bb.524146","name":"Message going into TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1010,"y":1460,"wires":[]},{"id":"320515f8.80ca82","type":"change","z":"1f20f9bb.524146","name":"put timestamp back in payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"timestamp","tot":"msg"},{"t":"delete","p":"timestamp","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1460,"wires":[["4e14cbcf.6e9724","87d12307.e68de"]]}]

```

---

<div class="post-metadata">

### Author: ![JustSeen](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@JustSeen](https://discourse.nodered.org/u/JustSeen)
#### Post date: [8 April 2020 11:36 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/29 "2020-04-08T11:36:23Z")

</div>

Same result for me 😕  
Dunno is i'm doing something wrong but the timestamp overwrite again.

---

<div class="post-metadata">

### Author: ![JustSeen](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@JustSeen](https://discourse.nodered.org/u/JustSeen)
#### Post date: [8 April 2020 11:37 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/30 "2020-04-08T11:37:50Z")

</div>

And as you can see, i have still a lot of response from TLE (4) one for each msg.

 ![satellite4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/926ea093cb63fed8ab03b7944187fcb545d8309a.png)

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 11:43 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/31 "2020-04-08T11:43:05Z")

</div>

You didn't use the `join` node to join the four mesages together.

Try this simpler flow using a function instead of the split/join (a @dceejay suggestion)

```auto
[{"id":"736f681c.fb3ea8","type":"inject","z":"6eeba0c2.aa0738","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":560,"wires":[["70029dca.401c34"]]},{"id":"70029dca.401c34","type":"http request","z":"6eeba0c2.aa0738","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://celestrak.com/satcat/tle.php?CATNR=44109","tls":"","persist":false,"proxy":"","authType":"","x":130,"y":620,"wires":[["dcbe4635.b98e6"]]},{"id":"dcbe4635.b98e6","type":"function","z":"6eeba0c2.aa0738","name":"Move the data to the override values","func":"var p = msg.payload.split(\"\\n\");\nmsg.satid = p[0]\nmsg.tle1 = p[1]\nmsg.tle2 = p[2]\nmsg.payload = Date.now()\n\nreturn msg;","outputs":1,"noerr":0,"x":210,"y":680,"wires":[["4f94285d.8cc2f"]]},{"id":"4f94285d.8cc2f","type":"tle","z":"6eeba0c2.aa0738","satid":"BLUEWALKER 1 ","tle1":"","tle2":"2 44105 97.4795 168.9341 0059630 107.2691 253.5087 15.31277171 57050","coordsys":"latlongdeg","name":"(TLE prefilled with BLUEWALKER 1 data)","x":220,"y":740,"wires":[["f26379b6.1eb2f8"]]},{"id":"f26379b6.1eb2f8","type":"debug","z":"6eeba0c2.aa0738","name":"Message coming out of TLE node","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":200,"y":800,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [8 April 2020 11:51 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/32 "2020-04-08T11:51:44Z")

</div>

@JustSeen just sent me a message (he hit his post limit) that this solved the issue.

---

<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: [22 April 2020 11:51 UTC](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441/33 "2020-04-22T11:51:44Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441.md?page=1)
