OpenMarine

Full Version: How to get IMU data in correct format in OpenCPN?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have connected a IMU + Pressure sensor to my RPI, it is working fine but...

The data is outputted as for instance "$OSXDR,A,33.3,D,I2CX,A,-2.7,D,I2CY*48"


According to this page "I2CX" should be "Barometer", "TempAir", "PTCH", "ROLL" or "ENV_WATER_T"
"$OSXDR,A,33.3,D,I2CX,A,-2.7,D,I2CY*48"

As of now the data is not recognised by OpenCpn. How have others dealed with this issue?
Turns out this is an OpenCPN issue, not OpenPlotter.
OpenCPN can still not handle XDR messages
(2016-08-30, 07:40 PM)Ewald Harmsen Wrote: [ -> ]I have connected a IMU + Pressure sensor to my RPI, it is working fine but...

The data is outputted as for instance "$OSXDR,A,33.3,D,I2CX,A,-2.7,D,I2CY*48"


According to this page "I2CX" should be "Barometer", "TempAir", "PTCH", "ROLL" or "ENV_WATER_T"
"$OSXDR,A,33.3,D,I2CX,A,-2.7,D,I2CY*48"

As of now the data is not recognised by OpenCpn. How have others dealed with this issue?

I had tried to use NMEA_Converter for this but failed.

I was able to edit I2C.py to get pitch and roll to work.

If you search I2C.PY for  I2CX and I2CY and replace them with PTCH and ROLL it should work. While you are in the the python would be pretty simple to scale or calibrate these items.

that file is in /home/pi/.config/openplotter

I didn't get barometer or temperature to work this way.
I tried to replace on i2c.py 'I2CP' and 'I2CT' with 'Barometer' and 'AirTemp', but it didn't works, so maybe opencpn not recognize XDR sentences!