# ivankornienko31/orbicraft_programs architecture

> Architecture diagram of the GitHub repository ivankornienko31/orbicraft_programs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ivankornienko31/orbicraft_programs
- Repository: https://github.com/ivankornienko31/orbicraft_programs

## Overview

#### Purpose and Scope
This is a C repository for controlling and validating hardware subsystems in the OrbiCraft satellite construction kit. The checked-in code is presently centered on standalone subsystem test executables; the README also describes planned/expected satellite behaviors such as stabilization, imaging, and orientation, but no corresponding source files appear in this tree.

#### Entry Points and Execution Model
Each `*_test.c` file is an independent C program and likely build/run entry point for one hardware-validation scenario. There is no application dispatcher, build manifest, service layer, or shared source implementation in the provided tree. Tests directly exercise physical kit components through the common API header.

Paths:
- `Sensor tests/Camera_and_HF_test.c`
- `Sensor tests/Motor_test.c`
- `Sensor tests/UHF_test.c`

#### Hardware API Boundary
`libschsat.h` is the repository’s central integration boundary: it declares the functions used to operate OrbiCraft subsystems. Test programs should depend on this header rather than on each other. Its implementation, library linkage details, and target runtime are external to the repository.

Path:
- `libschsat.h`

#### Attitude and Environmental-Sensing Validation
Sensor-oriented entry points validate measurements used by satellite orientation and environmental awareness. The magnetometer and solar-sensor programs are separate operational modes; the multi-sensor solar test is distinct from the single-sensor test, implying support for checking individual channels versus a sensor set.

Paths:
- `Sensor tests/Magn_test.c`
- `Sensor tests/Sun Sensor Tests/Sun_sensor_test.c`
- `Sensor tests/Sun Sensor Tests/Some_sun_sensors_test.c`

#### Propulsion / Actuation Validation
The motor test is the actuator-facing boundary. It should be treated as hardware-affecting execution rather than a safe unit test: it validates commands issued through the shared subsystem API against the physical engine/motor.

Path:
- `Sensor tests/Motor_test.c`

#### Imaging and Radio Communications Flow
The camera/HF program represents a composed device flow: acquire an image through the camera subsystem, then send it through the high-frequency transmitter. UHF has its own direct transceiver validation entry point. These programs bridge onboard data acquisition to external RF communications.

Paths:
- `Sensor tests/Camera_and_HF_test.c`
- `Sensor tests/UHF_test.c`

#### Additional Sensor / Device Checks
The remaining test executable covers the “Hyro” subsystem (the exact device meaning is not established by the supplied README). It follows the same standalone hardware-test architecture and common-header dependency model.

Path:
- `Sensor tests/Hyro_test.c`

#### Runtime, Infrastructure, and External Dependencies
The runtime is native C on an environment capable of accessing OrbiCraft hardware. Required subsystem drivers/libraries are implied by `libschsat.h` but are not vendored here. The primary external reference is the OrbiCraft documentation site, `http://orbicraft.sputnix.ru/doku.php`; the README cautions that its API descriptions and availability may be unreliable. No cloud services, databases, web runtime, CI configuration, or deployment infrastructure are represented in the tree.

Main entry points: [`libschsat.h`](https://github.com/ivankornienko31/orbicraft_programs/blob/main/libschsat.h) (libschsat API), [`Sensor tests/Magn_test.c`](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Magn_test.c) (Magnetometer test), [`Sensor tests/Sun Sensor Tests/Sun_sensor_test.c`](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Sun_sensor_test.c) (Sun sensor test), [`Sensor tests/Sun Sensor Tests/Some_sun_sensors_test.c`](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Some_sun_sensors_test.c) (Multi-sun-sensor test)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensor_tests["Sensor validation"]
  node_mag_test["Magnetometer test<br/>C executable<br/>[Magn_test.c]"]
  node_sun_single_test["Sun sensor test<br/>C executable<br/>[Sun_sensor_test.c]"]
  node_sun_multi_test["Multi-sun-sensor test<br/>C executable"]
  node_hyro_test["Hyro test<br/>C executable<br/>[Hyro_test.c]"]
end

subgraph group_device_flows["Actuation and communications"]
  node_motor_test["Motor test<br/>C executable<br/>[Motor_test.c]"]
  node_camera_hf_test["Camera and HF test<br/>C executable"]
  node_uhf_test["UHF test<br/>C executable<br/>[UHF_test.c]"]
end

subgraph group_external["External hardware boundary"]
  node_external_drivers{{"OrbiCraft drivers<br/>external library"}}
  node_attitude_sensors["Magnetometer and solar sensors<br/>physical hardware"]
  node_motor["Motor subsystem<br/>physical hardware"]
  node_camera_hf["Camera and HF transmitter<br/>physical hardware"]
  node_uhf["UHF transceiver<br/>physical hardware"]
  node_hyro["Hyro subsystem<br/>physical hardware"]
end

node_libschsat{{"libschsat API<br/>C header<br/>[libschsat.h]"}}

node_mag_test -->|"uses"| node_libschsat
node_sun_single_test -->|"uses"| node_libschsat
node_sun_multi_test -->|"uses"| node_libschsat
node_hyro_test -->|"uses"| node_libschsat
node_motor_test -->|"uses"| node_libschsat
node_camera_hf_test -->|"uses"| node_libschsat
node_uhf_test -->|"uses"| node_libschsat
node_libschsat -.->|"implemented by"| node_external_drivers
node_external_drivers -->|"accesses"| node_attitude_sensors
node_external_drivers -->|"commands"| node_motor
node_external_drivers -->|"acquires and transmits"| node_camera_hf
node_external_drivers -->|"accesses"| node_uhf
node_external_drivers -->|"accesses"| node_hyro

click node_mag_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Magn_test.c"
click node_sun_single_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Sun_sensor_test.c"
click node_sun_multi_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Some_sun_sensors_test.c"
click node_hyro_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Hyro_test.c"
click node_motor_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Motor_test.c"
click node_camera_hf_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Camera_and_HF_test.c"
click node_uhf_test "https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/UHF_test.c"
click node_libschsat "https://github.com/ivankornienko31/orbicraft_programs/blob/main/libschsat.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mag_test,node_sun_single_test,node_sun_multi_test,node_hyro_test toneBlue
class node_motor_test,node_camera_hf_test,node_uhf_test toneAmber
class node_external_drivers,node_attitude_sensors,node_motor,node_camera_hf,node_uhf,node_hyro toneMint
class node_libschsat toneNeutral
```

## Components

### Sensor validation

Standalone programs for sensing and orientation-related checks.

- [Magnetometer test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Magn_test.c): C executable · `Sensor tests/Magn_test.c`
- [Sun sensor test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Sun_sensor_test.c): C executable · Validates one solar-sensor channel. · `Sensor tests/Sun Sensor Tests/Sun_sensor_test.c`
- [Multi-sun-sensor test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Sun%20Sensor%20Tests/Some_sun_sensors_test.c): C executable · Validates a set of solar sensors. · `Sensor tests/Sun Sensor Tests/Some_sun_sensors_test.c`
- [Hyro test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Hyro_test.c): C executable · Validates the unspecified Hyro subsystem. · `Sensor tests/Hyro_test.c`

### Actuation and communications

Standalone programs that command or bridge physical devices.

- [Motor test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Motor_test.c): C executable · Hardware-affecting actuator validation. · `Sensor tests/Motor_test.c`
- [Camera and HF test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/Camera_and_HF_test.c): C executable · Acquires an image and transmits it over HF. · `Sensor tests/Camera_and_HF_test.c`
- [UHF test](https://github.com/ivankornienko31/orbicraft_programs/blob/main/Sensor%20tests/UHF_test.c): C executable · Validates the UHF transceiver directly. · `Sensor tests/UHF_test.c`

### External hardware boundary

Drivers and physical kit components are outside this repository.

- **OrbiCraft drivers**: external library · Library implementation and linkage are not vendored.
- **Magnetometer and solar sensors**: physical hardware
- **Motor subsystem**: physical hardware
- **Camera and HF transmitter**: physical hardware
- **UHF transceiver**: physical hardware
- **Hyro subsystem**: physical hardware

### Other components

- [libschsat API](https://github.com/ivankornienko31/orbicraft_programs/blob/main/libschsat.h): C header · Shared subsystem-control API boundary. · `libschsat.h`

## Connections

- Magnetometer test → libschsat API: uses
- Sun sensor test → libschsat API: uses
- Multi-sun-sensor test → libschsat API: uses
- Hyro test → libschsat API: uses
- Motor test → libschsat API: uses
- Camera and HF test → libschsat API: uses
- UHF test → libschsat API: uses
- libschsat API → OrbiCraft drivers: implemented by
- OrbiCraft drivers → Magnetometer and solar sensors: accesses
- OrbiCraft drivers → Motor subsystem: commands
- OrbiCraft drivers → Camera and HF transmitter: acquires and transmits
- OrbiCraft drivers → UHF transceiver: accesses
- OrbiCraft drivers → Hyro subsystem: accesses
