コード例 #1
0
def widelane_solve(dd, station_data, sta1, sta2, prn1, prn2, ticks):
    lambda_w = lambda_ws[prn1[0]]
    vr1s1s = []
    vr1s2s = []
    vr2s1s = []
    vr2s2s = []
    for tick in ticks:
        vr1s1s.append(tec.melbourne_wubbena(station_data[sta1][prn1][tick])[0])
        vr1s2s.append(tec.melbourne_wubbena(station_data[sta1][prn2][tick])[0])
        vr2s1s.append(tec.melbourne_wubbena(station_data[sta2][prn1][tick])[0])
        vr2s2s.append(tec.melbourne_wubbena(station_data[sta2][prn2][tick])[0])
    vr1s1 = numpy.mean(vr1s1s)
    vr1s2 = numpy.mean(vr1s2s)
    vr2s1 = numpy.mean(vr2s1s)
    vr2s2 = numpy.mean(vr2s2s)
    return dd_solve(dd, vr1s1, vr1s2, vr2s1, vr2s2, lambda_w)
コード例 #2
0
def test_n1(N_w, station_data, sta, prn, ticks):
    # given N_w = N_1 - N_2
    # find "optimal" N1
    lambda_1 = lambda_1s[prn[0]]
    lambda_2 = lambda_2s[prn[0]]
    lambda_n = lambda_ns[prn[0]]
    lambda_w = lambda_ws[prn[0]]

    # N_w = -N_w

    b_w = numpy.array([
        tec.melbourne_wubbena(station_data[sta][prn][tick])[0]
        for tick in ticks
    ]) - lambda_w * N_w

    freqs = tec.F_lookup[prn[0]]
    # TODO why are f1 and f2 reversed from what I expect?
    delay_factor_w = freqs[0] * freqs[1] / (freqs[1]**2 - freqs[0]**2)

    B_c = numpy.array(
        [estimate_Bc(station_data[sta][prn][tick])[0] for tick in ticks])
    gf_bias = bias(tec.geometry_free)
    B_i = numpy.array(
        [gf_bias(station_data[sta][prn][tick])[0] for tick in ticks])

    divisor = delay_factor_w * (lambda_2 - lambda_1) - lambda_n
    rhs = b_w - B_c - delay_factor_w * (
        B_i + lambda_2 * N_w) + lambda_n * N_w * lambda_w / lambda_2

    res = rhs / divisor
    n1 = numpy.mean(res)
    return int(n1)
コード例 #3
0
def test_n1_(N_w, station_data, sta, prn, ticks):
    # given N_w = N_1 - N_2
    # test out a N1/N2 combinations

    # get things that don't change base on N_1:
    #   using N_w get b_w, delay_factor_w, B_c, B_i, wavelengths
    # for each N_1 candidate:
    #   using N_w, N_1_candidate, B_c, estimate b_c, use that to get
    #      a b_I estimate plug in to get ERR_1
    #   using b_c, b_w, N_1_candidate, delay_factor_w, estimate b_I
    #      and use that to get ERR_1

    lambda_1 = lambda_1s[prn[0]]
    lambda_2 = lambda_2s[prn[0]]
    lambda_n = lambda_ns[prn[0]]
    lambda_w = lambda_ws[prn[0]]

    b_w = numpy.mean([
        tec.melbourne_wubbena(station_data[sta][prn][tick]) for tick in ticks
    ]) - lambda_w * N_w

    freqs = tec.F_lookup[prn[0]]
    # TODO why are f1 and f2 reversed from what I expect?
    delay_factor_w = freqs[0]*freqs[1]/(freqs[1]**2 - freqs[0]**2)

    # TODO don't average out... look at results for each tick?
    B_c = numpy.mean([
        estimate_Bc(station_data[sta][prn][tick])[0] for tick in ticks
    ])
    gf_bias = bias(tec.geometry_free)
    B_i = numpy.mean([
        gf_bias(station_data[sta][prn][tick]) for tick in ticks
    ])


    N_1_best = None
    err_best = 10000

    for N_1_cand in range(-400, 400):
        N_2_cand = N_1_cand - N_w

        # TODO ???
        N_1_cand, N_2_cand = N_2_cand, N_1_cand

        b_c_meas = B_c - lambda_n * (N_1_cand + N_w * lambda_w / lambda_2)
        b_i_meas = B_i - lambda_1 * N_1_cand + lambda_2 * N_2_cand

        b_i_est = (b_w - b_c_meas) / delay_factor_w
        b_c_est = b_w - delay_factor_w * b_i_meas
        
        err1 = (b_i_est - b_i_meas)**2
        err2 = (b_c_est - b_c_meas)**2
        if err1 + err2 < err_best:
            err_best = err1 + err2
            N_1_best = N_1_cand
    return N_1_best, err_best
コード例 #4
0
def widelane_solve(dd, station_data, sta1, sta2, prn1, prn2, tick):
    vr1s1, lambda_w = tec.melbourne_wubbena(station_data[sta1][prn1][tick])
    vr1s2, _ = tec.melbourne_wubbena(station_data[sta1][prn2][tick])
    vr2s1, _ = tec.melbourne_wubbena(station_data[sta2][prn1][tick])
    vr2s2, _ = tec.melbourne_wubbena(station_data[sta2][prn2][tick])
    return dd_solve(dd, vr1s1, vr1s2, vr2s1, vr2s2, lambda_w)