; ; FILE: prog_focus30.ips ; PURPOSE: Extract three pieces out of 8 of 10 filtergrams and send them ; down. ; RESTRICTION: ; The frame list used with this program must have 10 frames. ; Frame 1 and 10 are ignored. ; Downlink is shifted to start as late as possible (set up so that ; the last downlink starts on callback frame 10 -- 2 pages downlinked ; every 5 frames). ; PAGE USE: ; Page 0 is where the data is written to from the camera ; Page 13 is where the data is extracted 1024x1024 ; page 17 is where the 3 strip extract is written ; Page 1,2,3,4, 15,15.5,18,19 are where the data are stored for downlink ; HISTORY: Written 25-Apr-96 by M.Morrison ; 2-May-96 (MDM) - Added square-root compression ; ; QPROG_FOCUS30:: ;---------------- Optional Downlink Portion OPTIONAL_DL: BRANCHEQ R3072 5 &DL_FRM05 BRANCHEQ R3072 10 &DL_FRM10 GOTO &INCOMING_IMG DL_FRM05: SETREGS $IPRL_DL_PARAM 2 0x0800 0x1000 ;downlink the images taken at frames 2 and 3 CALLQUE $QSR_DL_2PAGE GOTO &INCOMING_IMG DL_FRM10: SETREGS $IPRL_DL_PARAM 2 0x1800 0x2000 ;downlink the images taken at frames 4 and 5 CALLQUE $QSR_DL_2PAGE GOTO &INCOMING_IMG ;----------------------------- Process incoming image INCOMING_IMG: SETREG $IPRL_CB_ADDR &QCB_FOCUS3 ;set the callback register with the address to go to BRANCHEQ R3072 1 &INIT_PAGE_POINTER BRANCHEQ R3072 10 &DONE ;---- Step #1: Making the observable and save the data SETREGS $IPRL_FLTGRAM_PARAM 4 0:0x0000 13:0x0726 ;set source page and destination pages COPYRD2D $IPRL_EXTRACT3_PARAM+2 $IPRL_FLTGRAM_PARAM+8 3 ;last three words are n/k, dpc(h,l) CALLQUE $QSR_MK_FLTGRAM ;---- Step #2: Extracting the three strips SETREGS $IPRL_EXTRACT3_INSTR 4 13:0x0726 17:0x0726 ;source and destination page for extract CALLQUE $QSR_FMT_EXTRACT3 ;---- Step $3: Square-root compress and save to page SETREGS $IPRL_SQRT_PARAM 2 17:0x00726 ;set source page for square root compression COPYRI2D $IPRP_FOCUS3_PAGE $IPRL_FOCUS3_TMP_PAGE 3 ;copy page into fixed location (plus one extra) COPYREG $IPRL_FOCUS3_TMP_PAGE $IPRL_SQRT_PARAM+2 ;copy page into the parameter COPYREG $IPRL_FOCUS3_TMP_PAGE+1 $IPRL_SQRT_PARAM+3 CALLQUE $QSR_SQRT_COMP ADDREGD $IPRP_FOCUS3_PAGE 2 ;increment forward to the next page in the list DONE: END INIT_PAGE_POINTER: SETREG $IPRP_FOCUS3_PAGE $IPRL_FOCUS3_PAGES ;set pointer to which page to use END ;----------------------- Start of callback code QCB_FOCUS3:: BRANCHEQ R3072 5 &CB_FRM05 BRANCHEQ R3072 10 &CB_FRM10 GOTO &QSR_CB_DONE_ADDR CB_FRM05: SETREGS $IPRL_DL_PARAM 2 0x7800 0x7808 ;downlink the images taken at frames 6 and 7 CALLQUE $QSR_DL_2PAGE GOTO &QSR_CB_DONE_ADDR CB_FRM10: SETREGS $IPRL_DL_PARAM 2 0x9000 0x9800 ;downlink the images taken at frames 8 and 9 CALLQUE $QSR_DL_2PAGE SETREG $IPRL_CB_ADDR 0 ;clear the callback register GOTO &QSR_CB_DONE_ADDR END