phys is a tool to detect physical unit inconsistencies in C++ that builds against the Robot Operating System. phys is a command-line tool that can be used with Docker.
For example, assume a developer is building a robot and wants to calculate the length of the hypotenuse of a triangle with sides x_err and y_err, but the developer accidently uses a multiply symbol (*) instead of an addition symbol (+), and ends up adding x_err * x_err (meter-squared) to err_y (meter):
err_d = sqrt( err_x * err_x + err_y + err_y);
This code compiles and can be difficult to detect. Yikes! This kind of error is called a physical unit inconsistency, and phys can detect it without developer annotations.
C++ files that build against the Robot Operation System (randomly selected from github data) used to test and evaluate phys.