A linearisation and compensation method for integrated sensors