@@ -355,26 +355,27 class RadarControllerHeader(Header): | |||
|
355 | 355 | if self.numTaus > 0: |
|
356 | 356 | self.Taus.tofile(fp) |
|
357 | 357 | |
|
358 | nCode = numpy.array(self.nCode, '<u4') | |
|
359 | nCode.tofile(fp) | |
|
360 | nBaud = numpy.array(self.nBaud, '<u4') | |
|
361 | nBaud.tofile(fp) | |
|
362 | code1 = (self.code + 1.0)/2. | |
|
363 | ||
|
364 | for ic in range(self.nCode): | |
|
365 | tempx = numpy.zeros(numpy.ceil(self.nBaud/32.)) | |
|
366 | start = 0 | |
|
367 | end = 32 | |
|
368 | for i in range(len(tempx)): | |
|
369 | code_selected = code1[ic,start:end] | |
|
370 | for j in range(len(code_selected)-1,-1,-1): | |
|
371 | if code_selected[j] == 1: | |
|
372 | tempx[i] = tempx[i] + 2**(len(code_selected)-1-j) | |
|
373 | start = start + 32 | |
|
374 | end = end + 32 | |
|
358 | if self.codeType !=0: | |
|
359 | nCode = numpy.array(self.nCode, '<u4') | |
|
360 | nCode.tofile(fp) | |
|
361 | nBaud = numpy.array(self.nBaud, '<u4') | |
|
362 | nBaud.tofile(fp) | |
|
363 | code1 = (self.code + 1.0)/2. | |
|
375 | 364 | |
|
376 | tempx = tempx.astype('u4') | |
|
377 | tempx.tofile(fp) | |
|
365 | for ic in range(self.nCode): | |
|
366 | tempx = numpy.zeros(numpy.ceil(self.nBaud/32.)) | |
|
367 | start = 0 | |
|
368 | end = 32 | |
|
369 | for i in range(len(tempx)): | |
|
370 | code_selected = code1[ic,start:end] | |
|
371 | for j in range(len(code_selected)-1,-1,-1): | |
|
372 | if code_selected[j] == 1: | |
|
373 | tempx[i] = tempx[i] + 2**(len(code_selected)-1-j) | |
|
374 | start = start + 32 | |
|
375 | end = end + 32 | |
|
376 | ||
|
377 | tempx = tempx.astype('u4') | |
|
378 | tempx.tofile(fp) | |
|
378 | 379 | |
|
379 | 380 | if self.line5Function == RCfunction.FLIP: |
|
380 | 381 | self.flip1.tofile(fp) |
General Comments 0
You need to be logged in to leave comments.
Login now