So, I know that the title isn't very precise, but so is my current knowledge of the subject. It begs the question of what unit are we talking or maybe percentage? Let me explain the situation.
Earth's atmosphere consists mostly of 21% oxygen and 78% nitrogen. O2 is the compound we use to breathe, but nitrogen on the other hand is just a non-toxic gas and is not necessery. Well, it is as it increases pressure which is essential for human existance, BUT it can be substituted by other non-toxic gas like Argon.
On Earth's highest mountains oxygen percentage is on a similar level, but the pressure is lower. Hikers have to use oxygen tanks. If I deduce well, with lower pressure, human needs more percentage points of oxygen than in higher pressure.
Now I am writing a simulation of space ship, in which there is a security system, which controls oxygen in the cabin when pressure drops and it should always keep oxygen amount correct for any pressure given.
How can I calculate the perfect oxygen amount in air and what would be the actual unit of it? Any idea of a unit I have come with would be $\frac{kg}{m^3}$.