Exemple #1
0
def main():
    # Import data. Will read many ms at once, then process the blocks as needed.
    # Need these to pass to importFile module
    fs = 4.092*10**6 # Sampling Frequency [Hz]
    numberOfMilliseconds = 31000
    sampleLength = numberOfMilliseconds*10**(-3)
    bytesToSkip = 0

    data = IQData()
    # Uncomment one of these lines to choose between Launch12 or gps-sdr-sim data

    # /home/evan/Capstone/gps/resources/[email protected]
    #data.importFile('resources/[email protected]', fs, sampleLength, bytesToSkip)
    #data.importFile('resources/[email protected]', fs, sampleLength, bytesToSkip)
    #data.importFile('resources/test4092kHz.max', fs, sampleLength, bytesToSkip)
    #data.importFile('resources/Single4092KHz5s.max', fs, sampleLength, bytesToSkip)
    RealDataOnly = True
    #data.importFile('resources/Single4092KHz60s.max', fs, sampleLength, bytesToSkip, RealDataOnly)
    data.importFile('resources/Single4092KHz120s.max', fs, sampleLength, bytesToSkip, RealDataOnly)

    acqresult = Acquisition.SatStats()
    theCodePhase = 630.251585
    acqresult.CodePhaseSamples = int((1023.0 - theCodePhase)*4 + 1)
    acqresult.FineFrequencyEstimate = -3363.8
    acqresult.Sat = 1

    chartOut = False
    channel1 = Channel(data, acqresult, chartOut)
    channel1.Track()
    #channel1._writeBits()
    channel1._writeBits2()
    channel1.GetEphemeris()