示例#1
0
channel[4].acquiredFreq = 9545013.3361816406
channel[4].codePhase = 10460
channel[4].status = 'T'
channel[5].PRN = 5
channel[5].acquiredFreq = 9544312.1986389160
channel[5].codePhase = 11834
channel[5].status = 'T'
channel[6].PRN = 2
channel[6].acquiredFreq = 9549903.0876159668
channel[6].codePhase = 17842
channel[6].status = 'T'
channel[7].PRN = 8
channel[7].acquiredFreq = 9550831.8672180176
channel[7].codePhase = 26519
channel[7].status = 'T'
showChannelStatus(channel, settings)

#Track the acquired satellites
trackSamples = getSamples.int8(
    settings.fileName, settings.msToProcess, 11 * samplesPerCode
)  #11*samplesPerCode is number of samples used in acquisition
if settings.skipTracking:
    print "\nLoading old tracking results ... ",
    (trackResults, channel) = pickle.load(open("trackResults.pickle", "rb"))
    print "done"
else:
    startTime = datetime.now()
    print "\nTracking started at", startTime
    (trackResults, channel) = track(trackSamples, channel, settings)
    pickle.dump((trackResults, channel), open("trackResults.pickle", "wb"))
    print "Tracking Done. Elapsed time =", (datetime.now() - startTime)
示例#2
0
    else:
      print ".",
      sys.stdout.flush()
    for i in range(32): #Add PRN number to each result
      acqResults[i].append(i)
  #Acquisition is over 
  print ")"
  return acqResults

if __name__ == "__main__":
  from initSettings import initSettings
  import getSamples
  from showChannelStatus import showChannelStatus
  from preRun import preRun
  from plotAcquisition import plotAcquisition
  settings = initSettings()
  #11 ms of samples
  samplesPerCode = int(round(settings.samplingFreq / (settings.codeFreqBasis / settings.codeLength)))
  acqSamples = getSamples.int8(settings.fileName,11*samplesPerCode,settings.skipNumberOfBytes)
  print "Acquiring satellites ...",
  acqResults = acquisition(acqSamples,settings)
  acqFigure = plotAcquisition(acqResults,settings)
  #if satellite wasn't found, pop it off the list
  for i in range(32-1,-1,-1):
    if acqResults[i][0] > settings.acqThreshold:
      acqSuccessful = True
    else: 
      acqResults.pop(i)
  showChannelStatus(preRun(acqResults,settings),settings)
  pylab.show()
示例#3
0
#if acqSuccessful:
#  channel = preRun(acqResults,settings)
#else:
#  print "No satellites acquired, not continuing to tracking"
#  pylab.show()
#Use Octave results instead
channel = [track_chan_init_state() for i in range(8)]
channel[0].PRN = 20; channel[0].acquiredFreq = 9547426.3420104980; channel[0].codePhase = 35228; channel[0].status = 'T';
channel[1].PRN = 17; channel[1].acquiredFreq = 9548236.7477416992; channel[1].codePhase = 4357; channel[1].status = 'T';
channel[2].PRN = 21; channel[2].acquiredFreq = 9549684.5512390137; channel[2].codePhase = 28111; channel[2].status = 'T';
channel[3].PRN = 14; channel[3].acquiredFreq = 9549921.2989807129; channel[3].codePhase = 19953; channel[3].status = 'T';
channel[4].PRN = 25; channel[4].acquiredFreq = 9545013.3361816406; channel[4].codePhase = 10460; channel[4].status = 'T';
channel[5].PRN = 5; channel[5].acquiredFreq = 9544312.1986389160; channel[5].codePhase = 11834; channel[5].status = 'T';
channel[6].PRN = 2; channel[6].acquiredFreq = 9549903.0876159668; channel[6].codePhase = 17842; channel[6].status = 'T';
channel[7].PRN = 8; channel[7].acquiredFreq = 9550831.8672180176; channel[7].codePhase = 26519; channel[7].status = 'T';
showChannelStatus(channel,settings)

#Track the acquired satellites
trackSamples = getSamples.int8(settings.fileName,settings.msToProcess,11*samplesPerCode) #11*samplesPerCode is number of samples used in acquisition
if settings.skipTracking:
  print "\nLoading old tracking results ... ",
  (trackResults,channel) = pickle.load(open("trackResults.pickle","rb"))
  print "done"
else:
  startTime = datetime.now()
  print "\nTracking started at", startTime
  (trackResults, channel) = track(trackSamples, channel, settings)
  pickle.dump((trackResults, channel),open("trackResults.pickle","wb"))
  print "Tracking Done. Elapsed time =", (datetime.now() - startTime)
if settings.plotTrackingLow:
  trackLowFigures = plotTrackingLow(trackResults,settings)
示例#4
0
    return acqResults


if __name__ == "__main__":
    from initSettings import initSettings
    import getSamples
    from showChannelStatus import showChannelStatus
    from preRun import preRun
    from plotAcquisition import plotAcquisition
    settings = initSettings()
    settings.fileName = '../gnss_signal_records/v2_3_samples.dat'
    settings.IF = 4.092e6
    settings.samplingFreq = 16.368e6
    #11 ms of samples
    samplesPerCode = int(
        round(settings.samplingFreq /
              (settings.codeFreqBasis / settings.codeLength)))
    acqSamples = getSamples.int8(settings.fileName, 11 * samplesPerCode,
                                 settings.skipNumberOfBytes)
    print "Acquiring satellites ...",
    acqResults = acquisition(acqSamples, settings)
    acqFigure = plotAcquisition(acqResults, settings)
    #if satellite wasn't found, pop it off the list
    for i in range(32 - 1, -1, -1):
        if acqResults[i][0] > settings.acqThreshold:
            acqSuccessful = True
        else:
            acqResults.pop(i)
    showChannelStatus(preRun(acqResults, settings), settings)
    pylab.show()