1
0
Fork 0

Use wider search in FGCommList::FindByPos

This commit is contained in:
Csaba Halasz 2009-10-13 17:54:27 +02:00 committed by Tim Moore
parent 58f303e464
commit ce7c98f210

View file

@ -167,8 +167,8 @@ int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stat
SGBucket buck(aPos);
// get neigboring buckets
int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2);
int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 );
int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2) + 1;
int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 ) + 1;
// loop over bucket range
for ( int i=-bx; i<=bx; i++) {