14 #include "../tools/errorhandler.hpp" 15 #include "../tools/toolbox.hpp" 16 #include "../tools/MathToolbox.hpp" 17 #include "../datatypes/Scan.hpp" 18 #include "../datatypes/Object.hpp" 19 #include "../datatypes/Msg.hpp" 20 #include "../datatypes/Measurement.hpp" 21 #include "../datatypes/Fields.hpp" 22 #include "../datatypes/EvalCases.hpp" 23 #include "../datatypes/EvalCaseResults.hpp" 24 #include "../devices/LD_MRS.hpp" 60 std::ostringstream oss;
62 for(ScannerInfo::ResolutionMap::const_iterator s = sector.begin(); s != sector.end(); ++s)
75 for (++iter ; iter != scan.
end(); ++iter)
77 if (iter->getLayer() == ret->getLayer())
91 if (iter != scan.
end())
101 if (scan.
size() < 10)
111 printWarning(
"LdmrsSectorChangeApp::checkResolution: Scan is in vehicle coordinates and thus cannot be processed!");
121 for (p = scan.
begin(); p != scan.
end(); ++p)
125 float interlaced = 1.;
132 angleDiff = std::fabs(p2->getHAngle() - p->getHAngle()) * interlaced;
136 if (sector.size() == 0)
138 sector.push_back(std::make_pair(p->getHAngle(), angleDiff));
143 if (
fuzzyCompare(
float(sector.back().second), angleDiff) ==
false)
145 sector.push_back(std::make_pair(p->getHAngle(),angleDiff));
153 std::ostringstream oss;
170 Scan* scan =
dynamic_cast<Scan*
>(&data);
195 INT16 angleInt = round_to_int<INT16> (radAngle * rad2ticks);
209 printWarning(
"NOT ABLE to to read detailed error code");
254 if(configuredRM.size() == 0 || configuredRM.size() > 8)
270 for (
UINT32 i = 0; i < configuredRM.size(); ++i)
354 UINT32 sleepTimeMs = 10000;
355 usleep(sleepTimeMs * 1000);
358 configuredRM.push_back(std::make_pair(50.f *
deg2rad, 1.f * deg2rad));
359 configuredRM.push_back(std::make_pair(35.f * deg2rad, .5f * deg2rad));
360 configuredRM.push_back(std::make_pair(30.f * deg2rad, .25f * deg2rad));
361 configuredRM.push_back(std::make_pair(20.f * deg2rad, .125f * deg2rad));
362 configuredRM.push_back(std::make_pair(0.f * deg2rad, .25f * deg2rad));
363 configuredRM.push_back(std::make_pair(-20.f * deg2rad, .5f * deg2rad));
364 configuredRM.push_back(std::make_pair(-31.f * deg2rad, 1.f * deg2rad));
365 configuredRM.push_back(std::make_pair(-40.f * deg2rad, .5f * deg2rad));
371 usleep(sleepTimeMs * 1000);
Scan::const_iterator getNextPoint(Scan::const_iterator iter, const Scan &scan)
std::string toString(const PositionWGS84::PositionWGS84SourceType &type)
const_iterator end() const
Scan::const_iterator getNextPointInSameLayer(Scan::const_iterator iter, const Scan &scan)
devices::BasicDevice * getFirstDeviceByType(Sourcetype type)
#define printInfoMessage(a, b)
bool setScanAngles(double startAngle, double endAngle)
INT16 radian2Int(float radAngle)
std::vector< std::pair< double, double > > ResolutionMap
bool getParameter(MrsParameterId id, UINT32 *value)
bool setParameter(MrsParameterId id, UINT32 value)
const_iterator begin() const
PointList::const_iterator const_iterator
static const UINT32 ANGULAR_TICKS_PER_ROTATION
Bit 11: Scanpoint coordinate system; 0 = scanner coordinates, 1 = vehicle / reference coordinates...
void printWarning(std::string message)
std::string sectorToString(const ScannerInfo::ResolutionMap §or)