You can't use the ideal gas law in an open system, but you can use Bernoulli's equation.
Starting with the conservation of energy:
$$ E_{in} = E_{out} $$
We have one source in and two sources out:
$$ E_{in} = E_{out} + E_{leak} $$
The energy is the sum of the enthalpy and kinetic energy (since the pipe is horizontal):
$$ (h_1 + v_1^2/2)*m_1 = (h_2 + v_2^2/2)*m_2 + m_{leak} * (h_3+ v_3^2/2)$$
By definition, the enthalpy is the internal energy plus $P/\rho$.
Now for some important assumptions:
- The velocity of the leak far from the pipe would be 0 (i.e., it's reached the atmosphere and not causing tornadoes).
- The leak's final pressure would be atmospheric pressure (via the same assumptions)
- The entire system is under roughly constant temperature, so the internal energy, u of the gas at all three points is the same
$$ (u + P_1/\rho + v_1^2/2)*m_1 = (u + P_2/\rho + v_2^2/2)*m_2 + m_{leak}*(u + P_{atm}) $$
- Now we assume constant flow. The pressure, internal energy and velocity at the inlet should be the same with respect to time. Same with the outlet and leak. So, differentiating with respect to time, the only thing that changes at each point is the mass:
$$ P_{in} = P_{out} + P_{leak} $$
$$ (u + P_1/\rho + v_1^2/2)*\dot{m}_1 = (u + P_2/\rho + v_2^2/2)*\dot{m}_2 + \dot{m}_{leak}*(u + P_{atm}) $$
Now we know by conservation of mass:
$$ m_{in} = m_{out} + m_{leak} $$
Which works when taking the derivative with respect to time. So, we can remove the u terms. Finally, it's easier to express mass flow as:
$$ \dot{m} = \rho A V $$
So, substituting in the mass flow, and multiplying the entire equation by the constant density to convert from head to pressure:
$$(P_1 +\rho\frac{V_1^2}{2})\rho AV_1 = (P_2 + \rho \frac{V_2^2}{2})\rho AV_2 + \dot{m}_{leak}(P_{atmosphere})$$
Note the units are Watts*density - to make your mass loss easier to solve. While you could solve for the leak in this equation, using your knowledge of the pressure outside and the pressure at two places, you would still need to know at least one of the velocities to solve for the leak. The other velocity, you could solve for because of conservation of mass again:
$$ \dot{m}_{in} = \dot{m}_{out} + \dot{m}_{leak} $$
$$ \rho V_1 A = \rho V_2 A + \dot{m}_{leak} $$
And of course, I did make these assumptions: constant density, and no loss due to pipe friction under the assumption the leaks are so light that the temperature didn't change, and so density didn't change - just decrease the velocity. Ultimately, to figure out the velocities, you need to know the flow rate - so the only way to tell is with flowmeters, not pressure gauges.