diff --git a/tools/0012-geocentric-mobility-model-Switch-to-WGS84-as-default.patch b/tools/0012-geocentric-mobility-model-Switch-to-WGS84-as-default.patch new file mode 100644 index 0000000..1e2659e --- /dev/null +++ b/tools/0012-geocentric-mobility-model-Switch-to-WGS84-as-default.patch @@ -0,0 +1,47 @@ +From 90b4b0fc9594f8bfcea45b59a938b07dbe017bf0 Mon Sep 17 00:00:00 2001 +From: Giovanni Grieco +Date: Thu, 13 Jul 2023 12:38:25 +0000 +Subject: [PATCH] geocentric-mobility-model: Switch to WGS84 as default Earth + Spheroid Type + +--- + src/mobility/model/geocentric-mobility-model.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/mobility/model/geocentric-mobility-model.cc b/src/mobility/model/geocentric-mobility-model.cc +index bed9b8cae..9bcbf3339 100644 +--- a/src/mobility/model/geocentric-mobility-model.cc ++++ b/src/mobility/model/geocentric-mobility-model.cc +@@ -37,7 +37,7 @@ GeocentricMobilityModel::GetTypeId() + .SetGroupName("Mobility") + .AddAttribute("EarthSpheroidType", + "Spheroid model to use for Earth", +- EnumValue(GeographicPositions::SPHERE), ++ EnumValue(GeographicPositions::WGS84), + MakeEnumAccessor(&GeocentricMobilityModel::m_earthSpheroidType), + MakeEnumChecker(GeographicPositions::SPHERE, + "SPHERE", +@@ -56,6 +56,8 @@ GeocentricMobilityModel::GetTypeId() + } + + GeocentricMobilityModel::GeocentricMobilityModel() ++ : m_earthSpheroidType(GeographicPositions::WGS84), ++ m_geographicReferencePoint({0.0, 0.0, 0.0}) + { + } + +@@ -102,7 +104,10 @@ GeocentricMobilityModel::GetEarthSpheroidType() const + Vector + GeocentricMobilityModel::DoGetPosition() const + { +- return DoGetPosition(PositionType::TOPOCENTRIC); ++ // TODO: we should implement a proper way to understand what projection to use ++ return (GetEarthSpheroidType() == GeographicPositions::EarthSpheroidType::WGS84) ++ ? DoGetPosition(PositionType::PROJECTED) ++ : DoGetPosition(PositionType::TOPOCENTRIC); + } + + void +-- +2.41.0 +