01-20-2010 07:51 PM
Hi, I am working on the example module "niGPS Write Waveform To File". I use the default settings to generate the baseband signal.
Now I am tring to simulate if there is a GPS signal in it. I read signal from the file into matlab, and try to acquire a GPS satellite, but cannot find it.
I checked again and again, do not know what's wrong with it.
01-21-2010 02:53 PM
Hello usami,
This is most likely due to incorrectly reading the data from the binary file. The file is a 1D Array of I16s that is interleaved I and Q data with a 512 byte header.
The header consists of 8 bytes of version information for the version of GPS toolkit used to generate the file, 16 bytes for the IQ rate and peak power of the waveform and 488 bytes of that are used for padding. Without accounting for this header data you will be unable to accurately reproduce the waveform that follows.
When using the GPS toolkit and an RF Upconverter in LabVIEW you would then upconvert and generate the resulting waveform using the niGPS Streaming From File VI.
Exactly how are you using Matlab to simulate the GPS signal in the file. How are you trying to acquire a GPS satellite?
Regards,
Dan King
01-22-2010 09:26 AM - edited 01-22-2010 09:28 AM
Dan_k
I just wanted to confirm if there is indeed GPS signal. I just read the binary file in Matlab as I16 data format, I used the command to read the binary file: fread(fid, 1, 'int16'); and used traditional acquisition method to check the GPS signal. But I could not find it.
01-25-2010 06:49 PM
Hello usami,
The data generated is an interleaved IQ waveform of a baseband GPS signal. As I said before, there is also a 512 byte header that needs to be accounted for. As for checking the signal in Matlab, if you are using functions that will accept this type of data it should have no problem detecting the GPS signal in the data. If your functions require the data to be in another form, you will need to first modify the data so that it is in a form that your functions can properly interpret.
Let me know what kind of format is required by your functions for analysis and I will do my best to make a recommendation as to how to realign the data to your needs.
Regards,
Dan King
01-27-2010 05:19 PM
Could you show me how to read it? I am not sure which part is wrong, the reading functions or the analysis functions. Thanks!
Dan_K wrote:Hello usami,
The data generated is an interleaved IQ waveform of a baseband GPS signal. As I said before, there is also a 512 byte header that needs to be accounted for. As for checking the signal in Matlab, if you are using functions that will accept this type of data it should have no problem detecting the GPS signal in the data. If your functions require the data to be in another form, you will need to first modify the data so that it is in a form that your functions can properly interpret.
Let me know what kind of format is required by your functions for analysis and I will do my best to make a recommendation as to how to realign the data to your needs.
01-28-2010 04:45 PM
I am unfamiliar with how to perform this type of operation in Matlab, but the steps you need to perform would be something like this.
Regards,
Dan King
06-16-2011 04:29 AM
I have the same problem. I have already read the values but it seems that one of them (I, Q) is always 0. This is a sample of consecutive values:
10496
0
-27651
0
-2307
Thank you for your help.
06-17-2011 03:01 PM
Hi Japm,
Is it always I or Q that is zeor, or does it sometimes swap which is zeroed?
Are you also reading your I/Q into MatLab?
More info on your signal and what you are expecting to see would be very helpful.
06-28-2011 05:49 AM
Thank you and sorry for my late replay, I was waiting to be notified automatically 😞
I generated the bin file with the "niGPS Write Waveform to File VI", from the GPS toolkit, without making changes. I'm waiting for an IQ signal that corresponds to only one satellite.
I'm trying to read the signal with MATLAB according to your instructions (I think I'm doing it right, it's easy) to use it on a program that identifies the satellite code from the IQ signal. Before using my MATLAB program, I find that the IQ signal that I read it's not right, the zeros always appear with the same pattern (only on Q).
I'm expecting to see a whole IQ GPS signal corresponding to only one satellite. I'm waiting for signals on both 'channels' I and Q different to zero. After that I will try to confirm that I use right the signal.
06-29-2011 01:52 PM
Hey japm,
There are three versions of the GPS Write Waveform to File example code. Are you using the (single satellite, manual mode) version? If so, you will not get Q data unless you add some amount of Doppler Shift.
If you want better, easier GPS data then I recommend using the (Simple, Automatic) version of the example code. I ran that one on my computer and got Q data with the default settings. Are you reading your BIN file in LabVIEW?
Let me know!