Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteWalker refactoring proposal in context of PR #5038 #5098

Closed
th3w4y opened this issue Sep 2, 2016 · 3 comments
Closed

SteWalker refactoring proposal in context of PR #5038 #5098

th3w4y opened this issue Sep 2, 2016 · 3 comments

Comments

@th3w4y
Copy link
Contributor

th3w4y commented Sep 2, 2016

In the context of #5038

This is how is see the new StepWalker

Help on class StepWalker in module pokemongo_bot.walkers.step_walker:

class StepWalker(__builtin__.object)
 |  StepWalker is used to handle bot position altering
 |  
 |  Methods defined here:
 |  
 |  __init__(self, bot, dest_lat, dest_lng, dest_alt=None, fixed_speed=None, add_deltas=True, stationary_deltas=False, stationary_updates=False, displayed_destination=None, displayed_remaining_dist=None)
 |      :param bot: PokemonGoBot object
 |      
 |      :param dest_lat: Latitude of final destination
 |      
 |      :param dest_lng: Longitude of final destination
 |      
 |      :param dest_alt: Altitude of final destination (meters)
 |      
 |      :param fixed_speed: Fix the speed to particular values
 |              (Used by PolylineWalker to pass same values from the PolylineObjectHandler)
 |              Posible values:
 |              -  Use 0.0 to stay put.
 |              -  Use float("inf") to teleport
 |      
 |              Default: None thus a random value between walk_min and walk_max is used
 |      
 |      :param add_deltas:  Add random_lat_long_delta() and random_alt_delta()
 |              to lat,lng, alt                                     Default: True
 |      
 |      :param stationary_deltas: Use the deltas in the case of speed 0.0 or small
 |              distance                                            Default: False
 |      
 |      :param stationary_updates: Force the StepWalker to set_position even on small
 |              distance and speed 0.0                              Default: False
 |      
 |      :param displayed_destination: passthrough by the driver
 |              with the intended destination to display, not the one used for calculations
 |      
 |      :param displayed_remaining_dist: passthrough by the driver
 |              with the intended remaining distance to display
 |  
 |  set_position(self, lat, lng, alt, add_deltas=True, completed_walk=False)
 |      :param lat: Latitude of the calculated position
 |      
 |      :param lng: longitude of the calculated position
 |      
 |      :param alt: Altitde of the calculated position
|      
 |      :param add_deltas: Add random_lat_long_delta() and random_alt_delta() to lat,lng, alt   Default: True
 |      
 |      :param completed_walk: boolean reflecting if the distance was fully walked or not       Default: False
 |      
 |      :return: boolean True/False reflecting if the full distance to final destination was walked in the step.
 |  
 |  step(self)
 |      Sets the bot.position  to the next calculated point according to the speed and distance
 |      :return: boolean True/False reflecting if the full distance to final destination was walked in the step.
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)

Your input would be appreciated

@th3w4y
Copy link
Contributor Author

th3w4y commented Sep 2, 2016

@th3w4y
Copy link
Contributor Author

th3w4y commented Sep 2, 2016

Build is passing https://travis-ci.org/th3w4y/PokemonGo-Bot/builds/157081419 but i need help testing and some peer eyes..

@th3w4y
Copy link
Contributor Author

th3w4y commented Sep 3, 2016

not much to do here... we'll need to redo based on the bearing calculations...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant