ostrosco / comms-rs

A library for building DSP communication pipelines.
MIT License
13 stars 1 forks source link

Feature/pulse shaping #67

Closed garbagetrash closed 5 years ago

garbagetrash commented 5 years ago

Added some math utility functions that can be combined with the existing FIR filter implementation and a hypothetical upsampler implementation to achieve pulse shaping for:

Not sure how to compose with upsampling just yet, will need to work that out. Some clippy issues remain that I don't know how to resolve. Basically complaining about use of as vs from, but when I try to use from it fails to compile because it's ambiguous if I want to use std::convert::From vs num_traits::NumCast implementations, and I can't figure out how to specify std cause rust syntax for static functions confuses me.

ostrosco commented 5 years ago

Could you make sure to run clippy on this? There are a couple of lints (mostly u32 -> f64 casts) that they're recommending you use f64::from() for.

garbagetrash commented 5 years ago

Ok, I was having issues using the f64::from because of the NumCast trait imported into the file scope screwing me up. Something something function disambiguity... kind of an unfortunate problem for the Num crate to inflict upon people, but whatever. I figured a way around it.

garbagetrash commented 5 years ago

Have added a first pass at node implementation. Only one test for the moment with the node (using a simple rectangular window) but all the math functions are tested outside of the node architecture as well.