I added elevation gain tracking to my fitness app earlier this year in my Hiking update. I haven't seen anything like this in development or heard any reporting from the field. I have a Series 3 with 6.2.8 and have never noticed anything like this.
As far as I know, CMAltimeter solely uses a barometric pressure sensor under the hood, well at least until the new watches that use GPS and Wi-Fi for improved data in that always-on scenario. Barometric pressure sensors have a sampling time where they 'accumulate' change, so we are limited by the update frequency of both the hardware and software.
I'll probably put something like this in my code to account for this; so I appreciate your share! I'd start by keeping track of my last known presumed good/first CMAltitudeData, then put the following (pseudo-code) guards into my update handler:
guard newData.timestamp > lastData.timestamp else { BAD }
guard abs(newData.relativeAltitude - lastData.relativeAltitude) < Constants.reasonableAltitudeDelta else { BAD }
Unless your app supports cliff jumping or some other crazy activity, assuming the update frequency of the altimeter API is 1hz, maybe it would be appropriate for the user to change say 2 m/s? So in guard 2, compare your elevation change over time to some velocity number. Furthermore, you'd need to understand and handle the cases where your lastData is actually the bad one, or enough time has passed where you just wanna give up start accumulating +/- elevation again.
I applied similar filtering (plus more) to my CLLocation data before adding to my workout route.
Questions:
By chance, do you have any CLLocation data during the 'paused' portion of your workout to correlate it against?
Could you share an example print out of your [CMAltitudeData] as well as markers where you paused your workout?
Roughly how many seconds after you paused the workout session did you see the elevation return to 'normal' values?
Any difference when you are doing a running workout with your watch set to auto-pause, vs you programmatically calling session.pause()?
As I mentioned, I have a Series 3, and a new Series 6 on the way. I will do some testing to see if I can reproduce what you're seeing and reply with my results.