Ammunition

Calculate ballistics for a firearm

Computes muzzle performance for a firearm using its own barrel length and a chosen ammunition load, and compares the result against the figures the catalog records for the firearm.

Returns muzzle figures only. For the sampled trajectory out to 1000 m use /v1/firearms/{id}/load.

When the firearm has no recorded barrel length the response is still 200 and carries an error string in place of the computed blocks.

Requires Builder tier or higher.

get/v1/firearms/{id}/calculate

Request

  • Base URL: https://api.gunspec.io
  • URL: https://api.gunspec.io/v1/firearms/{id}/calculate
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

idstring required

Resource slug ID

Query parameters

ammo_idstring required

Ammunition load to fire

Response

Calculate ballistics for a firearm

successboolean required

Always true on a successful response. Every error carries false and an error object instead.

Example response

{
  "success": true,
  "data": {
    "firearm": {
      "id": "ak-47",
      "name": "AK-47",
      "barrelLengthMm": 415
    },
    "ammunition": {
      "id": "9mm-124gr-fmj",
      "name": "9mm 124gr FMJ"
    },
    "calculated": {
      "muzzleVelocityMps": 360,
      "muzzleEnergyJ": 510,
      "terminalBallistics": {
        "tkoFactor": 12.9,
        "momentumKgMs": 5.7,
        "sectionalDensity": 0.181,
        "hatcherRSP": 103,
        "energyDensityJCm2": 4135.2
      }
    },
    "sourceReported": {
      "muzzleVelocityMps": 375,
      "muzzleEnergyJ": 540
    },
    "delta": {
      "velocityMps": -15,
      "energyJ": -30
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.