Hi everyone, I am figuring out everything step by step… And in nsh, when command ls /obj I noticed that there are sensor and vehicle data like:
nsh> listener vehicle_magnetometer
TOPIC: vehicle_magnetometer 2 instances
Instance 0:
vehicle_magnetometer_s
timestamp: 1867554377 (0.066130 seconds ago)
timestamp_sample: 1867546202 (8175 us before timestamp)
device_id: 396825 (Type: 0x06, I2C:3 (0x0E))
magnetometer_ga: [-0.4158, -0.4750, 0.3249]
calibration_count: 3
Instance 1:
vehicle_magnetometer_s
timestamp: 1867662652 (0.003013 seconds ago)
timestamp_sample: 1867661683 (969 us before timestamp)
device_id: 396809 (Type: 0x06, I2C:1 (0x0E))
magnetometer_ga: [0.2028, -0.0225, 0.0054]
calibration_count: 0
nsh> listener sensor_mag
TOPIC: sensor_mag 2 instances
Instance 0:
sensor_mag_s
timestamp: 1878958024 (0.038512 seconds ago)
timestamp_sample: 1878957084 (940 us before timestamp)
device_id: 396825 (Type: 0x06, I2C:3 (0x0E))
x: -0.2219
y: -0.3750
z: 0.3712
temperature: nan
error_count: 0
is_external: False
Instance 1:
sensor_mag_s
timestamp: 1879083901 (0.004078 seconds ago)
timestamp_sample: 1879082955 (946 us before timestamp)
device_id: 396809 (Type: 0x06, I2C:1 (0x0E))
x: 0.3356
y: 0.0795
z: 0.2537
temperature: nan
error_count: 0
is_external: True
Why are they seperated, they are same e.g instance 0s and 1s respectively. Theree are things are added e.g magnetometer gain ? (magnetometer_ga).
How can I use this info?