Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 2.74 KB

README.md

File metadata and controls

42 lines (31 loc) · 2.74 KB

QUnits

A SI-based units framework with minimal overhead, designed for use with VEX V5 and PROS. The project was originally inspired by OkapiLib's implementation, but is intended to surpass the original in scope and ease of use.

Want a place to chat with the devs and other users? Join our Discord server.

License

This project is licensed under the MIT license. Check LICENSE for more details.

Features

  • Autogenerated declaration and conversion functions to and from double using any unit quantity
  • Automatic conversion between unit types with mathmatical functions (Length squared returns area, Acceleration times Mass returns Force, etc)
  • All common std::math functions
  • Minimal overhead compared to regular float operations when compiled with optimizations
  • Automatic conversion to named types with operations, for cleaner compiler errors and debugging
  • Adjustments for using angles in standard (ccw) or compass (cw) orientation
  • Adjustments for using temperatures in Kelvin, Rankine, Celsius, or Fahrenheit
  • 2D QUnit vectors & poses
  • 3D vectors
  • N-dimensional vectors (potentially)
  • QUnit Matrices (potentially)

FAQ

1. Who should use this? This template is geared towards developers of PROS templates such as LemLib and its users, especially VURC and VAIRC teams.

2. What units are supported? Any that be constructed from the 7 SI base dimensions(Mass, Length, Time, Current, Temperature, Luminous Intensity, and Mols), and Angles. Any others will likely not be supported (although you can treat them as dimensionless if you really need to, IE bytes/second -> hz).

3. Is this V5RC legal? Yes. Per the RECF student-centred policy, in the context of third-party libraries.

Students should be able to understand and explain the code used on their robots

In other words, you need to know how libraries work. You don't need to know the details like all the math, just more or less how the algorithm works. This is less of a problem with QUnits specifically, but if you want to learn more about any LemLib project, you can look through the documentation and ask questions on our Discord server.

Contributing

Want to contribute? Please join our Discord server, and navigate to the QUnits discussion thread.

Code of Conduct

See the Code of Conduct on how to behave like an adult.