> For the complete documentation index, see [llms.txt](https://petayyyy.gitbook.io/copter-for-space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://petayyyy.gitbook.io/copter-for-space/postobrabotka/postobrabotka-na-raspberry.md).

# Постобработка на Raspberry

### Установка SatDump на микрокомпьютер Raspberry.

Для обработки данных сразу после принятия необходимо установить SatDump на Raspberry.

Для этого необходимо установить ряд библиотек:

```bash
sudo apt install git build-essential cmake g++ pkgconf libfftw3-dev libvolk2-dev libjpeg-dev libpng-dev 
sudo apt install librtlsdr-dev libhackrf-dev libairspy-dev libairspyhf-dev                             
sudo apt install libglew-dev libglfw3-dev   
sudo apt install libzstd-dev   

sudo apt install xorg-dev
pip3 install Mako 
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install -y libglew-dev
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev       
```

Установить и забилдить библиотеку `nng`:

```bash
git clone https://github.com/nanomsg/nng.git
cd nng
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..                             # MacOS
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr .. # Linux
make -j4
sudo make install
cd ../..
rm -rf nng
```

Установить и забилдить программу `Satdump`:

```bash
git clone https://github.com/altillimity/satdump.git
cd satdump
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_LIVE=ON .. # Linux
make -j4
ln -s ../pipelines . 
ln -s ../resources . 
```

Выдаем права для запуска `SatDump`:

```bash
chmod +x ./satdump-ui
```

Открываем системный файл:

```bash
nano ~/.bashrc
```

Редактируем системный файл для упрощения использования ПО, добавляя в него строчку:

```bash
alias ./satdump='sh /путь/к/директории/установки/satdump/satdump'
```

Пример строчки для уточнения расположения исполняемого ПО можете воспользоваться командой pwd (более подробно о командах терминала в [статье](https://petayyyy.gitbook.io/copter-for-space/more/osnonye-komandy-terminala)):

```bash
alias ./satdump='sh /catkin_ws/src/Lorett/satdump/satdump'
```

Сохраняем файл и выходим из него комбинацией клавишь `Ctrl+O` -> `Enter` -> `Cntr+X`.

Обновим командную оболочку:

```bash
source ~/.bashrc
```

Запустите SatDump:

```bash
./satdump
```

{% hint style="success" %}
**Поздравляем, Вы установили SatDump на Raspberry.**
{% endhint %}

### Декодирование на Raspberry

Для декодирования полученных данных необходимо запустить файл `satdump` следующей командой:

```bash
./satdump pipeline input_format path/to/input/file.something products output_folder [-baseband_format...]
```

&#x20;Где:

* `pipeline` - название спутника, данные которого Вы обрабатываете.
* `input_format` - формат данных (всегда имеет значение `baseband`)
* `path/to/input/file.something` - путь и название файла, хранящего данные для декодирования.
* `products` - константа.
* `output_folder` - выходная папка, которая будет содержать декодировнный данные.
* `[-baseband_format...]` - дополнительные параметы ( всегда имеют значения `-samplerate 6000000 -baseband_format f32` )

Пример команды:

```bash
./satdump meteor_hrpt baseband '20210514_111244_METEOR-M2 2.iq' products /METEOR-M2-2_20_02 -samplerate 6000000 -baseband_format f32 
```

Списки параметров для различных спутников:

#### Fengyun 3X:

#### **Pipeline:  `fengyun3_ab_ahrpt`    or   `fengyun3_c_ahrpt`**

#### Meteor-m2-2:

#### Pipeline: `meteor_hrpt`

#### NOAA 18 / NOAA 19:

#### Pipeline:  `noaa_hrpt`

#### METOP-x:

#### **Pipeline:  `metop_ahrpt`**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://petayyyy.gitbook.io/copter-for-space/postobrabotka/postobrabotka-na-raspberry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
