r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
173 stars 27 forks source link

Unit conversion from RPM to Hz #318

Closed Dimeruben closed 2 years ago

Dimeruben commented 2 years ago

This conversion should provide 50Hz.

> rot_speed<-set_units(3000,rpm)
> set_units(rot_speed,Hz)
314.1593 [Hz]
edzer commented 2 years ago

If this is an issue, it is an upstream issue, not of the units R package. The udunits database defines rpm as unit of angular velocity measuring the angular distance covered by a rotating object, divided by the amount of time used to cover that distance; measured perpendicular to the plane of rotation, with direction usually indicated by the right-hand rule (see file udunits2-common.xml).

Dimeruben commented 2 years ago

Thank you for your answer. You are right edzer, udunits establishes the conversion and I just figured out which was the problem. When converting rpm to Hz a radian conversion is applied . If the conversion 3000rpm <- 50Hz is needed It can be used:

>  rot_speed<-set_units(3000,rpm)
>  set_units(rot_speed,rps)
50 [rps]