This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open IMU for Pypilot
#1
I was looking into pypilot and I am not sure I understand why the code is not more module such that the IMU functionality is separated from the core autopilot functionality.  There are many off-the-shelf IMU-like
sensors that could be made to function as a viable IMU (I am using one currently and I love it), but since pypilot is not currently written with an open spec for the IMU, which doesn't seem like a huge work-effort (defining open NMEA0183 or json schema and data model/API, that is), and it seems to me that doing so would drive a lot more adoption and lower the cost of entry to use.  I can see that there is probably some degree of calibration specific to pypilot that might be optimally part of the platform, but maybe none is really required, outside of that necessary for the IMU to function in a boating environment.  In other words, calibration only becomes a pypilot problem to solve if use of the platform is tied to a specific IMU that cannot be optimally calibrated independently.  This is more a riff that a technical feature request but I think there is some merit to separating those services architecturally, it might also simplify the way other IMU related functions in Openplotter are implemented and supported.  Please correct me if I am wrong on this, but it may be worth looking at forking pypilot and then publishing the IMU spec so that developers can write NMEA or json IMU interfaces to other IMUs (that is, without I2C, which doesn't really have much of a place anymore in a Signalk environment, IMHO).  Sorry again if I am missing something, but I for one would work very hard on developing an open IMU (I have the bones of it already written) if I knew pypilot was ready for it.   Just a thought, I hope it's constructive.
Reply
#2
(2026-10-18, 11:35 PM)saltwaterone Wrote: I was looking into pypilot and I am not sure I understand why the code is not more module such that the IMU functionality is separated from the core autopilot functionality.  There are many off-the-shelf IMU-like
sensors that could be made to function as a viable IMU (I am using one currently and I love it), but since pypilot is not currently written with an open spec for the IMU, which doesn't seem like a huge work-effort (defining open NMEA0183 or json schema and data model/API, that is), and it seems to me that doing so would drive a lot more adoption and lower the cost of entry to use.  I can see that there is probably some degree of calibration specific to pypilot that might be optimally part of the platform, but maybe none is really required, outside of that necessary for the IMU to function in a boating environment.  In other words, calibration only becomes a pypilot problem to solve if use of the platform is tied to a specific IMU that cannot be optimally calibrated independently.  This is more a riff that a technical feature request but I think there is some merit to separating those services architecturally, it might also simplify the way other IMU related functions in Openplotter are implemented and supported.  Please correct me if I am wrong on this, but it may be worth looking at forking pypilot and then publishing the IMU spec so that developers can write NMEA or json IMU interfaces to other IMUs (that is, without I2C, which doesn't really have much of a place anymore in a Signalk environment, IMHO).  Sorry again if I am missing something, but I for one would work very hard on developing an open IMU (I have the bones of it already written) if I knew pypilot was ready for it.   Just a thought, I hope it's constructive.

I’ve done open source marine IMU filters. You can take a look here:

https://github.com/bareboat-necessities/ocean-imu
Download BBN Marine OS for raspberry pi 

https://bareboat-necessities.github.io/m...at-os.html

Video of actual installation:

https://www.youtube.com/watch?v=3zMjUs2X3qU


Reply
#3
The architectural point is interesting, but I think the calibration layer is harder to separate than it looks. Pypilot's IMU handling isn't just reading raw axes; it depends on tight timing and a specific fusion/calibration pipeline tuned for boat motion. Moving that behind JSON or NMEA adds latency and loses the sample-level access the autopilot needs. That said, defining a schema for a fused attitude/rate feed could still help other consumers in Openplotter and Signal K without touching the core loop. If you already have the bones of an open IMU, publishing the data model first seems like a more useful first step than forking.
Reply
#4
The timing argument makes sense — sample-level access for the fusion loop isn't something you'd want to put behind a messaging layer. But I think the more interesting split is between the fused output and the raw sensor interface. If pypilot exposed a stable schema for attitude and rates downstream, other IMUs could feed in without the core caring which chip produced the numbers. The calibration pipeline could stay inside pypilot while the transport stays open. Publishing the data model first does seem like the pragmatic route; a fork with an undefined contract would just split effort.
Reply
#5
The split you're describing between fused output and raw sensor interface seems like the more workable one. Keeping calibration inside pypilot while defining a stable schema for attitude and rates downstream would let other IMUs contribute numbers without the core loop needing to know the chip behind them. On the latency question, I'd separate the autopilot's sample-level path from whatever consumers in Openplotter or Signal K read — those don't need the same timing guarantees. Publishing the data model first still looks like the right sequencing, since a fork without a defined contract just multiplies effort.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)