예제 #1
0
파일: sbf2CN0.py 프로젝트: zhs951226/GNSSpy
    # determine current weeknumber and subsequent date from SBF data
    WkNr = int(dataMeas['MEAS_WNC'][0])
    dateString = gpstime.UTCFromWT(WkNr, float(
        dataMeas['MEAS_TOW'][0])).strftime("%d/%m/%Y")
    if verbose:
        print('WkNr = %d - dateString = %s' % (WkNr, dateString))

    # correct the smoothed PR Code and work with the raw PR
    dataMeas['MEAS_CODE'] = sbf2stf.removeSmoothing(
        dataMeas['MEAS_CODE'], dataExtra['EXTRA_SMOOTHINGCORR'],
        dataExtra['EXTRA_MPCORR'])
    # print('rawPR = %s\n' % dataMeas['MEAS_CODE'])

    # find list of SVIDs and SignalTypes observed
    SVIDs = sbf2stf.observedSatellites(dataMeas['MEAS_SVID'], verbose)
    signalTypes = sbf2stf.observedSignalTypes(dataMeas['MEAS_SIGNALTYPE'],
                                              verbose)

    # create the CN0 plots for all SVs and SignalTypes
    indexSignalType = []
    dataMeasSignalType = []

    # storing data in arrays per SV and per signalType
    measTOW = []  # TOWs with measurements
    measCN0 = []  # CNO values @ measTOW
    STlist = []  # list of signaltypes traversed
    SVIDlist = []  # list of SVIDs traversed

    # extract first TOW and CN0 arrays for all SVs and signaltypes
    for SVID in SVIDs:
예제 #2
0
            # read the MeasExtra data into numpy array
            dataExtra = sbf2stf.readMeasExtra(sbf2stfConverted[SBF2STFOPTS.index(option)], verbose)
        else:
            print('  wrong option %s given.' % option)
            sys.exit(E_WRONG_OPTION)

    # check whether the same signaltypes are on corresponsing lines after sorting
    if not sbf2stf.verifySignalTypeOrder(dataMeas['MEAS_SIGNALTYPE'], dataExtra['EXTRA_SIGNALTYPE'], dataMeas['MEAS_TOW'], verbose):
        sys.exit(E_SIGNALTYPE_MISMATCH)

    # correct the smoothed PR Code and work with the raw PR
    dataMeas['MEAS_CODE'] = sbf2stf.removeSmoothing(dataMeas['MEAS_CODE'], dataExtra['EXTRA_SMOOTHINGCORR'], dataExtra['EXTRA_MPCORR'])
    # print('dataMeas['MEAS_CODE'] = %s\n' % dataMeas['MEAS_CODE'])

    # find list of SVIDs observed
    SVIDs = sbf2stf.observedSatellites(dataMeas['MEAS_SVID'], verbose)

    for SVID in SVIDs:
        print('=' * 50)
        gnssSyst, gnssSystShort, gnssPRN = mSSN.svPRN(SVID)
        print('SVID = %d - %s - %s%d' % (SVID, gnssSyst, gnssSystShort, gnssPRN))

        indexSVID = sbf2stf.indicesSatellite(SVID, dataMeas['MEAS_SVID'], verbose)
        dataMeasSVID = dataMeas[indexSVID]
        print("indexSVID = %s" % indexSVID)

        # store temporaray results ONLY for inspection
        nameDataMeasSVID = str(SVID) + '.csv'
        print('nameDataMeasSVID = %s' % nameDataMeasSVID)
        print('dataMeasSVID = %s' % dataMeasSVID)
        np.savetxt(nameDataMeasSVID, dataMeasSVID, fmt='%i,%.1f,%i,%i,%i,%i,%i,%.2f,%.2f,%.2f,%.2f,%i,%i,%i')
예제 #3
0
    print('dataChanSt = %s' % dataChanSt)
    print('dataChanSt[0] = %s' % dataChanSt[0])

    # determine current weeknumber and subsequent date from SBF data
    WkNr = int(dataChanSt['CHST_WNC'][0])
    dateString = gpstime.UTCFromWT(WkNr, float(dataChanSt['CHST_TOW'][0])).strftime("%d/%m/%Y")
    if verbose:
        print('WkNr = %d - dateString = %s' % (WkNr, dateString))

    # create subset with only valid elevation angles
    indexValid = sbf2stf.findValidElevation(dataChanSt['CHST_Elevation'], verbose)
    dataChanStValid = dataChanSt[indexValid]

    # find the list of SVIDs with valid elev/azim data
    SVIDs = sbf2stf.observedSatellites(dataChanStValid['CHST_SVID'], verbose)

    # extract for each satellite the elevation and azimuth angles
    prnElev = []
    prnAzim = []
    prnHour = []
    prnHourElev = []
    prnHourAzim = []
    for i, PRN in enumerate(SVIDs):
        print('PRN = %d' % PRN)
        indexPRN = sbf2stf.indicesSatellite(PRN, dataChanStValid['CHST_SVID'], verbose)
        prnElev.append(dataChanStValid[indexPRN]['CHST_Elevation'])
        prnAzim.append(dataChanStValid[indexPRN]['CHST_Azimuth'])

        # retain only multiples of hours to display
        prnTime = dataChanStValid[indexPRN]['CHST_TOW']
예제 #4
0
    # check whether the same signaltypes are on corresponsing lines after sorting
    if not sbf2stf.verifySignalTypeOrder(dataMeas['MEAS_SIGNALTYPE'], dataExtra['EXTRA_SIGNALTYPE'], dataMeas['MEAS_TOW'], verbose):
        sys.exit(E_SIGNALTYPE_MISMATCH)

    # determine current weeknumber and subsequent date from SBF data
    WkNr = int(dataMeas['MEAS_WNC'][0])
    dateString = gpstime.UTCFromWT(WkNr, float(dataMeas['MEAS_TOW'][0])).strftime("%d/%m/%Y")
    if verbose:
        print('WkNr = %d - dateString = %s' % (WkNr, dateString))

    # correct the smoothed PR Code and work with the raw PR
    dataMeas['MEAS_CODE'] = sbf2stf.removeSmoothing(dataMeas['MEAS_CODE'], dataExtra['EXTRA_SMOOTHINGCORR'], dataExtra['EXTRA_MPCORR'])
    # print('rawPR = %s\n' % dataMeas['MEAS_CODE'])

    # find list of SVIDs from MeasEpoch and SatVisibility blocks and SignalTypes observed
    SVIDs = sbf2stf.observedSatellites(dataMeas['MEAS_SVID'], verbose)
    SVIDsVis = sbf2stf.observedSatellites(dataVisibility['VISIBILITY_SVID'], verbose)
    signalTypes = sbf2stf.observedSignalTypes(dataMeas['MEAS_SIGNALTYPE'], verbose)

    # storing data in arrays per SV and per signalType
    indexSignalType = []
    dataMeasSignalType = []
    measTOW = []  # TOWs with measurements
    measTOWElev = []
    measCN0 = []  # CNO diff @ measTOW
    measCN0Elev = []
    STlist = []  # list of signaltypes traversed
    SVIDlist = []  # list of SVIDs traversed for CN0
    SVIDlistElev = []  # list of SVIDs traversed for Elev
    ELEVATIONVisibility = []  # list of Elevation  traversed
예제 #5
0
    print('dataChanSt[0] = %s' % dataChanSt[0])

    # determine current weeknumber and subsequent date from SBF data
    WkNr = int(dataChanSt['CHST_WNC'][0])
    dateString = gpstime.UTCFromWT(WkNr, float(
        dataChanSt['CHST_TOW'][0])).strftime("%d/%m/%Y")
    if verbose:
        print('WkNr = %d - dateString = %s' % (WkNr, dateString))

    # create subset with only valid elevation angles
    indexValid = sbf2stf.findValidElevation(dataChanSt['CHST_Elevation'],
                                            verbose)
    dataChanStValid = dataChanSt[indexValid]

    # find the list of SVIDs with valid elev/azim data
    SVIDs = sbf2stf.observedSatellites(dataChanStValid['CHST_SVID'], verbose)

    # extract for each satellite the elevation and azimuth angles
    prnElev = []
    prnAzim = []
    prnHour = []
    prnHourElev = []
    prnHourAzim = []
    for i, PRN in enumerate(SVIDs):
        print('PRN = %d' % PRN)
        indexPRN = sbf2stf.indicesSatellite(PRN, dataChanStValid['CHST_SVID'],
                                            verbose)
        prnElev.append(dataChanStValid[indexPRN]['CHST_Elevation'])
        prnAzim.append(dataChanStValid[indexPRN]['CHST_Azimuth'])

        # retain only multiples of hours to display