VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
DtSensorFanWalker Class Reference

Classes

struct  IntersectionInformation
 

Public Types

typedef boost::function
< IntersectionInformation(const
DtVector &start, const
DtVector &end, bool
altitudeMSL)> 
SensorFanWalkerFunction
 
typedef std::vector
< IntersectionInformation
Result
 
typedef std::map< int, ResultResults
 

Public Member Functions

 DtSensorFanWalker ()
 
 DtSensorFanWalker (const DtSensorFanWalker &)
 
virtual ~DtSensorFanWalker ()
 
virtual void setBreakAfterTime (double)
 
double breakAfterTime () const
 
virtual void setPrintStats (bool)
 
bool printStats () const
 
double azimuthRange () const
 
double azimuthStart () const
 
double azimuthEnd () const
 
virtual bool isComplete () const
 
virtual void init (const DtVector &start, double radius, double circleRadianSamplingRate, double sensorFanLineSamplingRate, const std::set< double > &altitudes, double azimuthStart=0., double azimuthEnd=M_2PI, bool altitudeMSL=true)
 
virtual void init (const DtVector &start, double radius, double circleRadianSamplingRate, double azimuthStart=0., double azimuthEnd=M_2PI, double elevationRate=M_DEG2RAD, double elevationStart=0., double elevationEnd=M_PI_2)
 
virtual bool walk (SensorFanWalkerFunction, bool continueIfUnavailable=false)
 
const Resultsresults () const
 
virtual void resetStartingSpoke ()
 
int startingSpoke () const
 
int onSpoke () const
 
double elevationRate () const
 
double elevationStart () const
 
double elevationEnd () const
 
void setElevationRanges (double s, double e)
 
void setAzimuthRanges (double s, double e)
 
virtual void updateStartingSpoke ()
 
virtual DtSensorFanWalkerclone () const
 
virtual void addNew (int onSpoke, const IntersectionInformation &)
 
virtual void reset ()
 
virtual void printStatistics ()
 
virtual void setRecordIntersectionPointAsEndPoint (bool)
 
bool recordIntersectionPointAsEndPoint () const
 
virtual void setStopOnFirstClearView (bool)
 
bool stopOnFirstClearView () const
 
virtual void setCalculateAsDome (bool)
 
bool calculateAsDome () const
 
virtual void copyResultsOf (const DtSensorFanWalker &)
 
virtual void setCalculationsHaveBegun (bool)
 
bool calculationsHaveBegun () const
 
virtual bool timedOutSlice ()
 
virtual void setSliceTimeoutPeriod (double)
 
double sliceTimeoutPeriod () const
 

Static Public Member Functions

static DtSensorFanWalkercreate ()
 
static DtSensorFanWalkerCreatorFcn sensorFanWalkerCreatorFcn ()
 
static void setSensorFanWalkerCreatorFcn (DtSensorFanWalkerCreatorFcn)
 
static double calculateDistance (const DtVector &start, const DtVector &end)
 
static DtVector calculateEndPointFromRadian (const DtVector &start, double radius, double rad=0)
 
static DtVector calculatePointFromElevationAngle (const DtVector &geocentricStart, double radius, double azimuth, double elevation)
 

Protected Attributes

DtVector myStart
 
double myRadius
 
double myCircleRadianSamplingRate
 
double mySensorFanLineSamplingRate
 
std::set< doublemyAltitudes
 
Results myResults
 
int myOnSpoke
 
std::vector< intmyAlongSpoke
 
int myPointsAlongLine
 
int myTotalSpokes
 
double mySliceTimeoutPeriod = -1
 
double myWaitingForPageTime
 
double myLastStatPrint
 
double myIntersectionTime
 
DtTimedSection myPagingTimeTimer
 
bool myPagedLastTime
 
bool myPrintStats
 
bool myAltitudeMSL
 
double myBreakAfterTime
 
double myTimeSinceLastBreak
 
double myTimeSinceLastTimeout
 
int myStartingSpoke
 
bool mySetRecordIntersectionPointAsEndPoint
 
bool myStopOnFirstClearView
 
bool myCalculateAsDome
 
bool myCalculationsHaveBegun
 
double myAzimuthStart
 
double myAzimuthEnd
 
double myElevationRate
 
double myElevationStart
 
double myElevationEnd
 
double myCurrentElevation
 

Static Protected Attributes

static DtSensorFanWalkerCreatorFcn theSensorFanWalkerCreatorFcn
 

Member Typedef Documentation

typedef boost::function<IntersectionInformation (const DtVector& start, const DtVector& end, bool altitudeMSL)> DtSensorFanWalker::SensorFanWalkerFunction

If the altitude is not MSL, the function must do an additional height check at the location and adjust the given end vector altitude to actually be above the terrain at that location.

The result map is, by segment (i.e. number of lines along the circle) and step point along that line, contains the point at which there is no intersection If the result is DtVector::zero then there is no line of sight to that point.

Constructor & Destructor Documentation

DtSensorFanWalker::DtSensorFanWalker ( )

CTOR for the walker.

DtSensorFanWalker::DtSensorFanWalker ( const DtSensorFanWalker )

Copy constructor.

virtual DtSensorFanWalker::~DtSensorFanWalker ( )
virtual

Member Function Documentation

virtual void DtSensorFanWalker::setBreakAfterTime ( double  )
virtual

Set this value to return, even if not complete, after a certain time and a full spoke is complete. The walk will return true as this is a valid end condition, so, check the isComplete flag to see if the walk is also complete.

double DtSensorFanWalker::breakAfterTime ( ) const
inline
virtual void DtSensorFanWalker::setPrintStats ( bool  )
virtual

Set to true to print out stats of running every minute (default is false)

bool DtSensorFanWalker::printStats ( ) const
inline
double DtSensorFanWalker::azimuthRange ( ) const
inline
double DtSensorFanWalker::azimuthStart ( ) const
inline
double DtSensorFanWalker::azimuthEnd ( ) const
inline
virtual bool DtSensorFanWalker::isComplete ( ) const
virtual

This is considered complete if the number of spokes processed is the same as the total number of spokes.

static DtSensorFanWalker* DtSensorFanWalker::create ( )
static

Creates a new instance of this class. If there is a creator set will use that function to make the class, else create this class by default.

static DtSensorFanWalkerCreatorFcn DtSensorFanWalker::sensorFanWalkerCreatorFcn ( )
static
static void DtSensorFanWalker::setSensorFanWalkerCreatorFcn ( DtSensorFanWalkerCreatorFcn  )
static
virtual void DtSensorFanWalker::init ( const DtVector start,
double  radius,
double  circleRadianSamplingRate,
double  sensorFanLineSamplingRate,
const std::set< double > &  altitudes,
double  azimuthStart = 0.,
double  azimuthEnd = M_2PI,
bool  altitudeMSL = true 
)
virtual

Initialize for a post spacing sensor fan start - Start point, in geocentric radius - meters from the start (origin) to test to circleRadianSamplingRate - How many radians along the circle to move before doing another start to circle edge test sensorFanLineSamplingRate - How many meters to walk along the line before doing another altitude test altitudes - The alttiudes at each point to test along the line Azimuth start - Radians on the circle to start the azimuth check Asimuth end - Radians on the circle to stop the azimuth check altitudeMSL - If true the altitueds given will be above sea level, else the terrain height will be checked at the given location, and, the altitude will be considered above terrain.

virtual void DtSensorFanWalker::init ( const DtVector start,
double  radius,
double  circleRadianSamplingRate,
double  azimuthStart = 0.,
double  azimuthEnd = M_2PI,
double  elevationRate = M_DEG2RAD,
double  elevationStart = 0.,
double  elevationEnd = M_PI_2 
)
virtual

Initialize for a dome walking sensor fan start - Start point, in geocentric radius - meters from the start (origin) to test to circleRadianSamplingRate - How many radians along the circle to move before doing another start to circle edge test Azimuth start - Radians on the circle to start the azimuth check Asimuth end - Radians on the circle to stop the azimuth check elevationRate - The rate up the dome to walk. Assumes a single post space of the radius elevationStart - The elevation starting point in radians. Assumes a sweep, so, if you want to start before zero, start at a - elevation and go to a positive elevantionEnd - The elevation end point in radians.

virtual bool DtSensorFanWalker::walk ( SensorFanWalkerFunction  ,
bool  continueIfUnavailable = false 
)
virtual

Given the method, will walk along the lines and call this method with the line of sight to check (in geocentric). The return value will be intersection result. If dataAvailable is false, and the continue flag is false, will about the check at that point and return false from this method.

const Results& DtSensorFanWalker::results ( ) const
inline
virtual void DtSensorFanWalker::resetStartingSpoke ( )
virtual
int DtSensorFanWalker::startingSpoke ( ) const
inline
int DtSensorFanWalker::onSpoke ( ) const
inline
double DtSensorFanWalker::elevationRate ( ) const
inline
double DtSensorFanWalker::elevationStart ( ) const
inline
double DtSensorFanWalker::elevationEnd ( ) const
inline
void DtSensorFanWalker::setElevationRanges ( double  s,
double  e 
)
inline

Sets ranges without re-initializing.

void DtSensorFanWalker::setAzimuthRanges ( double  s,
double  e 
)
inline
virtual void DtSensorFanWalker::updateStartingSpoke ( )
inlinevirtual

Call this routine when you have sent off a chunk of data and need to move the counter to the next spot for sending.

virtual DtSensorFanWalker* DtSensorFanWalker::clone ( ) const
virtual

Returns a clone of this object.

static double DtSensorFanWalker::calculateDistance ( const DtVector start,
const DtVector end 
)
static

Calcualtes the 2D distance between the two geocentric points.

static DtVector DtSensorFanWalker::calculateEndPointFromRadian ( const DtVector start,
double  radius,
double  rad = 0 
)
static
virtual void DtSensorFanWalker::addNew ( int  onSpoke,
const IntersectionInformation  
)
virtual
virtual void DtSensorFanWalker::reset ( )
virtual

Resets internal variables to start the walking anew. If walk is called multiple times will be called with the current state of the spoke and results, unless this is called.

virtual void DtSensorFanWalker::printStatistics ( )
virtual
virtual void DtSensorFanWalker::setRecordIntersectionPointAsEndPoint ( bool  )
virtual

Whether or not to set the end point as the chord test end point or the end point where the intersection has been recorded. Default is the chord test end point.

bool DtSensorFanWalker::recordIntersectionPointAsEndPoint ( ) const
inline
virtual void DtSensorFanWalker::setStopOnFirstClearView ( bool  )
virtual

Whether or not to stop the intersection checks on the first clear view. Default is true.

bool DtSensorFanWalker::stopOnFirstClearView ( ) const
inline
virtual void DtSensorFanWalker::setCalculateAsDome ( bool  )
virtual

If calculateAsDome is true (default is false) will get the elevation angle between the start ray and the elevated ray and recalculate an end point based on the azimuth and elevation, which will be a more true represenation of the radius.

bool DtSensorFanWalker::calculateAsDome ( ) const
inline
static DtVector DtSensorFanWalker::calculatePointFromElevationAngle ( const DtVector geocentricStart,
double  radius,
double  azimuth,
double  elevation 
)
static
virtual void DtSensorFanWalker::copyResultsOf ( const DtSensorFanWalker )
virtual

Copies the results only of the sensor fan walker given.

virtual void DtSensorFanWalker::setCalculationsHaveBegun ( bool  )
virtual

Returns true if calculations have begun.

bool DtSensorFanWalker::calculationsHaveBegun ( ) const
inline
virtual bool DtSensorFanWalker::timedOutSlice ( )
virtual
virtual void DtSensorFanWalker::setSliceTimeoutPeriod ( double  )
virtual
double DtSensorFanWalker::sliceTimeoutPeriod ( ) const
inline

Member Data Documentation

DtVector DtSensorFanWalker::myStart
protected
double DtSensorFanWalker::myRadius
protected
double DtSensorFanWalker::myCircleRadianSamplingRate
protected
double DtSensorFanWalker::mySensorFanLineSamplingRate
protected
std::set<double> DtSensorFanWalker::myAltitudes
protected
DtSensorFanWalkerCreatorFcn DtSensorFanWalker::theSensorFanWalkerCreatorFcn
staticprotected
Results DtSensorFanWalker::myResults
protected
int DtSensorFanWalker::myOnSpoke
protected
std::vector<int> DtSensorFanWalker::myAlongSpoke
protected
int DtSensorFanWalker::myPointsAlongLine
protected
int DtSensorFanWalker::myTotalSpokes
protected
double DtSensorFanWalker::mySliceTimeoutPeriod = -1
protected
double DtSensorFanWalker::myWaitingForPageTime
protected
double DtSensorFanWalker::myLastStatPrint
protected
double DtSensorFanWalker::myIntersectionTime
protected
DtTimedSection DtSensorFanWalker::myPagingTimeTimer
protected
bool DtSensorFanWalker::myPagedLastTime
protected
bool DtSensorFanWalker::myPrintStats
protected
bool DtSensorFanWalker::myAltitudeMSL
protected
double DtSensorFanWalker::myBreakAfterTime
protected
double DtSensorFanWalker::myTimeSinceLastBreak
protected
double DtSensorFanWalker::myTimeSinceLastTimeout
protected
int DtSensorFanWalker::myStartingSpoke
protected
bool DtSensorFanWalker::mySetRecordIntersectionPointAsEndPoint
protected
bool DtSensorFanWalker::myStopOnFirstClearView
protected
bool DtSensorFanWalker::myCalculateAsDome
protected
bool DtSensorFanWalker::myCalculationsHaveBegun
protected
double DtSensorFanWalker::myAzimuthStart
protected
double DtSensorFanWalker::myAzimuthEnd
protected
double DtSensorFanWalker::myElevationRate
protected
double DtSensorFanWalker::myElevationStart
protected
double DtSensorFanWalker::myElevationEnd
protected
double DtSensorFanWalker::myCurrentElevation
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)