Beispiel #1
0
def update_glo_status(glo_status_fname=GLO_STATUS_FNAME,
                      glo_status_server_fname=GLO_STATUS_SERVER_FNAME):
    """
    Update the GLONASS status table stored at *glo_status_fname*. The
    remote file is accessed via FTP at *glo_status_server_fname*.
    """
    return update_sideshow_file(glo_status_fname, glo_status_server_fname)
Beispiel #2
0
def update_prn_gps(prn_gps_fname=PRN_GPS_FNAME,
                   prn_gps_server_fname=PRN_GPS_SERVER_FNAME):
    """
    Update the SVN/PRN mapping table stored at *prn_gps_fname*. The
    remote file is accessed via FTP at *prn_gps_server_fname*.
    """
    return update_sideshow_file(prn_gps_fname, prn_gps_server_fname)
Beispiel #3
0
def update_p1c1(p1c1_fname=P1C1_FNAME,
                p1c1_server_fname=P1C1_SERVER_FNAME):
    """
    Update the receiver type table stored at *p1c1_fname*. The remote
    file is accessed via FTP at *p1c1_server_fname*.
    """
    return update_sideshow_file(p1c1_fname,
                                p1c1_server_fname)
Beispiel #4
0
def update_prn_gps(prn_gps_fname=PRN_GPS_FNAME,
                   prn_gps_server_fname=PRN_GPS_SERVER_FNAME):
    """
    Update the SVN/PRN mapping table stored at *prn_gps_fname*. The
    remote file is accessed via FTP at *prn_gps_server_fname*.
    """
    return update_sideshow_file(prn_gps_fname,
                                prn_gps_server_fname)
Beispiel #5
0
def update_receiver_types(receiver_types_fname=RECEIVER_TYPES_FNAME,
                          receiver_types_server_fname=RECEIVER_TYPES_SERVER_FNAME):
    """
    Update the receiver types table stored at
    *receiver_types_fname*. The remote file is accessed via FTP at
    *receiver_types_server_fname*.
    """
    return update_sideshow_file(receiver_types_fname,
                                receiver_types_server_fname)
Beispiel #6
0
def fetch_sideshow_ionex(path,
                         date,
                         work_path=None,
                         templates=[JPLH_TEMPLATE, JPLH_ARCHIVE_TEMPLATE]):
    """
    ???
    """
    with SmartTempDir(work_path) as work_path:
        for template in templates:
            server_fname = template.format(date=date)
            local_fname = os.path.join(path, posixpath.basename(server_fname)[:-3])
            try:
                update_sideshow_file(local_fname,
                                     server_fname)
                return local_fname
            except:
                logger.info('could not download {}'.format(server_fname))
                continue
    raise RuntimeError('could not download IONEX file from sideshow for {:%Y-%m-%d}'.format(date))
Beispiel #7
0
def update_receiver_types(
        receiver_types_fname=RECEIVER_TYPES_FNAME,
        receiver_types_server_fname=RECEIVER_TYPES_SERVER_FNAME):
    """
    Update the receiver types table stored at
    *receiver_types_fname*. The remote file is accessed via FTP at
    *receiver_types_server_fname*.
    """
    return update_sideshow_file(receiver_types_fname,
                                receiver_types_server_fname)
Beispiel #8
0
def fetch_sideshow_ionex(path,
                         date,
                         work_path=None,
                         templates=[JPLH_TEMPLATE, JPLH_ARCHIVE_TEMPLATE]):
    """
    ???
    """
    with SmartTempDir(work_path) as work_path:
        for template in templates:
            server_fname = template.format(date=date)
            local_fname = os.path.join(path,
                                       posixpath.basename(server_fname)[:-3])
            try:
                update_sideshow_file(local_fname, server_fname)
                return local_fname
            except:
                logger.info('could not download {}'.format(server_fname))
                continue
    raise RuntimeError(
        'could not download IONEX file from sideshow for {:%Y-%m-%d}'.format(
            date))
Beispiel #9
0
def update_p1c1(p1c1_fname=P1C1_FNAME, p1c1_server_fname=P1C1_SERVER_FNAME):
    """
    Update the receiver type table stored at *p1c1_fname*. The remote
    file is accessed via FTP at *p1c1_server_fname*.
    """
    return update_sideshow_file(p1c1_fname, p1c1_server_fname)