JaiaBot 3.0.0
JaiaBot micro-AUV software
Loading...
Searching...
No Matches
conductivity.h
Go to the documentation of this file.
1#ifndef JAIABOT_UNITS_CONDUCTIVITY_H
2#define JAIABOT_UNITS_CONDUCTIVITY_H
3
4#include <boost/units/quantity.hpp>
5#include <boost/units/systems/si/conductivity.hpp>
6#include <boost/units/systems/si/prefixes.hpp>
7
8namespace jaiabot
9{
10namespace units
11{
12// 1 uS/cm = 10^-4 S/m
13typedef boost::units::make_scaled_unit<
14 boost::units::si::conductivity,
15 boost::units::scale<10, boost::units::static_rational<-4>>>::type microsiemens_per_cm_unit;
16
18
19} // namespace units
20} // namespace jaiabot
21
22template <typename ValueType>
23inline std::ostream&
24operator<<(std::ostream& os,
25 const boost::units::quantity<jaiabot::units::microsiemens_per_cm_unit, ValueType>& q)
26{
27 ValueType v = q.value();
28 return os << v << " uS/cm";
29}
30#endif
std::ostream & operator<<(std::ostream &os, const boost::units::quantity< jaiabot::units::microsiemens_per_cm_unit, ValueType > &q)
static const microsiemens_per_cm_unit microsiemens_per_cm
boost::units::make_scaled_unit< boost::units::si::conductivity, boost::units::scale< 10, boost::units::static_rational<-4 > > >::type microsiemens_per_cm_unit