The present invention relates to a method of compensating the pressure
drop in an ordinary ventilator tube. The method comprises the measurement
of a first air flow at a first pressure on the apparatus' side of the
ventilator tube and with the respiratory mask taken off. Moreover, a
parameter is calculated in a function which provides the pressure drop in
the ventilator tube in dependence on the air flow. The parameter for the
air flow and pressure is calculated. Later, the air flow is calculated
with the respiratory mask being put on. By means of the function a
correction pressure is calculated from the air flow. Finally, a target
pressure is set which results as a sum of the selected mask pressure and
the correction pressure. The invention moreover relates to ventilator for
performing the aforementioned method and to a memory medium for storing a
corresponding program.