# 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:** 1
**Showing post:** 24

<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.

---

_[View the full topic](https://discourse.nodered.org/t/get-coordinates-of-a-satellite-from-http-request/24441)._
