Exemple #1
0
def getResult(resultId):
    '''
    returns a result object for a result id.
    '''
    if resultExists(resultId):
        return util.loadObject(getResultFilename(resultId))
    else:
        return None
Exemple #2
0
    def __init__(self):
        self.azimuth = {}
        self.elevation = {}
        self.lastpos = util.PosVector(0, 0, 0)
        self.receiver_clock_error = 0
        self.rtcm_bits = None
        self.reset()
        self.average_position = None
        self.position_sum = util.PosVector(0, 0, 0)
        self.position_count = 0

        # the reference position given by the user, if any
        self.reference_position = None

        # the position reported by the reference receiver
        self.receiver_position = None

        # the position reported by the corrected rover
        self.recv2_position = None

        # the position reported by the uncorrected rover
        self.recv3_position = None

        # the position calculated from the reference receivers raw data
        # and the generated RTCM data.
        self.rtcm_position = None

        # the last position calculated from smoothed pseudo ranges
        self.position_estimate = None

        self.ephemeris = util.loadObject('ephemeris.dat')
        if self.ephemeris is None:
            self.ephemeris = {}
        
        self.ionospheric = util.loadObject('ionospheric.dat')
        if self.ionospheric is None:
            self.ionospheric = {}
        self.min_elevation = 5.0
        self.min_quality = 6

        self.smooth = prSmooth.prSmooth()
def loadBlastHits(path):
    '''
    path: location of stored blast hits computed by computeBlastHits()
    returns: mapping object from query id to hits.  used to be a bsddb, now is a dict.
    '''
    return util.loadObject(path)
Exemple #4
0
    second = t - 86400 * day - 60 * 60 * hour - 60 * minute

    return (day, hour, minute, second)


def format_time(time):
    return "{}:{}".format(int(time[1]), int(time[2]))


sat_el, sat_az, sat_res = None, None, None
t_first = 0
t_last = 0
t_wrap = 0

if opts.load_pos is not None:
    t_first = util.loadObject(opts.load_pos + '.stamp')
    if opts.plot_clusters >= 0 or opts.plot_skymap >= 0:
        sat_el, sat_az, sat_res = util.loadObject(opts.load_pos)

    print("Loaded")

if (sat_el is None or sat_az is None or sat_res is None or t_first is None) \
        and (opts.plot_clusters >= 0 or opts.plot_skymap >= 0):
    # Create storage for all sats (inc SBAS), 200 hours, (elev,azim,resid); this is sparse so
    # overestimating time doesn't hurt and we trim it back before using
    # it below anyway.  This would be nicer if sparse arrays supported tuple elements
    # but they don't..
    sat_el = scipy.sparse.lil_matrix((200 * 60 * 60, 140))
    sat_az = scipy.sparse.lil_matrix((200 * 60 * 60, 140))
    sat_res = scipy.sparse.lil_matrix((200 * 60 * 60, 140))
Exemple #5
0
    hour = (t - 86400 * day) // (60 * 60)
    minute = (t - 86400 * day - 60 * 60 * hour) // 60
    second = t - 86400 * day - 60 * 60 * hour - 60 * minute

    return (day, hour, minute, second)

def format_time(time):
    return "{}:{}".format(int(time[1]), int(time[2]))

sat_el, sat_az, sat_res = None, None, None
t_first = 0
t_last = 0
t_wrap = 0

if opts.load_pos is not None:
    t_first = util.loadObject(opts.load_pos + '.stamp')
    if opts.plot_clusters >= 0 or opts.plot_skymap >= 0:
        sat_el, sat_az, sat_res = util.loadObject(opts.load_pos)

    print("Loaded")

if (sat_el is None or sat_az is None or sat_res is None or t_first is None) \
        and (opts.plot_clusters >= 0 or opts.plot_skymap >= 0):
    print("Parsing UBX")
    dev = ublox.UBlox(opts.ubx_log)
    # Create storage for all sats (inc SBAS), 80 hours, (elev,azim); this is sparse so
    # overestimating time doesn't hurt and we trim it back before using
    # it below anyway.  This would be nicer if sparse arrays supported tuple elements
    # but they don't..
    sat_el = scipy.sparse.lil_matrix((80*60*60, 140))
    sat_az = scipy.sparse.lil_matrix((80*60*60, 140))
def loadBlastHits(path):
    '''
    path: location of stored blast hits computed by computeBlastHits()
    returns: mapping object from query id to hits.  used to be a bsddb, now is a dict.
    '''
    return util.loadObject(path)