Gyro sensitivity feature - #12715
Conversation
Signed-off-by: noacoohen <noa.cohen@intel.com>
| if( auto strong = _sensor.lock() ) | ||
| return strong->get_imu_sensitivity( RS2_STREAM_GYRO ); | ||
| else | ||
| return -1; |
There was a problem hiding this comment.
Why not throw if we cannot query it?
| { | ||
| switch( static_cast< int >( val ) ) | ||
| { | ||
| case 0: { |
There was a problem hiding this comment.
So I understand the user input is in range of 0-4?
So can we create an Enum for it instead of this description?
And we need somewhere to place the units
It can be
RS_OPTION_GYRO_SENSITIVITY_61_0_DEG_SEC?
Let's speak about it on Sunday
|
|
||
| #include <rsutils/lazy.h> | ||
|
|
||
| #include <src/hid-sensor.h> |
There was a problem hiding this comment.
Can be removed from the header as we use only pointers here
| @@ -0,0 +1,29 @@ | |||
| // License: Apache 2.0. See LICENSE file in root directory. | |||
| // Copyright(c) 2023 Intel Corporation. All Rights Reserved. | |||
| @@ -0,0 +1,29 @@ | |||
| // License: Apache 2.0. See LICENSE file in root directory. | |||
| // Copyright(c) 2023 Intel Corporation. All Rights Reserved. | |||
| static const std::map< float, double > gyro_sensitivity_convert | ||
| = { { 0.0f, 0}, | ||
| { 1.0f, 0.1}, | ||
| { 2.0f, 0.2}, |
| if( _imu_sensitivity_per_rs2_stream.find( stream ) != _imu_sensitivity_per_rs2_stream.end() ) | ||
| { | ||
| return _imu_sensitivity_per_rs2_stream[stream]; | ||
| } |
| { | ||
| // Default sensitivity is +-2000 deg/sec at 16.384 LSB/Deg/Sec (LSB is 0.1220703125 deg/sec, historically rounded to 0.1). | ||
| // High sensitivity is +-125 deg/sec at 262.144 LSB/Deg/Sec (LSB is 0.003814697265625 deg/sec). | ||
| // Default sensitivity in HKR is +-2000 deg/sec at 16.384 LSB/Deg/Sec. |
There was a problem hiding this comment.
Let's please remove HKR word, this comment was about d400.
but FW say it was +-1000 and not +-2000
… chnge default value in viewer
| dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() ) | ||
| { | ||
| check_and_restore_rgb_stream_extrinsic(); | ||
| if( _fw_version >= firmware_version( 5, 15, 1, 224 ) ) |
There was a problem hiding this comment.
Is this the formal FW version or just a temporary build?
There was a problem hiding this comment.
This should change to 5.16.0.0 before we merge it
| #define CASE( X ) STRCASE( GYRO_SENSITIVITY, X ) | ||
| switch( value ) | ||
| { | ||
| CASE( 61_0_MILLI_DEG_SEC ) |
There was a problem hiding this comment.
Please add a unit test setting the option from python, to validate the option works
Added gyro sensitivity feature for windows+Linux for D435i (Old/New sensor) and D455
tracked by RSDSO-19305