1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/// Temperature reading from the MPU-6050's internal temperature sensor.
///
/// Note: This measures the temperature of the MPU-6050 chip itself, not the ambient
/// room temperature. The sensor readings will typically be a few degrees higher than
/// the ambient temperature due to self-heating of the device during operation.
///
/// The raw temperature value from the sensor needs to be converted using a formula
/// from the datasheet to get the actual temperature in degrees Celsius.
/// While the raw value is available via [`Temperature::raw()`], you should typically use [`Temperature::celsius()`]
/// to get the temperature in a standard unit.
///
/// # Example
/// ```
/// # use mpu6050_dmp::temperature::Temperature;
/// let temp = Temperature::new(3990);
///
/// // Get temperature in Celsius (recommended)
/// let celsius = temp.celsius(); // Returns ~48.26°C
///
/// // Get raw value (typically not needed)
/// let raw = temp.raw(); // Returns 3990
/// ```