Pokemon-GO-node-api
Pokemon-GO-node-api copied to clipboard
Best way to scan a large zone
Hello, I would like to use your node api to scan a complete zone of ~2x2 miles from an origin point. The principle is to browse some point in the area, and perform a query to retrieve all the Pokémon of the surrounding area (I use hb.cells[i].MapPokemon).
This algorithm does not seem accurate enough, as few Pokémon are raised. Do you have an idea to improve the scan (accuracy/time of lap)?
- Step duration (Heartbeat min) : 400ms
- Origin point : latX & lngX
- Scan zone :
if (min_lat == 0) { min_lat = latX-0.007; max_lat = latX+0.007; min_lng = lngX-0.015; max_lng = lngX+0.015; position_lat = min_lat; position_lng = min_lng; }
- Steps : var step_lat = 0.001; var step_lng = 0.001;
- Loop :
a.SetLocation({ type: "coords", coords:{ latitude: position_lat, longitude: position_lng, altitude: 0 } }, function(err, new_location) { if (position_lat < max_lat) { position_lat = parseFloat((position_lat+step_lat).toFixed(6)); } else { position_lat = min_lat; position_lng = parseFloat((position_lng + step_lng).toFixed(6)); } if (position_lng > max_lng) { min_lat = 0; } });
Results : DURATION 192.497s (too long 👎 )
You have to scan the area using multiple accounts and have every account scan a little part of the area. There is no other way since Niantic introduced request throttling.
What is throttled in this case? The maximum distance in between queries or the maximum number of queries per seconds?
Maximum requests per second. Max 1 request every 5 seconds
Is there a maximum account per ip?
I don't think so, map scanner out there already used up to 40 accounts without problems.
There is now a throttling on max accounts per IP (dunno how much tho') and the throttling per account is ~6-7s