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

Plane: Enable quadplane dead reckoning navigation to start earlier #27883

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

This reduces EKF errors during transition fromVTOL to FW flight when operating without a GPS fix.

@@ -505,6 +505,11 @@ void Plane::update_fly_forward(void)
return;
}

if (quadplane.in_transition()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this does need an option, and off by default, likely need Q_OPTION2

@tridge tridge removed the DevCallEU label Aug 21, 2024
@peterbarker
Copy link
Contributor Author

Logs reflect the new bit being set, 'though does highlights oddities in setting and unsetting this bit as we go through transitions.

This image shows that the bit has the intended effect of setting fly-forward earlier in the transition from qhover to cruise:
image

this image (with the bit set,) shows we glitch fly-forward flag to zero in some stage of the forward transition:
image

ArduPlane/ArduPlane.cpp Outdated Show resolved Hide resolved
Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

Needs a rebase on #27770

@IamPete1
Copy link
Member

IamPete1 commented Sep 2, 2024

I think its a good idea, but I think just in transition is is a bit too coarse. Maybe a new method for the the transition class? I think we would be OK to turn on fly forward in the timer stage but maybe not airspeed wait.

@peterbarker peterbarker force-pushed the pr/quadplane-dead-reckoning-in-transition branch from 18bbfae to e72c075 Compare September 2, 2024 23:26
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

please check replaying an old log, and double check my 23 bits junkcode test

@@ -87,14 +87,21 @@ class AP_DAL {
void log_writeDefaultAirSpeed3(const float aspeed, const float uncertainty);
void log_writeEulerYawAngle(float yawAngle, float yawAngleErr, uint32_t timeStamp_ms, uint8_t type);

enum class StateMask {
enum class RFRNFlags {
Copy link
Contributor

Choose a reason for hiding this comment

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

should have a bitwidth?

};

// EKF ID for timing checks
enum class EKFType : uint8_t {
EKF2 = 0,
EKF3 = 1,
EKF2 = 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain this?

@tridge
Copy link
Contributor

tridge commented Sep 2, 2024

test here for bits, please check!
https://github.com/tridge/junkcode/blob/master/float_int.c

peterbarker and others added 5 commits October 15, 2024 13:10
doesn't actually really test the effect this has as I wasn't able to spot one immediately
This reduces EKF errors during transition fromVTOL to FW flight when operating without a GPS fix.
@peterbarker peterbarker force-pushed the pr/quadplane-dead-reckoning-in-transition branch from e72c075 to 0f70279 Compare October 15, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants