Jump to content

Alexey

Members
  • Content Count

    34
  • Joined

  • Last visited

Everything posted by Alexey

  1. Alexey

    Start at Boot

    Is an app required to have a Service component in order to use the "Start at Boot" feature or having only the Gui component is enough?
  2. Alexey

    Start at Boot

    Thank you! I don't suppose an app has a way to know that it was started at boot?
  3. Alexey

    Delete record file

    How do I remove a recorded QVRT file? Is it a reliable way to construct the path manually using WbtCommon::Data::FileInfo contents and then pass it to QFile::remove() or is there an API method? For example: const WbtCommon::Data::FileInfo file = WbtApi::WbtSystem().getRecordingList()[0]; const WbtCommon::Data::WbtStatusData status = WbtApi::WbtStatus().getCurrentStatus(); QString mountPoint; switch(file._diskSlot) { case WbtCommon::Data::DATA_DISK_1: mountPoint = QString::fromStdString(status._systemVolumesStatus._DataDisk1VolumeStatus._mountPoint); break; case WbtCommon::Data::DATA_DISK_2: mountPoint = QString::fromStdString(status._systemVolumesStatus._DataDisk2VolumeStatus._mountPoint); break; } if(!mountPoint.isEmpty()) { const QString path = mountPoint + QDir::separator() + QString::fromStdString(file._fileName) + ".qvrt"; QFile::remove(path); }
  4. Alexey

    Interact with App Icon

    When app is running, how to catch the click on app icon (available on the toolbar below "Help" button) to perform a custom action? For example, the "Live Preview" shows the "Viewer Settings" dialog upon clicking on its icon.
  5. I need to play a file with CF different from the one file was recorded with. To do this for file recorded with Combined tuners, I take the radio settings from the file, call combineTuners() with new CF and then call updateTunerSettings() with new settings. In my understanding, the combineTuners() method should only change the CF of radios, but it also changes the spans and sets them to 25/25/50. For example: Before - [A: CF=989.7, SP=22.8889; B: CF=1010.3, SP=22.8889; AB: CF=1000, SP=45.7778], after combineTuners(2000) - [A: CF=1987.5, SP=25; B: CF=2012.5, SP=25; AB: CF=2000, SP=50]. Before - [A: CF=849.082, SP=42; B: CF=889.082, SP=42; AB: CF=869.082, SP=84], after combineTuners(1200) - [A: CF=1187.5, SP=25; B: CF=1212.5, SP=25; AB: CF=1200, SP=50]. Why does it happen and is there another way to play the file with different center frequency?
  6. Alexey

    QVRT Context packet Metadata Timestamp

    Currently I'm only interested in Combined Radio_AB case, as the app I'm working on works only with Single or Combined. I would not want to make things too complicated, so if I can safely assume that both streams run with the same speed it would be great. I'll keep in mind that DualTuner Radio_AB case is more complicated. Thank you all for the explanations!
  7. Let me describe the issue that I have. There is a file which contains data from both tuners and TunerA sample rate is 42 MS/s and TunerB is 13.3 MS/s. The app dumps the processed packets number and encountered metadata (WbtVRTFileReadIterator::getCurrentMetadataAsJSON) to debug output. I start processing TunerA data. The first metadata has "GPS Fix UTC Seconds" value of 1446218004. By the time app processed 815M samples (which should constitute approx. 19 seconds of data) the metadata timestamp is 1446218019 - only 15 seconds later than the starting value. The difference is even bigger in case of TunerB. After processing 250M samples (~18 sec.) the metadata timestamp is 1446218009 - moved forward by only 5 sec. What is happening here and is it the expected behavior?
  8. Alexey

    QVRT Context packet Metadata Timestamp

    I examined several files with Combined tuners, looked into their "_radioSettings" variable. In every file the sample rate of each tuner was exactly 1/2 of combined sample rate, for example [A:42, B:42, AB:84], [A:41.6667, B:41.6667, AB:83.3333], [A:25, B:25, AB:50], [A:26.2417, B:26.2417, AB:52.4833]. But you're saying it's not strictly defined and I can't rely on this?
  9. Alexey

    QVRT Context packet Metadata Timestamp

    Sorry, I still don't get it. If I understand correctly, tuners record simultaneously during Combined config and the packets go like this: [A B A B ...], and I need to read them in the same order, not [A A ...] [B B ...]. Am I right?
  10. Alexey

    QVRT Context packet Metadata Timestamp

    Won't it violate the temporal integrity if I read all A samples and then all B? Also, if I need to process only part of the file (that is, need to stop after certain amount of samples) - it would read some A packets and none of B packets. Is the following code more correct: while(...) { ... totalSamples += iteratorA.getCurrentIQDataFloat(buffer, valuesPerChunk); // process buffer data totalSamples += iteratorB.getCurrentIQDataFloat(buffer, valuesPerChunk); // process iteratorA++; iteratorB++; int combinedSeconds = totalSamples / samplesPerSecond; if(combinedSeconds >= desiredDuration) break; } Also, is it safe to read metadata from only one of the iterators? Will it give correct steady data?
  11. It's currently possible to setup a WbtBroadcastMessenger and receive the messages from "wbtclient" process. However it seems that wbtclient sends only one type of notification - subject: "ViewingTuners", body: "A" or "B" - upon any action, be it selecting another tuner, changing tuner CF or BW and even switching between apps ("<" and ">" green arrows). Is there a way to get more detailed info about which buttons were pressed or which actions performed? A way to distinguish between cases when user changes tuner config and when switches between apps etc. API v2.4.6.13. The messages are not filtered: broadcastFilter("wbtclient", "", "").
  12. Alexey

    QVRT Context packet Metadata Timestamp

    The SingleTuner and Combined configs are fine. It happens only with DualTuner files. And then it correlates with tuners sample rates - if the sample rates are equal (2.2 + 2.2 MS/s) then each stream is ahead of metadata by the same seconds number; if the rates are different (0.27 + 13.3) then the stream with higher SR is closer to metadata timestamp. It look like the metadata packets are placed every [TunerA SR + TunerB SR] sample for every stream instead of [TunerA SR] for A stream and [TunerB SR] for B stream. GPS sync is perfect: every metadata shows "GPS Fix Status": "3D Fix". Hardware info (from file metadata): "Unit Hardware Version": "200", "Firmware Version": "2.4.6.34", "WBT File Format Version": "2.1". App is built with API v2.4.6.13. Code looks like this: void process(WbtCommon::Data::FileInfo file) { WbtApi::WbtVRTFileReadIterator iter(file._fileName, WbtCommon::Data::Radio_A); const int samplesPerSecond = file._radioSettings._radioA._span * 1e6L; const int valuesPerChunk = 33 * 995 * 2; qint64 totalSamples = 0; float *buffer = new float[valuesPerChunk]; while(!iter.isEndOfStream()) { switch(iter.getCurrentPacketType()) { case VRT_IF_DATA: totalSamples += iter.getCurrentIQDataFloat(buffer, valuesPerChunk); foobar(buffer, valuesPerChunk); break; } const int seconds = totalSamples / samplesPerSecond; if(iter.metadataChanged()) { qDebug() << totalSamples << seconds << QString::fromStdString(iter.getCurrentMetadataAsJSON()); } ++iter; } delete []buffer; }
  13. Something must have changed in recent firmware update because now the API rejects the tuner change if the sample rate is more than 42. So, if I set the bandwidth to more than 37.8 MHz (acceptable value) then the calculated sample rate is more than 42 (unacceptable value) and WbtSystem.updateTunerSettings() returns false. Do I have to manually limit the sample rate from now on or is this a temporary development? Can I rely on getMaxBandwidth or rather hardcode it to 42? API version is 2.4.6.13.
  14. Alexey

    High Sample Rate Tuner Bandwidths

    I'm not worried about going out of range but rather about incorrect recording setup. Imagine this: user enters the bandwidth value of 40 MHz, the app calculates the sample rate at 44.4 MS/s and clamps it to 42 using getMaxBandwidth and so the recording is started with BW=40, SR=42. If getMaxBandwidth will change and return an actual bandwidth limit (40 MHz) then the recording will start with BW=40 and SR=40 which is not 100% good. Anyway, it's not that big of an issue and the app can easily be fixed in the future. Thanks for the support!
  15. Alexey

    High Sample Rate Tuner Bandwidths

    Thank you for this explanation! Just one note: I asked about the reliability of getMinBandwidth/getMaxBandwidth because here http://forum.qrctech.com/topic/79-tuner-bandwidths-in-v24/ you said that their behavior will change: So if I use these methods - at some point in the future the app might break and I need to watch out for this.
  16. Alexey

    WPK icon

    Thanks, it worked!
  17. Alexey

    WPK icon

    The packaged WPK doesn't have the icon. Current API version is 2.4.5.4, and in one of the recent updates there was added a project template which has a script that creates a WPK after project build. What I do is: Create a new WBT App project.Add a Gui component.README says the icon.png should be placed in the directory with a GUI component so I put it there (and in the main project directory too).Build the project; the build log prints Warning: Icon path is missing and the created WPK contains only the license, manifest and executable, no icon.You've done a great job with the new project template, please fix this too. It's a bit inconvenient having to manually set the icon when the rest of the build and deployment is automated.
  18. I have a few questions regarding certain use-cases of reading data from a QVRT file: If I need to read a chunk of data in the middle of the file (for example from 10th second to 20th), there is the moveToTimeInSeconds method that will move the iterator to the starting position. But how do I know when to stop? Do I access the raw data with getCurrentPacketData and read the timestamp with help of the QVRT format spec? Or do I get it from getCurrentMetadataAsJSON - if so, what is the structure of returned JSON?How do I know how much data (IQ) packets does the file contain? Do I iterate over the whole file incrementing some counter when I see an IQ packet (VRT_IF_DATA)?How do I actually read the data? Is the following code snippet correct:WbtVRTFileReadIterator it("qvrtfile.qvrt"); it.moveToTimeInSeconds(5); while(!it.isEndOfStream()) { if(it.getCurrentPacketType() == 1) // VRT_IF_DATA { const int size = it.getCurrentSizeBytes(); float *data = new float[size]; it.getCurrentIQDataFloat(data, size); foobar(data, size); delete[] data; } ++it; }
  19. How do I do that, without actually processing the data (without getCurrentIQDataFloat)? Is the following code correct: WbtVRTFileReadIterator it("some_file", WbtCommon::Data::Radio_A); int samples = 0; while(!it.isEndOfStream()) { if(it.getCurrentPacketType() == VRT_IF_DATA) { // divide by 4 bytes since the samples are stored as 2 16-bit numbers samples += it.getCurrentSizeBytes() / 4; } ++it; } cout << "total samples" << samples;
  20. Alexey

    Detect Record press

    The app has to perform a certain action when user presses "Record" button. How to detect when this button is clicked?
  21. Alexey

    Detect Record press

    Current API is 2.4.5.4. Does it contain methods to intercept Record/Stop button? If yes, where exactly are they? If not, is there a rough estimation of when this will be implemented?
  22. The WbtVRTFileReadIterator doesn't seem to work at all. It doesn't matter which filename is supplied to the constructor - "foobar" or "/data1/foobar.qvrt" - isValid() always returns false. If I still attempt to read the file then initially isEndOfStream is false, but after reading one packet (but not actually reading since getCurrentPacketType returns 0, which is not a valid packet type) isEndOfStream returns true and reading stops. Also, attempting to use moveToStart() or moveToTimeInSeconds(int) results in "undefined reference" linking error. The API version is 2.4.2.41.
  23. In WBT v2.4 there is this new feature that the tuner span can be set to some arbitrary value (instead of a predefined list). For this there are WbtCommon::Data::RadioFrontend::getMinBandwidth() and WbtCommon::Data::RadioFrontend::getMaxBandwidth() methods. Currently they return values 0.7 and 42. However, in the Session screen of the WBT device the threshold at which the tuner config is switched to "Combined" is 40Mhz. The app has a screen similar to the Session screen and has to mimic its behavior. What is the proper way to determine when the tuners have to be combined/uncombined?
  24. Alexey

    Tuner bandwidths in v2.4

    OK, thank you! Will wait for the patch then.
  25. Alexey

    Tuner bandwidths in v2.4

    Why is the Session screen threshold 40MHz? Where is this 2MHz difference coming from?
×