# execute the conversion sbf2stf needed SBF2STFOPTS = ['MeasEpoch_2', 'MeasExtra_1'] # options for conversion, ORDER IMPORTANT!! sbf2stfConverted = sbf2stf.runSBF2STF(nameSBF, SBF2STFOPTS, overwrite, verbose) # print('SBF2STFOPTS = %s' % SBF2STFOPTS) for option in SBF2STFOPTS: # print('option = %s - %d' % (option, SBF2STFOPTS.index(option))) if option == 'MeasEpoch_2': # read the MeasEpoch data into a numpy array dataMeas = sbf2stf.readMeasEpoch( sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) elif option == 'MeasExtra_1': # 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) # 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:
sys.stderr.write('SBF datafile %s does not exists. Exiting.\n' % nameSBF) sys.exit(E_FILE_NOT_EXIST) # execute the conversion sbf2stf needed SBF2STFOPTS = ['MeasEpoch_2', 'MeasExtra_1'] # options for conversion, ORDER IMPORTANT!! sbf2stfConverted = sbf2stf.runSBF2STF(nameSBF, SBF2STFOPTS, overwrite, verbose) # print('SBF2STFOPTS = %s' % SBF2STFOPTS) for option in SBF2STFOPTS: # print('option = %s - %d' % (option, SBF2STFOPTS.index(option))) if option == 'MeasEpoch_2': # read the MeasEpoch data into a numpy array dataMeas = sbf2stf.readMeasEpoch(sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) elif option == 'MeasExtra_1': # 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)