Direction Finding and linking existing KiwiSDRs

2

Comments

  • You might want to have a look at the latest commits which are for compatibility with Windows but have not been tested on Windows.

    73
    Christoph
  • Hi linkz & Christoph,

    Thanks for this.

    I can't do much more until towards the end of this week, but I may well take you up on the offer of help regarding the Linux box.

    Regards,

    Martin
  • Christoph

    At first I want to thank you so much for your work, I was waiting for a long time for the working files from your blog & git and now my HFDF dream came true. Also thanks to John with his KiwiSDR hardware/GPS timestamps in wavs ;)

    I have tested the Windows version, so far no success, Octave (4.2.1 / 4.2.2 - 32bits) on Win7 32/64 crashes when it start computing. I have tested it on 2 different laptops, but i still have one more win7 at home, trying on it later

    Here is the error: http://81.93.247.141/~linkz/directTDoA/octave-win-crash.jpg

    FYI: octave-worskpace file contains "Octave-1-L " only

    running the Octave process step by step, it looks like it crashes when it reach lines 27,28 of proc_kiwi_iq_wav.m


    &linkz
  • I don't deserve much credit here. Christoph is responsible for the GPS timestamp work and crucial fixes/improvements to the Galileo code. And Dmitry (dev-zzo@github) is entirely responsible for the initial kiwiclient/kiwirecorder work.
  • Hi linkz,

    this is an error in the .oct file generated by read_kiwi_wav.cc and I suspect it is because Visual Studio ignores __attribute__((packed)) which is crucial for the 'kiwi' chunk.

    Can you make a test using the current master tag https://github.com/hcab14/kiwiclient ? I have added compile-time checks to catch such errors and also one run-time check which raises an octave error if the file does not exist.

    73
    Christoph
  • Have this

    >> mkoctfile read_kiwi_iq_wav.cc
    read_kiwi_iq_wav.cc: In constructor 'chunk_kiwi::chunk_kiwi()':
    read_kiwi_iq_wav.cc:63:5: error: static assertion failed: chunk_kiwi has wrong packed size
    static_assert(sizeof(chunk_kiwi) == 8+10, "chunk_kiwi has wrong packed size");
    ^
    warning: mkoctfile: building exited with failure status
    >>
  • Which compiler are you using? i.e. what does 'mkoctfile -v read_kiwi_iq_wav.cc' say?
  • On GNU Octave 4.2.1 32bits
    >> mkoctfile -v read_kiwi_iq_wav.cc
    read_kiwi_iq_wav.cc: In constructor 'chunk_kiwi::chunk_kiwi()':
    read_kiwi_iq_wav.cc:63:5: error: static assertion failed: chunk_kiwi has wrong packed size
    static_assert(sizeof(chunk_kiwi) == 8+10, "chunk_kiwi has wrong packed size");
    ^
    g++ -std=gnu++11 -c -I/scratch/jwe/mxe-octave/4.2.1/w32/usr/i686-w64-mingw32/include -IC:\Octave\OCTAVE~1.1\include\octave-4.2.1\octave\.. -IC:\O
    ctave\OCTAVE~1.1\include\octave-4.2.1\octave -IC:\Octave\OCTAVE~1.1\include -pthread -fopenmp -mieee-fp -g -O2 read_kiwi_iq_wav.cc -o read_kiw
    i_iq_wav.o
    warning: mkoctfile: building exited with failure status
    >>



    On GNU Octave 4.2.2 32bits
    >> mkoctfile -v read_kiwi_iq_wav.cc
    read_kiwi_iq_wav.cc: In constructor 'chunk_kiwi::chunk_kiwi()':
    read_kiwi_iq_wav.cc:63:5: error: static assertion failed: chunk_kiwi has wrong packed size
    static_assert(sizeof(chunk_kiwi) == 8+10, "chunk_kiwi has wrong packed size");
    ^~~~~~~~~~~~~
    g++ -c -I/home/jwe/build/mxe-octave-w32-stable/usr/i686-w64-mingw32/include -IC:\Octave\OCTAVE~1.2\include\octave-4.2.2\octave\.. -IC:\Octave\OC
    TAVE~1.2\include\octave-4.2.2\octave -IC:\Octave\OCTAVE~1.2\include -fopenmp -mieee-fp -g -O2 read_kiwi_iq_wav.cc -o read_kiwi_iq_wav.o
    warning: mkoctfile: building exited with failure status
    >>


    I'm going to sleep, cu tomorrow

    73
    &linkz
  • Hi @linkz,

    please try the latest git master and let me know if it works. I was able to reproduce your problem and found this explanation
    https://stackoverflow.com/questions/32808572/why-g-isnt-performing-structure-packing-here
    i.e. __attribute__((packed)) is currently broken on mingw g++ compilers, and mingw g++ is used by octave on Windows.

    @jks: looks good

    73 Christoph
  • For this to work, does the GPS need a good fix, or is the timing information from a few satellites sufficient? I'm wondering if I need to bump up the priority on installing a better antenna on the rooftop.
  • Hi @Christoph

    I've just tried the latest repo, now the .cc is compiling OK but still have that same error

    81.93.247.141/~linkz/directTDoA/octave4.2.2-win-bug-latest.jpg
  • edited July 2018
    sorry for those duplicates, something went wrong it seems :'( [fixed -jks]
  • Strange. For me it works (Windows 10 and octave 4.4.0), see the attached screen shot
    image

    Can you double-check that the .wav files in the iq folder are complete?

    One minor comment is that it is not necessary to copy all .m files from m/ and kiwiclient/ to the TDoA directory. octave does find these files, see .octaverc. Also the .oct file can be in kiwiclient/ and it should work.

    Attachments:
    https://forum.kiwisdr.com/uploads/Uploader/61/a5f06ecf23bf1ad14e7db60021a379.png
  • ... the IQ WAV files should have the sizes shown below
    image

    Attachments:
    https://forum.kiwisdr.com/uploads/Uploader/b9/4ab41f3fed15d3943dfbbabf7efac5.png
  • edited July 2018


    Trying with GNU Octave 4.4.0 to see, but i had problems to install "signal" pkg in the past

    Ok for your comment, I should launch Octave in a way that it does not read the .rc because it complains on missing files
  • These WAV files are too large. Did you clone the GitHub repository or download it as a zip file?

    When I installed octave using the windows installer all packages were already there, so on Windows there is no need to install the signal package by hand.
  • jksjks
    edited July 2018
    @W1EUJ Currently position solutions requiring 4 or more satellites are needed to get timing solutions. Although Christoph has a method using a Kalman filter in which individual pseudo-ranges from a single satellite can generate subsequent timing solutions (if I remember correctly). This code is not yet integrated into a Kiwi release.
    W1EUJ
  • @linkz: when reading your screenshot more carefully I realized that the .wav files have indeed the right size. I got confused by the spaces between the numbers, i.e., "1 424 874" vs. "1424874".

    The only other thing I can think of is that somewhere in your octave path there is an old version of read_kiwi_iq_wav.oct.
  • @Christoph: I've tried with Octave 4.4.0, still having the same error and crash
    Wonder why it's not working on that laptop (Win7 SP1 32bits)
  • Hi linkz,


    I'm still getting lots of Ubuntu error messages


    Exception in thread Thread-3:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
    File "directTDoA.py", line 267, in run
    "~" + str(filename[17:]) + " - " + str(os.path.getsize(wavfiles) / 1024) + "KB")
    File "directTDoA.py", line 1040, in writelog2
    self.Text3.delete("0.0", END)
    File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2975, in delete
    self.tk.call(self._w, 'delete', index1, index2)
    RuntimeError: main thread is not in main loop


    I'd like to take you up on your offer of some remote help with the setup, can you send me a private email ?

    martinmail2007-forum@yahoo.com


    Thanks,

    Martin - G8JNJ
  • v1.196 is out with a beta version of the TDoA extension. Click the green help button at upper left of the extension panel for some instructions.

    More improvements are in the works, like automatic detection of Kiwis that have had recent GPS solutions and their inclusion on the Google map (only a small number of EU Kiwis are listed now).

    If anyone knows how to map linear lat/lon coordinates to the Mercator projection that Google maps uses then I'd like to talk to you..
  • Hi John,

    Excellent and very timely :-)

    There is currently a problem with a military FSK signal in the 40m amateur band that folks have been trying to ID. I ran a TDoA on it this morning and was able to narrow down the likely transmitter site fairly accurately (given the number of KiWi's currently listed.

    So a big thanks to all concerned especially John, Christoph, linkz and others who have managed to make this work.

    I don't think I'm overstating it when I say that this is likely to be a real game changer, especially when trying to ID unknown or interfering signals and makes what would previously have been only within the capability of national regulators or the military available to everyone.

    This is truly ground breaking.

    Regards,

    Martin - G8JNJ
    WA2ZKD
  • The v1.197 update in about 12 hours will have the map fully populated with all Kiwis that have had a GPS solution within the last minute. To my surprise there are slightly over 100 in that category.

    The next step will be to add the per-Kiwi SNR statistics.
    G8JNJWA2ZKDChristoph
  • edited July 2018
    WOW! I need to upgrade my GPS antenna ASAP.

    edit: Installed one of those PCTEL 40 dB timing antennas - consider W1EUJ upgraded and ready for TDoA.
  • I have used those PCtel 40dB units for several things. High performance for <$50. They are no longer used for cell towers, replaced by ones with cross band filters, so $high for $low!
  • @jks: this is great news
  • edited July 2018
    Hi John,

    I've had a lot of fun today playing with the TDoA extension.

    A couple of observations

    I'm not sure if the recordings default to I/Q mode if another mode is selected on the KiWi but if it they don't maybe it should be forced when the TDoA extension opens up ?

    After a few runs I have to refresh my Chrome browser as when I change to a new signal and refresh the SDR's to be used, it fills the list from near the bottom and will not allow any more SDR's to be added. Once I have refreshed and reopened the extension it fills from the top again.

    Regards,

    Martin - G8JNJ
  • @linkz: sorry I cannot reproduce your error. Can you find out where exactly the exception 'bad_alloc' comes from and for which chunk the 'unknown chunk' message appears?
  • @G8JNJ
    Forcing IQ mode: good idea, I'll try it.
    List filling up: Are you using the red "scissors" icon to cut (clear) old list entries you don't want? Is this not working for you? Works for me with Firefox and Chrome.
This discussion has been closed.