Skip to content

Commit 793a8a6

Browse files
basic structure for sdr code docs
1 parent c501df0 commit 793a8a6

File tree

10 files changed

+617
-6
lines changed

10 files changed

+617
-6
lines changed

content/en/about/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: About Goldydocs
2+
title: Contributors, Citations, Contact Info, and Acknowledgements
33
linkTitle: About
44
menu: {main: {weight: 100, pre: "<i class='fa-solid fa-people-group'></i>"}}
55
---

content/en/docs/radar/_index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ menu: {main: {weight: 1, pre: "<i class='fa-solid fa-gears'></i>"}}
77
---
88

99
{{% pageinfo %}}
10-
Landing page for docs about the software-defined radar code
10+
For a general overview of the ORCA system, we highly recommend reading through
11+
our publication:
12+
13+
{{% readfile "/docs/tgrs_citation.md" %}}
14+
1115
{{% /pageinfo %}}
1216

13-
Test
17+
The documentation is broken into two parts. [Radar Code](/docs/radar/sdr-interface/) covers everything about
18+
the code that runs while the radar is actively collecting data. The
19+
[Postprocessing](/docs/radar/postprocessing/)
20+
section explains how data is saved and explains the basic processing scripts that
21+
we provide.
196 KB
Loading

content/en/docs/radar/sdr-interface/code/index.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,80 @@ title: Code overview
33
linkTitle: Code Overview
44
description: Overview of the code's architecture
55
weight: 20
6-
---
6+
---
7+
8+
## Conda environment setup
9+
10+
All of the required dependencies can be installed as a conda environment using
11+
the `environment.yaml` file in the repository. More instructions can be found
12+
in the [README](https://github.com/radioglaciology/uhd_radar/tree/main?tab=readme-ov-file#configuring-your-environment)
13+
file.
14+
15+
## Startup scripts
16+
17+
The X series devices require some initial network configuration. For convenience,
18+
a [startup script](https://github.com/radioglaciology/uhd_radar/blob/main/x310_startup.sh)
19+
is provided to automate this setup. You may need to tweak this file to your setup.
20+
21+
## Runner scripts
22+
23+
The basic steps required to run the radar are:
24+
25+
1. Build the C++ code
26+
2. Generate a chirp file to transmit based on your configuration
27+
3. Run the compiled radar code
28+
4. Move the collected data to an appropriate location
29+
30+
The main interface for running the radar code is through `run.py`, a Python
31+
script designed to automate the above process. This script is run as follows:
32+
33+
```
34+
python run.py config/my_radar_configuration.yaml
35+
```
36+
37+
At the end of the data collection, data will be saved with the current date
38+
to a location specified in the [YAML config file](/docs/radar/sdr-interface/config).
39+
40+
Generally, three files are saved:
41+
42+
* `YYYYMMDD_hhmmss_rx_samps.bin` - This is a binary file containing the raw
43+
samples recorded the SDR. Note that this file is not interpretable unless you
44+
also have the config file used.
45+
* `YYYYMMDD_hhmmss_config.yaml` - This is the YAML config file passed to `run.py`.
46+
It defines all parameters of the data collection, allowing for the `rx_samps.bin`
47+
file to be interpreted and processed.
48+
* `YYYYMMDD_hhmmss_uhd_stdout.log` - This is a text file containing the output
49+
of running the radar code. This is helpful for debugging and also contains a log
50+
of any errors encountered, which may be required to reconstruct the timing of
51+
each recording.
52+
53+
More details on the files stored and how these can be re-processed into a Zarr
54+
file are on the [file formats](/docs/radar/postprocessing/files/) page.
55+
56+
Note that there are also settings available to break `rx_samps.bin` into multiple
57+
files as needed.
58+
59+
## SDR interface code
60+
61+
For performance reasons, the code directly interfacing with the SDR is written
62+
in C++. This code is all located in the `sdr/` directory of the repository.
63+
64+
The main radar code is contained in `main.cpp` (with some SDR setup code located
65+
in `rf_settings.cpp`). The radar code runs in two threads, as shown in the
66+
figure below.
67+
68+
69+
{{% imgproc code_diagram Fit 500x1200%}}
70+
General architecture of the ORCA code
71+
{{% /imgproc %}}
72+
73+
One thread is responsible for scheduling
74+
[timed commands](https://kb.ettus.com/Synchronizing_USRP_Events_Using_Timed_Commands_in_UHD)
75+
that are enqueued into FIFO queues within the SDR's FPGA.
76+
77+
The other thead is responsible for pulling received samples from the SDR and
78+
writing them to a file on the host computer.
79+
80+
For a more complete overview, please refer to our paper:
81+
82+
{{% readfile "/docs/tgrs_citation.md" %}}

0 commit comments

Comments
 (0)