Elaboradar 0.1
Caricamento in corso...
Ricerca in corso...
Nessun risultato

◆ read_beam()

template<typename T >
void radarelab::PolarScan< T >::read_beam ( unsigned  az,
T *  out,
unsigned  out_size,
missing = 0 
) const
inline

Fill an array with beam data .

If the array is longer than the beam fill the remaining with missing

Parametri
[in]az- azimuth index
[in,out]out- array to be filled
out_size- dimension of the array
[in]missing- Value to be used to fill the exceeding part

Definizione alla linea 194 del file volume.h.

195 {
196 using namespace std;
197
198 // Prima riempio il minimo tra ray.size() e out_size
199 size_t set_count = min(beam_size, out_size);
200
201 for (unsigned i = 0; i < set_count; ++i)
202 out[i] = get(az, i);
203
204 for (unsigned i = set_count; i < out_size; ++i)
205 out[i] = missing;
206 }
T get(unsigned az, unsigned beam) const
Get a beam value.
Definition: volume.h:161
unsigned beam_size
Number of samples in each beam.
Definition: volume.h:33

Referenzia radarelab::PolarScanBase::beam_size, e radarelab::PolarScan< T >::get().