Esempio n. 1
0
def normal_meas_from_array(arr):
    observables, observables_std = {}, {}
    observables['C1C'] = arr[4]
    observables_std['C1C'] = arr[5]
    observables['D1C'] = arr[6]
    observables_std['D1C'] = arr[7]
    observables['S1C'] = arr[8]
    observables['L1C'] = arr[9]
    return GNSSMeasurement(get_prn_from_nmea_id(arr[0]), arr[1], arr[2],
                           observables, observables_std, arr[3])
Esempio n. 2
0
def read_rinex_obs(obsdata):
    measurements = []
    first_sat = obsdata.data.keys()[0]
    n = len(obsdata.data[first_sat]['Epochs'])
    for i in xrange(0, n):
        recv_time_datetime = obsdata.data[first_sat]['Epochs'][i]
        recv_time_datetime = recv_time_datetime.astype(datetime.datetime)
        recv_time = GPSTime.from_datetime(recv_time_datetime)
        measurements.append([])
        for sat_str in obsdata.data.keys():
            if np.isnan(obsdata.data[sat_str]['C1'][i]):
                continue
            observables, observables_std = {}, {}
            for obs in obsdata.data[sat_str]:
                if obs == 'Epochs':
                    continue
                observables[rinex3_obs_from_rinex2_obs(
                    obs)] = obsdata.data[sat_str][obs][i]
                observables_std[rinex3_obs_from_rinex2_obs(obs)] = 1
            measurements[-1].append(
                GNSSMeasurement(get_prn_from_nmea_id(int(sat_str)),
                                recv_time.week, recv_time.tow, observables,
                                observables_std))
    return measurements
Esempio n. 3
0
def read_raw_qcom(report):
    recv_tow = (report.gpsMilliseconds) * 1.0 / 1000.0  # seconds
    recv_week = report.gpsWeek
    recv_time = GPSTime(recv_week, recv_tow)
    measurements = []
    for i in report.sv:
        svId = i.svId
        if not i.measurementStatus.measurementNotUsable and i.measurementStatus.satelliteTimeIsKnown:
            sat_tow = (i.unfilteredMeasurementIntegral +
                       i.unfilteredMeasurementFraction) / 1000
            sat_time = GPSTime(recv_week, sat_tow)
            observables, observables_std = {}, {}
            observables['C1C'] = (recv_time -
                                  sat_time) * constants.SPEED_OF_LIGHT
            observables_std[
                'C1C'] = i.unfilteredTimeUncertainty * 1e-3 * constants.SPEED_OF_LIGHT
            observables['D1C'] = i.unfilteredSpeed
            observables_std['D1C'] = i.unfilteredSpeedUncertainty
            observables['S1C'] = np.nan
            observables['L1C'] = np.nan
            measurements.append(
                GNSSMeasurement(get_prn_from_nmea_id(svId), recv_time.week,
                                recv_time.tow, observables, observables_std))
    return measurements