-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Channel Estimation #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, but everything else looks quite good.
include/iq_stream_decoder.hpp
Outdated
private: | ||
void upperMacWorker(); | ||
|
||
std::complex<float> hard_decision(std::complex<float> symbol); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing return types.
|
||
const float SEQUENCE_DETECTION_THRESHOLD = 1.5; | ||
|
||
std::shared_ptr<LowerMac> lower_mac_{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this shared_ptr ?
std::shared_ptr<LowerMac> lower_mac_{}; | ||
std::shared_ptr<BitStreamDecoder> bit_stream_decoder_{}; | ||
|
||
bool is_uplink_{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe init the value
|
||
bool is_uplink_{}; | ||
|
||
std::shared_ptr<StreamingOrderedOutputThreadPoolExecutor<std::vector<std::function<void()>>>> threadPool_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fucking name :D
#include <vector> | ||
|
||
// thread pool executing work but outputting it the order of the input | ||
template <typename ReturnType> class StreamingOrderedOutputThreadPoolExecutor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just cursed
auto score_ndb_split = pattern_at_position_score(frame_, kNORMAL_TRAINING_SEQ_2, 244); | ||
|
||
auto minimum_score = score_sb; | ||
BurstType burstType = BurstType::SynchronizationBurst; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sneak_case
void Decoder::process_bit(uint8_t symbol) noexcept { | ||
assert(symbol <= 1); | ||
if (iq_or_bit_stream_) { | ||
std::complex<float>* rx_buffer_complex = reinterpret_cast<std::complex<float>*>(rx_buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think actually a static_cast is enough if u just want to change the pointer type.
, bit_stream_decoder_(bit_stream_decoder) | ||
, is_uplink_(is_uplink) { | ||
std::transform(training_seq_n_.crbegin(), training_seq_n_.crend(), | ||
std::back_inserter(training_seq_n_reversed_conj_), [](auto v) { return std::conj(v); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is nice !
src/iq_stream_decoder.cpp
Outdated
} | ||
|
||
void IQStreamDecoder::upperMacWorker() { | ||
while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we need a way to gracefully kill this. So some variable that we can toggle if we want a graceful shutdown. Like when we receive some signal
src/iq_stream_decoder.cpp
Outdated
} | ||
} | ||
|
||
std::vector<uint8_t> IQStreamDecoder::symbols_to_bitstream(std::vector<std::complex<float>> const& stream) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing return types.
return res; | ||
} | ||
|
||
auto print(std::vector<int> const& res) -> void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls keep it uniform const std::vector<>&
or std::vector<> const&
8f029f3
to
722a1fa
Compare
…horter executing time.
Closes #4