No description
Find a file
JBot4400 1215d03f31
chore(deps): update typescript-eslint monorepo to v8.65.0 (#73)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
2026-07-21 20:04:37 -06:00
.github chore(deps): update actions/checkout action to v7.0.1 (#83) 2026-07-20 10:58:36 -06:00
.husky chore: drop "Obsidian" from manifest description (#11) 2026-05-13 15:58:57 -06:00
docs/superpowers feat: trajectory chart codefence (#20) 2026-05-15 16:01:19 -06:00
src style(table): use filled triangle arrows for bound markers 2026-06-03 12:40:22 -07:00
tests fix(test): update header assertion for merged label/units cell 2026-06-03 12:02:37 -07:00
.gitignore chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
.justfile fix(release): use conventional commit format for release commits (#40) 2026-06-03 12:40:05 -07:00
.npmrc chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
.prettierignore chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
.prettierrc.json chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
CLAUDE.md feat: indicate zero range in table (⊕) and chart (dashed line) (#37) 2026-06-03 11:10:33 -07:00
cliff.toml fix(release): use conventional commit format for release commits (#40) 2026-06-03 12:40:05 -07:00
CONTRIBUTING.md docs: split README into user docs and CONTRIBUTING 2026-05-15 16:27:36 -06:00
esbuild.config.mjs chore: drop "Obsidian" from manifest description (#11) 2026-05-13 15:58:57 -06:00
eslint.config.mjs chore(deps): bump eslint-plugin-obsidianmd to ^0.3.0 (#9) 2026-05-13 15:35:00 -06:00
LICENSE chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
manifest.json obsidian-ballistics-0.2.1 2026-06-03 12:03:17 -07:00
package-lock.json chore(deps): update typescript-eslint monorepo to v8.65.0 (#73) 2026-07-21 20:04:37 -06:00
package.json chore(deps): update typescript-eslint monorepo to v8.65.0 (#73) 2026-07-21 20:04:37 -06:00
README.md docs: split README into user docs and CONTRIBUTING 2026-05-15 16:27:36 -06:00
styles.css refactor(table): single header row with units below label (#38) 2026-06-03 11:38:26 -07:00
tsconfig.json chore: initial plugin skeleton 2026-05-12 11:50:44 -06:00
versions.json obsidian-ballistics-0.2.1 2026-06-03 12:03:17 -07:00
vitest.config.ts feat: ballistics-table codefence with G1 trajectory solver 2026-05-12 14:46:37 -06:00

obsidian-ballistics

Embed ballistics trajectory tables and charts in Obsidian notes.

The plugin registers two code-fence processors, ballistics-table and ballistics-chart, that share the same inputs but render the trajectory differently. Inputs may live inline in the fence, in the note's frontmatter, or in a shared note referenced via use:.

Trajectory table

```ballistics-table
bc: 0.475
initialVelocity: 2700
sightHeight: 1.5
zeroRange: 100
bulletWeight: 168
windSpeed: 10
windAngle: 90
maxRange: 1000
rangeStep: 50
```

The table shows range, drop/elevation, velocity, and energy for each step. A windage column appears whenever windSpeed > 0. If minEnergy or maxEnergy is set, rows crossing those thresholds are marked.

Trajectory chart

```ballistics-chart
bc: 0.475
initialVelocity: 2700
sightHeight: 1.5
zeroRange: 100
bulletWeight: 168
maxRange: 1000
rangeStep: 50
minEnergy: 1000
```

The chart plots elevation vs. range as an inline SVG that scales to the note width. Energy thresholds (minEnergy, maxEnergy) are drawn as bound markers on the curve when the trajectory crosses them.

Inputs

Inputs describe the load, rifle, and conditions being modeled.

Required

Key Description Imperial Metric
bc G1 ballistic coefficient
initialVelocity Velocity at the muzzle ft/s m/s
sightHeight Sight axis height above bore in cm
zeroRange Range at which the rifle is zeroed yd m
bulletWeight Bullet weight grains grams

Optional — wind

Key Description Imperial Metric Default
windSpeed Wind speed mph m/s 0
windAngle Clock angle 0360° (90° = full from right) deg deg 0

Optional — atmosphere

Omitted atmospheric inputs fall back to ICAO standard conditions.

Key Description Imperial Metric
altitude Altitude above sea level ft m
pressure Barometric pressure inHg hPa
temperature Air temperature °F °C
humidity Relative humidity (0100) % %

Aliases

  • bc may be written as coeff or coefficient.
  • initialVelocity may be written as muzzleVelocity.

View options

View options control how a single fence is rendered. They live only in the fence body — never in frontmatter, never inherited via use:. Both ballistics-table and ballistics-chart accept the same set:

Key Description Default
minRange Smallest range to include 0
maxRange Largest range to include 1000
rangeStep Distance between rows / sample points 100
minEnergy Threshold marked when energy drops below
maxEnergy Threshold marked when energy first drops below it

rangeStep must not exceed maxRange; minRange must be less than maxRange; maxEnergy must be greater than minEnergy.

Frontmatter inputs

Any input can be set in the note's frontmatter using the ballistics- prefix and kebab-case:

---
ballistics-bc: 0.475
ballistics-initial-velocity: 2700
ballistics-sight-height: 1.5
ballistics-zero-range: 100
ballistics-bullet-weight: 168
---

A fence in that note can then omit those keys and only declare view options or per-fence overrides. View options (maxRange, rangeStep, etc.) are rejected in frontmatter.

Sharing inputs across notes

A fence can pull inputs from another note using use: [[note-name]]:

```ballistics-table
use: [[loads/308-168gr-match]]
maxRange: 800
rangeStep: 50
```

The referenced note's frontmatter (using the same ballistics- prefix) supplies the inputs. Only one use: reference is allowed per fence.

Precedence

When the same input is set in multiple places, the highest-precedence value wins:

  1. Inline in the fence body (highest)
  2. The current note's frontmatter
  3. The note referenced by use: (lowest)

Settings

  • Unit system — imperial or metric. Applied globally; all numeric inputs and rendered columns use this system.
  • Log level — controls plugin log verbosity in the developer console.

Contributing

See CONTRIBUTING.md for development setup and tooling.