Gas flow calculations

Has anyone developed a subroutine or flowchart to do gas flow volumes, I.e. using orifice meter constants and pressure differentials? Need to measure the gas output of a well in MCF.