Elaboradar 0.1
|
◆ sample()
Generate all the (azimuth, range) indices corresponding to a map point. Definizione alla linea 44 del file cart.cpp. 45{
46 // Map cartesian coordinates to angles and distances
49
50 // Exact angle
52
53#if 0
54 // Iterate indices 0.45° before and after
55 int az_min = floor((az - .45) * beam_count / 360.0);
56 int az_max = ceil((az + .45) * beam_count / 360.0);
57 if (az_min < 0)
58 {
59 az_min += beam_count;
60 az_max += beam_count;
61 }
62#endif
63
64 // Iterate on angles that actually overlap with the map cell
65 double d_az = M_1_PI * 180. / (range_idx + 0.5) / 2;
66 int az_min = round((az - d_az) * beam_count / 360.);
67 int az_max = round((az + d_az) * beam_count / 360.);
68
69 // Iterate all points between az_min and az_max
70 for (int iaz = az_min; iaz <= az_max; ++iaz)
71 f((unsigned)((iaz+beam_count) % beam_count), range_idx);
72}
const unsigned beam_size Beam size of the volume that we are mapping to cartesian coordinates. Definition cart.h:24 Matrix2D< double > map_range Range indices to use to lookup a map point in a volume. Definition cart.h:44 Matrix2D< double > map_azimuth Azimuth indices to use to lookup a map point in a volume. Definition cart.h:34 Referenzia beam_size, map_azimuth, e map_range. Referenziato da radarelab::FullsizeIndexMapping::map_max_sample(), radarelab::ScaledIndexMapping::sample(), e radarelab::ScaledIndexMapping::to_cart_average(). |