CARMA C++
ShadowingCalculator.h
Go to the documentation of this file.
1 // $Id: ShadowingCalculator.h,v 1.5 2012/07/25 16:40:11 eml Exp $
2 
3 #ifndef CARMA_PIPELINE_SHADOWINGCALCULATOR_H
4 #define CARMA_PIPELINE_SHADOWINGCALCULATOR_H
5 
15 #include "carma/monitor/ControlSubsystem.h"
17 
18 #include "carma/services/Global.h"
19 
22 #include "carma/szautil/HourAngle.h"
23 #include "carma/szautil/Percent.h"
24 
25 namespace carma {
26  namespace pipeline {
27 
28  class ShadowingCalculator {
29  public:
30 
31  // A struct for encapsulating a type of shadowing percentage
32 
33  struct Shadowing {
34  sza::util::Percent percent_;
35  bool percentOfDiameter_;
36  };
37 
41  ShadowingCalculator( const carma::monitor::MonitorSystem * const ms);
42 
46  virtual ~ShadowingCalculator();
47 
48  // Update shadowing calculations from the monitor system
49 
50  void update();
51 
52  // Return a vector of boolean flags indicating if antennas are
53  // shadowed by antennas in any subarray
54 
55  std::vector<bool> getSweptVolumeShadowing();
56 
57  // Return a vector of boolean flags indicating if antennas are
58  // shadowed by antennas in the same subarray
59 
60  std::vector<bool> getInternalShadowing();
61 
62  // Set what constitutes shadowing, as a percentage of the
63  // diameter of the shadowed dish.
64 
65  void setInternalShadowingDiameterPercentage(sza::util::Percent percent);
66  void setSweptVolumeShadowingDiameterPercentage(sza::util::Percent percent);
67 
68  // Set what constitutes shadowing, as a percentage of the
69  // area of the shadowed dish.
70 
71  void setInternalShadowingAreaPercentage(sza::util::Percent percent);
72  void setSweptVolumeShadowingAreaPercentage(sza::util::Percent percent);
73 
74  // Override az/el positions for all telescopes with the passed az/el
75 
76  void setAzEl(sza::util::Angle az, sza::util::Angle el);
77  void setHaDec(sza::util::HourAngle ha, sza::util::Declination declination);
78 
79  std::vector<sza::util::CarmaConfig::PadLocation>& getPadLocations();
80 
81  private:
82 
83  void initialize();
84  void cacheMonitorSystemPointers();
85 
86  public:
87 
88  void updateConfigurationInformation();
89  void updateShadowFlags();
90 
91  void defaultToSweptVolumeForAllAntennas(bool swept);
92 
93  public:
94 
95  unsigned nAnt_;
96  const carma::monitor::MonitorSystem * const ms_;
97 
98  Shadowing sweptVolumeShadowing_;
99  Shadowing internalShadowing_;
100 
101  std::vector<bool> sweptVolumeShadowingFlags_;
102  std::vector<bool> internalShadowingFlags_;
103  std::vector<unsigned> subarrayNos_;
104  std::vector<sza::util::Angle> azimuths_;
105  std::vector<sza::util::Angle> elevations_;
106  std::vector<sza::util::Angle> latitudes_;
107  std::vector<sza::util::Angle> longitudes_;
108  std::vector<sza::util::Length> altitudes_;
109  std::vector<bool> tracking_;
110 
111  std::vector<carma::monitor::AntennaCommon*> antennaCommonPtrs_;
112  std::vector<carma::monitor::ControlSubsystemBase::Antenna*> controlAntennaPtrs_;
113 
114  std::vector<sza::util::CarmaConfig::PadLocation> padLocations_;
115 
116  bool sweptOverride_;
117 
118  }; // End class ShadowingCalculator
119 
120  } // End namespace pipeline
121 } // End namespace carma
122 
123 
124 
125 #endif // End #ifndef CARMA_PIPELINE_SHADOWINGCALCULATOR_H
Tagged: Fri Jun 15 16:44:12 PDT 2007.
Tagged: Mon Aug 17 11:01:48 PDT 2009.
The monitor system base class.
Tagged: Thu Aug 28 15:18:31 PDT 2008.
Common parameters used CARMA-wide, both typedefs and constants such as number of antennas.
Monitor system base class.
Definition: MonitorSystem.h:81