Repository navigation
examples: the Europe map image lines up with the latitudes drawn on it - #1397
Open
adamgeorge309 wants to merge 2 commits into
Open
adamgeorge309 wants to merge 2 commits into
adamgeorge309 wants to merge 2 commits into
Conversation
…e new fake GUI probabilities Before this commit, the tyf fingerprint test of the SatelliteMobility configuration of examples/mobility fails on an unchanged INET tree: the stored value is 772e-b194, and the test now calculates 332a-ea89. The stored value was recorded when opp_repl ran the tyf ingredients with fake graphical user interface (GUI) probabilities of 0.1. opp_repl commit 5049cc8fbe changed these probabilities (before event, after event, on hold and on simulation time) to 0.001. After this commit, the row stores 332a-ea89, and the test passes again. No INET source, configuration or image changes. The y (display strings) and f (canvas figures) ingredients are added on each refreshDisplay() call that the fake GUI makes, and the probabilities decide when those calls happen, so the new arguments alone move the value. The simulation itself does not change: the other ingredient sets of this configuration keep their stored values. Provenance: opp_run_fingerprint_tests of opp_repl main 39e15bc, -m release -w examples/mobility -c '^SatelliteMobility$' --ingredients tyf, release build of a40c4ff. Change: tests | behavior.change | fingerprint
… on it GeoMapCanvasVisualizer stretches its map image linearly in latitude and longitude, so the image must be equirectangular. images/maps/europe-er.png was a Web Mercator image, and examples/mobility declared it as 13.8 W to 44.3 E and 37 N to 73 N. Every figure drawn on the Europe map was offset from the image: about 1.2 degrees (130 km) at 60 degrees north, and 5.4 degrees at the top edge. To see it, open the europe module of the SatelliteMobility configuration in Qtenv and compare the 60 degree graticule line with Helsinki (60.17 N): at 100% zoom the city is about 30 pixels north of the line. Fitted to the markers of 11 capitals, a Web Mercator model with square pixels leaves 0.24 pixel root mean square (RMS) error and a model linear in latitude 20 pixels. The fit puts the old image at 13.34 W to 44.13 E and 35.60 N to 67.62 N. The image is now resampled (bicubic) to equirectangular over 13.3 W to 44.1 E and 35.6 N to 67.6 N, with the same 1308 x 1245 pixel size and a 256-color palette (340 kB instead of 524 kB), and the example declares that window. The capital markers are within 1 to 2 pixels of their linear positions; the labels drawn into the image are stretched vertically in the south and compressed in the north. Only the tyf fingerprint (display strings and canvas figures) of SatelliteMobility moves, from 332a-ea89 to 3438-54ea, because the map window positions the canvas figures. The image shipped in v4.7.0 and the release note gives the new window. Change: examples.mobility | behavior.change.fix | fingerprint whatsnew
This was referenced Oct 28, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Figures that canvas visualizers draw on the Europe map of
examples/mobility(SatelliteMobilityconfiguration) were offset from the map image by up to 5.4 degrees of latitude with the example's old window, because the image is Web Mercator andGeoMapCanvasVisualizermaps latitude linearly. The markers of 11 capitals on the image fit a Web Mercator model with 0.24 pixel root mean square (RMS) error, and a model linear in latitude with 20 pixels. The change reprojects the image to equirectangular and declares the window that the reprojected image covers. After it, the figures are within 1 to 2 image pixels of the map. The labels drawn into the image are now distorted vertically, and a model that copied the old map window is misaligned by more until it declares the new one.Closes #1396
The problem
EquirectangularProjection::geoToCanvas()(src/inet/common/geometry/common/EquirectangularProjection.cc:119) maps latitude linearly, andGeoMapCanvasVisualizerstretchesmapImageover the same window. The fitted extent ofimages/maps/europe-er.pngis 13.34 W to 44.13 E, 35.60 N to 67.62 N; the example declared 13.8 W to 44.3 E, 37 N to 73 N. A figure drawn at 60 N therefore landed on the image at 58.8 N, and at the top edge the offset reached 5.4 degrees.The change
The image is resampled (bicubic) to equirectangular over 13.3 W to 44.1 E and 35.6 N to 67.6 N, at the same 1308 x 1245 pixel size, and the example declares that window. The new file has a 256-color palette instead of RGBA (red, green, blue, alpha) with 5230 colors, all opaque (340 kB instead of 524 kB). No other configuration uses
europe-er.png.Risks:
doc/whatsnew/fixes/examples-europe-map-equirectangular.txtgives the new window. The note is a fix and not an incompatible change, because the old window was already wrong for the old image, and the note gives the window to declare.topic/gy/skyview-observer-titlesandtopic/gy/osm-map-coordinate-systemalso move theSatelliteMobilitytyfrow oftests/fingerprint/store.jsonfrom332a-ea89, each for its own change. Whichever of the three merges later has to re-record that row again on the merged code, because the correct value depends on all of their changes.Commits, in reading order:
tests: change: re-record the SatelliteMobility tyf fingerprint for the new fake GUI probabilities(17a67ca219) prepares: it moves theSatelliteMobilitytyfrow from772e-b194to332a-ea89and changes nothing else. The cause is opp_repl5049cc8fbe, which changed the fake graphical user interface (GUI) probabilities of thetyfingredients from 0.1 to 0.001; INET does not change. Without it, the row fails on master under the current opp_repl, and the fix commit would carry two causes in one value. The same commit is the first commit oftopic/gy/skyview-observer-titlesandtopic/gy/osm-map-coordinate-system, so it merges once.examples: fix: the Europe map image lines up with the latitudes drawn on itchanges the drawn map and adds a release note. It moves the same row from332a-ea89to3438-54ea(see Verification); no fingerprint that continuous integration (CI) checks moves.Architectural surface
No contract, packet, NED parameter or feature changes. Configuration surface: the four
*.europe.mapwindow parameters ofSatelliteMobilityinexamples/mobility/omnetpp.ini. Asset:images/maps/europe-er.pngchanges projection; its file name is the known exception NV-17.Verification
Base:
a40c4ffcdc(build: fix: the description of the INET package names the Testing chapter as text), theorigin/masteron 2026-10-28. Release build.Qtenv, in
examples/mobility, theeuropemodule inspected at 200% zoom and exported with Qtenv's image export (the simulation's own Model Context Protocol (MCP) server,get_canvas_imagewithareamodule_rectangle):"Before" is the image of
origin/masterwith its window (--*.europe.map.minLatitude=37.0deg --*.europe.map.maxLatitude=73.0deg --*.europe.map.minLongitude=-13.8deg --*.europe.map.maxLongitude=44.3deg); the branch changes no source file, so the same build serves both. Before the change, the 60 degree graticule line runs 62 image pixels (31 pixels at 100% zoom) south of the Helsinki marker (60.17 N). After it, the line runs 7 image pixels south of the marker, which is about the 0.17 degree that the city lies north of 60 N (6.6 pixels).The whole
europecanvas, before and after:GeoMapCanvasVisualizercreates no figures without a graphical user interface (GUI) (src/inet/visualizer/canvas/scene/GeoMapCanvasVisualizer.cc:48,if (!hasGUI()) return;), so only thetyfingredient (ydisplay strings,fcanvas figures), which runs Cmdenv with a fake GUI, can see this change.Fingerprints that CI checks:
opp_run_fingerprint_tests -p inet -m release --no-build -w examples/mobility(opp_replorigin/main,39e15bc) gives 32 PASS at each of the two commits: thetplx,~tNland~tNDrows of all 32 storedexamples/mobilityconfigurations.opp_run_fingerprint_tests -p inet -m release --no-build -w examples/mobility -c '^SatelliteMobility$' --ingredients tyfgives PASS at each of the two commits, against332a-ea89after commit 1 and3438-54eaafter commit 2.The
tyfrow ofSatelliteMobilityis re-recorded with the current opp_repl arguments. opp_repl changed itstyfarguments in5049cc8fbe(committed 2026-10-26): the fake GUI probabilities went from 0.1 to 0.001. Computed with both sets, on a checkout of the base and on the branch (-r 0 --sim-time-limit=3600s):tyfarguments5049cc8fbe)772e-b194(the old stored value)3977-3f7dorigin/main)332a-ea893438-54ea(the new stored value)Commit 1 records the step from
772e-b194to332a-ea89, which the opp_repl change alone causes, on the same INET code; commit 2 records the step from332a-ea89to3438-54ea, which this change causes. With the new value,opp_run_fingerprint_tests -p inet -m release --no-build -w examples/mobility --ingredients tyfgives 29 PASS of 31 on the branch;AttachedMobilityandSuperpositioningMobilityfail on the base too, and this change does not reach them. The other 30 storedtyfrows ofexamples/mobilitycompute the same values on the base and on the branch under both sets of arguments.Gates, on this description without its title and branch lines:
All six gates pass with 0 violations and 0 notes: check-commits.sh, check-classification.sh, check-includes.sh, check-ned-params.sh, check-whatsnew.sh and check-pr-description.sh.
Not verified: the alignment was measured at the capital markers and at Helsinki only.