Skip to content

Conversation

@mmosca
Copy link
Collaborator

@mmosca mmosca commented Jun 5, 2023

Update rate of M9 was limited to 5Hz to enable tracking of more than 16 satellites but m10 does not appear to have such limitation.

Position hold also seems to work better with an update rate of 10Hz.

This will change the behavior of M9 and newer devices to match M5-8, enabling 10Hz when using UBLOX7 and limiting it to 5Hz when using regular UBLOX.

Is it also possible to set a custom navigation update rate in UBLOX7 to support even higher update rates, like 25Hz on M10 devices, or 5Hz for M9 devices.

set gps_ublox_nav_hz = 25

In case the user specified a refresh rate that is rejected by the GPS module it will fall back to 5Hz.

Update rate of M9 devices was limited to 5Hz to enable tracking of more
than 16 satellites.

The number of tracked satellites is limited by the update rate in M8
devices as well, but we allow those to run in 10Hz mode.

This will change the behavior of M9 and newer devices to match M5-8,
enabling 10Hz when using UBLOX7 and limiting it to 5Hz when using
regular UBLOX.
@mmosca mmosca changed the title Enable 10Hz update rate for M9+ gps devices Enable 10Hz update rate for M9 and m10 gps devices Jun 5, 2023
@stronnag
Copy link
Collaborator

stronnag commented Jun 5, 2023

With M8 on 10Hz, I get c. 30 satellites ....

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 5, 2023

I don't think I have seen that many on mine, but it could be where I am. I considered making it an option, but ublox/ublox7 already has the same effect.

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 5, 2023

BTW, documentation on m10 mentions that maximum satellites is related to update rate, but does not go into detail as it can be affected by performance settings on the device and enabled constellations as well.

@stronnag
Copy link
Collaborator

stronnag commented Jun 5, 2023

Just a data point that I never saw a reduction in satellites on M8 5Hz v. 10Hz, whereas Konstantin obviously did for M9 from the comment in the code.

I'm in no way opposed to this PR ...

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 5, 2023

I think I recall seeing reports of low satellite acquisition with m8 before, maybe it was some kind of interference and I don't recall ever seeing more than 16 on my m8.

I will probably head to rooftop with some aircraft to test both m10 and m8 with a clear view o the skies.

@mmosca mmosca changed the title Enable 10Hz update rate for M9 and m10 gps devices Enable 10Hz update rate for M9 and M10 gps devices Jun 5, 2023
@mmosca
Copy link
Collaborator Author

mmosca commented Jun 5, 2023

Can confirm m10 can see more than 16 satellites in 10hz mode.

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 5, 2023

IMG_3250

@Jetrell
Copy link

Jetrell commented Jun 6, 2023

@mmosca Great addition!
I see you read my post in the discussions #8741... This fixed the problem, as I thought it may have. Because it was the only variable left that I couldn't compare.
Poshold is far more rock solid and less jittery at 10Hz, than at 5Hz with the M10... I'm rather amazed at the difference. This is the most stable and locked in, that I have seen this quad hover in Poshold.. Even with a 4km/h wind.

The Satellite count was comparable at both 5Hz and 10Hz. Today it was averaging 27 Sats, with a HDOP of 1.1.

It certainly appears that INAV requires the higher refresh rate to maintain a higher level of estimation precision. (on small quads anyway).
Looking at the logs. It didn't just increase horizontal position accuracy. But also appears to give the altitude estimator more data to work with, which provided better altitude precision in today's tests.

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 6, 2023

@mmosca Great addition! I see you read my post in the discussions #8741... This fixed the problem, as I thought it may have. Because it was the only variable left that I couldn't compare. Poshold is far more rock solid and less jittery at 10Hz, than at 5Hz with the M10... I'm rather amazed at the difference. This is the most stable and locked in, that I have seen this quad hover in Poshold.. Even with a 4km/h wind.

The Satellite count was comparable at both 5Hz and 10Hz. Today it was averaging 27 Sats, with a HDOP of 1.1.

It certainly appears that INAV requires the higher refresh rate to maintain a higher level of estimation precision. (on small quads anyway). Looking at the logs. It didn't just increase horizontal position accuracy. But also appears to give the altitude estimator more data to work with, which provided better altitude precision in today's tests.

That is great news.

It would be good to test it with M9 as well. I wonder if the gains from higher update rate compensate for the possible loss from being limited to 16 satellites.

Worse case scenario, I can make the 10Hz in UBLOX7 a config setting that defaults to 10Hz.

Copy link
Collaborator

@stronnag stronnag left a comment

Choose a reason for hiding this comment

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

s/defautl/default/

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 6, 2023

I Added gps_ublox_nav_hz variable to set ublox7 navigation rate.

Default is 10, this should address #9087

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 6, 2023

On m10:
image

Will test outside later.

@mmosca mmosca changed the title Enable 10Hz update rate for M9 and M10 gps devices Set 10Hz update rate for M9 and M10 gps devices by default and allow higher refresh rates Jun 6, 2023
@mmosca
Copy link
Collaborator Author

mmosca commented Jun 6, 2023

IMG_3261
18 satellites @ 25Hz

mmosca added 3 commits June 6, 2023 14:26
Mention 10Hz as safe for M8 and newer and 25Hz being supported by some
devices.

When setting it too high, the GPS stops sending navigation updates.
This should make it even safer for the end user.

Enter an invalid value for you gps module, fallback to minimum frequency
of 5Hz.
@DzikuVx DzikuVx added the Release Notes Add this when a PR needs to be mentioned in the release notes label Jun 9, 2023
@DzikuVx DzikuVx merged commit c7ab8c0 into master Jun 9, 2023
@DzikuVx DzikuVx deleted the mosca-m10-10hz branch June 9, 2023 12:48
rmaia3d pushed a commit to rmaia3d/inav that referenced this pull request Jul 7, 2023
Set 10Hz update rate for M9 and M10 gps devices by default and allow higher refresh rates
SpencerCake pushed a commit to SpencerCake/ORQAF405-INAV-Fork that referenced this pull request Nov 24, 2023
Set 10Hz update rate for M9 and M10 gps devices by default and allow higher refresh rates
SpencerCake added a commit to orqafpv/orqa-inav that referenced this pull request Nov 24, 2023
Set 10Hz update rate for M9 and M10 gps devices by default and allow higher refresh rates
@trenth00
Copy link

Any idea if there is a way to update the refresh rate when a GPS is connected over MSP? I have a very jittery Quad in Poshold using a Matek M10Q-3100. The compass accuracy is excellent and I don't really have a problem getting a good number of sats >15... but it is quite jittery (no the accelerometer is not causing it). Would be great to push that to 10Mhz too

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 27, 2024

Any idea if there is a way to update the refresh rate when a GPS is connected over MSP? I have a very jittery Quad in Poshold using a Matek M10Q-3100. The compass accuracy is excellent and I don't really have a problem getting a good number of sats >15... but it is quite jittery (no the accelerometer is not causing it). Would be great to push that to 10Mhz too

10Mhz is waaaaaay too high. Not supported by the gps.
You can update the desired update rate via cli, but it is only applied during initialization time.

@trenth00
Copy link

trenth00 commented Jun 27, 2024

Sorry, I meant 10Hz, not 10Mhz.

just trying to bump for MSP the same way it is for Ublox

@mmosca
Copy link
Collaborator Author

mmosca commented Jun 27, 2024 via email

@trenth00
Copy link

The GPS can only be connected via CAN bus or MSP (over Uart).

@stronnag
Copy link
Collaborator

The GPS can only be connected via CAN bus or MSP (over Uart).

The rate for this device is set by the device firmware. You should ask manufacturer.

@trenth00
Copy link

ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release Notes Add this when a PR needs to be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants