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

Android GPS Proxy script #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

antonxy
Copy link

@antonxy antonxy commented Oct 29, 2017

No description provided.


def send(sock):
global last_gps, last_angle
sock.send("{} {} {} {} {} {}\n".format(last_gps[0], last_gps[1], last_gps[2], last_angle, -1, -1).encode("utf-8"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed the accuracy.

see https://github.com/penguinmenac3/robotics-introduction/blob/master/robots/alice.py

if tags[0] == "gps":
    # lat, lon, alt, angle_to_north, ?, accuracy, ?
    self._update_global_position(float(tags[1]), float(tags[2]), float(tags[4]), float(tags[6]))

If the app does not support accuracy, fake it. ;)

Also did you test it with the robotics-introduction implementation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put in -1 to indicate that accuracy is not known. I think that's better than putting in some arbitrary value.

I tested it with robotics-introduction, the values are being received.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So no accuracy support by that app? :(

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think so, every sensor has three values, and for GPS that is lat, lon and alt. But I guess for the introduction it's ok, it gets interesting for SLAM but for that we will have to use the big robot anyway.

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

Successfully merging this pull request may close these issues.

2 participants