1 #ifndef SZA_UTIL_VOLTAGE_H
2 #define SZA_UTIL_VOLTAGE_H
13 #include "carma/szautil/ConformableQuantity.h"
18 class Voltage :
public ConformableQuantity {
26 static const double centiVoltsPerVolt_;
27 static const double milliVoltsPerVolt_;
36 Voltage(
const Volts& units,
double volts);
37 Voltage(
const CentiVolts& units,
double centiVolts);
38 Voltage(
const MilliVolts& units,
double milliVolts);
46 void setVolts(
double volts);
47 void setCentiVolts(
double centiVolts);
48 void setMilliVolts(
double milliVolts);
52 inline double volts() {
56 inline double centiVolts() {
57 return volts_ * centiVoltsPerVolt_;;
60 inline double milliVolts() {
61 return volts_ * milliVoltsPerVolt_;;
64 inline unsigned short gunnUnits() {
65 return (
unsigned short)centiVolts();
68 friend std::ostream& operator<<(std::ostream& os, Voltage& voltage);
78 std::ostream& operator<<(std::ostream& os, Voltage& voltage);
85 #endif // End #ifndef SZA_UTIL_VOLTAGE_H