I finally solved the GRADE issue. I ride in Florida on mostly flat roads with very subtle elevation change. But the barometer is problematic. The "noise floor" on my EDGE 1050 causes a variation of +/- 3-5 ft over a 30-40 sec rolling window. My Forerunner 955 is +/- 7-12 ft. So what worked really well to eliminate spurious grades (flat road detection) was to maintain a queue of the last N elevation readings, generate a max/min value and assume a flat road if max-min < X. This shows the first 30 miles of my ride this morning. Blue is the EDGE 1050 barometer. It was essentially a flat road other than two overpasses over SR-528 at about a 3.5% grade. The data field rejected the noise but quickly detected true gradients.
If you have a more dynamic topography you can try the data field. It writes ELEVATION and GRADE as FIT data that you can then plot.
apps.garmin.com/.../f0ddadf0-4eb1-41fc-ae62-3b94575109ab
