OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
spacetrack_tles Namespace Reference

Variables

dictionary norad
 
 parser
 
 action
 
 version
 
 nargs
 
 help
 
 type
 
 choices
 
 str
 
 default
 
 None
 
 int
 
 False
 
 args = parser.parse_args()
 
 level
 
 identity = args.username
 
 password = args.password
 
 netrc = os.path.join(os.environ['HOME'],'.netrc')
 
 parts = line.split()
 
dictionary credentials = {'identity':identity,'password':password}
 
 baseTLEdir = args.directory
 
 tleIDs = None
 
string baseurl = "https://www.space-track.org"
 
string loginurl = '/'.join([baseurl, "ajaxauth","login"])
 
string tleurl = '/'.join([baseurl,"basicspacedata","query","class","tle_latest","ORDINAL","1","NORAD_CAT_ID",tleIDs,"format","tle"])
 
 stConn = requests.Session()
 
dictionary tlehash = {}
 
 req = stConn.post(loginurl, data=credentials)
 
 tlereq = stConn.get(tleurl)
 
 tleID = int(parts[1].strip('U'))
 
string bird = 'NORAD_' + str(tleID)
 
dictionary tle = tlehash[tleID]
 
dictionary tleDate = tle[0].split()[3]
 
 year = str(int(tleDate[0:2]) + 2000)
 
dictionary doy = tleDate[2:5]
 
 tleFile = os.path.join(baseTLEdir,bird+doy+year+".dat")
 
 tceFile = os.path.join(baseTLEdir,bird+".tce")
 
 ext
 

Variable Documentation

◆ action

action

Definition at line 35 of file spacetrack_tles.py.

◆ args

args = parser.parse_args()

Definition at line 63 of file spacetrack_tles.py.

◆ baseTLEdir

baseTLEdir = args.directory

Definition at line 85 of file spacetrack_tles.py.

◆ baseurl

string baseurl = "https://www.space-track.org"

Definition at line 115 of file spacetrack_tles.py.

◆ bird

bird = 'NORAD_' + str(tleID)

Definition at line 160 of file spacetrack_tles.py.

◆ choices

choices

Definition at line 37 of file spacetrack_tles.py.

◆ credentials

dictionary credentials = {'identity':identity,'password':password}

Definition at line 80 of file spacetrack_tles.py.

◆ default

default

Definition at line 54 of file spacetrack_tles.py.

◆ doy

dictionary doy = tleDate[2:5]

Definition at line 171 of file spacetrack_tles.py.

◆ ext

ext

Definition at line 188 of file spacetrack_tles.py.

◆ False

False

Definition at line 58 of file spacetrack_tles.py.

◆ help

help

Definition at line 36 of file spacetrack_tles.py.

◆ identity

identity = args.username

Definition at line 68 of file spacetrack_tles.py.

◆ int

int

Definition at line 55 of file spacetrack_tles.py.

◆ level

level

Definition at line 66 of file spacetrack_tles.py.

◆ loginurl

string loginurl = '/'.join([baseurl, "ajaxauth","login"])

Definition at line 116 of file spacetrack_tles.py.

◆ nargs

nargs

Definition at line 36 of file spacetrack_tles.py.

◆ netrc

netrc = os.path.join(os.environ['HOME'],'.netrc')

Definition at line 72 of file spacetrack_tles.py.

◆ None

None

Definition at line 54 of file spacetrack_tles.py.

◆ norad

norad
Initial value:
1 = {
2  'TERRA': 25994,
3  'AQUA': 27424,
4  'CALIPSO': 29108,
5  'CLOUDSAT': 29107,
6  'PROBA': 26958,
7  'NPP': 37849,
8  'JPSS1': 43013,
9  'LANDSAT-8': 39084,
10  'SEAHAWK-1': 43820,
11  'SENTINEL-2A': 40697,
12  'SENTINEL-2B': 42063,
13  'SENTINEL-3A': 41335,
14  'SENTINEL-3B': 43437,
15  'OCEANSAT-2': 35931,
16  'GCOM-C': 43065
17 }

Definition at line 14 of file spacetrack_tles.py.

◆ parser

Initial value:
1 = argparse.ArgumentParser(prog='spacetrack_tles',
2  description='This script retrieves Two-Line Elements from www.space-track.org for a given satellite name or NORAD catalog ID')

Definition at line 33 of file spacetrack_tles.py.

◆ parts

parts = line.split()

Definition at line 76 of file spacetrack_tles.py.

◆ password

password = args.password

Definition at line 69 of file spacetrack_tles.py.

◆ req

req = stConn.post(loginurl, data=credentials)

Definition at line 126 of file spacetrack_tles.py.

◆ stConn

stConn = requests.Session()

Definition at line 120 of file spacetrack_tles.py.

◆ str

str

Definition at line 54 of file spacetrack_tles.py.

◆ tceFile

string tceFile = os.path.join(baseTLEdir,bird+".tce")

Definition at line 186 of file spacetrack_tles.py.

◆ tle

dictionary tle = tlehash[tleID]

Definition at line 165 of file spacetrack_tles.py.

◆ tleDate

dictionary tleDate = tle[0].split()[3]

Definition at line 169 of file spacetrack_tles.py.

◆ tleFile

tleFile = os.path.join(baseTLEdir,bird+doy+year+".dat")

Definition at line 172 of file spacetrack_tles.py.

◆ tlehash

dictionary tlehash = {}

Definition at line 123 of file spacetrack_tles.py.

◆ tleID

tleID = int(parts[1].strip('U'))

Definition at line 146 of file spacetrack_tles.py.

◆ tleIDs

string tleIDs = None

Definition at line 101 of file spacetrack_tles.py.

◆ tlereq

tlereq = stConn.get(tleurl)

Definition at line 138 of file spacetrack_tles.py.

◆ tleurl

string tleurl = '/'.join([baseurl,"basicspacedata","query","class","tle_latest","ORDINAL","1","NORAD_CAT_ID",tleIDs,"format","tle"])

Definition at line 117 of file spacetrack_tles.py.

◆ type

type

Definition at line 36 of file spacetrack_tles.py.

◆ version

version

Definition at line 35 of file spacetrack_tles.py.

◆ year

year = str(int(tleDate[0:2]) + 2000)

Definition at line 170 of file spacetrack_tles.py.