A method for compensating for gyroscope drift on an electronic device , the method comprising: acquiring, by a gyroscope sensor, measurement data including at least one of an angular velocity or a rotation of the electronic device ; acquiring, from a temperature sensor in the gyroscope, variations in temperature of the gyroscope sensor; detecting, by a state detection unit included in a processor of the electronic device , whether a state of the electronic device is static or in motion based on the measurement data; computing, by the at least one processor, a compensation parameter by analyzing the measurement data with respect to the variations in temperature of the gyroscope sensor; and compensating, by the at least one processor, the measurement data by correcting the measurement data based on the computed compensation parameter, and wherein the compensation parameter includes a static drift, a dynamic drift, and temperature drift, and the static drift and the dynamic drift are calculated independently according to temperature and the state of the electronic device , and wherein computing the compensation parameter comprises one of: computing the static drift when the electronic device is static, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the static drift, or computing the dynamic drift when the electronic device is in motion, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the dynamic drift. acquiring, by a gyroscope sensor, measurement data including at least one of an angular velocity or a rotation of the electronic device ; acquiring, from a temperature sensor in the gyroscope, variations in temperature of the gyroscope sensor; detecting, by a state detection unit included in a processor of the electronic device , whether a state of the electronic device is static or in motion based on the measurement data; computing, by the at least one processor, a compensation parameter by analyzing the measurement data with respect to the variations in temperature of the gyroscope sensor; and compensating, by the at least one processor, the measurement data by correcting the measurement data based on the computed compensation parameter, and wherein the compensation parameter includes a static drift, a dynamic drift, and temperature drift, and the static drift and the dynamic drift are calculated independently according to temperature and the state of the electronic device , and wherein computing the compensation parameter comprises one of: computing the static drift when the electronic device is static, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the static drift, or computing the dynamic drift when the electronic device is in motion, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the dynamic drift. computing the static drift when the electronic device is static, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the static drift, or computing the dynamic drift when the electronic device is in motion, wherein the measurement data received from the gyroscope sensor is corrected by compensating for the dynamic drift. <EOS>