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

Allow position failsafe sensitivity to be adjusted for different platform types #7842

Merged
merged 3 commits into from
Sep 1, 2017

Conversation

priseborough
Copy link
Contributor

The description for the parameters created contain recommended values for fixed wing platforms.

Partially addresses #7609

@dagar
Copy link
Member

dagar commented Aug 22, 2017

Would it be more intuitive for users to enter the params in units of seconds? We can also add minimum and maximum metadata to limit it in QGC.

Appropriate default values for FW can be placed here. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/rc.fw_defaults#L11

* The probation delay is number of uSec that the EKF innovation checks need to pass for the positon to be declared good once it has been declared bad.
* The probation delay will be reset to this parameter value when takeoff is detected.
* After takeoff, if position checks are passing, the probation delay will reduce by one uSec for every lapsed uSec of valid position down to a minimum of 1E6 uSec.
* If position checks are failing, the probation delay will increase by COM_POS_FS_FACT micro seconds for every lapsed uSec up to a maximum of 100E6 uSec.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should COM_POS_FS_FACT be COM_POS_FS_GAIN?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix

@Antiheavy
Copy link
Contributor

Would it be more intuitive for users to enter the params in units of seconds?

I'd vote "yes".

We can also add minimum and maximum metadata to limit it in QGC.

Also vote "yes" here.

Appropriate default values for FW can be placed here. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/rc.fw_defaults#L11

This seem very important, as the defaults for VTOL are very bad for fixed wing. The FW defaults suggested in the code comments seem like good defaults to add to the rc.fw_defaults. Relying on users to set them appropriately is too risky for an important failsafe such as this.

@Antiheavy
Copy link
Contributor

Also, for fixed wing applications I might consider setting COM_POS_FS_GAIN = 0. Overall I think the arguments for "probation" on fixed wing are outweighed by the benefits of using position immediately once available. Would be interested in others opinions here.

@priseborough
Copy link
Contributor Author

@Antiheavy Thinking about your comment about COM_POS_FS_GAIN I agree. Now that fixed wing has the ability to recover from a bad magnetometer at launch by resetting the heading using GPS, we can afford to exit the failsafe soon after that the EKF has completed its reset because it is much less likely that the GPS rejection will be repeated.

This is required because the hardcoded values were too sensitive for fixed wing use and bad initial mag heading could trigger the failsafe and lead to crashes on launch. The defaults have been left unchanged. Suitable values for fixed wing use will need to be implemented in the airframe specific config file.
Change units of parameters from uSec to sec.
Change recommended FW value for COM_POS_FS_GAIN from 2 to 0
Fix error in parameter description for COM_POS_FS_PROB
Fix error in unit for COM_POS_FS_GAIN
@LorenzMeier LorenzMeier merged commit c3b1ec8 into PX4:master Sep 1, 2017
@priseborough priseborough deleted the pr-fixedWingFailsafe branch October 9, 2017 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants