How to use the gpstime.dayOfWeek function in gpstime

To help you get started, we’ve selected a few gpstime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aewallin / ppp-tools / igs_ftp.py View on Github external
def CODE_rapid_files(dt, prefixdir=""):
    """
        retrieve rapid CODE products for the datetime dt
        
        Examples of Rapid files: (FIXME: old paths!)
        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.aiub.unibe.ch"
    remotedir = "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)
github aewallin / ppp-tools / igs_ftp.py View on Github external
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)

gpstime

GPS-aware datetime module

GPL-3.0
Latest version published 5 months ago

Package Health Score

55 / 100
Full package analysis