-
Notifications
You must be signed in to change notification settings - Fork 24
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
getPVT() returns false for long periods of time in ZED-F9P moving base application #66
Comments
Hi @jordancth , Please try adding the following. By default, both GNSS will be outputting the standard NMEA messages on UART1. Disabling them will help.
I don't recommend calling Let's quickly estimate how much traffic is on the I2C bus:
At 100kHz, the bus can support perhaps 5-8kBytes per second (with overheads). I suspect you are exceeding what the I2C bus can support... Increasing to 400kHz will help: Do you need to output RTCM at the full rate? Try reducing the rate:
Let me know if this helps, |
Thanks for your help, @PaulZC. I think disabling NMEA on UART1 and increasing the clock speed to 400 kHz fixed the problem I was having, or at least reduced the severity. It will still happen sometimes, but only lasts for up to 5-6 seconds at most. I did try reducing the rate of the RTCM to 1/5, but that led to most of the RELPOSNED data being zero, with the exception of some flags. Even reducing output rate to 1/2 didn't work for me; I did get data, but it was way off and never changed. I also tried moving getPVT to its own callback, but I noticed that there would be stretches of time (maybe around 10 seconds) where only the revGPS's PVT callback would fire, and the other two callbacks (fwdGPS PVT and RELPOSNED) wouldn't. Not too sure why the revGPS unit would get data more often than the fwdGPS unit. Let me know if you have any other suggestions. Otherwise, I'm happy to close this issue. |
Hi @jordancth , Ah! You might have an issue with the way you are calling the Base Try adding You're not using implicitUpdate on fwdGPS PVT. That means getPVT will always return false, and you need to call checkUblox manually. That's OK - you're aware of that. I see your comment in the code. More suggestions: Restructure your code so that you are using separate callbacks for fwd and rev PVT, and fwd RELPOSNED. The loop then needs to call checkUblox and checkCallbacks on both fwdGPS and revGPS. Try using two I2C (Wire) ports, one for fwd and a second for rev. Does that help? (ESP32 supports two I2C ports.) You could then have separate threads running the fwd and rev instances, but that's really fancy and probably overkill for your application... (ESP32 supports threading. You can use threads on a single port, but you need to add a mutex so the two threads don't try to access the single port at the same time.) I hope this helps, |
Hi @PaulZC , Actually, going back to what you said previously, about calculating the traffic on the I2C bus, wouldn't the MSM4 and the RELPOSNED messages go through UART rather than I2C? I did update my code to what is below:
Still having some minor issues. I've not yet tried using two I2C ports or multiple threads. I'll get back to you on that. |
Hi @jordancth , Yes, sorry, I got a bit carried away including the RTCM in the I2C traffic numbers. At least you have an indication of how much traffic UART2 is carrying...! ;-) Do make sure you only have the PVT and RELPOSNED messages enabled. If you have something like RXM-RAWX enabled from earlier code, that would add an excess of traffic. I'd recommend doing a Your code looks good to me... It should be running fine at 5Hz. To dig further, you may need to put a logic analyzer on the bus and see how much traffic each is generating. We wrote a UBX analyzer for the Saleae Logic Pro, if you have access to one of those. It really helps figure out what's going on... You can have two analyzers running, one watching 0x42 and a second watching 0x43. I've done the same thing to debug traffic between the ZED-F9P and the NEO-D9S. Please close this if you think we're done. Or leave it open if you need more suggestions. No problem either way. All the best, |
Subject of the issue
I have two ZED-F9P units, each with their own antenna, connected to an ESP32. I am trying use the two units in a moving base setup, as described here - specifically sections 2.2.1 and 2.3.2. I am trying to get the latitude and longitude from the base unit, and the relative position data from the rover unit. Most of the time, the values I get are fine. However, there can be long periods of time (up to 20 seconds) where the getPVT() method returns false. I've also noticed an instance where the callback didn't fire for almost 20 seconds. I'm wondering if that's to be expected, or if there is some way to figure out what the issue is.
Your workbench
Firmware for ZED-F9P is HPG1.50, although I have also tested using HPG1.13 and had the same problems. When testing, the antennae have a clear view of the sky.
Steps to reproduce
Example code below.
Expected behavior
The getPVT() method shouldn't return false for more than 5 seconds at a time ideally. The callback method should also run at least every 5 seconds.
Actual behavior
There are long periods of time where either getPVT() returns false or the callback method doesn't fire.
The text was updated successfully, but these errors were encountered: