3D printed Arduino Airsoft Chronograph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ticks.h 483B

1234567891011121314151617181920212223
  1. /*
  2. * ticks.h
  3. *
  4. * OpenChrono BB speed measurement device.
  5. *
  6. * Copyright (c) 2022 Thomas Buck <thomas@xythobuz.de>
  7. */
  8. #ifndef __TICKS_H__
  9. #define __TICKS_H__
  10. extern uint16_t tick_history[];
  11. extern uint8_t tick_count;
  12. void tick_new_value(uint16_t ticks);
  13. uint16_t tick_average();
  14. uint16_t tick_max();
  15. uint16_t tick_min();
  16. double tick_to_metric(uint16_t ticks);
  17. double metric_to_imperial(double speed);
  18. double metric_to_joules(double speed, double mass);
  19. #endif // __TICKS_H__