Skip to content

Commit

Permalink
Implement ranging correction algorithm from jkelleyrtp#105.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Pallant (42 Technology) committed Apr 16, 2020
1 parent 89c6baf commit ff96909
Show file tree
Hide file tree
Showing 3 changed files with 586 additions and 5 deletions.
7 changes: 7 additions & 0 deletions dw1000/src/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ impl Default for UwbChannel {
}

impl UwbChannel {
/// Is this a narrow channel?
pub fn is_narrow(&self) -> bool {
match self {
UwbChannel::Channel4 | UwbChannel::Channel7 => false,
UwbChannel::Channel1 | UwbChannel::Channel2 | UwbChannel::Channel3 | UwbChannel::Channel5 => true,
}
}
/// Gets the recommended preamble code
pub fn get_recommended_preamble_code(&self, prf_value: PulseRepetitionFrequency) -> u8 {
// Many have overlapping possibilities, so the numbers have been chosen so that there's no overlap here
Expand Down

0 comments on commit ff96909

Please sign in to comment.