-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Message SCALED_IMU - magnetic field #1179
Comments
Yes, that sounds like a screw up. @auturgy @julianoes You got any thoughts on thsi? |
ArduPilot uses mG internally. I’m not sure if there’s a 10^-4 somewhere to convert or we send mG not mT.
Regards,
James
… On 11 Jul 2019, at 5:48 pm, Hamish Willee ***@***.***> wrote:
Yes, that sounds like a screw up. @auturgy @julianoes You got any thoughts on thsi?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hmm. PX4 source docs think it is dealing in mT and there is no obvious scaling. |
(I should clarify that ArduPilot doesn’t send SCALED_IMU, but does send RAW_IMU)
… On 12 Jul 2019, at 10:57 am, Hamish Willee ***@***.***> wrote:
Hmm. PX4 source docs think it is dealing in mT and there is no obvious scaling.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I had a look in PX4 and it looks like we send the "raw" sensor values, so not "scaled" at all but scaled by whatever is acquired from the sensors. Also, PX4 doesn't seem to implement So it looks like we should send what is currently in |
Would it make sense to add a message |
Thanks @julianoes
Yes.
I would do it if someone will use the message. What is
Sounds good. Do you have a view on what is sensible? With x,y,z int16 fields we have decimal values of +/- 32767. Earth max field strength is 65 µT. This particular sensor gives us +/- 2 Gauss = 200 µT = 20000nT. Even though they are not an SI unit, I am tempted by mili gauss [mG].
@auturgy do you have a view on all that? |
mG is zero change for ArduPilot, so sounds good to me.
Whilst it’s not the SI unit, it’s in common use and is simple to convert with zero loss for anyone who needs T.
Regards,
James
… On 25 Jul 2019, at 5:07 pm, Hamish Willee ***@***.***> wrote:
Thanks @julianoes
So it looks like we should send what is currently in SCALED_IMU in RAW_IMU
Yes.
Would it make sense to add a message RAW_IMU2 and RAW_IMU3 for consistency?
I would do it if someone will use the message. What is RAW_IMU used for now, and will the logic apply also to 2, and 3?
implement SCALED_IMU correctly (to whatever spec makes sense).
Sounds good. Do you have a view on what is sensible?
With x,y,z int16 fields we have decimal values of +/- 32767. Earth max field strength is 65 µT. This particular sensor gives us +/- 2 Gauss = 200 µT = 20000nT.
Even though they are not an SI unit, I am tempted by mili gauss [mG].
This is what ardupilot use. It gives a fairly good granularity (-2000 to + 2000) for this sensor.
Using µT gives us a range of =/- 200 which seems wasteful for range and low resolution
Using nT gives us great resolution, but we'd have to cap scaled values to around 3 Ga. That might be fine - do we know what values systems like EKF can actually use?
@auturgy do you have a view on all that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
That's what I'm wondering too. What are common and outlier values? |
OK, so mG is a good fallback. To do due diligence I've asked about range on the PX4 slack estimation channel: https://px4.slack.com/archives/C643UJTB7/p1564098198007100 If we can't get an answer within a week or 2 then I vote we just settle on mG. |
Don't know if either of you had answer to this. But further thought is that IF these are needed, then we should consider using a message with an IMU ID. |
ArduPilot uses RAW_IMU for the primary, SCALED_IMU2/3 for additionals. That’s known not to be ideal.
There might be history as to why RAW_IMU2/3 weren’t added, I don’t know. It makes sense to me to add them.
Regards,
James
… On 26 Jul 2019, at 9:47 am, Hamish Willee ***@***.***> wrote:
Would it make sense to add a message RAW_IMU2 and RAW_IMU3 for consistency?
I would do it if someone will use the message. What is RAW_IMU used for now, and will the logic apply also to 2, and 3?
Don't know if either of you had answer to this. But further thought is that IF these are needed, then we should consider using a message with an IMU ID.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks @auturgy .
|
According documentation message SCALED_IMU, magnetic field values (xmag, ymag, zmag) represent the magnetic field in [mT]. According to wikipedia the earth magnetic field is, in worst case, something around 65[uT]. Which is equal to 0.065[mT]. So casting 0.065[mT] to (int) results always in 0. It seems that value should be expressed in [uT] not [mT] ?
The text was updated successfully, but these errors were encountered: