Labrabaco: calculate BC from Labradar tracks

Labrabaco is free and open source, most of the code is under GPL 3 license, with some (unzipping library) bits under 3-clause BSD. Read the code for more info.

It is written entirely in javascript, and runs in your browser. There are no server-side components. There is nothing uploaded to the server. There are no cookies. I shit you not (and if you don't believe -- read the code).

My deepest gratitude goes to entoptics @ longrangehunting.com forums, who has contributed multiple high-quality datasets and data processing ideas, to design, test and fine-tune the algorithms.

This software is provided with no guarantee of fitness for any particular purpose or whatever blah-blah-blah... I tried my best to make it useful (kept myself busy over a rainy weekend), and I believe it's reasonably accurate, but if someone finds a way to go full retard with the tool, who am I to get in the way of natural selection.

Remember: garbage in = garbage out. Atmosphere is *very* important. If you don't know humidity, put 50%. Kestrel is good enough (although I wish the thermometer was more precise). "Data pulled through the Internet from some 'nearest meteo station'" is not good enough. Make *very* sure you are using absolute pressure (a.k.a. station pressure), and not some altitude-adjusted one (Kestrel misleadingly use the term "barometric pressure" to designate pressure adjusted to the mean sea level -- this is *not* the one we want). Typically, if you are measuring 1000+ hPa at alt. 500 m or above (29.5 inHg and 1500 ft for our metric-impared friends), it probably means that either you are reading the wrong pressure value (adjusted instead of absolute/station), or perhaps the End of the World is even closer than expected.

Remember #2: Labradar has a setting called "proj. offset"; this defines the expected distance from the muzzle to the side of the radar. Respect it (within -5 cm), this is important! The offset refers to the distance from the barrel, *not* to the distance from the muzzle; keep it in mind if your muzzle is not level with the radar, but slightly in front or behind.

Remember #3: one shot = one shit. You need at least 20 (for decent factory ammo) to even out the errors. Crappy surplus bullets need more shots (count at least 30), while with high quality projectiles 10 shots may be enough. Generally, more is better.

The software works on Labradar radar track files: "ShotXXXX Track.csv" in TRK directories written by the device on the SD card. No SD card = no luck. It accepts a ZIP archive, containing radar tracks files. You can zip entire folder structures; the software ignores everything that is not radar track data.

NOTA BENE: all tracks in the ZIP file should be recorded with the same projectile in the same atmosphere. Otherwise garbage is guaranteed. Speeds do not have to be the same or even regular, ex. it is just fine to feed Labrabaco with load testing data.

The full manual detailing the approach, error sources and margins, expected precision etc. is coming. In the meantime, if you hit a problem, write me an e-mail: ptosis [at] this site's domain.

Atmosphere:

Odd tracks filters:

This filter uses the coefficient of determination (R squared) of the regression to filter out odd tracks appearing, for example, when the Labradar box shakes under some strong muzzle blast, or just operates in an environment with a lot of signal reflections. In such situations, the muzzle velocity displayed is not necessarily completely off, but the calculated BC can get rather random. "Normal" (R^2 > 0.95) is the recommended default setting for most scenarios. You may want to set "High noise" (R^2 > 0.90) if you run the radar in a particularly noisy environment (obstacles in or near the line of fire), and you see too many valid measurements rejected.
This filter uses the calculated standard deviation of BCs, to detect and reject outliers. This is useful, for example, to discard tracks accidentally recorded from another shooting lane nearby, or to ignore occasional "flyers" in factory ammo, or to compensate for out-of beam errors. "Conservative" rejects anything beyond ±2 x STDEV, and is the recommended setting for most scenarios where spacing between shooters is less than 5 m, or when the trajectory is poorly aligned to the beam axis; usually it is enough to reject "illegal alien" tracks. Disable this filter (set to "None") if you are very sure of your data (lone shooter in good conditions, radar perfectly aligned to the [single] target), especially for small datasets of less than 10 shots. "Agressive" (±1.64 x STDEV) can be used to reject multiple odd shots, if you run your radar in the middle of a busy range, where other people use similar calibers/ballistics or where you shoot at multiple targets without realigning the radar. Nota Bene: the "Agressive" setting may cause the calculator to ignore some very valid data, and therefore reduce the accuracy of the results.

Drag model

* G7 for long boat-tail spitzer nose projectiles, typically used for long-range shooting.
* G8 for long flat base spitzer nose projectiles.
* RA4 for lead round nose .22LR projectiles.
* G1 for everything else.

ZIP containing radar tracks:

Fetch!