Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add command line argument for file format.

  • Loading branch information...
commit 87fc45490403673cbbe46bbeb14623ce7a799134 1 parent 12dfe7a
Fergus Noble fnoble authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 peregrine/run.py
9 peregrine/run.py
@@ -41,6 +41,9 @@ def main():
41 41 parser.add_argument("-n", "--skip-navigation",
42 42 help="use previously saved navigation results",
43 43 action="store_true")
  44 + parser.add_argument("-f", "--file-format", default="piksi",
  45 + help="the format of the sample data file "
  46 + "(e.g. 'piksi', 'int8', '1bit')")
44 47 args = parser.parse_args()
45 48 settings.fileName = args.file
46 49
@@ -60,7 +63,8 @@ def main():
60 63 else:
61 64 # Get 11ms of acquisition samples for fine frequency estimation
62 65 acq_samples = load_samples(args.file, 11*samplesPerCode,
63   - settings.skipNumberOfBytes)
  66 + settings.skipNumberOfBytes,
  67 + file_format=args.file_format)
64 68 acq = Acquisition(acq_samples, settings.samplingFreq, settings.IF,
65 69 samplesPerCode)
66 70 acq_results = acq.acquisition()
@@ -94,7 +98,8 @@ def main():
94 98 sys.exit(1)
95 99 else:
96 100 signal = load_samples(args.file,
97   - int(settings.samplingFreq*1e-3*(settings.msToProcess+1)))
  101 + int(settings.samplingFreq*1e-3*(settings.msToProcess+1)),
  102 + file_format=args.file_format)
98 103 track_results = track(signal, acq_results, settings)
99 104 try:
100 105 with open(track_results_file, 'wb') as f:

0 comments on commit 87fc454

Please sign in to comment.
Something went wrong with that request. Please try again.