Online Planetary radar software
nov10
Online Planetary radar scripts documentation: need to add
problems:
monostatic cycle:
A single monostatic tx,rx cycle is done by
sbcycle.proc.
Multiple cycles are done with sbdon.proc (which just calls sbcycle
repeatedly).
notes:
- xxxx argument
set in tcl sb() array. normally defined in setup file.
- xxxx error .. normally in
sbdProg
- sbcycle -p {txStartTm} {rxStartTm}
- args:
- -p : do not restart phase modulation .. it is
already started
- txStartTm Integral Seconds from midnite (AST) to
start transmit cycle. def. now +10secs.
- rxStartTm: Integral seconds from midnite (AST) so start
receive cycle. def: set sbdProg (tx routine trip time
rounded up to next sec),
- sbst {txStartTm} { rxStartTm}
- if no args: txStartTm= now sec + 10
- sbstinfo txStartTm {rxStartTm}
- call the C program sbdProg:
- sbdProg "g txStartTm {rxStartTm}" ..
get startinfo.
- Variables _I are ints.
- getindex( txStartTm,ind1Tx,ind2Tx,fracStepTx)
- returns:
- ind1Tx,ind2Tx: indices into ephmBuf that brackets
the start secs
- fracStepTx: fraction of ephmStep from ind1Tx to
txStartTm
- txOn_I = txStartTm
- rttTxOn. compute tx round trip time form ephem
ind1Tx,ind2Tx and fracStepTx
- txOff_I=txOn_I + rttTxOn - txDownEarlySec_I
- rxOn_I=txOn_I + rttTxOn + rxSecEchoBeforeStart_I
- If
rxStartTm_I supplied
- rxOn_I =
rxStartTm
- if
rxOn_I <= txOff_I .. rx trying to start before
tx done.
- errno=S_RDRDOP_RXONREQ_BEFORE_TX_DOWN_TIME;
- rxOff_I =
txOff_I + rttTxOn + rxSecForNoise
.. if want noise with no echo
- if rxOn_I
>= rxOff_I .. rxOn req after echo gone.
- errno=S_RDRDOP_RXONREQ_AFTER_ECHO_GONE;
- Compute baud delay so marker arrives at rxOn.
- rtt to use: If dopTx use rrtTxOn else use rttRxOn
- rtt -= ephDelayBauds*baudSecs
.. smaller rtt puts marker before planet
- secsAfterRtt=(rxOn-txOn) - rtt .. extra time after
rtt, before rx on.
- For non long pnc
- codesBeforeRxOn=secsAfterRtt/codeLenSec
- fracCodeBeforeRxOn=codesBeforeRxOn -
int(codesBeforeRxO)
- delayInBauds_I=int(codelenBauds*
fracCodeBeforeRxOn)
- Compute fractional baud assuming we delay be
delayinbauds
- markerToRxOnUsec=fracCodeBeforeRxOn*codeLenUsec -
delayInBauds*baudLenUsec.
- returns:
txStart,txDown,rxStart,rxDone,startPhase=delayInBauds,markerToRxOnusecs
- sb(mintxtime).. doc skipped. if mono and bistatic ...
- set start time for dopplerfrequency interpolation;
- sb(tmpoly) =
- rxdop: tmrxUp
- txdop: tmTxUp
- txrx : {tmTxUP tmRxUp
- default: tmRxUp.
- get tracking info .. ra ,dec, rates..
- sbdProg "t txStartTm rxStartTm"
- getTrackInfo(txStartTm, rxStartTm)
- compute ra,dec for tx Start (using tx ephm), ra,dec
start for Rx (using rxEphm)
- This interpolates between the closest ephmEntries.
- Compute the rates for ra,dec.
- ind1= 1st ephm entry before txSTart
- ind2 = 1st ephm entry before rxStart
- If indices the same increment indEphm2 by 1.
- Use txPosition for rate computation.
- deltaTm=tmephm[ind2] - tmephm[ind1]
- raRate=(ephmRaTx[ind1] -
ephmRaTx[ind2])/deltaTm
- decRte=(ephmDecTx[ind1] - ephmDecTx[ind2/deltaTm
- Notes:
- if sbposcycle() is later called, you just
replace the tx,rx starttimes with now and now+60
secs..
- sbdProg "poly sb(tmpoly) .. compute
the polynomial for freq interpolation.
- return from sbstinfo
- print out
- txcycle.. up ..down
- rxcycle .. up .. down
- If using ri and requested, use ri gatedelay to
correct for fractional baud
- setup ri gatedelay timing
- note this is always done even if sb(dev) is none
- This is a bug .. mainly occuring in bistatic
observations..
- If sb(dev) in none, then sb(prg) = rtgProg@da is
not defined (see sbsetup.proc)
- mcp setupTiming $sb(prg) "tming_gd $sb(rigd) will fail
with sb(prg) not defined.
- It will not fail if you first run the routines with
sb(dev) =ri and then switch. the first time, sb(prg)
will be defined to rtg...
- To fix the bug (11mar17) sbst will only setup the rigd
timing if sb(dev) is ri.
- return from sbst.proc
- sbtx -t -p -l
- args:
- -t start a transmit cycle and return immediately (don't
wait for end of tx cycle)
- -p don't turn the phase modulation on of off (because we
already did it)
- -l don't talk to the transmitter (in case using
other tx .. lro..)
- looking at the code, you need to enter them in the order
above..
- log tx cycle, rxcycle times to logfile
- if not -p sbchoosepm .. turn phase mod on or off
- sbtxrdy {-l} wait for tx to be ready
- args:
- -l don't talk to tx.. in case lro
- move rotary floor to tx position (pnt tur pos
$sb(_fltxpos)
- close sbn shutter, tx synth on on frequency, set rfnum
to 14 to get leakage.
- if2 "if1_sbshcl t if1_syn2 $sb(_txsyn) if1_rfnum 14"
- if not -l
- sbSxmt - tell transmitter to got to transmit mode
- send telescope tracking position:
- tx pos,offset, rates, at txUptime
- set dds's to 20Mhz
- if txdop or txrxdop or freqswitching
- set dds output switch to tx output
- mcp setup ddsProg@dap1 "dds_rcvsw f"
- loop wait for things to be ready
- use sb(txrdymask) to see which things we wait for
- if telbit check if telescope on position
- if turbit check if turret on position
- if shutter bit (we can't read it.. it is a hardware
interlock)
- if combiner bit (check if combiner ready)
- If all ready break out of loop
- wait 5 clock ticks 1/12 of a second.
- return from sbtxrdy
- If pncL (long code generator) get the starting phase
- wait till 200ms before txup
- if sb(pncgen) = pncmem (standard code generator)
- start the generator on next tick with the correct phase
- if pncl (long code) .. start it.
- If sb(txsamp) == 1 .. if requested to sample the
transmitter with the ri...
- sbristart .. start the ri running on next tick
- wait for ri start
- log message
- if txdop or txrxdop or freqswitching
- start the dds running, doing the doppler correction
- BUG:
- if txampl is used, we wait there until the ri starts..
so the start time has passed.
- the dds will then start doppler tracking l second late
(waits for the next tick)
- This just means that the 1 sec of data has no doppler.
- Mike should have let the ri tx sampling start late..
- if pnclong, log the starting phase
- if -t option
- return for sbtx. do not wait for end of tx
- wait for end of tx down
- if txsamp, sbristop
- # sbstop 20e6 20e6 .. mike commented this out.
- said it was tripping the tx.
- Commenting out means the doppler tracking of dds
continues.
- sbrx left off here...
home_~phil