Exemple #1
0
def extractTOWandCN0(SVprn, measData, TOWmeas, CN0meas, verbose=False):
    """
    extractTOWandCN0 axtracts for a SV the TOW and CN0 values observed per signaltype
    Parameters:
        SVprn: the ID for this SV
        measData: the measurement data from MEAS_EPOCH
        TOWmeas: array of lists that contains the TOW for this PRN and per signalType
        CN0meas: idem for CN0
    Returns:
        the signal types for this SVprn
    """
    if verbose:
        print('  Processing SVID = %d' % SVprn)

    # find indices with data for this SVID
    # print('SVprn = %s' % SVprn)
    indexSVprn = sbf2stf.indicesSatellite(SVprn, measData['MEAS_SVID'],
                                          verbose)
    # print('indexSVprn = %s' % indexSVprn)
    dataMeasSVprn = measData[indexSVprn]
    # print('dataMeasSVprn = %s' % dataMeasSVprn)

    # find indices that correspond to the signalTypes for this SVprn
    signalTypesSVprn = sbf2stf.observedSignalTypes(
        dataMeasSVprn['MEAS_SIGNALTYPE'], verbose)

    indexSignalType = []

    for index, signalType in enumerate(signalTypesSVprn):
        if verbose:
            print('      Treating signalType = %s (index=%d)' %
                  (signalType, index))

        # get the observation time span and observed CN0 for this SVprn and SignalType
        indexSignalType.extend(
            np.array(
                sbf2stf.indicesSignalType(signalType,
                                          dataMeasSVprn['MEAS_SIGNALTYPE'],
                                          verbose)))
        TOWmeas.append(dataMeasSVprn[indexSignalType[index]]['MEAS_TOW'])
        CN0meas.append(dataMeasSVprn[indexSignalType[index]]['MEAS_CN0'])

        # # print last added values
        if True:
            print('TOWmeas[%d] = %d => %d (%d)' %
                  (len(TOWmeas), TOWmeas[-1][0], TOWmeas[-1][-1],
                   np.size(TOWmeas[-1])))
            print('CN0meas[%d] = %f => %s (%d)' %
                  (len(CN0meas), CN0meas[-1][0], CN0meas[-1][-1],
                   np.size(CN0meas[-1])))

    return signalTypesSVprn
Exemple #2
0
def extractTOWandCN0(SVprn, measData, TOWmeas, CN0meas, verbose=False):
    """
    extractTOWandCN0 axtracts for a SV the TOW and CN0 values observed per signaltype
    Parameters:
        SVprn: the ID for this SV
        measData: the measurement data from MEAS_EPOCH
        TOWmeas: array of lists that contains the TOW for this PRN and per signalType
        CN0meas: idem for CN0
    Returns:
        the signal types for this SVprn
    """
    if verbose:
        print('  Processing SVID = %d' % SVprn)

    # find indices with data for this SVID
    # print('SVprn = %s' % SVprn)
    indexSVprn = sbf2stf.indicesSatellite(SVprn, measData['MEAS_SVID'], verbose)
    # print('indexSVprn = %s' % indexSVprn)
    dataMeasSVprn = measData[indexSVprn]
    # print('dataMeasSVprn = %s' % dataMeasSVprn)

    # find indices that correspond to the signalTypes for this SVprn
    signalTypesSVprn = sbf2stf.observedSignalTypes(dataMeasSVprn['MEAS_SIGNALTYPE'], verbose)

    indexSignalType = []

    for index, signalType in enumerate(signalTypesSVprn):
        if verbose:
            print('      Treating signalType = %s (index=%d)' % (signalType, index))

        # get the observation time span and observed CN0 for this SVprn and SignalType
        indexSignalType.extend(np.array(sbf2stf.indicesSignalType(signalType, dataMeasSVprn['MEAS_SIGNALTYPE'], verbose)))
        TOWmeas.append(dataMeasSVprn[indexSignalType[index]]['MEAS_TOW'])
        CN0meas.append(dataMeasSVprn[indexSignalType[index]]['MEAS_CN0'])

        # # print last added values
        if True:
            print('TOWmeas[%d] = %d => %d (%d)' % (len(TOWmeas), TOWmeas[-1][0], TOWmeas[-1][-1], np.size(TOWmeas[-1])))
            print('CN0meas[%d] = %f => %s (%d)' % (len(CN0meas), CN0meas[-1][0], CN0meas[-1][-1], np.size(CN0meas[-1])))

    return signalTypesSVprn
Exemple #3
0
        # print("len dataMeas['MEAS_CODE'] %d" % len(dataMeas['MEAS_CODE']))
        # print("len dataMeasSVID['MEAS_CODE'] %d" % len(dataMeasSVID['MEAS_CODE']))
        # print dataMeasSVID['MEAS_SVID']

        indexSignalType = []
        dataMeasSVIDSignalType = []
        lliIndicators = []
        lliTOWs = []
        firstTOW = []

        for index, signalType in enumerate(signalTypesSVID):
            print('-' * 25)
            print("signalType = %s  index=%d - name = %s\n" % (signalType, index, mSSN.GNSSSignals[signalType]['name']))

            indexSignalType.extend(np.array(sbf2stf.indicesSignalType(signalType, dataMeasSVID['MEAS_SIGNALTYPE'], verbose)))

            print('type indexSignalType = %s' % type(indexSignalType))
            print('type indexSignalType[index] = %s' % type(indexSignalType[index]))
            print('indexSignalType = %s' % indexSignalType)
            print("indexSignalType[index] = %s (len = %d)" % (indexSignalType[index], len(indexSignalType[index])))
            print("indexSignalType[index][2] = %s\n" % indexSignalType[index][2])

            # set the data for 1 SV and 1 ST
            dataMeasSVIDSignalType.append(dataMeasSVID[indexSignalType[index]])

            print("dataMeasSVIDSignalType[index]['MEAS_LOCKTIME'] = %s (len = %d)" % (dataMeasSVIDSignalType[index]['MEAS_LOCKTIME'], len(dataMeasSVIDSignalType[index]['MEAS_LOCKTIME'])))
            print("dataMeasSVIDSignalType[index]['MEAS_LOCKTIME'][2] = %s\n" % dataMeasSVIDSignalType[index]['MEAS_LOCKTIME'][2])
            print("dataMeasSVIDSignalType[index][2] = %s\n" % dataMeasSVIDSignalType[index][2])
            print("dataMeasSVIDSignalType[index] = %s\n" % dataMeasSVIDSignalType[index])
Exemple #4
0
        # print dataMeasSVID['MEAS_SVID']

        indexSignalType = []
        dataMeasSVIDSignalType = []
        lliIndicators = []
        lliTOWs = []

        for index, signalType in enumerate(signalTypesSVID):
            print('-' * 25)
            print("signalType = %s  index=%d - name = %s\n" %
                  (signalType, index, mSSN.GNSSSignals[signalType]['name']))

            indexSignalType.extend(
                np.array(
                    sbf2stf.indicesSignalType(signalType,
                                              dataMeasSVID['MEAS_SIGNALTYPE'],
                                              verbose)))

            # print('type indexSignalType = %s' % type(indexSignalType))
            # print('type indexSignalType[index] = %s' % type(indexSignalType[index]))
            # print('indexSignalType = %s' % indexSignalType)
            # print("indexSignalType[index] = %s (len = %d)" % (indexSignalType[index], len(indexSignalType[index])))
            # print("indexSignalType[index][2] = %s\n" % indexSignalType[index][2])

            # newData = dataMeasSVID[indexSignalType[index]]
            # dataMeasSVIDSignalType.append(newData)
            dataMeasSVIDSignalType.append(dataMeasSVID[indexSignalType[index]])

            # print("dataMeasSVIDSignalType[index]['MEAS_CODE'] = %s (len = %d)" % (dataMeasSVIDSignalType[)index]['MEAS_CODE'], len(dataMeasSVIDSignalType[index]['MEAS_CODE'])))
            # print("dataMeasSVIDSignalType[index]['MEAS_CODE'][2] = %s\n" % dataMeasSVIDSignalType[)index]['MEAS_CODE'][2])
            # print("dataMeasSVIDSignalType[index][2] = %s\n" % dataMeasSVIDSignalType[index][2]))