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

Pr liftdrag coefficients #690

Merged
merged 10 commits into from
Jan 25, 2021
Merged

Conversation

pjdewitte
Copy link
Contributor

This pull request adresses 1, 2, 3 and 5 from #684

Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Would it be possible to have an example of a model that fully utilizes all the newly defined parameters you defined? A good model for this would be the plane or techpod

this->cmaStall * (this->alpha + this->alphaStall))
* cosSweepAngle;
cm = this->cm_alpha0 - this->cma * this->alphaStall +
this->cmaStall * (this->alpha + this->alphaStall);
// make sure cm is still less than 0
cm = std::min(0.0, cm);
Copy link
Member

Choose a reason for hiding this comment

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

Does this assumption still hold with the defined cm_alpha0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, cm behavior was symmetric around zero, while now we start at cm_alpha0. Given the simplified aerodynamics we use in this plugin, assuming now it is symmetric around cm_alpha0 makes sense. I'll add this to the pull request.

Note that for current simulation models, it doesn't matter, since those all set cm to 0 under all conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact, what I can find indicates that past stall, cm is typically more negative than cm_alpha0 (positive angle of attack), e.g. this. I'll improve on this too.

@pjdewitte
Copy link
Contributor Author

I added 3 commits to the pull request that address the feedback about Cm, a bug that slipped in and a docstring that was not up to date (the documentation of Gazebo 9 and later clarify that link.AddForceAtRelativePosition works relative to the CoG of the base link, not the origin).

I haven't found the time yet to create or improve an example simulation model.

@Jaeyoung-Lim
Copy link
Member

@pjdewitte Please do, otherwise we have no way to test the newly introduced parameters

@Jaeyoung-Lim
Copy link
Member

@pjdewitte Would it be possible to share a timeline when you could add it to the models? It would be great that we could verify this PR by adding it to the models

@pjdewitte
Copy link
Contributor Author

I should have thought about a testcase from the start. I'll adjust one of the models by the end of this week (24/01/2021).

@pjdewitte
Copy link
Contributor Author

Flight log with plane model, using the committed new parameters: link

@Jaeyoung-Lim
Copy link
Member

@sfuhrer @RomanBapst FYI

Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

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

Looks good!

Thanks for the contribution! This would improve a lot of the flight dynamics performance for fixed-wing / VTOL models

@Jaeyoung-Lim Jaeyoung-Lim merged commit 38224fb into PX4:master Jan 25, 2021
@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Mar 15, 2021

@pjdewitte Have you ever tested this with the techpod? It doesn't seem to be able to takeoff anymore

Jaeyoung-Lim pushed a commit that referenced this pull request Mar 16, 2021
Jaeyoung-Lim added a commit that referenced this pull request Mar 16, 2021
This reverts commit 38224fb.

Co-authored-by: Pieter-Jan Dewitte <pj.dewitte@gmail.com>
C-Glick added a commit to Open-UAS/PX4-SITL_gazebo that referenced this pull request Mar 18, 2021
Jaeyoung-Lim added a commit that referenced this pull request Mar 19, 2021
RyosukeMatsushima pushed a commit to RyosukeMatsushima/PX4-SITL_gazebo that referenced this pull request Jun 21, 2022
* liftdrag_plugin code cleanup

* Add cd_alpha0, cm_alpha0 and cd_delta

* Remove sweep correction: already covered by velocity in Lift-Drag plane

* Deprecate controlJointRadToCL and a0

* Rename deprecated XML tags

* Make cm post-stall behavior symmetric around cm_alpha0

* Fix: post-stall drag (pitch-down stall) not properly accounted for

* Correct docstring of cp

* Plane: rename elevon to aileron, to align with mixer file. Give elements unique name.

* Plane: use new aero parameters

Co-authored-by: Pieter-Jan Dewitte <pieterjan.dewitte@atmosuav.com>
RyosukeMatsushima pushed a commit to RyosukeMatsushima/PX4-SITL_gazebo that referenced this pull request Jun 21, 2022
This reverts commit 38224fb.

Co-authored-by: Pieter-Jan Dewitte <pj.dewitte@gmail.com>
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.

2 participants