Enable Conservative RTK mode for MicroStrain GQ7#105
Enable Conservative RTK mode for MicroStrain GQ7#105aidan-laracy-HBK wants to merge 7 commits intomainfrom
Conversation
|
|
||
| bool mipFilterReset(EmptySrv::Request& req, EmptySrv::Response& res); | ||
|
|
||
| bool mipEnableConservativeRTKMode(EmptySrv::Request& req, EmptySrv::Response& res); |
There was a problem hiding this comment.
If this is being done through config, this should probably be removed
| rtcm_on_main_port_ = false; | ||
| } | ||
|
|
||
| //Enable conservative RTK solution |
There was a problem hiding this comment.
Comments should all start with spaces, so
// Enable conservative RTK solution
| else | ||
| MICROSTRAIN_MIP_SDK_ERROR(node_, mip_cmd_result, "Failed to set receiver 1 to direct mode."); | ||
|
|
||
| sleep(1); |
There was a problem hiding this comment.
I would add a comment to explain why we are sleeping for one second, and maybe investigate usleep to see if sleeping for maybe 100 milliseconds would be enough
|
|
||
| sleep(1); | ||
| //Here, we need to send the raw configuration bytes to the receiver to enable CAR mode for the RTK algorithm. | ||
| //First, define the UBX configuration bytes in a buffer. These are the raw bytes requred to write the RTK-Conservative Ambiguity Resolution mode to the receiver's Flash (change to RAM). |
There was a problem hiding this comment.
Same thing about comment styling and maybe break it up into multiple lines.
| uint8_t data[] = {0xB5, 0x62, 0x06, 0x8A, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x11, 0x00, 0x14, 0x20, 0x05, 0xe4, 0x07 }; | ||
| size_t size = 17; | ||
|
|
||
| bool result = mip_device_->send(data, size); |
There was a problem hiding this comment.
Since this can only pass or fail, hanging onto result here doesn't make much sense. Instead you should be able to change the following if statement to be something like
if (mip_device_->send(data, size)
...
else
...
| else | ||
| MICROSTRAIN_MIP_SDK_ERROR(node_, mip_cmd_result_1, "Failed to set receiver 2 to direct mode."); | ||
|
|
||
| sleep(1); |
There was a problem hiding this comment.
Same here, explain why you need to sleep and investiage sleeping for less time
| //Here, we need to send the raw configuration bytes to the receiver to enable CAR mode for the RTK algorithm. | ||
| //First, define the UBX configuration bytes in a buffer. These are the raw bytes requred to write the RTK-Conservative Ambiguity Resolution mode to the receiver's Flash (change to RAM). | ||
|
|
||
| bool result_1 = mip_device_->send(data, size); |
There was a problem hiding this comment.
Inline in if statement like mentioned previously
| else | ||
| MICROSTRAIN_DEBUG(node_, "Failed to write bytes to receiver"); | ||
| sleep(1); | ||
| const mip::CmdResult mip_cmd_result_2 = mip::commands_system::writeCommMode(*mip_device_, 0x01); //put the device back into normal mode |
There was a problem hiding this comment.
Reuse existing mip_cmd_result variable
| raw_file_config_aux_write_service_ = createService<RawFileConfigWriteSrv>(node_, RAW_FILE_CONFIG_AUX_WRITE_SERVICE, &Services::rawFileConfigAuxWrite, this); | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Should probably be removed
| } | ||
|
|
||
| } // namespace microstrain | ||
| } // namespace microstrain; |
There was a problem hiding this comment.
I would remove the semicolon
…ms, removing old direct mode for enabling conservative rtk and adding mip command
This addition adds a param: enable_conservative_rtk (default is False) that will enable the conservative ambiguity fix mode on the internal receivers on the GQ7. This may result in a longer time to first fix and mode float solutions and results in a nearly certain RTK fix.