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

[WIP] Fixed-wing performance model docs #2842

Merged
merged 20 commits into from
Feb 1, 2024
Merged

Conversation

RomanBapst
Copy link
Contributor

@RomanBapst RomanBapst commented Nov 2, 2023

Docs for

  • Added PerformanceModel for fixed wing PX4-Autopilot#22091

  • mention that some compensations apply only for propellers (e..g maximum climbrate would be different for jet engine)

  • document procedure when user does initial tuning in conditions very different from sea level standard atmospheric conditions

@RomanBapst
Copy link
Contributor Author

@github-actions Could you please post a couple more times, I don't understand yet.

@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from 9610535 to 3233be6 Compare November 2, 2023 10:27
@hamishwillee
Copy link
Collaborator

@github-actions Could you please post a couple more times, I don't understand yet.

Sarcasm @RomanBapst ?

FW_S_CEILING is not in https://docs.px4.io/main/en/advanced_config/parameter_reference.html but your doc links to that. Probably because PR not yet merged?

And you need to add this to SUMMARY.md.

It will whinge on every commit until those are fixed.

@@ -1,6 +1,6 @@
# PX4-Autopilot Main Release Notes

This contains changes to PX4 since the last major release (v1.14).
This contains changes to PX4 since the last major release (v1.14).
Copy link
Collaborator

Choose a reason for hiding this comment

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

@RomanBapst When you're done, can you add a release note in this doc for the change following the pattern in https://docs.px4.io/main/en/releases/1.14.html

I'm trying to make sure that we don't have to come back and think about what we did and why when we get to the release.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from 62bec52 to 13cd0e6 Compare November 8, 2023 01:32
@sfuhrer sfuhrer changed the title WIP: Docs for https://github.com/PX4/PX4-Autopilot/pull/22091 [WIP] Fixed-wing performance model docs Nov 21, 2023
@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from 1d3c1d2 to 8dac417 Compare November 22, 2023 01:22
@hamishwillee
Copy link
Collaborator

@RomanBapst Let me know when this is ready for review (I see corresponding PR went in).

@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from 8dac417 to 95ed5ca Compare November 29, 2023 02:11
@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from 95ed5ca to db72892 Compare December 7, 2023 03:05
@hamishwillee hamishwillee force-pushed the weight_altitude_tuning branch from af5e291 to 49200ef Compare December 12, 2023 22:46
@RomanBapst
Copy link
Contributor Author

@hamishwillee I am not sure what the issue with the formula rendering is. They render fine in vscode, but that might not say anything.
Is this the right place to look for what's supported?
https://docs.mathjax.org/en/latest/input/tex/macros/index.html

I might also need to start using chatGPT...

@hamishwillee
Copy link
Collaborator

Formulas fixed - the markers can't have whitespace. See commit

@hamishwillee
Copy link
Collaborator

@RomanBapst OK, fixed rendering and subedit. You should have another look and add info in a release note if this is a new feature (?). If it is docs on older features, from what version is this all true?

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Maybe you could split the docs a bit more into sections that explain what PX4 is doing in the background (the parts with the formulas basically), and what the user has to do to enable the auto adaptions (set the WEIGHT_GROSS, set the CEILING, ..anything else if I forgot about it).

en/config_fw/weight_and_altitude_tuning.md Outdated Show resolved Hide resolved

rearranging this equation for airspeed gives:

$$V = \\sqrt{\\frac{2mg}{\\rho c_A F}}$$
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$$V = \\sqrt{\\frac{2mg}{\\rho c_A F}}$$
$$V = \sqrt{\frac{2mg}{\rho c_A F}}$$

@hamishwillee
Copy link
Collaborator

@RomanBapst @sfuhrer I'm away for two weeks, so won't be commenting on this further for a bit.

Maybe you could split the docs a bit more into sections that explain what PX4 is doing in the background (the parts with the formulas basically), and what the user has to do to enable the auto adaptions (set the WEIGHT_GROSS, set the CEILING, ..anything else if I forgot about it).

I agree with this - the 80% of users just need to know what you set, while the rest are interested in what PX4 does.

You've somewhat done this by having the top section of weight compensation "this is what you do" and then the subsections "this is how things are scaled", but it isn't obvious when you're reading the docs. In the compensating for air density section you've mixed what the user has to do and what PX4 does in each of the subsections.

So as @sfuhrer indicates I'd have a top section covering everything that the user actually does - such as set WEIGHT_BASE and WEIGHT_GROSS, FW_SERVICE_CEIL and so on, indicating what they tune, and possibly linking down from that information to where the information what PX4 does to use this information.

Then all the rest on what PX4 does could be in its own section PX4 Scaling Algorithms. The notation bit would go under there too.

Further, consider this section:

image

If you read this out of context looks like this is something you have to do "Scale the Maximum Climb Rate" and "The maximum climb rate (FW_T_CLMB_MAX) must be scaled as a function of the weight ratio.". Actually this is what PX4 does. So I'd rewrite that section (and similar) as "TECS scales the maximum climb rate (FW_T_CLMB_MAX) as a function of the weight ratio."

Hope that makes sense. I can help with this in two weeks if it isn't clear.

…eds to tune

and the theory behind the various compensations

Signed-off-by: RomanBapst <[email protected]>
Signed-off-by: RomanBapst <[email protected]>
@RomanBapst
Copy link
Contributor Author

@hamishwillee @sfuhrer I tried to restructure the text according to your input, please let me know what you think.

Copy link

No flaws found


### Effect of Density on Trim Throttle

TODO: Add derivation here.
Copy link
Collaborator

Choose a reason for hiding this comment

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

ETA? I.e. is it worth merging the rest first and doing this as a post process?

@hamishwillee hamishwillee merged commit d957ac0 into main Feb 1, 2024
2 checks passed
@hamishwillee hamishwillee deleted the weight_altitude_tuning branch February 1, 2024 02:46
@hamishwillee hamishwillee restored the weight_altitude_tuning branch February 1, 2024 02:46
@hamishwillee
Copy link
Collaborator

hamishwillee commented Feb 1, 2024

@sfuhrer @RomanBapst I just pressed the wrong button and merged this rather than updated :-(.

Let's build on the docs now published. I did a subedit to my taste in #3029 - I think the new structure is better but this can be made a bit tidier.

@RomanBapst We may need answers/fixes from these (I'll merge my fixup PR but questions are against it):

@hamishwillee hamishwillee deleted the weight_altitude_tuning branch February 1, 2024 02:52
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-v1-15-public-changes-what-needs-docs/39850/7

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.

4 participants