Converting to base SI units with Unitful.jl

I’m trying to figure out if its possible to convert dimensions to base SI units using Unitful without explicitly specifying the base unit.

Right now I do:

a = 800.0u"ft/s" |> u"m/s" 
b = 50.0u"cm^2" |> u"m^2"

Edit: accidentally submitted prior to finishing post…

1 Like

I believe upreferred(800u"ft/s") should do what you want. Glancing through the hosted documentation for Unitful, it doesn’t seem like this is made explicitly clear anywhere. Perhaps a PR is in order?

1 Like

upreferred does the trick. Thanks. I agree with your comment about the documentation.