First commit of claude's rework in django + vanillajs fronted

This commit is contained in:
Gérald Colangelo
2026-04-02 11:24:30 +02:00
parent 7710a876df
commit fde92f92db
163 changed files with 84852 additions and 15 deletions

View File

@@ -0,0 +1,32 @@
"""
Ballistic correction engine.
Computes scope elevation and windage corrections given a rig, ammo,
target distance, and weather conditions.
Currently a stub — returns None until the trajectory integration is built.
"""
def compute_corrections(session, stage) -> dict:
"""
Return scope corrections for a given PRS stage.
Args:
session: PRSSession instance (provides rig, ammo/reloaded_batch, weather)
stage: PRSStage instance (provides distance_m)
Returns:
dict with keys: elevation, windage, unit, message
"""
# TODO: implement point-mass trajectory integration using:
# - session.rig.zero_distance_m, session.rig.scope_height_mm
# - ammo BC (Bullet.bc_g7 / bc_g1) and muzzle velocity
# - session weather fields (temperature_c, pressure_hpa, humidity_pct)
# - stage.distance_m and session wind fields
return {
'elevation': None,
'windage': None,
'unit': None,
'message': 'Ballistic engine not yet implemented.',
}