Decawave / mynewt-dw1000-core

[DEPRECATED] Use https://github.com/Decawave/uwb-core for new designs.
Apache License 2.0
57 stars 34 forks source link

A few questions #3

Closed afnan closed 5 years ago

afnan commented 5 years ago

Hi, I have the following questions.

  1. When do you plan to do release 2 for PANS library?
  2. If we use this core, can we send custom messages through UWB?
  3. I intend to use IMU with a tag. It seems that you already have that in the plan. Any release dates for that?
pkettle commented 5 years ago

Hi

  1. This codebase is not related to the PANS library. You should direct PANS questions to the Decawave forum.

  2. This stack supports a lwIP implementation which you can use for basic data communications.

Alternatively, if you are interested in augmenting ranging packets with custom messages, you can overload the dw1000_mac_interface->final_cb and modify the frame->payload[] with IMU data etc. (Note: these comments pertain to the refactor branch, this will be merged into the master shortly)

The final_cb is accessible through the dw1000_mac_get_interface API. The final_cb is in the interrupt context, so plan just populate the data and return.

static bool
my_final_cb(dw1000_dev_instance_t * inst, dw1000_mac_interface_t * cbs){
    dw1000_rng_instance_t * rng = inst->rng; 
    twr_frame_t * frame = rng->frames[(rng->idx)%rng->nframes];

    for (uint16_t i=0;i<sizeof(struct _twr_data_t);i++)
        frame->payload[i]....
}

main(){
   ....
    // Override default final callbacks
    dw1000_mac_get_interface(inst, DW1000_RNG_DS_EXT)->final_cb = my_final_cb;
}
  1. One of the working example already show the IMU example so you should be able to do everything from main. Is it significant motion detection or ahrs/fusion that you are working on?
afnan commented 5 years ago

Thank you for detailed information. I will be working on AHRS. I have a suggestion perhaps your team can take it up. Instead of integrating MPU6500 and similar stuff and then using Mahony or Medwick (processor intensive) into your future hardware (from docs looks like you have planned for it), use EM7180 to do all the heavy lifting and read it through I2C. I found them highly reliable within 2 degrees. https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution-lsm6dsm-lis2md/

Secondly, regarding point no 2 does this code refer to PANS library? The hardware module I would be using in DWM1001.

pkettle commented 5 years ago

Hi Afnan, Thanks for the suggestion, we welcome any contributions. We are looking at going beyond AHRS and fusing UWB with IMU to tackle the NLOS problem. As you can see we have put in place the necessary hooks; now we need to find time to complete this work.

2 referrs to mynewt-dw1000-core stack.