About RX Level and first path power

hello all, I need to estimate the rx level and first path power , but i do not know how make my code.so who has this code about rx level and first path power, thank you !

DW1000 user manual show the details of how to estimate the signal power.