Flue gas and smoke gas analysis