Pokemon-GO-node-api icon indicating copy to clipboard operation
Pokemon-GO-node-api copied to clipboard

Best way to scan a large zone

Open Nico-Nico-FR opened this issue 8 years ago • 6 comments

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 👎 )

Nico-Nico-FR avatar Aug 01 '16 19:08 Nico-Nico-FR

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.

WiS3 avatar Aug 01 '16 22:08 WiS3

What is throttled in this case? The maximum distance in between queries or the maximum number of queries per seconds?

fredx21 avatar Aug 02 '16 00:08 fredx21

Maximum requests per second. Max 1 request every 5 seconds

WiS3 avatar Aug 02 '16 00:08 WiS3

Is there a maximum account per ip?

fredx21 avatar Aug 02 '16 00:08 fredx21

I don't think so, map scanner out there already used up to 40 accounts without problems.

WiS3 avatar Aug 02 '16 00:08 WiS3

There is now a throttling on max accounts per IP (dunno how much tho') and the throttling per account is ~6-7s

beuted avatar Aug 14 '16 13:08 beuted