|
How does your team incorporate engineering units?
I'm hoping to get feedback on how teams are already managing engineering units within their code.
Several of the languages used in FRC can provide compile-time checking to verify that units of distance and velocity, for example, are not combined incorrectly within your code. The upside is that you have a compiler watching your back as you make algebraic statements in your code to update an actuator. The downside is that compilers are sticklers and your code may actually become harder to read, or the points at which you connect to WPILib, which doesn't use units, may just become littered with casts and such.
Is anyone using unit features within the languages or libraries? Do you have another system that you've adopted?
Greg McKaskle
|