-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
revert changes to follow_path.py from request 4350 #4395
Conversation
@ckrmml, thanks for your PR! By analyzing the annotation information on this pull request, we identified @kanemasa1987, @leanhdaovn and @binarydepartment to be potential reviewers |
'last_position': (last_lat, last_lng, last_alt), | ||
'current_position': (lat, lng, alt), | ||
'last_position': (last_lat, last_lng, 0), | ||
'current_position': (lat, lng, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 is not good. we have random altitude for now, please help to check if sending 0 to server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr 4350 crashes the bot and this is just copied over from the commit before, so better this than a crash i assume
no experience in python but the last version here is the one i run atm and it works.
at least it shows the altitude of the waypoint correctly, the altitude of current position is gibberish altitude derived from config |
|
||
point = self.points[self.ptr] | ||
lat = float(point['lat']) | ||
lng = float(point['lng']) | ||
alt = float(point['alt']) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json files do not contain alt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gpx files do, and this is the change that allows the bot to follow path provided by gpx after your pr forced it to crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and gpsies.com json do contain elevation
{"data":{"trackData":[[{"lon":-118.48879337310791,"lat":34.031891963311,"ele":65},{"lon":-118.49720478057863,"lat":34.0323898728239,"ele":69}...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an option to read json files, around line 41, and they don't read alt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if 'alt' in point:
alt = float(point['alt'])
else:
alt = uniform(self.bot.config.alt_min, self.bot.config.alt_max)
should keep everything good
Easiest fix would probably put _, _, alt = self.bot.api.get_position() right before emit. |
Short Description:
request 4350 changes to follow_path.py crash bot
Fixes/Resolves/Closes (please use correct syntax):