Packages
sidereon
0.37.0
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.1.0
2.0.0
1.4.1
1.3.3
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
0.39.1
0.39.0
0.38.0
0.37.0
0.36.5
0.36.4
0.36.3
0.36.2
0.36.1
0.36.0
0.35.0
0.34.0
0.33.1
0.32.0
0.31.2
0.30.0
0.29.2
0.29.1
0.29.0
0.28.1
0.28.0
0.27.1
0.27.0
0.26.1
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.19.1
0.19.0
0.18.0
0.17.0
0.16.1
0.15.0
0.14.0
0.13.0
0.12.0
0.11.1
0.11.0
0.10.1
0.10.0
0.9.2
0.9.1
0.9.0
0.8.0
retired
Satellite toolkit for Elixir with SGP4 propagation, coordinate transforms, GNSS positioning, orbit determination, conjunction assessment, pass prediction, and a Rust NIF backend.
Current section
Files
Jump to
Current section
Files
guides/batch_analysis.md
# Batch Analysis: Coverage, Visibility, and Link Budgets
Use `Sidereon.Coverage` for single-epoch constellation/station coverage grids
and `Sidereon.RF` for scalar or list-based link-budget helpers. The Elixir layer
marshals element structs and station coordinates, while propagation, look-angle
evaluation, and RF calculations run in the Rust core.
## Which Satellites Can a Ground Station See?
```elixir
{:ok, iss} = Sidereon.Format.TLE.parse(line1, line2)
stations = [
%{latitude: 40.7128, longitude: -74.0060, altitude_m: 10.0},
{51.5074, -0.1278, 11.0}
]
datetime = ~U[2024-01-01 12:00:00Z]
look = Sidereon.Coverage.look_angles([iss], stations, datetime)
# [[{:ok, {azimuth_deg, elevation_deg, range_km}}, ...]]
visible = Sidereon.Coverage.visible_mask([iss], stations, datetime, 10.0)
# [[true | false, ...]]
```
## Access Counts
`access_counts/4` returns one count per station at a single epoch: the number of
input satellites above the elevation threshold.
```elixir
counts = Sidereon.Coverage.access_counts(tles, stations, datetime, 10.0)
```
## Maximum Elevation
`max_elevation/3` reduces the satellite rows and returns one value per station,
or `nil` if no satellite produced a valid look angle for that station.
```elixir
max_el = Sidereon.Coverage.max_elevation(tles, stations, datetime)
```
## Batch Link Budget
```elixir
ranges_km =
look
|> List.first()
|> Enum.flat_map(fn
{:ok, {_az, _el, range_km}} -> [range_km]
:error -> []
end)
path_loss_db = Sidereon.RF.fspl_batch(ranges_km, 1616.0)
budgets =
Enum.map(path_loss_db, fn fspl_db ->
%{
eirp_dbw: 0.0,
fspl_db: fspl_db,
receiver_gt_dbk: -12.0,
other_losses_db: 3.0,
required_cn0_dbhz: 35.0
}
end)
margins_db = Sidereon.RF.link_margin_batch(budgets)
```