Author Topic: Improving the TLE download batch files  (Read 4149 times)

0 Members and 1 Guest are viewing this topic.

Offline Tim Long

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • Welcome to the Satellite Tracker Forum
Improving the TLE download batch files
« on: March 08, 2016, 01:38:57 AM »
When editing the batch files to insert my credentials, it occurred to me that they all do pretty much exactly the same thing, so it would make a lot of sense to apply the DRY (Don't Repeat Yourself) principle and factor out all the common code. One benefit of this is that it's only necessary to enter user credentials once, in one file. And I've done the work for you :) The common file is called WgetData.bat and is as follows:

"wget1pt15.exe" --no-check-certificate --post-data "identity=%Id%&password=%Password%" --keep-session-cookies --save-cookies=cookies.txt -o login.txt
"wget1pt15.exe" --no-check-certificate --keep-session-cookies --load-cookies=cookies.txt -O %1 %2
del login
del login.txt
del cookies.txt

As you can see, I've parameterized the user-id and password fields, and accept the output file name and the URL used to retrieve the data as command line parameters, therefore the batch fill should be invoked thus:

WgetData.bat output.txt "http://whatever/the/url/should/be"

Each of the other batch files then becomes a simple one-liner that calls WgetData. I've attached my edited anonymized files, they should just drop straight into the SatTrk directory. Only the WgetData.bat file needs to be edited, to insert your username and password in the first two lines of the file.

Offline John Eccles

  • Owner of Satellite Tracker and Yahoo Satellite Tracker
  • Administrator
  • *****
  • Posts: 186
  • Karma: +0/-1
    • Satellite Tracker
Re: Improving the TLE download batch files
« Reply #1 on: March 08, 2016, 12:52:07 PM »

Yes, someone else told me about this quite a while ago so I will already be incorporating this and will be available on the next release. I didn't want to release another version just for that.
Regards, John Eccles, Owner of Satellite Tracker Application, the Satellite Tracker Forum, and the Yahoo Groups called Satellite Tracker

Offline Nic Mcmilan

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
  • Welcome to the Satellite Tracker Forum
    • Drone Quad Flying
Re: Improving the TLE download batch files
« Reply #2 on: September 03, 2018, 04:11:49 AM »
Is this still method still working with changing its website?
I tried a few times and nothing get downloaded.
I can manually d/l from spacetrack so that is currently working.
When I try from satellite tracker v2.6.1, I get files but they are 0KB and nothing inside.
What is the current way to get TLE's?


  • Guest
Re: Improving the TLE download batch files
« Reply #3 on: July 07, 2019, 12:49:40 PM »
Hi Nic,

The current method of getting TLEs from, as described in the User Manual and coded in the supplied .bat files, still works as of 07-07-2019.