{
 "bus_current_limit": {
  "bus_a_max": 51.4,
  "bus_scale_min": 0.749,
  "i_peak_a": 50.0,
  "mode_after": "run",
  "ms_over_the_limit": 39,
  "reason": "none",
  "rise_above_standing_mm": 151.7
 },
 "conditions": {
  "bus_v": 36.0,
  "half_mass_kg": 18.75,
  "legs": "two rigs (sim/leg_rig.py through rig/sim_bus.py), one per bus",
  "loop_hz": 1000,
  "pack_r_int_ohm": 0.1
 },
 "cutoff": {
  "leg_at_stop_mm": 137.2,
  "mcu_run_at_end": false,
  "mode_at_end": "idle",
  "motors_stopped_ms": 1342.0,
  "reason": "cut-off",
  "trip_after_drop_ms": 192.0,
  "vload_at_trip": 29.991,
  "vload_tick_before": 30.005,
  "vrest_at_trip": 33.213
 },
 "heartbeat": {
  "reason": "link",
  "sit_after_last_setpoint_s": 2.198
 },
 "jump_gate": {
  "33.9 V": {
   "bus_a_max_in_the_jump": 1.4,
   "bus_v_min_in_the_jump": 33.76,
   "cutoff": false,
   "jumped": false,
   "mode_after": "run",
   "push_bus_current_limit_a": 0.0,
   "refused": "voltage",
   "rise_above_standing_mm": 0.1,
   "scale": 0.0
  },
  "34.1 V": {
   "bus_a_max_in_the_jump": 32.8,
   "bus_v_min_in_the_jump": 30.82,
   "cutoff": false,
   "jumped": true,
   "mode_after": "run",
   "push_bus_current_limit_a": 31.0,
   "refused": null,
   "rise_above_standing_mm": 83.1,
   "scale": 0.4306
  },
  "36.0 V": {
   "bus_a_max_in_the_jump": 51.2,
   "bus_v_min_in_the_jump": 30.88,
   "cutoff": false,
   "jumped": true,
   "mode_after": "run",
   "push_bus_current_limit_a": 50.0,
   "refused": null,
   "rise_above_standing_mm": 125.1,
   "scale": 0.6944
  },
  "41.0 V": {
   "bus_a_max_in_the_jump": 70.4,
   "bus_v_min_in_the_jump": 33.97,
   "cutoff": false,
   "jumped": true,
   "mode_after": "run",
   "push_bus_current_limit_a": 72.0,
   "refused": null,
   "rise_above_standing_mm": 167.4,
   "scale": 1.0
  }
 },
 "made_by": "python -m pytest firmware/balance/hil (firmware/balance/hil/test_hil.py)",
 "overcharge": {
  "leg_at_stop_mm": 137.2,
  "leg_min_in_the_sit_mm": 137.2,
  "mcu_run_at_end": false,
  "mode_at_end": "idle",
  "motors_stopped_ms": 1198.0,
  "reason": "over-charge",
  "regen_scale_min": 0.753,
  "trip_after_step_ms": 48.0,
  "vhigh_at_trip": 44.035,
  "vhigh_tick_before": 43.995
 },
 "people_near": {
  "jump_refused": "people near",
  "reason": "people",
  "sit_after_s": 2.008
 },
 "radio_stop": {
  "leg_at_stop_mm": 129.8,
  "mcu_run_open_ms": 1.0,
  "motors_stopped_ms": 451.0,
  "reason": "stop"
 },
 "regen_clamp": {
  "bus_v_max": 45.75,
  "charge_a_max": 50.4,
  "leg_min_mm": 153.7,
  "mode_after": "run",
  "ms_over_42_5_v_in_the_landing": 25,
  "ms_over_42_5_v_outside_the_landing": 5,
  "overcharge": false,
  "overcharge_filter_max_v": 42.904,
  "pack_v": 41.0,
  "regen_scale_min": 0.0,
  "rise_above_standing_mm": 167.4
 },
 "robot_sil": {
  "at_3.9s": {
   "L_fw_mm": 302.0,
   "L_py_mm": 302.0,
   "v_fw": 0.619,
   "v_py": 0.617,
   "x_fw": 0.871,
   "x_py": 0.866
  },
  "at_5.9s": {
   "L_fw_mm": 302.3,
   "L_py_mm": 302.3,
   "v_fw": -0.049,
   "v_py": -0.04,
   "x_fw": 1.488,
   "x_py": 1.492
  },
  "at_7.9s": {
   "L_fw_mm": 245.1,
   "L_py_mm": 245.1,
   "v_fw": -0.078,
   "v_py": -0.083,
   "x_fw": 1.292,
   "x_py": 1.299
  },
  "bus_v": 36.0,
  "fell": false,
  "final_mode": "run",
  "imu_pitch_rate_error": 0.0017109844051829042,
  "seconds": 8.0,
  "theta_estimate_error_deg": 0.021402983609226666,
  "worst_diff_L": 0.001037794214705845,
  "worst_diff_theta": 0.19338924122009793,
  "worst_diff_v": 0.010710620118217447,
  "worst_diff_x": 0.009453538577884224,
  "worst_theta_deg_firmware": 5.444535200045252,
  "worst_theta_deg_python": 5.273092249761172
 },
 "stand_up": {
  "boot_ms": 102,
  "criterion": "worst |dL| / L_ref <= 0.05 and worst |d lean| <= 0.05 rad (the axle 5 % of the leg off line)",
  "firmware_left_leg": {
   "end_L_mm": [
    304.76054879118243,
    304.75917310301793
   ],
   "rms_L_mm": 0.15499240085071514,
   "samples": 1500,
   "worst_L_at_s": 0.788,
   "worst_L_mm": 0.36727493786994914,
   "worst_L_rel": 0.001700261752612433,
   "worst_lean_axle_rel": 0.00015648568990486492,
   "worst_lean_deg": 0.008965969585741713,
   "worst_lean_rad": 0.00015648568990486492
  },
  "firmware_right_leg": {
   "end_L_mm": [
    304.7605618108865,
    304.75917310301793
   ],
   "rms_L_mm": 0.1547961498823979,
   "samples": 1500,
   "worst_L_at_s": 0.78,
   "worst_L_mm": 0.3669893169138405,
   "worst_L_rel": 0.001702953209519304,
   "worst_lean_axle_rel": 0.00015946739157184455,
   "worst_lean_deg": 0.009136808507026768,
   "worst_lean_rad": 0.00015946739157184455
  },
  "misses": [
   0,
   0,
   0,
   0
  ],
  "rig_controller_same_hil": {
   "end_L_mm": [
    304.7604985049771,
    304.75917310301793
   ],
   "rms_L_mm": 0.07774752255431966,
   "samples": 1500,
   "worst_L_at_s": 0.074,
   "worst_L_mm": 0.3039411019303828,
   "worst_L_rel": 0.0021481606056215513,
   "worst_lean_axle_rel": 0.0001571259114166845,
   "worst_lean_deg": 0.00900265157632246,
   "worst_lean_rad": 0.0001571259114166845
  },
  "tx_drops": 0
 },
 "uvlo": {
  "cutoff": {
   "bus_v_on_the_wire": 29.98,
   "estimate_v": 29.9997,
   "estimate_v_tick_before": 30.0001,
   "firmware_estimate": "vload",
   "mode": "idle",
   "pack_open_circuit_v": 30.0332,
   "t_s": 30.335,
   "threshold_v": 30.0
  },
  "jump_refused": {
   "bus_v_on_the_wire": 33.664,
   "estimate_v": 34.0,
   "estimate_v_tick_before": 34.0004,
   "firmware_estimate": "vrest",
   "mode": "run",
   "pack_open_circuit_v": 33.8008,
   "t_s": 11.497,
   "threshold_v": 34.0
  },
  "note": "warn, jump and sit trip on the resting estimate (V + I x 0.100 ohm, 1 s filter), which on a falling pack lags by ramp x 1 s; the cut-off on the loaded bus (0.1 s filter)",
  "ramp_v_per_s": 0.2,
  "sat_leg_mm": 137.2,
  "sit": {
   "bus_v_on_the_wire": 31.656,
   "estimate_v": 32.0,
   "estimate_v_tick_before": 32.0004,
   "firmware_estimate": "vrest",
   "mode": "sit",
   "pack_open_circuit_v": 31.8008,
   "t_s": 21.497,
   "threshold_v": 32.0
  },
  "warn": {
   "bus_v_on_the_wire": 34.669,
   "estimate_v": 34.9999,
   "estimate_v_tick_before": 35.0003,
   "firmware_estimate": "vrest",
   "mode": "run",
   "pack_open_circuit_v": 34.8024,
   "t_s": 6.489,
   "threshold_v": 35.0
  }
 }
}
