|
@@
-720,14
+720,14
int getFBinMask( int index, unsigned cha
|
|
720
|
|
|
720
|
|
|
721
|
unsigned char acquisitionTimeIsValid( unsigned int coarseTime, unsigned int fineTime, unsigned char channel)
|
|
721
|
unsigned char acquisitionTimeIsValid( unsigned int coarseTime, unsigned int fineTime, unsigned char channel)
|
|
722
|
{
|
|
722
|
{
|
|
723
|
u_int64_t acquisitionTimeStart;
|
|
723
|
u_int64_t acquisitionTStart;
|
|
724
|
u_int64_t acquisitionTimeStop;
|
|
724
|
u_int64_t acquisitionTStop;
|
|
725
|
u_int64_t timecodeReference;
|
|
725
|
u_int64_t timecodeReference;
|
|
726
|
u_int64_t offsetInFineTime;
|
|
726
|
u_int64_t offsetInFineTime;
|
|
727
|
u_int64_t shiftInFineTime;
|
|
727
|
u_int64_t shiftInFineTime;
|
|
728
|
u_int64_t tBadInFineTime;
|
|
728
|
u_int64_t tBadInFineTime;
|
|
729
|
u_int64_t acquisitionTimeRangeMin;
|
|
729
|
u_int64_t perturbationTStart;
|
|
730
|
u_int64_t acquisitionTimeRangeMax;
|
|
730
|
u_int64_t perturbationTStop;
|
|
731
|
unsigned char pasFilteringIsEnabled;
|
|
731
|
unsigned char pasFilteringIsEnabled;
|
|
732
|
unsigned char ret;
|
|
732
|
unsigned char ret;
|
|
733
|
|
|
733
|
|
|
@@
-735,18
+735,18
unsigned char acquisitionTimeIsValid( un
|
|
735
|
ret = 1;
|
|
735
|
ret = 1;
|
|
736
|
|
|
736
|
|
|
737
|
// compute acquisition time from caoarseTime and fineTime
|
|
737
|
// compute acquisition time from caoarseTime and fineTime
|
|
738
|
acquisitionTimeStart = ( ((u_int64_t)coarseTime) << SHIFT_2_BYTES )
|
|
738
|
acquisitionTStart = ( ((u_int64_t)coarseTime) << SHIFT_2_BYTES )
|
|
739
|
+ (u_int64_t) fineTime;
|
|
739
|
+ (u_int64_t) fineTime;
|
|
740
|
switch(channel)
|
|
740
|
switch(channel)
|
|
741
|
{
|
|
741
|
{
|
|
742
|
case CHANNELF0:
|
|
742
|
case CHANNELF0:
|
|
743
|
acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F0;
|
|
743
|
acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F0;
|
|
744
|
break;
|
|
744
|
break;
|
|
745
|
case CHANNELF1:
|
|
745
|
case CHANNELF1:
|
|
746
|
acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F1;
|
|
746
|
acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F1;
|
|
747
|
break;
|
|
747
|
break;
|
|
748
|
case CHANNELF2:
|
|
748
|
case CHANNELF2:
|
|
749
|
acquisitionTimeStop = acquisitionTimeStart + FINETIME_PER_SM_F2;
|
|
749
|
acquisitionTStop = acquisitionTStart + ACQUISITION_DURATION_F2;
|
|
750
|
break;
|
|
750
|
break;
|
|
751
|
}
|
|
751
|
}
|
|
752
|
|
|
752
|
|
|
@@
-759,20
+759,19
unsigned char acquisitionTimeIsValid( un
|
|
759
|
shiftInFineTime = ((double) filterPar.sy_lfr_pas_filter_shift) * CONST_65536;
|
|
759
|
shiftInFineTime = ((double) filterPar.sy_lfr_pas_filter_shift) * CONST_65536;
|
|
760
|
tBadInFineTime = ((double) filterPar.sy_lfr_pas_filter_tbad) * CONST_65536;
|
|
760
|
tBadInFineTime = ((double) filterPar.sy_lfr_pas_filter_tbad) * CONST_65536;
|
|
761
|
|
|
761
|
|
|
762
|
acquisitionTimeRangeMin =
|
|
762
|
perturbationTStart =
|
|
763
|
timecodeReference
|
|
763
|
timecodeReference
|
|
764
|
+ offsetInFineTime
|
|
764
|
+ offsetInFineTime
|
|
765
|
+ shiftInFineTime
|
|
765
|
+ shiftInFineTime;
|
|
766
|
- acquisitionDurations[channel];
|
|
|
|
|
767
|
|
|
766
|
|
|
768
|
acquisitionTimeRangeMax =
|
|
767
|
perturbationTStop =
|
|
769
|
timecodeReference
|
|
768
|
timecodeReference
|
|
770
|
+ offsetInFineTime
|
|
769
|
+ offsetInFineTime
|
|
771
|
+ shiftInFineTime
|
|
770
|
+ shiftInFineTime
|
|
772
|
+ tBadInFineTime;
|
|
771
|
+ tBadInFineTime;
|
|
773
|
|
|
772
|
|
|
774
|
if ( (acquisitionTimeStart >= acquisitionTimeRangeMin)
|
|
773
|
if ( (acquisitionTStart >= perturbationTStart)
|
|
775
|
&& (acquisitionTimeStart <= acquisitionTimeRangeMax)
|
|
774
|
&& (acquisitionTStart <= perturbationTStop)
|
|
776
|
&& (pasFilteringIsEnabled == 1) )
|
|
775
|
&& (pasFilteringIsEnabled == 1) )
|
|
777
|
{
|
|
776
|
{
|
|
778
|
ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
|
|
777
|
ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
|
|
@@
-785,8
+784,8
unsigned char acquisitionTimeIsValid( un
|
|
785
|
// the last sample of the data used to compute the matrix shall not be INSIDE the range, test it now, it depends on the channel
|
|
784
|
// the last sample of the data used to compute the matrix shall not be INSIDE the range, test it now, it depends on the channel
|
|
786
|
if (ret == 1)
|
|
785
|
if (ret == 1)
|
|
787
|
{
|
|
786
|
{
|
|
788
|
if ( (acquisitionTimeStop >= acquisitionTimeRangeMin)
|
|
787
|
if ( (acquisitionTStop >= perturbationTStart)
|
|
789
|
&& (acquisitionTimeStop <= acquisitionTimeRangeMax)
|
|
788
|
&& (acquisitionTStop <= perturbationTStop)
|
|
790
|
&& (pasFilteringIsEnabled == 1) )
|
|
789
|
&& (pasFilteringIsEnabled == 1) )
|
|
791
|
{
|
|
790
|
{
|
|
792
|
ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
|
|
791
|
ret = 0; // the acquisition time is INSIDE the range, the matrix shall be ignored
|