Skip to content

Show how long the shell is in the air - flight time - #15

Open
Crecket wants to merge 18 commits into
apollyon-sys:mainfrom
Crecket:upstream-pr/flight-time
Open

Show how long the shell is in the air - flight time#15
Crecket wants to merge 18 commits into
apollyon-sys:mainfrom
Crecket:upstream-pr/flight-time

Conversation

@Crecket

@Crecket Crecket commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This stacks on #11 and cannot merge before it. It needs loadProjectileModel and PROJECTILE_MODEL from js/map/range-ring.js, which only exist on that branch. Until #11 lands, the diff here also shows #11's commits.

#11 dropped projectileModelArc() as dead code. This adds it back, because the flight time is its consumer. Nothing else in that file changes.

The seconds come from the same vacuum fit the range ring reads, so no new data file. The angle is taken from the MIL actually on screen rather than from the distance, so the printed time belongs to the number above it. A distance that lands on a table row with a MIL band uses the band's midpoint. Target height minus gun height comes from the terrain meta #11 already computes.

These are derived seconds, never measured in game, which is what the badge's approximately-equals prefix says. Both SPG-2 arcs and the mortar are covered.

The last two commits are droppable: a machine-written Korean string for the new label, and a Playwright test that was not run.

@apollyon-sys

Copy link
Copy Markdown
Owner

I'm going to hold this together with #11

The UI idea is useful, but the displayed flight time is derived from the same vacuum-fit projectile model used by #11, and that model has already been superseded by the current ballistic research

Even with the ≈ prefix, I'd rather not show a seemingly precise gameplay value until it comes from the validated projectile model

Definitely worth revisiting once the ballistic side is locked down

@Crecket Crecket changed the title Show how long the shell is in the air Show how long the shell is in the air - flight time Aug 30, 2026
Crecket added a commit to Crecket/wardogs-calculator that referenced this pull request Aug 30, 2026
@Crecket

Crecket commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Did some testing last night but getting exact numbers was tricky without a nice heightmap of the shooting range map so I tried aiming for flat-ish grounds to get these numbers, had claude turn it into a new model that looked reasonable using these measurements. This doc has some of the measurements and thoughts etc https://github.com/Crecket/wardogs-calculator/blob/feat/collab-rooms/docs/firing-range-measurements.md

Idk if you want to do your own measurements or how oyu want to go about implementing these but the flight numbers specifically are within like at most a 1 second margin of error now so I can update this PR to pull in my fire and flight model if you want.

Imo the flight time is mostly to give a general idea anyway since you're not gonna cancel a shot because it might land a few seconds too late. It is mostly nice for showing the difference between a high and low arc shot

@apollyon-sys

Copy link
Copy Markdown
Owner

One important detail: the Shooting Range isn’t actually a separate map - it’s part of Bakurani. The firing range complex is around x 98.49, y 109.80.

I already have the full verified Bakurani Terrain3D heightfield in the repo, so we can get the actual terrain elevation for both the gun and every impact point from your measurements. The coordinate mapping is already calibrated as well, so we don’t need to assume flat ground or treat the 100 m coordinate scale as unverified.

Because of that, I’d rather run your raw measurements through the terrain data first before pulling the fitted fire/flight model in as-is. Some of the assumptions in the doc about unknown target elevations and terrain effects can now be replaced with actual ΔZ values, and then we can see how the fitted muzzle velocity/drag numbers change.

The flight-time measurements are definitely useful though. Once we account for the real elevations, they should give us a much better basis for validating the projectile model. So I don’t think you need to redo all the measurements yet - I can work from the data you already collected first.

@Crecket

Crecket commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Ahh that's nice I did look at the map but didn't recognise the location right away, feel free to use those shots obviously, I tried to keep the arty gun on somewhat flat ground to but it's probably off by a degree or something to. Ill have claude update the file to include Z values on all of the to/from spots in that list for now to

Edit: also going to do some extra shots intentionally into mountains to do more height specific tests tonight

@Crecket

Crecket commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Btw a question, if you figured out the height map, can we not extract terrain angles and things aswell? It's something outside my expertise on how that's done in the game files etc, just a thought about whether that's in there or not since that'd help a ton with figuring out shooting angles obviously. I imagine it might be a bit too much data even if we did have it though

@Crecket

Crecket commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Had claude extract the Z values for all the spots and add it to the doc for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants