ArduPilot / ArduPilot/ardupilot
Rover/Boat: add support for water barometers
- Dominant language
- C++
- Stars
- 15.9k
- Forks
- 21.4k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 119
Description
## Feature request
**Is your feature request related to a problem? Please describe.**
1. It's difficult to tell how loaded a boat is, especially from telemetry
- Multiple barometers at opposite ends of a boat (and/or in opposite hulls of a catamaran) could even potentially provide high-resolution pitch or roll estimates, to estimate load distribution (which impacts travel efficiency and controller tuning)
2. Boats have no feedback if they have water ingress or get overloaded
- If a boat with a winch tries to pick up something heavy (or something lands on it) it could sink without warning
3. It's safety-critical for an underwater crawler to tell how deep it is, to prevent hull/component implosion
- This isn't a boat, but is still Rover
**Describe the solution you'd like**
1. `BARO_TYPE_WATER` sensors should be supported in Rover (at minimum in the boat firmware)
- I believe this would at least require [specific gravity parameter support](https://github.com/ArduPilot/ardupilot/blob/d4e9bf05b9995657b72eedd7d6a7e41c82284cdb/libraries/AP_Baro/AP_Baro.cpp#L143), for the water density
- I'm unsure what else is required - the rest of the driver code might already be compiled in?
2. A pressure/altitude failsafe should be implemented
- Should ideally share implementation with [the proposed Sub one](https://github.com/ArduPilot/ardupilot/issues/32090)
3. Ideally [barometer positions could be specified](https://github.com/ArduPilot/ardupilot/issues/30727), and used as an alternative roll/pitch source (or at least in a warning/failsafe/pre-arm-check capacity if the average difference gets/is too high)
**Describe alternatives you've considered**
[A leak failsafe](https://github.com/ArduPilot/ardupilot/issues/19103) could at least warn about active water ingress, but that's somewhat independent functionality.
**Platform**
[ ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[X] Rover
[ ] Submarine
**Additional context**
ArduSub already supports water barometers, so could be used for inspiration.
Contributor guide
Research direction
Start with libraries/AP_Baro/AP_Baro.cpp around the linked specific-gravity parameter, then compare the existing ArduSub water-barometer support with Rover's barometer paths. Review the linked Sub failsafe and barometer-position issues before defining the scope; done should include Rover water-barometer support and an agreed pressure/altitude safety response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, robotics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100