radar-coord-conversion-utility  0.8
RadarSegment_util.hpp
Go to the documentation of this file.
1 
5 #ifndef __RADAR_SEGMENT_UTIL__
6 #define __RADAR_SEGMENT_UTIL__
7 
8 #include <limits>
9 #include <iostream>
10 #include <vector>
11 #include <cmath>
12 
13 using namespace std;
14 
15 #include <GeographicLib/Math.hpp>
16 #include <GeographicLib/Geodesic.hpp>
17 #include <GeographicLib/GeodesicLine.hpp>
23 
24 #define SEGMENT_LENGTH_MINIMUM 1.
25 
36 enum SegmentFillingMethod {NOT_DEF_STEP_TYPE,NUM_POINT, LINE_STEP, AZIMUTH_STEP};
37 
46 enum RotationVersus{CW=1, NOT_DEF_ROT_VERSUS = 0, CCW=-1};
47 
66 private:
79 
83  GeographicLib::GeodesicLine SegmentLine;
84 
88  int numPoint;
95  float segmentStep;
102  float AzimuthStep;
110  vector <RadarPoint_util> SegmentPoint;
111 
116 
117 public:
138  RadarSegment_util(float latr,float lonr,float heightr, float aTH);
139 
148  void setRadarCoord(float latr,float lonr,float heightr, float aTH);
149 
163  bool setSegmentGeo(float lat_begin, float lon_begin, float lat_end, float lon_end) ;
177  bool setSegmentAeqd(float x_begin, float y_begin, float x_end, float y_end) ;
191  bool setSegmentGeodesic(float az_begin, float surfDist_begin, float az_end, float surfDist_end) ;
195  void clearSegment();
200  void clearSegmentPoints();
205  float getSegmentAzimuth();
210  float getSegmentLength();
219  void setSegmentStep(SegmentFillingMethod type, float value);
223  void CalculateSegment();
224 
230  vector<RadarPoint_util> getSegment();
237  RadarPoint_util getSegmentPoint(int index);
242  void addSegmentPoint(RadarPoint_util point);
249  bool addSegmentPoint(int index,RadarPoint_util point);
257  void setSegmentType(SegmentFillingMethod type);
262  SegmentFillingMethod getSegmentType();
267  int getSegmentNumPoint();
272  float getSegmentLineStep();
277  float getSegmentAzimuthStep();
282  RotationVersus getSegmentVersus();
283 
293  void setSegmentElevation(float elev);
303  void setSegmentHeight(float height);
304 
314  bool isRHI();
319  bool isSegmentLengthValid();
320 
325  void printSegmentInfo(std::ostream& out = std::cout);
326 
332  float distanceAlongSegment(int i);
333 
334 private:
339  bool setSegmentVersus();
340 
345  void setSegmentLength(float value);
350  void setSegmentNumPoint(int value);
355  void setSegmentLineStep(float value);
360  void setSegmentAzimuthStep(float value);
361 
365  void CalculateSegmentNumPoint();
369  void CalculateSegmentLineStep();
373  void CalculateSegmentAzimuthStep();
377  void SetGeodesicLine();
378 };
379 
380 #endif
Class to manage relationship between radar coordinates (Azimuth, elevation, range) and "pseudo-cilind...
Class to manage relationship between radar site and a single point over the Earth.
Class to manage relationship between radar site and a single point.
RotationVersus
Versus of rotation.
Definition: RadarSegment_util.hpp:46
SegmentFillingMethod
Definition of filling types .
Definition: RadarSegment_util.hpp:36
Class to calculate radar point coordinates related to radar place and coordinates.
Definition: RadarPoint_util.hpp:33
Class to calculate radar point coordinates along a defined segment relative to radar site.
Definition: RadarSegment_util.hpp:65
RotationVersus segmentVersus
Definition: RadarSegment_util.hpp:115
RadarPoint_util endSegment
Definition: RadarSegment_util.hpp:74
float AzimuthStep
Definition: RadarSegment_util.hpp:102
float segmentLength
Definition: RadarSegment_util.hpp:78
SegmentFillingMethod stepType
Definition: RadarSegment_util.hpp:106
RadarPoint_util beginSegment
Definition: RadarSegment_util.hpp:70
float segmentStep
Definition: RadarSegment_util.hpp:95
GeographicLib::GeodesicLine SegmentLine
Definition: RadarSegment_util.hpp:83
int numPoint
Definition: RadarSegment_util.hpp:88
vector< RadarPoint_util > SegmentPoint
Definition: RadarSegment_util.hpp:110
Namespace for generic utility used.
Radar coord exceptions.