Closed EpsilonZ closed 3 years ago
That's what I ended up doing.
In nrng_encode.c I changed the json filling part to this: (you need to add these parameters in the json struct too)
uint16_t j=0;
for (uint16_t i=0; i < 16; i++){
if (valid_mask & 1UL << i){
uint16_t idx = BitIndex(nrng->slot_mask, 1UL << i, SLOT_POSITION);
nrng_frame_t * frame = nrng->frames[(base + idx)%nrng->nframes];
struct _twr_data_t * twr_data = (struct _twr_data_t * ) frame->payload;
if (frame->code == UWB_DATA_CODE_SS_TWR_NRNG_FINAL && frame->seq_num == seq_num){
json.rng[j] = (dpl_float64_t) uwb_rng_tof_to_meters(nrng_twr_to_tof_frames(nrng->dev_inst, frame, frame));
json.ouid[j] = frame->dst_address;
json.rssi[j] = twr_data->rssi;
json.fppl[j] = twr_data->fppl;
json.los[j] = uwb_estimate_los(nrng->dev_inst,json.rssi[j],json.fppl[j]);
j++;
}
}
}
Originally, the twr_ss does not add the RSSI and FPPL data into the twr_data thus you need to modify the twr_nrng_ss.c too:
Within the case UWB_DATA_CODE_SS_TWR_NRNG_T1:
frame->fppl = uwb_get_fppl(nrng->dev_inst);
frame->rssi = uwb_get_rssi(nrng->dev_inst);
And you'll have the signal data of each twr available!
Hi!
I've been testing with the NRNG_TAG / NRNG_NODE examples and everything is working really good but I would need to add statistics to debug and mitigate in case a Hard-NLOS is found. I've tried to modify the code in many ways together with amend paramers but can not find the way to get them correctly.
I've tried to amend this parameters:
But seems like none of them work. I've also debugged and found out that all statistic values are always set to 0 so it seems like these amend parameters do not work properly.