Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Units class not implemented #37

Closed
megarubber opened this issue Jan 2, 2023 · 3 comments
Closed

Units class not implemented #37

megarubber opened this issue Jan 2, 2023 · 3 comments

Comments

@megarubber
Copy link
Contributor

megarubber commented Jan 2, 2023

Problem description

Following #49
In statespaceflywheel Java example Robot.java file, it uses the Units class for measurement conversion when it calls the rotationsPerMinuteToRadiansPerSecond static method.

I don't know if it's very necessary to add...

Operating System

Windows, MacOS, Linux

Installed Python Packages

robotpy 2023.0.0b7
robotpy-wpimath 2023.0.0b7

Reproducible example code

private static final double kSpinupRadPerSec = Units.rotationsPerMinuteToRadiansPerSecond(500.0);
@virtuald
Copy link
Member

virtuald commented Jan 2, 2023

I feel like we did this at one point, but I can't find it.

@megarubber
Copy link
Contributor Author

megarubber commented Jan 2, 2023

Is MathUtll.yml a reference for Utils?

@virtuald
Copy link
Member

virtuald commented Jan 3, 2023

C++ has its own units system, so it doesn't have a units utils equivalent. It would probably make sense to implement our own conversions and put it in wpimath -- I think it would be more performant and maintainable to do them in python instead of C++. Maybe as wpimath/units.py.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants