Elaboradar 0.1
|
◆ CoordinateMapping()
Build a cartography mapping cartesian coordinates to volume polar indices. The mapping is a 1 to 1 mapping, without scaling. Definizione alla linea 6 del file cart.cpp. 10{
13 {
14 // x and y centered on the map center
17 //absx += (absx < 0) ? -0.5 : 0.5;
18 //absy += (absy < 0) ? -0.5 : 0.5;
19 // x and y (referred to map center) centered on the pixel center
20 absx += 0.5;
21 absy += 0.5;
22
23 // Compute range
24 map_range(y, x) = hypot(absx, absy);
25
26 // Compute azimuth
27 double az;
28 /* if (absx > 0)
29 if (absy < 0)
30 az = atan(absx / -absy) * M_1_PI * 180.;
31 else
32 az = 90.0 + atan(absy / absx) * M_1_PI * 180.;
33 else
34 if (absy > 0)
35 az = 180 + atan(-absx / absy) * M_1_PI * 180.;
36 else
37 az = 270 + atan(-absy / -absx) * M_1_PI * 180.;
38 map_azimuth(y, x) = az;
39 */
40 map_azimuth(y,x)= fmod (450 - atan2( -absy,absx)*M_1_PI*180., 360. );
41 }
42}
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. |