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: Updated QTUN and NTUN units to modern multiplier #27875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Georacer
Copy link
Contributor

@Georacer Georacer commented Aug 20, 2024

Did not change the format character, as pymavlink seems to need it, due to a bug: ArduPilot/pymavlink#965

Before:
Screenshot from 2024-08-20 16-37-12
Screenshot from 2024-08-20 16-39-23

After:
Screenshot from 2024-08-20 16-37-37
Screenshot from 2024-08-20 16-44-27

Did not change the format character, as pymavlink seems to need it, due
to a bug.
@@ -341,7 +341,7 @@ const struct LogStructure Plane::log_structure[] = {
// @Field: TAT: target altitude TECS
// @Field: TAsp: target airspeed
{ LOG_NTUN_MSG, sizeof(log_Nav_Tuning),
"NTUN", "QfcccfffLLeee", "TimeUS,Dist,TBrg,NavBrg,AltE,XT,XTi,AsE,TLat,TLng,TAW,TAT,TAsp", "smddmmmnDUmmn", "F0BBB0B0GG000" , true },
"NTUN", "QfcccfffLLeee", "TimeUS,Dist,TBrg,NavBrg,AltE,XT,XTi,AsE,TLat,TLng,TAW,TAT,TAsp", "smddmmmnDUmmn", "F0BBB0B0GGBB0" , true },
Copy link
Contributor

Choose a reason for hiding this comment

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

the 'e' already has the * 100 built in, so if we added the B it would apply twice, and get the wrong answer

Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably change the '0' to a '-' meaning no multiplier (thanks @peterbarker )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it applies twice. At least not in my testing. I vaguely remember that the MAVProxy logic is that if a format with multiplier is found, then the separate multiplier is not taken into account.

I would prefer changing the format e into i, but seeing this triggered some unwanted behaviour last time, I thought I'd double-dip and do scaling via both the format and the individual multiplier. Mostly because doing it right doesn't seem to work correctly: ArduPilot/pymavlink#965.

It's not a big deal, let's discuss live.

@tridge
Copy link
Contributor

tridge commented Sep 4, 2024

need to get this fixed first:
ArduPilot/pymavlink#965

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