Migrates AreaEffectSimulation to generated rtiddsgen API
Converts accessor calls to plain member access across aes service and plugin.
This commit is contained in:
102 files changed
+3307
-3313
No files matched your search
+10
-10
@@ -48,10 +48,10 @@ inline std::string toString(const std::vector<Core::RelativePositionRelativeTime
|
||||
for (const auto &coordinate : trajectoryRelative)
|
||||
{
|
||||
QJsonObject coordObj;
|
||||
coordObj[QStringLiteral("offsetX")] = coordinate.offsetX();
|
||||
coordObj[QStringLiteral("offsetY")] = coordinate.offsetY();
|
||||
coordObj[QStringLiteral("offsetZ")] = coordinate.offsetZ();
|
||||
coordObj[QStringLiteral("relativeTime")] = coordinate.relativeTime();
|
||||
coordObj[QStringLiteral("offsetX")] = coordinate.offsetX;
|
||||
coordObj[QStringLiteral("offsetY")] = coordinate.offsetY;
|
||||
coordObj[QStringLiteral("offsetZ")] = coordinate.offsetZ;
|
||||
coordObj[QStringLiteral("relativeTime")] = static_cast<qint64>(coordinate.relativeTime);
|
||||
arr.append(coordObj);
|
||||
}
|
||||
obj[TRAJECTORY_RELATIVE_KEYWORD] = arr;
|
||||
@@ -83,10 +83,10 @@ inline std::vector<Core::RelativePositionRelativeTime> fromString(const QString
|
||||
return {};
|
||||
|
||||
Core::RelativePositionRelativeTime coord;
|
||||
coord.offsetX() = coordinate[QStringLiteral("offsetX")].toDouble();
|
||||
coord.offsetY() = coordinate[QStringLiteral("offsetY")].toDouble();
|
||||
coord.offsetZ() = coordinate[QStringLiteral("offsetZ")].toDouble();
|
||||
coord.relativeTime() = coordinate[QStringLiteral("relativeTime")].toInt();
|
||||
coord.offsetX = coordinate[QStringLiteral("offsetX")].toDouble();
|
||||
coord.offsetY = coordinate[QStringLiteral("offsetY")].toDouble();
|
||||
coord.offsetZ = coordinate[QStringLiteral("offsetZ")].toDouble();
|
||||
coord.relativeTime = coordinate[QStringLiteral("relativeTime")].toInt();
|
||||
|
||||
ret.push_back(coord);
|
||||
}
|
||||
@@ -119,8 +119,8 @@ inline double getAngleDegreeNorth(const QPointF &p1, const QPointF &p2)
|
||||
|
||||
inline bool isPointSimilar(AreaEffectSimulation::AesExplosionGeometry geometry)
|
||||
{
|
||||
return (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint) ||
|
||||
(geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgPoint);
|
||||
return (geometry == AreaEffectSimulation::AesExplosionGeometry::EgAimPoint) ||
|
||||
(geometry == AreaEffectSimulation::AesExplosionGeometry::EgPoint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+77
-77
@@ -18,22 +18,22 @@ namespace DdsDbConvert
|
||||
Database::AesNContamination nContamination(const AreaEffectSimulation::NContamination &src)
|
||||
{
|
||||
Database::AesNContamination dst;
|
||||
dst.id = src.id();
|
||||
dst.chargeTypeId = src.chargeStruct().chargeTypeId();
|
||||
dst.effectStateId = src.effectStateId();
|
||||
dst.partyId = src.partyId().is_set() ? src.partyId().get() : 0;
|
||||
dst.participantId = src.participantId().is_set() ? src.participantId().get() : 0;
|
||||
dst.effectDuration = src.effectDuration();
|
||||
dst.effectStart = src.effectStart().is_set() ? QDateTime::fromMSecsSinceEpoch(src.effectStart().get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name());
|
||||
dst.impactPosition.rx() = src.impactPosition().lon();
|
||||
dst.impactPosition.ry() = src.impactPosition().lat();
|
||||
dst.borderLengthInner = src.borderLengthInner();
|
||||
dst.borderLengthOuter = src.borderLengthOuter();
|
||||
dst.impactRadius = src.impactRadius();
|
||||
dst.spanAngle = src.spanAngle();
|
||||
dst.rotationAngle = src.rotationAngle();
|
||||
dst.detonationValue = src.detonationValue();
|
||||
dst.id = src.id;
|
||||
dst.chargeTypeId = src.chargeStruct.chargeTypeId;
|
||||
dst.effectStateId = src.effectStateId;
|
||||
dst.partyId = src.partyId.is_set() ? src.partyId.get() : 0;
|
||||
dst.participantId = src.participantId.is_set() ? src.participantId.get() : 0;
|
||||
dst.effectDuration = src.effectDuration;
|
||||
dst.effectStart = src.effectStart.is_set() ? QDateTime::fromMSecsSinceEpoch(src.effectStart.get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name);
|
||||
dst.impactPosition.rx() = src.impactPosition.lon;
|
||||
dst.impactPosition.ry() = src.impactPosition.lat;
|
||||
dst.borderLengthInner = src.borderLengthInner;
|
||||
dst.borderLengthOuter = src.borderLengthOuter;
|
||||
dst.impactRadius = src.impactRadius;
|
||||
dst.spanAngle = src.spanAngle;
|
||||
dst.rotationAngle = src.rotationAngle;
|
||||
dst.detonationValue = src.detonationValue;
|
||||
// dst.priv_entityId;
|
||||
// dst.privNContaminationId;
|
||||
return dst;
|
||||
@@ -42,23 +42,23 @@ Database::AesNContamination nContamination(const AreaEffectSimulation::NContamin
|
||||
Database::AesBCContamination bcContamination(const BCContamination &src)
|
||||
{
|
||||
Database::AesBCContamination dst;
|
||||
dst.id = src.id();
|
||||
dst.effectStateId = src.effectStateId();
|
||||
dst.partyId = src.partyId().is_set() ? src.partyId().get() : 0;
|
||||
dst.participantId = src.participantId().is_set() ? src.participantId().get() : 0;
|
||||
dst.effectDuration = src.effectDuration();
|
||||
dst.effectStart = src.effectStart().is_set() ? QDateTime::fromMSecsSinceEpoch(src.effectStart().get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name());
|
||||
dst.impactPosition.rx() = src.impactPosition().lon();
|
||||
dst.impactPosition.ry() = src.impactPosition().lat();
|
||||
dst.impactRadius = src.impactRadius();
|
||||
dst.chargeTypeId = src.chargeStruct().chargeTypeId();
|
||||
dst.windSpeed = src.windSpeed();
|
||||
dst.weatherTimestamp = QDateTime::fromMSecsSinceEpoch(src.weatherTimestamp());
|
||||
dst.propagationDirection = src.propagationDirection();
|
||||
dst.id = src.id;
|
||||
dst.effectStateId = src.effectStateId;
|
||||
dst.partyId = src.partyId.is_set() ? src.partyId.get() : 0;
|
||||
dst.participantId = src.participantId.is_set() ? src.participantId.get() : 0;
|
||||
dst.effectDuration = src.effectDuration;
|
||||
dst.effectStart = src.effectStart.is_set() ? QDateTime::fromMSecsSinceEpoch(src.effectStart.get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name);
|
||||
dst.impactPosition.rx() = src.impactPosition.lon;
|
||||
dst.impactPosition.ry() = src.impactPosition.lat;
|
||||
dst.impactRadius = src.impactRadius;
|
||||
dst.chargeTypeId = src.chargeStruct.chargeTypeId;
|
||||
dst.windSpeed = src.windSpeed;
|
||||
dst.weatherTimestamp = QDateTime::fromMSecsSinceEpoch(src.weatherTimestamp);
|
||||
dst.propagationDirection = src.propagationDirection;
|
||||
dst.weatherPosition = dst.impactPosition; // initial, is not used during update therefore it's ok here
|
||||
dst.upperOffset = src.upperOffset();
|
||||
dst.lowerOffset = src.lowerOffset();
|
||||
dst.upperOffset = src.upperOffset;
|
||||
dst.lowerOffset = src.lowerOffset;
|
||||
// dst.expansionFactor;
|
||||
// dst.isDynamicWeather;
|
||||
// dst.priv_entityId;
|
||||
@@ -69,24 +69,24 @@ Database::AesBCContamination bcContamination(const BCContamination &src)
|
||||
Database::AesExplosionArea explosionArea(const ExplosionArea &src)
|
||||
{
|
||||
Database::AesExplosionArea dst;
|
||||
dst.id = src.id();
|
||||
dst.effectStateId = src.effectStateId();
|
||||
dst.partyId = src.partyId().is_set() ? src.partyId().get() : 0;
|
||||
dst.participantId = src.participantId().is_set() ? src.participantId().get() : 0;
|
||||
dst.effectDuration = src.effectDuration();
|
||||
dst.effectStart = src.effectStart().is_set() && src.effectStart().get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart().get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name());
|
||||
dst.impactPosition.rx() = src.area().cornerBottomLeft().lon();
|
||||
dst.impactPosition.ry() = src.area().cornerBottomLeft().lat();
|
||||
dst.impactLength = src.area().height();
|
||||
dst.impactWidth = src.area().width();
|
||||
dst.rotationAngle = src.area().rotation();
|
||||
dst.chargeTypeId = src.chargeStruct().chargeTypeId();
|
||||
dst.cannonCount = src.cannonCount();
|
||||
dst.cannonRounds = src.cannonRounds();
|
||||
dst.originalEffectStart = src.originalEffectStart() > 0 ? QDateTime::fromMSecsSinceEpoch(src.originalEffectStart()) : QDateTime();
|
||||
dst.originalEffectDuration = src.originalEffectDuration();
|
||||
dst.remainExplosionNumber = src.remainExplosionNumber();
|
||||
dst.id = src.id;
|
||||
dst.effectStateId = src.effectStateId;
|
||||
dst.partyId = src.partyId.is_set() ? src.partyId.get() : 0;
|
||||
dst.participantId = src.participantId.is_set() ? src.participantId.get() : 0;
|
||||
dst.effectDuration = src.effectDuration;
|
||||
dst.effectStart = src.effectStart.is_set() && src.effectStart.get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart.get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name);
|
||||
dst.impactPosition.rx() = src.area.cornerBottomLeft.lon;
|
||||
dst.impactPosition.ry() = src.area.cornerBottomLeft.lat;
|
||||
dst.impactLength = src.area.height;
|
||||
dst.impactWidth = src.area.width;
|
||||
dst.rotationAngle = src.area.rotation;
|
||||
dst.chargeTypeId = src.chargeStruct.chargeTypeId;
|
||||
dst.cannonCount = src.cannonCount;
|
||||
dst.cannonRounds = src.cannonRounds;
|
||||
dst.originalEffectStart = src.originalEffectStart > 0 ? QDateTime::fromMSecsSinceEpoch(src.originalEffectStart) : QDateTime();
|
||||
dst.originalEffectDuration = src.originalEffectDuration;
|
||||
dst.remainExplosionNumber = src.remainExplosionNumber;
|
||||
// dst.firePurpose;
|
||||
// dst.fireRequestTime;
|
||||
// dst.priv_entityId;
|
||||
@@ -98,16 +98,16 @@ Database::AesExplosionArea explosionArea(const ExplosionArea &src)
|
||||
Database::AesExplosionSingle explosionSingle(const ExplosionSingle &src)
|
||||
{
|
||||
Database::AesExplosionSingle dst;
|
||||
dst.id = src.id();
|
||||
dst.effectStateId = src.effectStateId();
|
||||
dst.partyId = src.partyId().is_set() ? src.partyId().get() : 0;
|
||||
dst.participantId = src.participantId().is_set() ? src.participantId().get() : 0;
|
||||
dst.effectDuration = src.effectDuration();
|
||||
dst.effectStart = src.effectStart().is_set() && src.effectStart().get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart().get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name());
|
||||
dst.impactPosition.rx() = src.impactPosition().lon();
|
||||
dst.impactPosition.ry() = src.impactPosition().lat();
|
||||
dst.chargeTypeId = src.chargeStruct().chargeTypeId();
|
||||
dst.id = src.id;
|
||||
dst.effectStateId = src.effectStateId;
|
||||
dst.partyId = src.partyId.is_set() ? src.partyId.get() : 0;
|
||||
dst.participantId = src.participantId.is_set() ? src.participantId.get() : 0;
|
||||
dst.effectDuration = src.effectDuration;
|
||||
dst.effectStart = src.effectStart.is_set() && src.effectStart.get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart.get()) : QDateTime();
|
||||
dst.name = QString::fromStdString(src.name);
|
||||
dst.impactPosition.rx() = src.impactPosition.lon;
|
||||
dst.impactPosition.ry() = src.impactPosition.lat;
|
||||
dst.chargeTypeId = src.chargeStruct.chargeTypeId;
|
||||
// dst.priv_entityId;
|
||||
// dst.priv_explosionId;
|
||||
// dst.privExplosionSingleId;
|
||||
@@ -117,19 +117,19 @@ Database::AesExplosionSingle explosionSingle(const ExplosionSingle &src)
|
||||
Database::AesMineArea mineArea(const MineArea &src)
|
||||
{
|
||||
Database::AesMineArea dst;
|
||||
dst.id = src.id();
|
||||
dst.name = QString::fromStdString(src.name());
|
||||
dst.effectStart = src.effectStart().is_set() && src.effectStart().get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart().get()) : QDateTime();
|
||||
dst.effectDuration = src.effectDuration();
|
||||
dst.partyId = src.partyId().is_set() ? src.partyId().get() : 0;
|
||||
dst.chargeTypeId = src.chargeStruct().chargeTypeId();
|
||||
dst.participantId = src.participantId().is_set() ? src.participantId().get() : 0;
|
||||
dst.density = src.density();
|
||||
dst.width = src.width();
|
||||
dst.layingProcedureTypeId = src.layingProcedureType();
|
||||
dst.isLaidHidden = src.isLaidHidden();
|
||||
dst.effectStateId = src.effectStateId();
|
||||
dst.isCenterLine = src.isCenterLine();
|
||||
dst.id = src.id;
|
||||
dst.name = QString::fromStdString(src.name);
|
||||
dst.effectStart = src.effectStart.is_set() && src.effectStart.get() > 0 ? QDateTime::fromMSecsSinceEpoch(src.effectStart.get()) : QDateTime();
|
||||
dst.effectDuration = src.effectDuration;
|
||||
dst.partyId = src.partyId.is_set() ? src.partyId.get() : 0;
|
||||
dst.chargeTypeId = src.chargeStruct.chargeTypeId;
|
||||
dst.participantId = src.participantId.is_set() ? src.participantId.get() : 0;
|
||||
dst.density = src.density;
|
||||
dst.width = src.width;
|
||||
dst.layingProcedureTypeId = src.layingProcedureType;
|
||||
dst.isLaidHidden = src.isLaidHidden;
|
||||
dst.effectStateId = src.effectStateId;
|
||||
dst.isCenterLine = src.isCenterLine;
|
||||
// qint32 priv_entityId;
|
||||
// qint32 priv_mineId;
|
||||
// qint32 privMineAreaId;
|
||||
@@ -138,17 +138,17 @@ Database::AesMineArea mineArea(const MineArea &src)
|
||||
|
||||
QVector<Database::AesMineAreaSegment> mineAreaSegments(const MineArea &src)
|
||||
{
|
||||
const std::vector<AreaEffectSimulation::MineSegment> &segments = src.segments();
|
||||
const std::vector<AreaEffectSimulation::MineSegment> &segments = src.segments;
|
||||
QVector<Database::AesMineAreaSegment> dbSegments;
|
||||
dbSegments.reserve(segments.size());
|
||||
for (size_t i = 0; i < segments.size(); ++i)
|
||||
{
|
||||
Database::AesMineAreaSegment newSegment;
|
||||
newSegment.elementNumber = i;
|
||||
newSegment.mineAreaId = src.id(); // Todo: korrekt?
|
||||
newSegment.mineAreaId = src.id; // Todo: korrekt?
|
||||
newSegment.id = 0;
|
||||
newSegment.startPosition = QPointF(segments[i].positionStart().lon(), segments[i].positionStart().lat());
|
||||
newSegment.endPosition = QPointF(segments[i].positionEnd().lon(), segments[i].positionEnd().lat());
|
||||
newSegment.startPosition = QPointF(segments[i].positionStart.lon, segments[i].positionStart.lat);
|
||||
newSegment.endPosition = QPointF(segments[i].positionEnd.lon, segments[i].positionEnd.lat);
|
||||
dbSegments << newSegment;
|
||||
}
|
||||
return dbSegments;
|
||||
|
||||
+16
-21
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <aes.hpp>
|
||||
#include <AreaEffectSimulation/logger.h>
|
||||
#include <ElevationMap/elevation_map.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsCoordinate/lts_coord_vector.h>
|
||||
#include <LtsCoordinate/lts_coordinate.h>
|
||||
@@ -36,13 +35,9 @@
|
||||
|
||||
// Note: All polygones are open!
|
||||
|
||||
std::ostream &operator<<(std::ostream &stream, const QVector<QPointF> &value)
|
||||
{
|
||||
stream << "QVector<QPointF>(" << value.size() << "): ";
|
||||
for (const QPointF &item : value)
|
||||
stream << item << ";";
|
||||
return stream;
|
||||
}
|
||||
// operator<< for QVector<QPointF> removed: in Qt6 QVector is an alias of
|
||||
// QList, so the inline operator<<(std::ostream&, const QList<QPointF>&) in
|
||||
// INGLLogger.h (pulled in via logger.h) has the identical signature.
|
||||
|
||||
std::ostream &operator<<(std::ostream &stream, const QVector<LtsCoordTrans::UtmCoordinate> &value)
|
||||
{
|
||||
@@ -86,8 +81,8 @@ namespace Polygons
|
||||
// regarding ExplosionCluster:
|
||||
bool isPointSimilar(AreaEffectSimulation::AesExplosionGeometry geometry)
|
||||
{
|
||||
return (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint)
|
||||
|| (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgPoint);
|
||||
return (geometry == AreaEffectSimulation::AesExplosionGeometry::EgAimPoint)
|
||||
|| (geometry == AreaEffectSimulation::AesExplosionGeometry::EgPoint);
|
||||
}
|
||||
|
||||
// AreaBottomLeft :
|
||||
@@ -427,7 +422,7 @@ QPolygonF explosionClusterArea(const Database::AesExplosionCluster &explosionClu
|
||||
QPolygonF poly;
|
||||
|
||||
const bool bIsPointSimilar = isPointSimilar(explosionCluster.explosionGeometryId);
|
||||
if (bIsPointSimilar || explosionCluster.explosionGeometryId.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
|
||||
if (bIsPointSimilar || explosionCluster.explosionGeometryId == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
|
||||
{
|
||||
// get center ... (zog isn´t relevant yet)
|
||||
const double radius = explosionCluster.impactWidth / 2.0;
|
||||
@@ -626,7 +621,7 @@ QPolygonF effectClusterArea(const Database::AesEffectCluster &effectCluster)
|
||||
QPolygonF poly;
|
||||
|
||||
const bool bIsPointSimilar = isPointSimilar(effectCluster.explosionGeometryId);
|
||||
if (bIsPointSimilar || effectCluster.explosionGeometryId.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
|
||||
if (bIsPointSimilar || effectCluster.explosionGeometryId == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
|
||||
{
|
||||
// get center ... (zog isn´t relevant yet)
|
||||
const double radius = effectCluster.impactWidth / 2.0;
|
||||
@@ -962,7 +957,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
//
|
||||
// calculate the subAreas / mtps:
|
||||
//
|
||||
if (explosionCluster.explosionGeometryId.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
|
||||
if (explosionCluster.explosionGeometryId == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
|
||||
mtps_asUtm = explosionClusterRadialToMtps(areaBlWithTla, numberOfMTPsRequested, firingOriginUtm, centerUtm, &singleWidthOut, &singleHeightOut);
|
||||
else
|
||||
mtps_asUtm = explosionClusterAreaToMtps(areaBlWithTla, numberOfMTPsRequested, &singleWidthOut, &singleHeightOut);
|
||||
@@ -1662,14 +1657,14 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
ppmDtc->waitForHistoricalDataParticipant(1000);
|
||||
|
||||
const ParticipantManagement::Participant &partData = ppmDtc->participant(unitParticipantId);
|
||||
if (partData.id() != unitParticipantId)
|
||||
if (partData.id != unitParticipantId)
|
||||
{
|
||||
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, participant failed for id =" << unitParticipantId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
ppmDtc->waitForHistoricalDataParticipantPosition(1000);
|
||||
|
||||
const std::vector<int> &childIds = partData.inferiorIds();
|
||||
const std::vector<int> &childIds = partData.inferiorIds;
|
||||
|
||||
singlePositionsOut.clear();
|
||||
singlePositionsOut.reserve(childIds.size());
|
||||
@@ -1681,21 +1676,21 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
for (int childId : qAsConst(childIds))
|
||||
{
|
||||
const ParticipantManagement::ParticipantPosition &childPos = ppmDtc->participantPosition(childId);
|
||||
if (childPos.participantId() != childId)
|
||||
if (childPos.participantId != childId)
|
||||
{
|
||||
// may happen in real life: so ERROR_LOG to DEBUG_LOG
|
||||
DEBUG_LOG(logger) << LOGFUNCTION << " ERROR, participantPosition failed for id =" << childId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
const Core::GeoPosition &childGeoPos = childPos.pos();
|
||||
const Core::GeoPosition &childGeoPos = childPos.pos;
|
||||
|
||||
singlePositionsOut.emplace_back(childGeoPos);
|
||||
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(childGeoPos.lon(), childGeoPos.lat(), utmZone);
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(childGeoPos.lon, childGeoPos.lat, utmZone);
|
||||
if (utmZone == -1)
|
||||
utmZone = utm.zone;
|
||||
|
||||
pos += LtsUtils::QPoint3D(utm.x, utm.y, childGeoPos.z());
|
||||
pos += LtsUtils::QPoint3D(utm.x, utm.y, childGeoPos.z);
|
||||
++childCount;
|
||||
} // for
|
||||
|
||||
@@ -1743,7 +1738,7 @@ QVector<LtsCoordTrans::UtmCoordinate> geoVecToUtm(const std::vector<Core::GeoPos
|
||||
utmVec.reserve(vecPos.size());
|
||||
for (const auto &pos : vecPos)
|
||||
{
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat(), utmZone);
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon, pos.lat, utmZone);
|
||||
if (utmZone == -1)
|
||||
utmZone = utm.zone;
|
||||
utmVec.append(utm);
|
||||
@@ -1757,7 +1752,7 @@ QVector<QPointF> geoVecToUtmPointF(const std::vector<Core::GeoPosition2D> &vecPo
|
||||
points.reserve(vecPos.size());
|
||||
for (const auto &pos : vecPos)
|
||||
{
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat(), utmZone);
|
||||
const auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon, pos.lat, utmZone);
|
||||
if (utmZone == -1)
|
||||
utmZone = utm.zone;
|
||||
points.append(QPointF(utm.x, utm.y));
|
||||
|
||||
Reference in new issue
Block a user