[Positioner] Stock::generate_RP(): fix update mobile
In generate_reference_point(), update the mobile's attributes *before* to test if the current AP should be skipped.
This commit is contained in:
parent
fb9d2d0cef
commit
4c5ad300c3
|
@ -508,15 +508,15 @@ void Stock::generate_reference_point(const Point3D &point)
|
|||
for (unordered_map<string, AccessPoint>::const_iterator
|
||||
rx = aps.begin() ; rx != aps.end() ; ++rx)
|
||||
{
|
||||
/* Update the mobile's attributes */
|
||||
vmob_gain += rx->second.get_antenna_gain() / aps.size() ;
|
||||
vmob_pow += rx->second.get_trx_power() / aps.size() ;
|
||||
|
||||
/* Skip the AP if it is not at the good level */
|
||||
const Point3D &rx_coord = rx->second.get_coordinates() ;
|
||||
if (rx_coord.get_z() != point.get_z())
|
||||
continue ;
|
||||
|
||||
/* Update the mobile's attributes */
|
||||
vmob_gain += rx->second.get_antenna_gain() / aps.size() ;
|
||||
vmob_pow += rx->second.get_trx_power() / aps.size() ;
|
||||
|
||||
/* Choose the 2 nearest APs in angle */
|
||||
multimap<double, pair<double,
|
||||
unordered_map<string, AccessPoint>::const_iterator> >
|
||||
|
|
Loading…
Reference in New Issue