[Positioning] Fix RP generation with >3 APs

When selecting the 2 reference APs, skip the APs that do not have (yet)
an associated reference point.
This commit is contained in:
Matteo Cypriani 2011-07-25 19:24:10 +02:00
parent 84acee629c
commit a1dd6d90d8
1 changed files with 4 additions and 0 deletions

View File

@ -520,6 +520,10 @@ void Stock::regenerate_reference_points()
continue ;
const Point3D &ref_coord =
ref->second.get_coordinates() ;
// Skip the AP if the associated reference point does
// not exist yet:
if (! reference_point_exists(ref_coord))
continue ;
double angle =
rx_coord.angle(current_point, ref_coord) ;
pair<double,