Currently I am working on a project to incorporate our radar as an input to applications in Driveworks. Since the radar is neither Delphi ESR 2.5 nor Continental ARS430, I have to write a program that implements the costom decoder based on the interface given and compile it to a library. Then I can use the command below to make the demo application work with a custom radar. Please correct me if I am wrong.
./sample_radar_replay --protocol=radar.socket --params=ip=192.168.0.2,port=9999,device=CUSTOM,protocol=udp,decoder=/path/to/lib/libradardecoder.so
After I read through the packet definitions, I found there are a lot of structs defined that need to be filled up. So my first question is that is it compulsory to fill all of the variables(E.g. uint32_t supportedScanTypes[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT] in struct dwRadarProperties) or only some of the essential ones must be filled.
My second question is that in the doc page
It asks me to implement five functions for decoder, but actually in the page
I found there are more than five functions to be implement for the decoder plugin. So should I implement the additional ones? Is there any example code for a custom decoder plugin that I can refer to?
The third question was raised by my colleague. Regard the timestamp from sensor, should it be UTC time in microseconds or the clocking time from the sensor starts? Since the sensor may not have the global time on board and the sync across CAN is very slow(when the connection is CAN), we might not be able to get the exact global time in microseconds from sensor side without GPS. Could you provide an example of a valid timestamp also?