Alternatives for external USB GPS

I am currently using the RPi 4 image and am looking for a potential alternative method to provide GPS to the Kraken software.

Lets say for example I have GPS packets on my network via UDP (broadcast for simplicity). I have the code to parse the GPS messages on the network, and have that data ready to pass to the Kraken. Is there somewhere I can hook this data into in order to provide some redundancy or customization to the devices providing GPS data?

My other thought was maybe set the ‘Location Source’ to ‘Static’, and have the settings.json file update with incoming packets (lat/long/heading) on a certain interval, but I don’t know if that would be a suitable use case for the Kraken or even supported at this point.

Secondarily, what is the maximum range we could theoretically detect a signal accurately? I know that’s a loaded question and difficult to quantify because it relies on so many external factors, but realistically, does anyone have an idea of max range?

If you have GPS packets via UDP that’s something you’d need to write some custom code for in krakensdr_doa/_signal_processing/ at main · krakenrf/krakensdr_doa · GitHub

You could also just update settings.json, but changes to that file are only checked for every few seconds, so it wouldn’t update rapidly.

Any reason not to just use a USB GPS?

For max range, we get this question a lot, but it really isn’t something that can be answered easily. Basically if you can receive the signal, you will get a bearing. But if it’s far away and there are many obstacles in the way, obviously multipath is going to distort it. Then it also depends on how many readings you can take at different locations.

Excellent thanks for the insight Carl. I think updating settings.json is out of the question at this point. I am looking for something more real time.

I would use a USB GPS, but our system has an external GPS that is serving another purpose, and adding another small USB GPS to the Pi might muddy the waters on which GPS device is doing what. The external GPS is just a standard NMEA that we have an application translating from USB serial to UDP multicast for multiple applications to ingest at the same time.

Regarding max, I figured that would be the answer but I had to ask out of sheer ignorance.

In order to implement the changes I want to feed external GPS to the kraken, I need to include a new library from pip (pymavlink). I have done as much but end up not being able to load the module when running inside the

Is there a special way I need to link the library into the project? I am able to use it on the Pi outside of the project, but once I add ‘from pymavlink’ in krakenSDR_singal_processor, I am getting a module not found exception.

Any advice?

You need to install within the conda environment.

So do a

conda activate kraken

and then install your package via pip.

Someone just pointed out to me that gpsd actually does already support UDP input sockets. You just need to edit the config at /etc/sysconfig/gpsd.

So it might be a good idea to have a read up on the gpsd docs first to see if it does what you need as that is already built into the KrakenSDR code.

Perfect, thank you again Carl!

In regards to using an external USB GPS module, are there any configuration steps that need to be performed prior to using the USB GPS data? Is it automatic, or does this need to be specifically commanded?

If it’s a standard USB GPS that is supported by gpsd, you don’t need to do anything, other than set the “Location Source” setting to “GPS” in the web GUI.

Then if you are using the Android app, make sure to set the Bearing Mode (to be renamed to Heading Sensor in the upcoming new version) to “Kraken”.

Thank you, Carl! I appreciate your prompt reply! I will make the change in the Kraken app to point to the Kraken for bearing/Heading mode.

Thanks for a great piece of equipment/ software!


1 Like