If you are kind enough to answer my question, please bear in mind my background is not in physics, so I may need some corrections in setting up the proper framework. On the other hand, my background is in math so feel free to include technicalities of that nature.
We have been able to approximate the curvature of the observable universe by measuring triangles with vertices near the boundary of our limits of observation. We are also able to approximate the error in these computations, and data shows that the observable universe is flat up a 0.4% error margin.
First question: What is the value being measured here, having this error margin? How is it defined? At first I thought it would be the curvature but that doesn't seem right. After all, we only get flat with curvature at exactly $0$, so if one knew the curvature to be in an interval around $0$, flat would be a single option among infinitely many other (small) numbers. For instance, a curvature of $-0.00001$ would still be negative, i.e. not flat, right?
Regardless of that, the observable universe is "almost" flat. The more interesting issue to me is whether the general universe is flat, but a well known property of a smooth manifold is that any sufficiently small sample is "almost" flat. Yet, based on my limited web-researching, we have a way of saying whether or not the flatness of the general universe is determinable, by looking at our local flatness. (This seems incredible, am I understanding it right?) It comes down to the cosmological curvature parameter, which apparently has something to do with expansion rate. For instance, Wikipedia says that we "will not be able to distinguish between flat, open and closed universe if the true value of cosmological curvature parameter is smaller than $10^{−4}$."
Second question: What is the definition of the cosmological curvature parameter? Is this something we can measure up to some bounded error? Or is it impossible to even approximate such a parameter for the general universe, since we only have the observable portion to work with?
I did exhaust my web-searching in attempt to answer this and can only find things telling me how to interpret the parameter, not how it is defined or computed.