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

Update 4401_ssrc_fog_x_tmotor mag0 prio #848

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danielhtii
Copy link

Param should be set as default so it is changeable by user. Further I propose setting it to a lower priority than external one. This makes the drone usable without external mag but will still prioritize the external one if it is installed.

Param should be set as default so it is changeable by user. Further I propose setting it to a lower priority than external one. This makes the drone usable without external mag but will still prioritize the external one if it is installed
@danielhtii danielhtii requested a review from jlaitine December 18, 2024 12:14
@Jigyasu-TII
Copy link

I don't think that MAG0 is always going to be internal. I have had situations where MAG0 was external mag.
Instead of forcing the priority in the airframe configuration file, we can choose to not mention it at all because PX4 automatically sets the priority of external mags higher than that of the internal mag.

In short, I propose to remove the line that changes/sets the mag priority (CAL_MAGx_PRIO) altogether.

@jlaitine
Copy link

jlaitine commented Dec 19, 2024

The problem with magnetometer initialization order was fixed in #818 ; so the magnetometer ordering (which one is 0 and which one is 1) should stay.

Now, the reason why the internal magnetometer is disabled on x500 airframe is, that the placement of saluki FC on our X500 setup causes too much disturbance on the mag from the power distribution board.

This led to the issue that if there was any issue with the external magnetometer (the GPS stick), the internal one was taken into use without user noticing. But it didn't work well causing toiletbowling in the air.

This was mitigated by disabling the internal magnetometer altogether when flying on the "hobby-grade" x500 setup, and using only external mag on that airframe.

I'd suggest enabling the internal mag only in configurations where you know that it actually is usable.

If you know that you actually can use the internal MAG on the T-motor airframe, it is indeed correct to just remove the line!

Can you @kordets comment on what is your experience on internal mag on T-motor in outdoor flights, does it work ok?

# Disable internal magnetometer
param set CAL_MAG0_PRIO 0
# Low priority for internal magnetometer
param set-default CAL_MAG0_PRIO 25

Choose a reason for hiding this comment

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

As you commented, unless you want to disable the mag, just remove this line altogether.

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.

3 participants