Data reconciliation: an engineeristic approach based on least squares optimization