Ejemplo n.º 1
0
def CODE_rapid_files(dt, prefixdir=""):
    """
        retrieve rapid CODE products for the datetime dt
        
        Examples of Rapid files:
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.EPH_R    ephemeris aka orbits
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.ERP_R    erp, earth rotation parameters
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.CLK_R    clk, clocks

    """
    server = "ftp.unibe.ch"
    remotedir = "aiub/CODE/%s/" % (dt.year)
    week = gpstime.gpsWeek(dt.year, dt.month, dt.day)
    dow = gpstime.dayOfWeek(dt.year, dt.month, dt.day)
    clk = "COD%s%s.CLK.Z" % (week, dow)
    sp3 = "COD%s%s.EPH.Z" % (week, dow)
    erp = "COD%s7.ERP.Z" % (week)
    print("CODE rapid products for %d-%02d-%0d" % (dt.year, dt.month, dt.day))
    print("CLK = ", clk)
    print("SP3 = ", sp3)
    print("ERP = ", erp)

    ftp_tools.check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_rapid/"
    print("local dir = ", localdir)

    #return  CODE_download(server, directory, [clk, sp3, erp], localdir)
    return (server, "anonymous", "", remotedir, [clk, sp3, erp], localdir)
Ejemplo n.º 2
0
def CODE_rapid_files(dt, prefixdir=""):
    """
        retrieve rapid CODE products for the datetime dt
        
        Examples of Rapid files:
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.EPH_R    ephemeris aka orbits
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.ERP_R    erp, earth rotation parameters
        ftp://ftp.unibe.ch/aiub/CODE/COD17840.CLK_R    clk, clocks

    """
    server = "ftp.unibe.ch"
    remotedir = "aiub/CODE/"
    week = gpstime.gpsWeek( dt.year, dt.month, dt.day )
    dow  =  gpstime.dayOfWeek( dt.year, dt.month, dt.day )
    clk = "COD%s%s.CLK_R" % ( week,  dow )
    sp3 = "COD%s%s.EPH_R" % ( week, dow )
    erp = "COD%s%s.ERP_R" % ( week, dow )
    print "CODE rapid products for %d-%02d-%0d" %( dt.year , dt.month, dt.day )
    print "CLK = ", clk
    print "SP3 = ", sp3
    print "ERP = ", erp
    
    ftp_tools.check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_rapid/"
    print "local dir = ", localdir
    
    #return  CODE_download(server, directory, [clk, sp3, erp], localdir)
    return  (server, "", "", remotedir, [clk, sp3, erp], localdir)
Ejemplo n.º 3
0
def gps_sprintf(url, date):
    hourcode = chr(ord('a') + date.hour - 1)
    gpsweek = gpstime.gpsWeek(date.year, date.month, date.day)
    dayofgpsweek = gpstime.dayOfWeek(date.year, date.month, date.day)
    doy = gpstime.julianDay(date.year, date.month, date.day)
    return url.format(date=date,
                      hourcode=hourcode,
                      dayofgpsweek=dayofgpsweek,
                      doy=doy,
                      gpsweek=gpsweek)
Ejemplo n.º 4
0
def CODE_final_files(dt, prefixdir=""):
    server = "ftp.unibe.ch"
    directory = "aiub/CODE/%s/" % (dt.year)
    week = gpstime.gpsWeek(   dt.year, dt.month, dt.day )
    dow  = gpstime.dayOfWeek( dt.year, dt.month, dt.day )
    clk = "COD%s%s.CLK.Z" % ( week, dow ) # clock
    sp3 = "COD%s%s.EPH.Z" % ( week, dow ) # orbit
    erp = "COD%s%s.ERP.Z" % ( week, dow ) # earth
    print "CODE final products for ", dt.year ,"-", dt.month, "-",dt.day
    print "CLK = ", clk
    print "SP3 = ", sp3
    print "ERP = ", erp
    
    check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_final/"
    print "local dir = ", localdir
    return  (server, directory, [clk, sp3, erp], localdir)
Ejemplo n.º 5
0
def CODE_final_files(dt, prefixdir=""):
    server = "ftp.unibe.ch"
    remotedir = "aiub/CODE/%s/" % (dt.year)
    week = gpstime.gpsWeek(dt.year, dt.month, dt.day)
    dow = gpstime.dayOfWeek(dt.year, dt.month, dt.day)
    clk = "COD%s%s.CLK.Z" % (week, dow)  # clock
    sp3 = "COD%s%s.EPH.Z" % (week, dow)  # orbit
    erp = "COD%s%s.ERP.Z" % (week, dow)  # earth
    print("CODE final products for %d-%02d-%0d" % (dt.year, dt.month, dt.day))
    print("CLK = ", clk)
    print("SP3 = ", sp3)
    print("ERP = ", erp)

    ftp_tools.check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_final/"
    print("local dir = ", localdir)
    return (server, "anonymous", "", remotedir, [clk, sp3, erp], localdir)
Ejemplo n.º 6
0
def CODE_final_files(dt, prefixdir=""):
    server = "ftp.aiub.unibe.ch"
    remotedir = "CODE/%s/" % (dt.year)
    week = gpstime.gpsWeek(   dt.year, dt.month, dt.day )
    dow  = gpstime.dayOfWeek( dt.year, dt.month, dt.day )
    clk = "COD%s%s.CLK.Z" % ( week, dow ) # clock
    sp3 = "COD%s%s.EPH.Z" % ( week, dow ) # orbit
    erp = "COD%s%s.ERP.Z" % ( week, dow ) # earth
    print "CODE final products for %d-%02d-%0d" %( dt.year , dt.month, dt.day )
    print "CLK = ", clk
    print "SP3 = ", sp3
    print "ERP = ", erp
    
    ftp_tools.check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_final/"
    print "local dir = ", localdir
    return  (server, "", "", remotedir, [clk, sp3, erp], localdir)
Ejemplo n.º 7
0
def CODE_rapid_files(dt, prefixdir=""):
    server = "ftp.unibe.ch"
    directory = "aiub/CODE/"
    week = gpstime.gpsWeek( dt.year, dt.month, dt.day )
    dow  =  gpstime.dayOfWeek( dt.year, dt.month, dt.day )
    clk = "COD%s%s.CLK_R" % ( week,  dow )
    sp3 = "COD%s%s.EPH_R" % ( week, dow )
    erp = "COD%s%s.ERP_R" % ( week, dow )
    print "CODE rapid products for ", dt.year ,"-", dt.month, "-",dt.day
    print "CLK = ", clk
    print "SP3 = ", sp3
    print "ERP = ", erp
    
    check_dir(prefixdir + "/products/")
    localdir = prefixdir + "/products/CODE_rapid/"
    print "local dir = ", localdir
    
    #return  CODE_download(server, directory, [clk, sp3, erp], localdir)
    return  (server, directory, [clk, sp3, erp], localdir)