boost::units - converting from one derived_dimension to another across systems (imperial to metric)
Thanks for input...Ok, I have errors creating a 'lineal force unit'.
In our branch of engineering, we have kips****/ft, kips/in, lbs/foot, lbs/in, kN/meter, Kn/cm, KN/mm, N/meter, N/cm, N/mm, Metric Ton/meter, Metric Ton/cm, Metric Ton/mm, KiloGram/meter $, KiloGram/cm, KiloGram/mm, etc....All these units* are loosing force divided by length.
After all the appreciated input in this thread, I thought I'd try this but it does not compile*** probably because force is "L M T^-2" and length is "L" which is not correct: //Lineal Force
typedef boost::units::derived_dimension<
boost::units::force_dimension, 1,
boost::units::length_dimension, -1
>::type lineal_force_dimension;
How can I use Boost.Units to convert one force/length to another force/length: say, lb/in to, say, kg/m?
*not Boost.Units**, the units in the engineering math equation**A set of base units raised to rational exponents, e.g. m^1, kg^1, m^1/s^2.
*** ...\boost_1_68_0\boost\mpl\aux_\preprocessed\plain\less.hpp(20): error C2039: 'value': is not a member of 'boost::units::detail::dimension_list_tag'
****1000 lbs force = kips***** Here is a table in Wiki about converting between lbs and kilogram. Kilogram in Boost.Units is a mass not a force so I need to create a kilogram force and I did that when I converted "Forces" $ in another task...
$.h
struct metric_ton_base_unit : boost::units::base_unit
AMDG On 11/16/2018 05:27 AM, Matt Vinson via Boost-users wrote:
Thanks for input...Ok, I have errors creating a 'lineal force unit'. In our branch of engineering, we have kips****/ft, kips/in, lbs/foot, lbs/in, kN/meter, Kn/cm, KN/mm, N/meter, N/cm, N/mm, Metric Ton/meter, Metric Ton/cm, Metric Ton/mm, KiloGram/meter $, KiloGram/cm, KiloGram/mm, etc....All these units* are loosing force divided by length. After all the appreciated input in this thread, I thought I'd try this but it does not compile*** probably because force is "L M T^-2" and length is "L" which is not correct: //Lineal Force typedef boost::units::derived_dimension< boost::units::force_dimension, 1, boost::units::length_dimension, -1 >::type lineal_force_dimension;
derived_dimension works with the base_dimensions not a dimension list. Use either: boost::units::derived_dimension< boost::units::mass_base_dimension, 1, boost::units::time_base_dimension, -2>::type or boost::mpl::divides< boost::units::force_dimension, boost::units::length_dimension>::type
How can I use Boost.Units to convert one force/length to another force/length: say, lb/in to, say, kg/m? *not Boost.Units**, the units in the engineering math equation**A set of base units raised to rational exponents, e.g. m^1, kg^1, m^1/s^2. *** ...\boost_1_68_0\boost\mpl\aux_\preprocessed\plain\less.hpp(20): error C2039: 'value': is not a member of 'boost::units::detail::dimension_list_tag' <snip>>
In Christ, Steven Watanabe
participants (2)
-
Matt Vinson
-
Steven Watanabe