tehp / OpenPoGoBot

A PokemonGo Python bot - NO LONGER MAINTAINED
MIT License
123 stars 53 forks source link

Altitude not set for address #213

Open epicblood opened 8 years ago

epicblood commented 8 years ago

Expected Behavior

Altitude is set for all locations

Actual Behavior

When an address is specified for start location ("Central Park, New York, NY"), altitude is set to 0, if the coords of this address are used ("40.7711329,-73.97418739999999") altitude is looked up and set.

Steps to Reproduce

start bot with non-coord location

Other Information

OS: Debian Testing Git Commit: 703615372f6aec8ceb3c1515531a58abddf758af

andythorne commented 8 years ago

I think this could be extended to altitude is ONLY set when using geolocation on in it (i.e. It's not correctly set on each step either).

The only way I've found how to do this is call Google's elevation api every time we set the location.

tegob commented 8 years ago

The only way I've found how to do this is call Google's elevation api every time we set the location.

Stating the obvious here but don’t forget to add a random value that is generated once per bot session to the altitude you’re getting this way. I’d suggest something like random.uniform(0.9, 1.7) meters. People don’t put their phones on the ground while playing Pokémon GO.

xasdf commented 8 years ago

I think pgoapi just sets altitude to 8 anyway regardless of what you set it to (see rpc_api.py). That being said it is a bug. They should only do this hack if altitude is set to 0 in request.

@andythorne maybe get target fort altitude and then interpolate as bot moves?

niicojs commented 8 years ago

maybe @wchill can commit to fix to the api and set 8 only if altitude is not set

meyer9 commented 8 years ago

I REALLY doubt Niantic checks/will ever check exact altitude for a location. This is a pretty low priority issue IMO.