# ornstein89/atmosgost_r_25645_166_2004 architecture

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

- Interactive diagram: https://gitdiagram.com/ornstein89/atmosgost_r_25645_166_2004
- Repository: https://github.com/ornstein89/atmosgost_r_25645_166_2004

## Overview

This repository provides a C++ implementation of the GOST R 25645.166-2004 upper-atmosphere density model and a Qt example for exploring density-versus-altitude curves. Users supply altitude, solar and geomagnetic indices, date, and coordinate/time inputs; the library validates inputs and returns density (or an error value). The example plots either an F107 curve family or user-parameterized curves, and can also compare against NRLMSISE-00. Data-table usage beyond the explicitly included tables is not fully visible in the excerpts, so those connections are left unasserted.

Main entry points: [`atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp`](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp) (Density API), [`example_app/mainwindow.cpp`](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/mainwindow.cpp) (Curve Calculation And Plotting), [`example_app/main.cpp`](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/main.cpp) (Qt Application Entry), [`atmosGOST_R_25645_166_2004/table_1_GOST_R_25645_166_2004.cpp`](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_1_GOST_R_25645_166_2004.cpp) (Seasonal Coefficients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["GOST Density Model"]
  node_density_api["Density API"]
  node_api_header["Public Interface"]
end

subgraph group_data["Model Tables"]
  node_seasonal["Seasonal Coefficients"]
  node_low_coeff["Low-Altitude Coefficients"]
  node_high_coeff["High-Altitude Coefficients"]
  node_altitude_tables["Altitude Tables 4–9"]
  node_solar_tables["Solar Tables 10–11"]
end

subgraph group_example["Qt Example"]
  node_app_entry["Qt Application Entry<br/>[main.cpp]"]
  node_curve_ui["Curve Controls<br/>[mainwindow.cpp]"]
  node_plotting["Curve Calculation And Plotting<br/>[mainwindow.cpp]"]
end

subgraph group_reference["Reference Model"]
  node_nrl["NRLMSISE-00"]
end

node_user(("Application User"))

node_user -->|"calls API"| node_density_api
node_user -->|"opens example"| node_app_entry
node_app_entry -->|"creates window"| node_curve_ui
node_curve_ui -->|"triggers plots"| node_plotting
node_plotting -->|"computes density"| node_density_api
node_density_api -->|"imports coefficients"| node_seasonal
node_density_api -->|"imports coefficients"| node_low_coeff
node_density_api -->|"imports coefficients"| node_high_coeff
node_plotting -->|"optionally compares"| node_nrl

click node_density_api "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp"
click node_api_header "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.h"
click node_seasonal "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_1_GOST_R_25645_166_2004.cpp"
click node_low_coeff "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_2_GOST_R_25645_166_2004.cpp"
click node_high_coeff "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_3_GOST_R_25645_166_2004.cpp"
click node_altitude_tables "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/tables_4_9_GOST_R_25645_166_2004.cpp"
click node_solar_tables "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/tables_10_11_GOST_R_25645_166_2004.cpp"
click node_app_entry "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/main.cpp"
click node_curve_ui "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/mainwindow.cpp"
click node_plotting "https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/mainwindow.cpp"
click node_nrl "https://github.com/ornstein89/atmosgost_r_25645_166_2004/tree/main/nrlmsise00_brodowski/nrlmsise-00"

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_density_api,node_api_header,node_user toneBlue
class node_seasonal,node_low_coeff,node_high_coeff,node_altitude_tables,node_solar_tables toneAmber
class node_app_entry,node_curve_ui,node_plotting toneMint
class node_nrl toneRose
```

## Components

### GOST Density Model

- [Density API](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp`
- [Public Interface](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.h): `atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.h`

### Model Tables

- [Seasonal Coefficients](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_1_GOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/table_1_GOST_R_25645_166_2004.cpp`
- [Low-Altitude Coefficients](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_2_GOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/table_2_GOST_R_25645_166_2004.cpp`
- [High-Altitude Coefficients](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/table_3_GOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/table_3_GOST_R_25645_166_2004.cpp`
- [Altitude Tables 4–9](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/tables_4_9_GOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/tables_4_9_GOST_R_25645_166_2004.cpp`
- [Solar Tables 10–11](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/atmosGOST_R_25645_166_2004/tables_10_11_GOST_R_25645_166_2004.cpp): `atmosGOST_R_25645_166_2004/tables_10_11_GOST_R_25645_166_2004.cpp`

### Qt Example

- [Qt Application Entry](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/main.cpp): `example_app/main.cpp`
- [Curve Controls](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/mainwindow.cpp): `example_app/mainwindow.cpp`
- [Curve Calculation And Plotting](https://github.com/ornstein89/atmosgost_r_25645_166_2004/blob/main/example_app/mainwindow.cpp): `example_app/mainwindow.cpp`

### Reference Model

- [NRLMSISE-00](https://github.com/ornstein89/atmosgost_r_25645_166_2004/tree/main/nrlmsise00_brodowski/nrlmsise-00): `nrlmsise00_brodowski/nrlmsise-00`

### Other components

- **Application User**

## Connections

- Application User → Density API: calls API (evidence: `README.md`)
- Application User → Qt Application Entry: opens example (evidence: `README.md`)
- Qt Application Entry → Curve Controls: creates window (evidence: `example_app/main.cpp`)
- Curve Controls → Curve Calculation And Plotting: triggers plots (evidence: `example_app/mainwindow.cpp`)
- Curve Calculation And Plotting → Density API: computes density (evidence: `example_app/mainwindow.cpp`)
- Density API → Seasonal Coefficients: imports coefficients (evidence: `atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp`)
- Density API → Low-Altitude Coefficients: imports coefficients (evidence: `atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp`)
- Density API → High-Altitude Coefficients: imports coefficients (evidence: `atmosGOST_R_25645_166_2004/atmosGOST_R_25645_166_2004.cpp`)
- Curve Calculation And Plotting → NRLMSISE-00: optionally compares (evidence: `example_app/mainwindow.cpp`)
