Slamtec S3 Driver for Ardupilot

Hello, I am currently working with the Slamtec S3 360 LIDAR sensor to develop its support for the Ardupilot firmware. I have made changes to the AP_Proximity Library_RPLIDARA2.cpp and header files to successfully recognize, set parameters and output angle and distance to mavproxy and log the data onto the SD Card.

Reviewing the log, I notice that the sensor is randomly skipping data points, say around 70 degrees on an average. I am trying to resolve this issue, and could really use some inputs on how to resolve this issue.

I have attached a cleaned up file containing logged data points from the .log file. A few things about the S3

  1. Communication Protocol: UART
  2. Baud Rate: 1000000
  3. Descriptor, Response, Scan requests are all the same as S1 - which is currently supported by the Ardupilot firmware
  4. Min Sample Rate for S3: 16,000 - currently running my scan at this speed.
  5. Max Sample Rate for S3: 32,000
  6. Motor Speed: 10Hz
    log5.txt (31.3 KB)

My hypothesis is, the sample rate being much higher than previous Lidar - almost 3 times higher - the buffer is being overloaded and hence cleared before everything is being read. My data that is attached is being logged right after the sensor response data is parsed and converted into floating point values, hence I am suspecting something to be modified in the UART Library?