Git Product home page Git Product logo

Comments (4)

tapparelj avatar tapparelj commented on August 9, 2024

Hello @sadsnow,
when you say original preamble symbols, you mean the ones without sampling time offset (STO) but still with carrier frequency offset (CFO) and sampling frequency offsets (SFO)? Or the ones after all offsets estimation and compensation?
If you want the first case, I think that the easiest place to extract it is after line 664 from the corr_preamb. Else, it would be after line 673.
(I haven't tried, only looked at the code. So don't hesitate to comment if it doesn't work as expected.)

from gr-lora_sdr.

sadsnow avatar sadsnow commented on August 9, 2024

@tapparelj @
Hello, and thank you very much for your response.
I have tried running the code at the two locations you mentioned and noticed that the output dimension is 128*8. Is this the dimension after down sampling?

This dimension does not align with my expectation for the 8 original preamble symbols. I am looking for the original preamble signal, calculated based on a sampling rate of 1Mbps, with a spread factor (sf) of 7 and a bandwidth (bw) of 125kHz. The expected signal dimension, calculated according to the sampling rate and symbol transmission time, should be 8*1024=8192. In the code, this dimension is described as preamble_len * samples_per_symbol = 8*1024=8192.

In essence, in addition to understanding the implementation and data collection locations of STO, CFO, and SFO, I am particularly interested in locating and extracting the raw data of the original preamble. How can I determine the exact positions of the 8 preamble symbols and extract this set of data?

Thank you again for your guidance on this matter. I look forward to your response at your earliest convenience.

`
std::rotate(corr_preamb.begin(), corr_preamb.begin() + mod(m_cfo_int, m_number_of_bins), corr_preamb.end());

std::cout<<"dim of corr_preamb:"<<(m_n_up_req + additional_upchirps) * m_number_of_bins<<std::endl;
std::cout<<"m_os_factor:"<<m_os_factor<<std::endl; // also confused about m_os_factor and no answer
std::cout<<"preamble_raw_size"<<(m_preamb_len) * m_samples_per_symbol<<std::endl; // 8*1024

std::ofstream fout("/home/user4/Desktop/preamble.txt", std::ios::out|std::ios::app);
for(int i =0;i<(m_n_up_req + additional_upchirps) * m_number_of_bins;i++)
{
fout<<"this is i"<<i<<": "<<corr_preamb[i]<<std::endl;
}
fout.close();
`

Hello @sadsnow, when you say original preamble symbols, you mean the ones without sampling time offset (STO) but still with carrier frequency offset (CFO) and sampling frequency offsets (SFO)? Or the ones after all offsets estimation and compensation? If you want the first case, I think that the easiest place to extract it is after line 664 from the corr_preamb. Else, it would be after line 673. (I haven't tried, only looked at the code. So don't hesitate to comment if it doesn't work as expected.)

from gr-lora_sdr.

tapparelj avatar tapparelj commented on August 9, 2024

Hello,
so if you want to get the samples before decimation, you should get them from preamble_raw_up before line 662.
The upchirps samples will be in that vector, but the STO is not corrected yet (i.e. the first sample of the vector is not the first sample of the preamble).
If you want to realign this vector you need to realign it yourself following a similar procedure as the one performed on the downsampled preamb_correct in line 662 and 664.

from gr-lora_sdr.

tapparelj avatar tapparelj commented on August 9, 2024

As it has been some time without follow-up, I'll close the issue. Don't hesitate to reopen it if needed.

from gr-lora_sdr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.