Loading ...
Sorry, an error occurred while loading the content.

2005Re: [SpectrumLabUsers] Apparent inconsistency in SL Conditional Actions calculation

Expand Messages
  • kd7ts
    Jul 20, 2014
    • 0 Attachment
      Hi Paul,

      I see what you are seeing, though I don't get numbers less than 17.

      if( C=1 ) then Mtime=h2:MSig=Sig:MNoise=A

      It might help to change the order of the above,as below, not sure.

      if( C=1 ) then MSig=Sig:MNoise=A:Mtime=h2

      I suspect this has to do with the way the operating system deals with
      interrupts. Asking for time is a BIOS call so, maybe, asking for time last and
      Sig first would capture the value in MSig before Sig changes.

      This didn't change much for me, but it helps. The biggest factor seems to be
      random noise. If I set the generator just below the threshold, it triggers at
      random even though the threshold is theoretically never reached.

      I added an additional column in the file for (MSig - MNoise) (the last entry)

      16:49:19 -58.609 -77.207 18 18.597
      16:49:28 -58.052 -77.058 18 19.006
      16:49:38 -62.048 -79.346 11 17.298
      16:49:46 -60.299 -80.654 30 20.354
      16:50:04 -60.649 -78.721 35 18.072

      I think this is real.

      Mike KD7TS

      ; Exported "Conditional Actions" for Spectrum Lab

      if( initialising ) then A=0:Sig=0:C=0:low=4000:high=4800:Mtime=0:MSig=0:MNoise=0
      if( always ) then A=noise(low,high):Sig=peak_a(low,high):h2=str("hh:mm:ss",now)
      if( Sig>(A+17) ) then C=C+1:timer0.restart(2)
      if( C=1 ) then MSig=Sig:MNoise=A:Mtime=h2
      if( timer0.expired(1) ) then
      if( !else ) then
    • Show all 5 messages in this topic