Building modified krakensdr_doa

Hi all. new to Kraken and stoked to be here. I’ve got everything up and running quite easily. Instructions were great so thanks for that! I want to start messing around with modifying the software but I am new to building for Pi. Can someone point me to some resources for how to get started compiling custom Kraken code for Pi?

Hi, what sort of custom code are you looking at creating?

The majority of the code is in Python, so it’s as simple as editing the code, then running the start script to see your changes in action.

I am working on implementing a function to calculate the distance between sources.

My background is in embedded C so I’m struggling to understand what code is running when. I had planned to use logging.info() to print out flags to mark when and where but am stuck because I’m unable to find the path that the logging info is being written to.

Any help getting up and running would be greatly appreciated!

If you want to use the logging feature you need to edit the settings.json file to set the logging level threshold lower, to say 2 or 1.

Alternatively, you can simply using the print function to print to the terminal.

I started by attempting to use print functions but they weren’t showing on the terminal. I figured either I was somehow implementing them wrong, or stdout was somehow being redirected, or the object I wrote the print in was not being called. My hunch is that its the latter. My hunch is that I don’t correctly understand how the whole chain of programs are running. Are there any block diagrams available that show how each piece is interacting with each other?

The Heimdall doc explains the architecture in detail, but it is a little outdated now. The basics are still there though.

I found this PDF in the HDAQ folder. It is useful but I’m still not able to build a picture of how the system operates. Basically looking to build a flow chart that looks something like “Pi boots up → XXX script runs starting H DAQ → H DAQ runs _daq_core items → H DAQ starts Kraken DOA → etc, etc, etc…”

This example is obviously wrong as I wouldn’t be asking for help if I knew how to draw it right! Currently Im digging through all the code to try to build this flow chart myself but if you have one already built it would be greatly appreciated!

Specifically this question comes from my trying to figure out how/when the _signal_processing module gets called? If I run kraken_doa_start.sh, then it runs (I’m confirming this with print statements). But when I power cycle the system and let the auto execution start everything, I don’t see the print statements. So either its not running (which I doubt because I can see the DOA estimation being displayed by the GUI and Android device) or print() is not being sent to stdout? I don’t know what Im doing wrong here.

Thanks!!!

It’s something like

Pi boots → runs the start.sh script in the /boot folder → runs the kraken_doa_start.sh script → which runs the heimdall DAQ start script → then the DOA start script.

It’s possible that the last statement in the DOA start script to start the php or nodejs server is blocking print statements. Try comment that out as those programs are only for uploading data to the Kraken Android App, or the Kraken web app.

You sir are awesome! thank you so much for answering all my silly questions! I don’t know if you drink beer but if we ever cross paths the first round is on me!