Thursday, May 13, 2010

Linking PRIMO with gps-sdr

Hello,

just finished adapting the open-source project www.gps-sdr.com to use PRIMO. On our Ubuntu Karmic 32bit laptop runs nicely but still uses a lot of resources (especially the GUI). The effect is nevertheless outstanding!

Figure 1: The gps-sdr GUI running with PRIMO (PVT window).

Figure 1: The gps-sdr GUI running with PRIMO (alm. and eph. window).


I really have to congratulate with Gregory Heckler and his colleagues for the fantastic job they have done so far. Every PRIMO user can now also enjoy their open-source receiver.

Thank you guys,
Michele


P.S. On their project website you should be able to find the archive with a preliminary snapshot of the code. Compile and run the GUI with ./gps-gse and the receiver with sudo ./gps-sdr -primo. I had no time to test it with the USRP 'cause we only have tweaked ones in the lab.. just be aware I tuned the scaling in acquisition and correlators.

25 comments:

克·单 said...

Good job Michele! I only have max2769 evaluation kit and I download gps-sdr but I don't have PRIMO. Can I do the same thing you did? Just use max2769 evaluation kit as front end?

Please advise

Thanks
Dan

Michele said...

Hello Dan,

yes you can, but the MAX2769 misses is a Data AcQuisition System. So if you get yourself a DAQ of some sort you'll be able to use gps-sdr.

Regards,
Michele

Cristian Paul said...

There is some documentation about how to get compiled gpsd-sdr gui as you show it is posible, and the other question is, can i just simulate the data output that sdr requires to work do you have examples of it?

Viktar Palstsiuk said...

Is PRIMO support added to gps-sdr.com repository?

Michele said...

for Cristian:
I think the documentation was in the repository at some point, but links are now broken, I shall see if I can find it back inside old copies of the gps-sdr archive.

for Viktar:
I did add a snapshot of the software on the forum, but the post has been removed after being flooded with spam. If you give me an email address, I can send you a copy.

Bests,
Michele

Viktar Palstsiuk said...
This comment has been removed by the author.
Viktar Palstsiuk said...

vipals@gmail.com

Cristian Paul said...

hey, great if you can make this documentation public again, in the man time my mail kristian.paul at g m a i l dot c o m in case you can send it easilly

thanks for answer

Cristian Paul said...

BTW whats the accuracy that can be achieved using this sofware gps-sdr and the PRIMO receiver, a friend is interested in aplication related to GISS (Open GISS) so i'm asking that for him

Michele said...

Cristian,

gps-sdr is a project developed by Gregory Heckler, who's an aerospace engineer at NASA. Since I did not touch the positioning part of the receiver, this question is best asked him.

If you need to try the gps-sdr with a file, you could have a look at the second revision which has been released on the 9th of June (as far as I understand they fixed the file input).

Cheers,
Michele

克·单 said...

Michele,

I would like to know how fast laptop need used if I want real time mode with PRIMO.

Also, Just curiosity, how long have you non-stop run PRIMO, beyond 24 hours?

Michele said...

Hi,

the Primo version of gps-sdr requires roughly the same processing power as the USRP version of gps-sdr does.
I am pretty sure Gregory Heckler has run extensive stress test on his receiver, but surely I haven't. Again, gps-sdr is an amazing Open-Source tool distributed without taking any liability and as has to be taken as such.

Cheers,
Michele

Marlon Bright said...

Michele,

Do you know if the gps-sdr code can run on 64 bit Ubuntu or is the 32-bit version required?

Thanks
Marlon

Michele said...

Hi Marlon,

The last version of gps-sdr from the repository has some non portable assembly code which won't compile on 64-bit machines. Either disable the inline assembly code, or take some files from my Primo version, where I updated the assembly code.

Bests,
Michele

knowledge flow said...

Hello Michele,
I am able to run the entire GPS receiver. Thanks for your great work. I have few questions like

1. Up to my analysis the input file on your blog is having an intermediate frequency of 4.092 khz. Is this correct.

2. I want to know where you are compensating this IF. I saw that by the time you are entering in to acquisition block your IF is zero.

Can you please give details regarding Intermediate frequency part of processing.

Thanks

Michele said...

Hi,

The intermediate frequency is 4.092MHz, or 4092kHz.

I am compensating the IF by demodulating the signal. When the IF is one quarter of the FS the demodulation operation is conveniently done by changing signs of samples in a defined pattern, which greatly simplifies the process. In fact in the software the demodulation is done by a LUT.
I hope this helps.

Best wishes,
Michele

Mário said...

Hello Michele;

I am working in gps-sdr receiver with a USRP1 and DBSRX. Now I have compiled the gps-sdr and I can run the ./gps-sdr and ./gps-gse, for that I run first the command sudo ./gps-sdr –gr 30 –gi 40 –x –v on one terminal and then ./gps-gse on other.

During the run of the gps-sdr and gps-gse the values of ‘Execution Tic’ from ‘TRACKING’, ‘PVT’, ‘ACQUISITION’, ‘SV_SELECT’ and ‘TELEMETRY’ increase constantly, but I never obtain a single PVT position. Can you explain me why?

You know where can I get more information about gps-sdr project?

Best regards;
Mário

Michele said...

Dear Mario,

There can be many reasons, but I suspect a simple poor antenna placement. The main limitation of GPS-SDR is the sensitivity.

AFAIK, the project is not maintained any more, but GNSS-SDR might be:
http://gnss-sdr.org/

This blog is also very useful:
http://gnss-sdr.ru/index.php?blogid=2

Cheers,
Michele

Mário said...

Dear Michele;

Can You inform me about the gain that you have used in the command ./gps-sdr?

I use an antenna from a RTK module that has 27dB of gain when biased, what gain should have it the ./gps-sdr command?

Best Regards;
Mário

Michele said...

Dear Mario,

No I can't:
1) I am not a maintainer of GPS-SDR 2) I adapted GPS-SDR to work with Primo so the gain settings where not influent

Cheers,
Michele

Mário said...

Dear Michele;

First of all, thanks for your answers.

I am not figure out why I can not acquire gps with gps-srd. I have the gps-sdr code from this blog, I can run that, and also acquire gps positions from the file recorded with Primo (with the link in this blog). But when I try to use my USRP, I can not have any GPS position.

I use an USRP1, a DBSRX-LF REV2.2 with the jumper J101 connected and a antenna ANN-MS0-005 from u-blox. When I use the command './gps-sdr -v' it return this in my prompt:

Verbose: 1
Log channel: 0
Telemetry: 0
USRP Decimation: 16
USRP Sample Rate: 64000000.00
DBSRX LO A: 1575420000.00
DBSRX LO B: 1227600000.00
RF Gain: 30.00
IF Gain: 10.00
DBSRX Bandwidth: 6000000.00

Detected MMX
Detected SSE
Detected SSE2
Detected SSE3
Detected SSSE3
Cleared Pipes Init
Creating Keyboard
Creating Acquisition
Creating Ephemeris
Creating SV Select
Creating Telemetry
Creating Commando
Creating PVT
Creating Channel 0
Creating Channel 1
Creating Channel 2
Creating Channel 3
Creating Channel 4
Creating Channel 5
Creating Channel 6
Creating Channel 7
Creating Channel 8
Creating Channel 9
Creating Channel 10
Creating Channel 11
DBS-RX A Configuration
BW: 5885000.00
LO: 1575500000.00
IF Gain: 10.00
RF Gain: 30.00
DDC 0: 80000.00
USRP Start
Creating GPS Source
Creating FIFO
Creating Patience
Creating Correlator
Cleared Object Init
Keyboard thread started
PVT thread started
Correlator thread started
Acquisition thread started
Ephemeris thread started
Commando thread started
SV_Select thread started
Telemetry thread started
FIFO thread started
GUI connected
acq success for sv 0 at doppler 1250 and codephase 719, magnitude 118129349
Patience thread started
acq success for sv 1 at doppler 6500 and codephase 1300, magnitude 162508177
acq success for sv 2 at doppler -5000 and codephase 200, magnitude 113068717
acq success for sv 3 at doppler 12750 and codephase 992, magnitude 126611305
acq success for sv 4 at doppler -7000 and codephase 1308, magnitude 96502541
acq success for sv 5 at doppler -10750 and codephase 234, magnitude 130096132
acq success for sv 6 at doppler -11250 and codephase 316, magnitude 150578962
acq success for sv 7 at doppler -7750 and codephase 1124, magnitude 139362866
acq success for sv 8 at doppler 0 and codephase 1309, magnitude 134103780
acq success for sv 9 at doppler -4000 and codephase 1206, magnitude 117470665
acq success for sv 10 at doppler -750 and codephase 793, magnitude 113145754
acq success for sv 11 at doppler 3250 and codephase 1426, magnitude 123148097
....

and in the ./gps-gse, the 'Channel' window shows the values of the diferent channel, but the information from one channel disapears when the 'Active' collun pass the 29 value. After that the information of that channel reappears and the same happen again when 'Active' collun pass the 29 value.

I already tried to put the antenna on a open space without obstacles around, but the result is allways the same, even if I simply disconnect the antenna from USRP.

What I am doing wrong?

Best regards
Mário Lima

Michele said...

Hi Mario,

I can just look quickly into this as I don't even have a USRP.

Anyway, if you do have an USRP (and not PRIMO) I suggest you to use the code from the official repository:
https://github.com/gps-sdr/gps-sdr

as my changes surely affected the compatibility with the USRP.

In fact I think I removed the 38.4kHz IF that the USRP had to emulate the GN3S frequency plan, and I tuned the scaling in the fixed-point operations of both acquisition and tracking for a two bit ADC.

Basically it's not so simple if you don't have PRIMO (or similar).

Sorry,
Michele

knowledge flow said...

Hi Michele,

Thanks for your great work. I am able to run entire receiver with your binary file on blog.

When I am converting gps binary files from Ako's book to the specifications of primo input binary file:

Fs= 5.456 MHz
If= 4.092 MHz
Integer type= 'uint8'

I am unable to track any satellites and position. can you tell me the reason..

Whether my specifications of primo input file are true or not. Please guide me.

Thanks

Michele said...

Hi,

The specifications of the file are no secret. I just don't understand why you insist on using the 'uint8' type as the samples ARE NOT unsigned.

The way you do the conversion of the files from Akos' book is unknown to me so I can't tell what is not working.

What I know is that their software does not work "as is" with files having an IF greater than FS/2, so you may have to tweak the code a little. You will notice the problem above if you look at the table of Doppler shifts calculated by the acquisition script. This does not happen with the files coming on the CD with the book.

Cheers,
Michele

knowledge flow said...

Hi Michele,

The base buffer (primoBuffer), which holds the samples from file is of uint8 type . This misguided me. Could you please give me the specifications of the input file and also what are the precautions i have to take in generating similar kind of input file as in your blog at your convenience.

Thanks

Regards,
Dushyanth