# Overwrite pressure sensor data

**URL:** <https://discuss.bluerobotics.com/t/overwrite-pressure-sensor-data/13789>\
**Category:** Blue Robotics Software\
**Created:** [February 28, 2023, 5:42pm UTC](https://discuss.bluerobotics.com/t/overwrite-pressure-sensor-data/13789 "2023-02-28T17:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinsub](https://avatars.discourse-cdn.com/v4/letter/v/d6d6ee/32.png) [@vinsub](https://discuss.bluerobotics.com/u/vinsub)\
**Post date:** [February 28, 2023, 5:42pm UTC](https://discuss.bluerobotics.com/t/overwrite-pressure-sensor-data/13789/1 "2023-02-28T17:42:13Z")

</div>

Hi all, is it possible to overwrite the pressure sensor data, to have it transmitted to the QGC via the same flag as mavlink? Let me explain, is it possible to connect an adc and an analog depth gauge to the raspberry and add the readout in the python script that is responsible for sending the data to the surface computer to have it read into the depth field?  
Thanks

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 2, 2023, 11:54am UTC](https://discuss.bluerobotics.com/t/overwrite-pressure-sensor-data/13789/2 "2023-03-02T11:54:50Z")

</div>

Hi @vinsub,

> [@Ardusub 4.1.0 working with waterlinked uw gps?](https://discuss.bluerobotics.com/t/ardusub-4-1-0-working-with-waterlinked-uw-gps/13294/6):
>
> > [@Ardusub 4.1.0 working with waterlinked uw gps?](https://discuss.bluerobotics.com/t/ardusub-4-1-0-working-with-waterlinked-uw-gps/13294/5):
> >
> > Is there a way to simulate depth and temp without BAR30 connected to Pixhawk?
> 
> I don’t believe so, unless you simulate a Bar30 with a microcontroller or something that’s connected to the I2C port.
> 
> It may be possible to simulate depth by sending it via [`VISION_POSITION_ESTIMATE`](https://docs.bluerobotics.com/ardusub-zola/software/autopilot/ArduSub-4.1/developers/mavlink-messages/#incoming-messages:~:text=VISION_POSITION_ESTIMATE) MAVLink messages or something …

That said, if you only care about sending the values to QGC (e.g. for manual control), and not to the autopilot (e.g. for depth-hold mode and similar) then it may work to send [`SCALED_PRESSURE2`](https://mavlink.io/en/messages/common.html#SCALED_PRESSURE2) MAVLink messages (e.g. via a Python program) to the topside. That will only work if there’s not also an existing depth sensor (e.g. Bar30/Bar100) connected to the flight controller - otherwise the autopilot and your Python program will be fighting over which depth gets reported to QGC / QGC will be flickering between the different values.
