A method for drilling a subterranean wellbore, the method comprising: (a) drilling the subterranean wellbore via rotating a drill string therein, the drill string including a drill bit, a triaxial accelerometer set, and a triaxial magnetometer set; (b) causing the triaxial accelerometer set and the triaxial magnetometer set to make corresponding analog triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) ( B x (t), B y (t) B z (t)) and analog triaxial magnetometer measurements ( B x (t), B y (t) B z (t)) while drilling in (a); (c) filtering the triaxial magnetometer measurements ( B x (t), B y (t) B z (t)) made in (b) using a first analog circuit located in the drill string to obtain filtered triaxial magnetometer measurements; (d) filtering the triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) made in (b) using a second analog circuit located in the drill string to obtain filtered triaxial accelerometer measurements; (e) digitizing the filtered triaxial magnetometer measurements ( B x (t), B y (t) B z ( t)) obtained in (c) and the filtered triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) obtained in (d) to obtain digitized triaxial magnetometer measurements ( B x, B y B z) and digitized triaxial accelerometer measurements ( A x, A y A z); the method being characterised by the following steps: (f) processing the digitized magnetometer measurements ( B x, B y B z) to remove a first time lag (τ 2) and thereby obtain compensated magnetometer measurements; and (g) processing the digitized accelerometer measurements ( A x, A y A z) to remove a second time lag (τ 3) and thereby obtain compensated accelerometer measurements; (h) processing the compensated magnetometer measurements and the compensated accelerometer measurements to compute an inclination and an azimuth of the subterranean wellbore while drilling in (a). (a) drilling the subterranean wellbore via rotating a drill string therein, the drill string including a drill bit, a triaxial accelerometer set, and a triaxial magnetometer set; (b) causing the triaxial accelerometer set and the triaxial magnetometer set to make corresponding analog triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) ( B x (t), B y (t) B z (t)) and analog triaxial magnetometer measurements ( B x (t), B y (t) B z (t)) while drilling in (a); (c) filtering the triaxial magnetometer measurements ( B x (t), B y (t) B z (t)) made in (b) using a first analog circuit located in the drill string to obtain filtered triaxial magnetometer measurements; (d) filtering the triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) made in (b) using a second analog circuit located in the drill string to obtain filtered triaxial accelerometer measurements; (e) digitizing the filtered triaxial magnetometer measurements ( B x (t), B y (t) B z ( t)) obtained in (c) and the filtered triaxial accelerometer measurements ( A x (t), A y (t) A z (t)) obtained in (d) to obtain digitized triaxial magnetometer measurements ( B x, B y B z) and digitized triaxial accelerometer measurements ( A x, A y A z); the method being characterised by the following steps: (f) processing the digitized magnetometer measurements ( B x, B y B z) to remove a first time lag (τ 2) and thereby obtain compensated magnetometer measurements; and (g) processing the digitized accelerometer measurements ( A x, A y A z) to remove a second time lag (τ 3) and thereby obtain compensated accelerometer measurements; (h) processing the compensated magnetometer measurements and the compensated accelerometer measurements to compute an inclination and an azimuth of the subterranean wellbore while drilling in (a).