Skip to content
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

Merged
merged 35 commits into from
Jun 2, 2024
Merged

WIP Channel Estimation #8

merged 35 commits into from
Jun 2, 2024

Conversation

marenz2569
Copy link
Member

Closes #4

Copy link
Member

@tanneberger tanneberger left a 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.

private:
void upperMacWorker();

std::complex<float> hard_decision(std::complex<float> symbol);
Copy link
Member

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_{};
Copy link
Member

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_{};
Copy link
Member

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_;
Copy link
Member

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 {
Copy link
Member

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;
Copy link
Member

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);
Copy link
Member

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); });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nice !

}

void IQStreamDecoder::upperMacWorker() {
while (true) {
Copy link
Member

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

}
}

std::vector<uint8_t> IQStreamDecoder::symbols_to_bitstream(std::vector<std::complex<float>> const& stream) {
Copy link
Member

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 {
Copy link
Member

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&

@marenz2569 marenz2569 force-pushed the feature/channel-estimation branch from 8f029f3 to 722a1fa Compare January 28, 2024 01:48
@tanneberger tanneberger merged commit 73f0bde into master Jun 2, 2024
1 check failed
@marenz2569 marenz2569 deleted the feature/channel-estimation branch June 4, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement channel estimation
2 participants