Capsim Block Documentation
Generate chirp for SAR
| Port | Type | Name | |
|---|---|---|---|
| 0 | float | outSample |
| Num | Type | Name | Initial Value | Description |
|---|---|---|---|---|
| 0 | float | phase | 0. | |
| 1 | float | t | 0. | |
| 2 | float | dt | ||
| 3 | float | tp | ||
| 4 | int | done | 0 | |
| 5 | int | maxIndex | ||
| 6 | int | k | ||
| 7 | float | lamda | ||
| 8 | float | t0 | ||
| 9 | int | maxRangeIndex |
int no_samples; int i,j; float taz; float range; float arg; float a,b,c; float rx; |
|---|
dt=(1.0/fs)*.000001; maxRangeIndex=(int)tau*0.000001/dt; tp=tpi*(1.0/prf); done=0; maxIndex=(int)total*prf; t=0; k=0; lamda=C/(fc*1000000.0); t0=2.0*840.0*1000.0/C; |
|---|
if(done)return(0);
for(i=0; i< maxRangeIndex; i++) {
t=dt*i+t0;
// t=dt*i;
;
// taz=(1.0/prf)*i;
taz=tazs;
range=rp+(v*v*0.5/rp)*(tc+tp-taz)*(tc+tp-taz);
a=t-2.0*range*1000.0/C;
b=a*a;
b=PI*Kr*b*1e12;
c=fIF*t*1000000.0-(2.0*range*1000.0/lamda);
rx=cos(c+b);
// fprintf(stderr,"%d %f\n",k,range);
if(IT_OUT(0) ) {
KrnOverflow("sar_chirp",0);
return(99);
}
outSample(0)=rx;
}
done=1;
return(0);
|
|---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks)
Copyright (C) 1989-2002 XCAD Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://capsimtmk.sourceforge.net
XCAD Corporation
Raleigh, North Carolina */
|
|---|
/************************************************************************ * * (c) 1989-2002 XCAD Corporation |
|---|