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
13using 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
36enum SegmentFillingMethod {NOT_DEF_STEP_TYPE,NUM_POINT, LINE_STEP, AZIMUTH_STEP};
37
46enum RotationVersus{CW=1, NOT_DEF_ROT_VERSUS = 0, CCW=-1};
47
66private:
79
83 GeographicLib::GeodesicLine SegmentLine;
84
110 vector <RadarPoint_util> SegmentPoint;
111
116
117public:
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
229
230 vector<RadarPoint_util> getSegment();
236
242 void addSegmentPoint(RadarPoint_util point);
249 bool addSegmentPoint(int index,RadarPoint_util point);
267 int getSegmentNumPoint();
272 float getSegmentLineStep();
277 float getSegmentAzimuthStep();
283
293 void setSegmentElevation(float elev);
303 void setSegmentHeight(float height);
304
314 bool isRHI();
320
325 void printSegmentInfo(std::ostream& out = std::cout);
326
332 float distanceAlongSegment(int i);
333
334private:
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
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
void setSegmentLineStep(float value)
Define segment Line step.
Definition RadarSegment_util.cpp:178
void setSegmentHeight(float height)
Set segment Height.
Definition RadarSegment_util.cpp:422
void setRadarCoord(float latr, float lonr, float heightr, float aTH)
Set radar coordinates for the segment, clear any other informations First and last points of the segm...
Definition RadarSegment_util.cpp:11
RotationVersus segmentVersus
Definition RadarSegment_util.hpp:115
RadarPoint_util endSegment
Definition RadarSegment_util.hpp:74
float AzimuthStep
Definition RadarSegment_util.hpp:102
bool setSegmentGeo(float lat_begin, float lon_begin, float lat_end, float lon_end)
Set segment extremes in geographic coordinate.
Definition RadarSegment_util.cpp:17
void setSegmentType(SegmentFillingMethod type)
Set segment filling method.
Definition RadarSegment_util.cpp:408
void setSegmentStep(SegmentFillingMethod type, float value)
Define segment subdivision.
Definition RadarSegment_util.cpp:125
float segmentLength
Definition RadarSegment_util.hpp:78
RadarSegment_util()
Constructor.
Definition RadarSegment_util.cpp:3
void setSegmentLength(float value)
Define Segment lenght.
Definition RadarSegment_util.cpp:372
bool isRHI()
Check if segment is an RHI.
Definition RadarSegment_util.cpp:429
void setSegmentAzimuthStep(float value)
Define segment Azimuth step.
Definition RadarSegment_util.cpp:181
SegmentFillingMethod stepType
Definition RadarSegment_util.hpp:106
float getSegmentLength()
Return the segment lenght.
Definition RadarSegment_util.cpp:378
void CalculateSegmentLineStep()
Calculate segment point for LineStep method.
Definition RadarSegment_util.cpp:237
RadarPoint_util getSegmentPoint(int index)
Get segment point.
Definition RadarSegment_util.cpp:157
float getSegmentAzimuth()
Return the segment direction - Azimuth.
Definition RadarSegment_util.cpp:375
void CalculateSegment()
Calculate segment point.
Definition RadarSegment_util.cpp:140
bool setSegmentVersus()
Calculate and set segment versus return true if calculation is possible (starting and ending points d...
Definition RadarSegment_util.cpp:386
RadarPoint_util beginSegment
Definition RadarSegment_util.hpp:70
void setSegmentElevation(float elev)
Set segment Elevation.
Definition RadarSegment_util.cpp:415
bool isSegmentLengthValid()
check if SegmentLength is valid
Definition RadarSegment_util.cpp:435
float segmentStep
Definition RadarSegment_util.hpp:95
bool setSegmentGeodesic(float az_begin, float surfDist_begin, float az_end, float surfDist_end)
Set segment extremes in geodesic coordinate relative to radar site.
Definition RadarSegment_util.cpp:77
void CalculateSegmentNumPoint()
Calculate segment point for NumPoint method.
Definition RadarSegment_util.cpp:193
void setSegmentNumPoint(int value)
Define segment numpoint.
Definition RadarSegment_util.cpp:175
float distanceAlongSegment(int i)
Calculate distance along the segment from segment starting point.
Definition RadarSegment_util.cpp:467
GeographicLib::GeodesicLine SegmentLine
Definition RadarSegment_util.hpp:83
void addSegmentPoint(RadarPoint_util point)
Add a segment point at the end of the vector.
Definition RadarSegment_util.cpp:163
RotationVersus getSegmentVersus()
return the segment versus return segmentVersus attribute
Definition RadarSegment_util.cpp:382
void clearSegmentPoints()
Definition RadarSegment_util.cpp:117
SegmentFillingMethod getSegmentType()
Get the segment filling method utilized.
Definition RadarSegment_util.cpp:411
int numPoint
Definition RadarSegment_util.hpp:88
int getSegmentNumPoint()
Return the number of segment points.
Definition RadarSegment_util.cpp:184
void printSegmentInfo(std::ostream &out=std::cout)
Segment information on a output stream.
Definition RadarSegment_util.cpp:440
float getSegmentAzimuthStep()
Return segment Azimuth step.
Definition RadarSegment_util.cpp:190
void SetGeodesicLine()
set of GeodesicLine
Definition RadarSegment_util.cpp:358
void CalculateSegmentAzimuthStep()
Calculate segment point for AzimuthStep method.
Definition RadarSegment_util.cpp:272
bool setSegmentAeqd(float x_begin, float y_begin, float x_end, float y_end)
Set segment extremes in gnomonic coordinate.
Definition RadarSegment_util.cpp:47
float getSegmentLineStep()
Return segment interval.
Definition RadarSegment_util.cpp:187
vector< RadarPoint_util > getSegment()
Get segment.
Definition RadarSegment_util.cpp:152
void clearSegment()
Definition RadarSegment_util.cpp:109
vector< RadarPoint_util > SegmentPoint
Definition RadarSegment_util.hpp:110
Namespace for generic utility used.
Radar coord exceptions.