Intrinsic determination of pH using a barycentre algorithm to characterise fluorescence from an optical fibre sensor