3DR Pixhawk strange barometer issues AC 3.3.3

So I have a pixhawk that I bought used, and without testing it or using it, I sold it to a friend who wanted to upgrade from APM.
He has a TBS discovery that was flying great on APM2.5

Now with the PH he was having troubles trying to keep a consistent altitude. When setting the copter to altitude hold, it would either suddenly drop or rise, and actually caused a number of crashes.

We went through a bunch of testing to figure out why, Such as ensuring the PH is on the latest firmware, and set up correctly. All sensors calibrated properly. All solder joints done well and correctly. Throttle to hover at 50%. etc etc.

Finally we had his quad sitting up high about 2m above ground, so to keep the copter at a consistent height, armed and at about 50% throttle (props off). Now we think that the barometer might be faulty but we can’t be sure. We checked the logs and found the copter seemed to think it varying in altitude by a number of meters, sometimes more than 10m.

I opened up the PH and double checked there was the black foam in place which it is.

We swapped out this PH for another one that I have, and with the same settings (loaded the parameter file), the copter hovered perfectly, and was even able to do auto-tune, and now he is off doing auto missions.

Im now left with this PH and trying to figure out what’s wrong with it and how to fix it. I plugged it in to MP and opened up the terminal, chose the right port and clicked connect, and went through the sequence and when it started to have a look at the barometer, the terminal started outputting gobbledegook. See attached screenshot.

So my question is: Is there something in the firmware that can calibrate/configure the barometer, or do I need to replace the barometer?

Note: I have the ability and the sensor to replace the SMT baro, I’d just rather not, so fixing it in other ways would be great.

Here are the last 3 dataflash logs
Link to logs

As far as I know there is no way to calibrate the barometer. I did look at one of your logs and the barometer closely matched the GPS in altitude. What I did notice though is a large change in temperature which can cause issues if its in the hot sun. It starts at about 39 and goes to 44 degrees.

Mike