RE: Does anyone have SpaceTrack scripts?

From: Andy Kirkham (ajk@f2s.com)
Date: Sun Feb 20 2005 - 18:45:13 EST

  • Next message: Andy Kirkham: "RE: Does anyone have SpaceTrack scripts?"

    > wget version 1.9 and above does support a "post" request.
    
    I have also found that GET requests work just fine too, so one
    could do this:-
    
    	wget -o log1 -O out1 --save-cookies cookies.txt \
    
    http://www.space-track.org/perl/login.pl?username=USERNAME&password=PASSWORD
    &_submitted=1
    
    Obviously, replace USERNAME and PASSWORD with your real ones.
    Note, the _submitted var needs setting too.
    
    > I have not yet attempted to figure out how to retrieve individual tles.
    
    All files appear to be sent via a single script "dl.pl" with an
    ID for the file you want. So, once you have the cookie from the
    above command stored, just ask for the file you want:-
    
    	wget --load-cookies cookies.txt \
    		http://www.space-track.org/perl/dl.pl?ID=2
    
    Above, I have asked for ID=2 which is:-
    
    	"Three-Line Format (includes object names)"
    
    ID=1 is "Two-Line Format (no object names)"
    
    Geosynchronous Satellites
    ID=3 "Two-Line Format (no object names)"
    ID=4 "Three-Line Format (includes object names)"
    
    If you hover ur mouse over the link on the ST site
    (or read the html source) you can see the "ID" code
    in the status bar which shows the link.
    
    For what it's worth, the "download.sh" script with STcookie
    also demostrates how to "pipe" the download from wget
    directly thru gunzip via stdin/stdout and redirect to a
    more sensible name (as the file name in the gzipped version
    changes).
    
    Hope that saves you some time.
    
    cheers
    --Ak
    
    -------------------------------------------------------------------------
    Subscribe/Unsubscribe info, Frequently Asked Questions, SeeSat-L archive:  
    http://www.satobs.org/seesat/seesatindex.html
    



    This archive was generated by hypermail 2b29 : Sun Feb 20 2005 - 18:49:36 EST