Capsim Block Documentation
This simulates target range measurements from a track-while-scan radar
int i,j,k; float tdel; double sd,yn,zn,ynr,znc,zns,u,sqrt(),log(); |
---|
if((no_outbuf = NO_OUTPUT_BUFFERS() ) <= 0) { fprintf(stderr,"target: no output buffers\n"); return(1); /* no output buffers */ } no_inbuf = NO_INPUT_BUFFERS(); if(no_inbuf == 1) output_target = samples_first_time; else output_target = num_of_samples; if(output_target > num_of_samples) output_target = num_of_samples; if(pace_rate < 0) pace_rate = -pace_rate; tdel = ts*0.001; xm[0] = initial_range; sd = sdf/6076.0; srandom(seed); max = m; for(k=1; k |
---|
if(no_inbuf == 1) { while(IT_IN(0)) pace_in_total += 1.0; if(pass == 1) { output_target = samples_first_time + (int) (pace_rate * pace_in_total + 0.5); if(output_target > num_of_samples && num_of_samples > 0) output_target = num_of_samples; } } pass = 1; i = 0; while(samples_out < output_target) { if(++i > NUMBER_SAMPLES_PER_VISIT) return(0); for(j=0; j |
---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks) Copyright (C) 1989-2017 Silicon DSP 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://www.silicondsp.com Silicon DSP Corporation Las Vegas, Nevada */ |
---|
/* target.s: this simulates target range measurements from a track-while-scan radar parameters: cv - closing velocity in knots initial_range - initial range in nautical miles sdf - standard deviation in feet num_of_samples - number of samples ts - sampling interval in milliseconds pd - data probability seed - random number seed inputs: none outputs: range measurements description: This star generates range measurements from a track-while-scan radar with measurement uncertainty. If there is a missed range value a "0" is output. written by Ray Kassel August 13, 1990 |
---|