csete / gpredict

Gpredict satellite tracking application
http://gpredict.oz9aec.net/
GNU General Public License v2.0
829 stars 245 forks source link

(BUG) Unable To Pull TLEs From Web #307

Closed spsvihla closed 1 year ago

spsvihla commented 1 year ago

Hi All,

We recently discovered that we're unable to pull TLEs from the web. The issue was first noticed on 07/06/22.

While investigating the issue, we found the cause to be an error with the top-level domain of the CelesTrak TLE URLs found in sat-cfg.c (celestrak.com instead of celestrak.org). We realized this change from the file '~/.config/Gpredict/satdata/cache/file-01.tle' which had the following contents:

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://celestrak.org/NORAD/elements/amateur.txt">here</a></body>

I've created this pull request to fix the issue.

As a more permanent solution, it might be desirable to make use of libcurl's CURLOPT_FOLLOWLOCATION in tle-update.c in case this URL changes in the future. I've also created this pull request which does so.