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

[gyro.c] An option to not calibrate the gyro during boot #7624

Merged
merged 39 commits into from
Feb 15, 2022
Merged

[gyro.c] An option to not calibrate the gyro during boot #7624

merged 39 commits into from
Feb 15, 2022

Conversation

JulioCesarMatias
Copy link
Collaborator

I see this as a good alternative for those who use iNav with an airplane and don't want to wait for the gyro calibration to finish.

CLI:

init_gyro_cal : If defined to OFF, it will ignore the gyroscope calibration done at each startup. Instead, the gyroscope last calibration from when you calibrated will be used. It also means you don't have to keep the UAV stationary during a startup.

gyro_zero_x : gyro X calibration stored

gyro_zero_y : gyro Y calibration stored

gyro_zero_z : gyro Z calibration stored

@JulioCesarMatias
Copy link
Collaborator Author

JulioCesarMatias commented Nov 22, 2021

The extension "fc/config.h" is included but still returns an error. VSCode compiles normal, no errors

@JulioCesarMatias
Copy link
Collaborator Author

The extension "fc/config.h" is included but still returns an error. VSCode compiles normal, no errors

build fails because of "sensor_gyro_unittest.cc"

@MrD-RC
Copy link
Collaborator

MrD-RC commented Nov 22, 2021

Is there any benefit to this? It usually takes longer to get a GPS fix than wait for the gyro to calibrate. So I don’t really see it being useful for fixed wing.

However, it could be good for people with drones who want to fly from boats for some crazy reason. There was an issue raised a few months ago that their quad’s gyro wouldn’t calibrate on a boat 😆

@JulioCesarMatias
Copy link
Collaborator Author

Is there any benefit to this? It usually takes longer to get a GPS fix than wait for the gyro to calibrate. So I don’t really see it being useful for fixed wing.

However, it could be good for people with drones who want to fly from boats for some crazy reason. There was an issue raised a few months ago that their quad’s gyro wouldn’t calibrate on a boat 😆

no benefit... other than being able to use the Quad on a boat 😆

@DzikuVx
Copy link
Member

DzikuVx commented Nov 24, 2021

There is a benefit and I'm very happy this is done. The benefit is: with no gyro runtime calibration you can arm on the boat :) Believe me, we had such requests

@DzikuVx DzikuVx added this to the 5.0 milestone Nov 24, 2021
@JulioCesarMatias
Copy link
Collaborator Author

JulioCesarMatias commented Nov 27, 2021

Fixed unit test compilation error!

@JulioCesarMatias
Copy link
Collaborator Author

this also causes the INS 1G gravity calibration to be ignored, when init_gyro_cal is set to OFF, the gravity value stored in flash memory during the last calibration will be used.

@JulioCesarMatias
Copy link
Collaborator Author

this implementation was tested on a Matek F405-SE, and everything worked fine... I believe I won't be doing any more Pushes for this PR.

@DzikuVx
Copy link
Member

DzikuVx commented Dec 21, 2021

@JulioCesarMatias if you could fix settings that would be awesome :)

@JulioCesarMatias
Copy link
Collaborator Author

@JulioCesarMatias if you could fix settings that would be awesome :)

all new PR are giving the same problem in "settings.md"

@digitalentity
Copy link
Member

I'm a bit on the fence regarding this feature. TDK gyros are known for have significant gyro bias which is also subject to be temperature/mechanical stress/time dependent.

This feature may create weird to troubleshoot issues, but it could be improved by creating an offline gyro calibration proceadure and a set of gyrozero_x/y/z settings that would be used as a primer for gyro bias. Then (fingers crossed) bypassing run-time gyro calibration might be safe.

@DzikuVx
Copy link
Member

DzikuVx commented Dec 23, 2021

@digitalentity For 2 or 3 times I was already building a special version of INAV for people that wanted to arm their quads or airplanes on boats. So there is practical use for such a solution.
By default it's running boot calibration. So you know ;)

@JulioCesarMatias try merging master one more time and regenerate docs. It should be working now

@DzikuVx DzikuVx merged commit 4b38672 into iNavFlight:master Feb 15, 2022
sakisdog pushed a commit to sakisdog/inav that referenced this pull request Apr 19, 2022
…bration

[gyro.c] An option to not calibrate the gyro during boot

(cherry picked from commit 4b38672)
@robmulally
Copy link

Thank you for working on this, Just wanted to add some context here for any devs reading in the future who might want to extend or modify this feature.

I did a search and didn't see any discussions on arming on boats or being stuck on calibrating but i can see that it obviously has been discussed and considered so thank you!!

Context:
The boat launch we recently had issues with here is actually a small "barge" due to aviation laws here its easier for us to get permissions to fly and launch from a boat within the restricted flight area than to get permission to launch from the ground.

Troubleshooting
We were able to arm on the barge using a 5" and the Cinelifter (Siccario) when the swell was calm, but it would arm sometimes causing us to go into troubleshooting mode due to the lack of feedback from the OSD, and also when plugged into configurator, was hard to find the cause of issue. We were thinking a failed GYRO hardware. (Not easy to do this with a lot of people waiting for you to launch etc)

Obviously out testing the day before on land and previous success launching 5" from the boats meant this caught us off guard on the day with a lot of crew and talent and people waiting. our work around was to move the barge into calmer water, arm on the shore and go back on the boat to launch etc.

So again thanks to the team for working on this.

Safety First
At no time do we want to be operating (especially over water) without all the features inav brings which is why we asked qslabs to build this quad with inav to start with its, required for us to fly here legally for commercial fpv.

Suggestions and potential improvements:

Before we launch we want to know the quad will behave as expected which is why the checks are there to begin with and I appreciate that.

Can you think a way to visually test this pre-arm via the OSD or using a buzzer. perhaps a 45" alarm
that lets the pilot put the aircraft into preflight check mode and they manually move the aircraft 45" forward pitch 1 beep
45" right = 2 beeps etc (matching the marine cardinal marker for N E S W . This isn't to configure the drone its just a feedback to pilot mode perhaps:

Condition: ARMED = FALSE AND PRE_FLIGHT_TEST = ON , When Aircraft angle = 45" forward = 1 beep....etc etc etc
So that the pilot has the confidence the aircraft's "Last known " state is close to reality.

If there is another way to do the same thing on DJI FPV system using OSD etc let me know!
Or an OSD element that uses the text field for DJI if artificial horizon can't be used like in analog.

Anything that can give the pilot confidence the sensors are performing visually or audibly if we are to use "Last known Good Gyro"

Just an IDEA, even when we got it to arm there was a sense of anxiety doing the hover test etc, was it a gyro issue or a startup warning issue was not clear to us and when its $20K of equipment on the line anything that adds safety without complexity is welcomed.

With smaller 5" we have ways to do it POST arm, with a bigger quad its not a safe thing to do physically.

Cheers!
Thanks for all the hard work.

Rob

@DzikuVx DzikuVx added the Release Notes Add this when a PR needs to be mentioned in the release notes label May 21, 2022
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.

5 participants