Goby3 3.2.3
2025.05.13
Loading...
Searching...
No Matches
system.hpp
Go to the documentation of this file.
1// Copyright 2009-2018 Toby Schneider (http://gobysoft.org/index.wt/people/toby)
2// GobySoft, LLC (2013-)
3// Massachusetts Institute of Technology (2007-2014)
4// Community contributors (see AUTHORS file)
5//
6//
7// This file is part of the Goby Underwater Autonomy Project Libraries
8// ("The Goby Libraries").
9//
10// The Goby Libraries are free software: you can redistribute them and/or modify
11// them under the terms of the GNU Lesser General Public License as published by
12// the Free Software Foundation, either version 2.1 of the License, or
13// (at your option) any later version.
14//
15// The Goby Libraries are distributed in the hope that they will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU Lesser General Public License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public License
21// along with Goby. If not, see <http://www.gnu.org/licenses/>.
22
23#ifndef RPM_SYSTEM_20190727H
24#define RPM_SYSTEM_20190727H
25
26#include <boost/units/base_units/metric/minute.hpp>
27#include <boost/units/make_system.hpp>
28#include <boost/units/unit.hpp>
29#include <boost/units/conversion.hpp>
30#include <boost/units/physical_dimensions/frequency.hpp>
31#include <boost/units/physical_dimensions/angular_velocity.hpp>
32#include <boost/units/static_constant.hpp>
33#include <boost/units/systems/angle/revolutions.hpp>
34
35#include "goby/util/constants.h"
36
37namespace goby
38{
39namespace util
40{
41namespace units
42{
43namespace rpm
44{
45typedef boost::units::make_system<boost::units::angle::revolution_base_unit, boost::units::metric::minute_base_unit>::type system;
46
47typedef boost::units::unit<boost::units::dimensionless_type, system> dimensionless;
48
49// an RPM is either 1/60 Hz (when considered a frequency)
50typedef boost::units::unit<boost::units::frequency_dimension, system> frequency;
51// or 2*pi/60 rad/s (when considered an angular velocity)
52typedef boost::units::unit<boost::units::angular_velocity_dimension, system> angular_velocity;
53
56
59
60} // namespace rpm
61} // namespace units
62} // namespace util
63} // namespace goby
64
65#endif
BOOST_UNITS_STATIC_CONSTANT(rpm_f, frequency)
boost::units::unit< boost::units::frequency_dimension, system > frequency
Definition system.hpp:50
boost::units::unit< boost::units::dimensionless_type, system > dimensionless
Definition system.hpp:47
boost::units::make_system< boost::units::angle::revolution_base_unit, boost::units::metric::minute_base_unit >::type system
Definition system.hpp:45
boost::units::unit< boost::units::angular_velocity_dimension, system > angular_velocity
Definition system.hpp:52
The global namespace for the Goby project.