-
Notifications
You must be signed in to change notification settings - Fork 14
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
aproblem #9
Comments
Hi; I can try ^_^ Can you send me your entire code snippet as you write it? y = x.read()
print(y.ubx_id)
print(y.ubx_class) Which version of python are you using? |
I think I can see what the problem is: you're enabling NAV-POSLLH to be sent regularly. >>> y = x.read()
Receiving
02 14 # <- This is a class 2, id 14 event you are receiving: UBX-RXM-MEASX not NAV-POSLLH There are multiple things you can/should do:
x.disable_message(2,20) # Note that it prints out the class/id in hexadecimal, but takes in these as integers
while(True):
try:
y = x.read()
if(y.ubx_id == '02' and y.ubx_class == '01'):
print("You found a NAV-POSLLH message ^_^")
print(y.lat)
else:
print("You found a different but supported message.")
print("ID: " + y.ubx_id + " Class: " + y.ubx_class)
print("Variables: " + vars(y))
except:
print("Now you found an unsupported message") See this document for more message types and technical information on the receiver: https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29.pdf If you find a message you want to have added let me know :) |
I'm not sure what exactly the issue is for you; it seems to work. Some things maybe you can try:
x.disable_NMEA() # get rid of noise
When it enables a message type a CFG message is sent and only when the receiver processes this correctly an ACK is sent. If the message is sent but is malformed/not supported etc. it will send a NACK. In your case it seems to receive neither. Let me know how your experiments are going; hope I can be of more help ^_^ |
Hmm; this seems like a classical python2 vs. 3 error. btw; do you have pyserial properly installed? pip install --upgrade --force-reinstall pyserial
pip3 install --upgrade --force-reinstall pyserial Also which version of this project are you using? (maybe do a pull / clean clone? just in case) |
You're probably doing the installation correct; the way I installed the package on my system is actually insecure and should be avoided. Although you could look into using venv virtual environment. Could you try to print PATH as described here just in case?: https://www.dummies.com/programming/python/how-to-find-path-information-in-python/ If you don't see your .local dir printed there follow for example PYTHONPATH example to add it manually: https://www.devdungeon.com/content/python-import-syspath-and-pythonpath-tutorial Git pull / git clone: cd ~/Desktop/py/
git clone https://github.com/Korving-F/ublox
# https://docs.github.com/en/enterprise/2.13/user/articles/cloning-a-repository Can you also send a "ls -lah /dev/ttyACM3"? Doing this from my phone so sorry for the incomplete response. Really not sure what it otherwise could be.. P.s. your English is good ^_^ |
Awesome :D no worries and good luck with your project! |
hello,here is my problem :
i follow the usage describle in the usage.png
nav_posllh = x.read()
No errors have been found as of now
and then when i go next
nav_posllh.lat
it says that nav_posllh has no attribute 'lat'
nav_posllh.l
it says that nav_posllh has no attribute 'l'
could u help me with that ,thanks
The text was updated successfully, but these errors were encountered: