# Magnetometer UAVCAN v1 for PX4

**URL:** <https://forum.opencyphal.org/t/magnetometer-uavcan-v1-for-px4/1188>\
**Category:** Libcanard\
**Created:** [April 9, 2021, 2:26pm UTC](https://forum.opencyphal.org/t/magnetometer-uavcan-v1-for-px4/1188 "2021-04-09T14:26:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arne](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@arne](https://forum.opencyphal.org/u/arne)\
**Post date:** [April 9, 2021, 2:26pm UTC](https://forum.opencyphal.org/t/magnetometer-uavcan-v1-for-px4/1188/1 "2021-04-09T14:26:07Z")

</div>

I’m developing a magnetometer sensor board that can interface to PX4 over UAVCAN.  
I would like to use UAVCAN v1 but I was wondering if this is even supported right now.  
It seems like the 1002.MagneticFieldStrength2.uavcan data type is just for UAVCAN v0 and that there is no implementation yet for a magnetometer over UAVCAN v1 for PX4.

I currently have a working driver on my STM32L432KBU6, reading from a QMC5883L sensor over I2C.  
I want to package the data now so the PX4 can read the data over UAVCAN.  
Is it possible right now to use v1 or should I try to implement the old UAVCAN?  
Thank you very much for any help.

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [April 10, 2021, 6:06pm UTC](https://forum.opencyphal.org/t/magnetometer-uavcan-v1-for-px4/1188/2 "2021-04-10T18:06:20Z")

</div>

> [@arne](#):
>
> It seems like the 1002.MagneticFieldStrength2.uavcan data type is just for UAVCAN v0 and that there is no implementation yet for a magnetometer over UAVCAN v1 for PX4.

Not sure about PX4 but the corresponding data type for v1 would be **`uavcan.si.sample.magnetic_field_strength.Vector3`** :

> <https://github.com/OpenCyphal/public_regulated_data_types/blob/53a7dbbf85554e11517c13ad91b9efb871599ad1/uavcan/si/sample/magnetic_field_strength/Vector3.1.0.uavcan#L1-L3>

If there is no support for magnetometers in PX4 yet, it is trivial to add. Using the old UAVCAN would be a mistake at this point.

---

<div class="post-metadata">

**Author:** ![arne](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@arne](https://forum.opencyphal.org/u/arne)\
**Post date:** [April 12, 2021, 8:22am UTC](https://forum.opencyphal.org/t/magnetometer-uavcan-v1-for-px4/1188/3 "2021-04-12T08:22:17Z")

</div>

Thank you, I’ll look into that!
