Elaboradar 0.1
|
◆ intersecting()
Get all the positions intersecting an angle centered on azimuth and with the given amplitude.
Definizione alla linea 67 del file azimuth_resample.cpp. 68{
69 // Compute the amplitude between our beams assuming the angles we have are
70 // close to evenly spaced
71 double my_semi_amplitude = src_amplitude / 2.0;
72 // Angles closer than this amount are considered the same for overlap detection
73 static const double precision = 0.000000001;
74
75 double lowest_azimuth = dst_azimuth - dst_amplitude / 2 - my_semi_amplitude + precision;
76 while (lowest_azimuth < 0) lowest_azimuth += 360;
77 lowest_azimuth = fmod(lowest_azimuth, 360);
78 double highest_azimuth = dst_azimuth + dst_amplitude / 2 + my_semi_amplitude - precision;
79 while (highest_azimuth < 0) highest_azimuth += 360;
80 highest_azimuth = fmod(highest_azimuth, 360);
81
82 std::vector<pair<double, unsigned>> res;
83
84 if (lowest_azimuth <= highest_azimuth)
85 {
88 for (auto i = begin; i != end; ++i)
89 res.push_back(*i);
90 } else {
94 res.push_back(*i);
96 res.push_back(*i);
97 }
98
99 return res;
100}
std::map< double, unsigned > by_angle map azimuth angles to beam indices Definition: azimuth_resample.h:24 Referenzia by_angle. |