1 #ifndef CARMA_CONTROL_LOCHAIN_H
2 #define CARMA_CONTROL_LOCHAIN_H
56 Freq operator+(
const Freq& rhs)
const;
57 Freq operator-(
const Freq& rhs)
const;
58 Freq operator*(
const Freq& rhs)
const;
59 Freq operator*(
const double& rhs)
const;
60 Freq operator/(
double div)
const;
338 ::std::string
toString( const ::std::vector< Harmonic >& h )
const;
358 typedef ::std::vector<Harmonic> HarmonicVec;
364 HarmonicVec getHarmonics()
const;
369 HarmonicVec getAllHarmonics()
const;
372 computeHarmonics(
const Freq& oscFreq,
373 const Freq& oscOffsetLock,
374 const Freq& yigOffsetLock,
378 const Freq& yigHigh);
381 findPreferredHarmonic(
const HarmonicVec& harmonics,
394 size_t preferredHarmonicIndex_;
395 HarmonicVec harmonics_;
406 #endif // End of conditional include guard
void setTuningRange(double range)
Set the tuning range.
double megahertz() const
Accessor, megaHertz.
double getTuningScore() const
Get the score for this harmonic (range is [0,10)
::std::string toString() const
Dump LOchain parameters for the odd YIG harmonics to a string.
Handles all parameters and calculations for the CARMA LO chain.
double microhertz() const
Accessor, microHertz.
void setYigHarmonicNumber(int harm)
Set the yig harmonic number.
double gigahertz() const
Accessor, gigaHertz.
int getYigHarmonicNumber() const
Get the yig harmonic number.
int getRank() const
Get the rank for this harmonic (1 is best, 2 is second best, etc)
UNITS
Enumeration for units.
void setRefHarmonicNumber(int harm)
Set the harmonic number.
Freq()
Default constructor.
double kilohertz() const
Accessor, kiloHertz.
void setYigFreq(const Freq &yig)
Set the yig frequency.
int getOscillatorMultiplier()
Get the oscillator multiplier.
::std::string toStringPreferred() const
Dump the LOchain parameters for the preferred harmonics to a string.
Freq getOscillatorFreq() const
Get the oscillator (Gunn) frequency.
void setOscillatorMultiplier(int multiplier)
Set the oscillator multiplier to get the LOfreq.
double getTuningRange() const
Get the fractional tuning range.
int getRefHarmonicNumber() const
Get the ref harmonic number.
int getNumberHarmonics() const
Gets the number of available harmonics.
void setOscillatorFreq(const Freq &freq)
Set the oscillator (Gunn) frequency and computes LO chain.
double millihertz() const
Accessor, milliHertz.
Freq getYigFreq() const
Get the yig frequency.
void setRefFreq(const Freq &ref)
Set the ref frequency.
void setRank(int rank)
Set the rank.
Harmonic getPreferredHarmonic() const
Gets the preferred harmonic.
::std::string toStringAll() const
Dump the LOchain parameters for all harmonics to a string.
void setTuningScore(double score)
Set the tuning score.
An LOchain harmonic; has self consistent ref and yig frequencies and harmonics.
double div(const Freq &div) const
Division operation.
Freq getRefFreq() const
Get the ref frequency.
Harmonic getHarmonic(int rank) const
Gets the specified harmonic.
Freq getLOfreq() const
Get the LO frequency.
double hertz() const
Accessor, Hertz.
void updateFreq(const Freq &freq)
Update the LO frequency.