Repository navigation
examples: draw the Óbuda street map in the SatelliteMobility config - #1399
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
Before this commit, opening europe and then budapest of the SatelliteMobility config in Qtenv showed an empty canvas instead of the Óbuda street map. The OpenStreetMapSceneCanvasVisualizer inside the Budapest module kept its coordinateSystemModule default, "coordinateSystem". OMNeT++ resolves a module path that starts with neither "." nor "^" from the network, so the visualizer used the network's Wgs84EcefGeographicCoordinateSystem, not the Wgs84AnchoredGeographicCoordinateSystem next to it. The streets landed far outside the map bounds, adjustBackgroundBox stretched the background box (bgb) over them, and the fitted view had zoom 0.001 and showed no street. After this commit, the visualizer refers to its sibling with "^.coordinateSystem", the anchored frame that the comment above the setting describes, whose origin is the north-west corner of obuda.osm. The Budapest canvas shows the street map at a fitted zoom of 0.452 in a 584 x 455 pixel view. The default of the parameter stays. Its NED documentation says that it refers to a top-level module, and examples/openstreetmap relies on that: there the visualizer is visualizer.sceneVisualizer, so a default of "^.coordinateSystem" would name the nonexistent visualizer.coordinateSystem and stop that example with an error. To reproduce: in examples/mobility, run "inet -u Qtenv -c SatelliteMobility", open europe, then budapest. The visualizer draws only with a graphical user interface or cmdenv-fake-gui (initialize() returns early otherwise), so the fingerprints of the default ingredients (tplx, ~tNl and ~tND) of examples/mobility and examples/openstreetmap do not see the defect and are unchanged. The tyf fingerprint of SatelliteMobility runs with cmdenv-fake-gui, so this visualizer's background box (display strings, y) and street figures (f) enter it. The row moves from 332a-ea89 to 4268-429c, because both are now computed in the anchored frame. No other row moves. The tyf rows of AttachedMobility and SuperpositioningMobility fail on master too, and this change does not reach them. Change: examples | behavior.change.fix | fingerprint
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.
Before this change, the
SatelliteMobilityconfig ofexamples/mobilityshowed an empty canvas in Qtenv when the user openedeuropeand thenbudapest. TheOpenStreetMapSceneCanvasVisualizerinside theBudapestmodule kept itscoordinateSystemModuledefault,"coordinateSystem", which OMNeT++ resolves from the network. It therefore projected the Óbuda streets through the network'sWgs84EcefGeographicCoordinateSysteminstead of theWgs84AnchoredGeographicCoordinateSystembeside it. The streets landed far outside the map bounds, andadjustBackgroundBoxstretched the background box (bgb) over them, so the view fitted to that box (zoom 0.001) showed no street.After this change, the ini sets
*.europe.budapest.map.coordinateSystemModule = "^.coordinateSystem", and the Budapest canvas shows the street map. The setting is in the ini file, beside the other coordinateSystemModule settings of this network, such as that of*.europe.budapest.mobility.The fix is in the example, not in the default of the parameter. The NED documentation of
OpenStreetMapSceneCanvasVisualizersays the default refers to a top-level module, andSceneOsgEarthVisualizeruses the same default.examples/openstreetmaprelies on it. There the visualizer isvisualizer.sceneVisualizer, so a default of"^.coordinateSystem"would name the nonexistentvisualizer.coordinateSystem, and the mandatory reference would stop that example with an error. These two examples are the only users of the visualizer inexamples/,showcases/,tests/andtutorials/. The risk is limited to theSatelliteMobilityconfig in a graphical user interface.Closes #1398
Commits
tests: change: re-record the SatelliteMobility tyf fingerprint for the new fake GUI probabilities(17a67ca219) prepares: it moves the tyf row ofSatelliteMobilityintests/fingerprint/store.jsonfrom 772e-b194 to 332a-ea89 and changes nothing else. The cause is opp_repl commit 5049cc8fbe, which changed the fake graphical user interface (GUI) probabilities of the tyf ingredients 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 of pull request examples: the Europe map image lines up with the latitudes drawn on it #1397 (the Europe map image) and of a sky view title change that is not filed yet, so it merges once.examples: fix: draw the Óbuda street map in the SatelliteMobility configsets the parameter inexamples/mobility/omnetpp.iniand moves the same row from 332a-ea89 to 4268-429c. It changes what Qtenv draws. The default fingerprints do not change.No architectural surface is touched: no contract, packet content, feature descriptor or NED default changes; the configuration change is one ini line of an example.
Evidence
All results are from this branch rebased onto master
a40c4ffcdc3b05619999411023a916214e2c0fde(build: fix: the description of the INET package names the Testing chapter as text), release build. "Master" below means that commit; its behavior is reproduced on the branch with--*.europe.budapest.map.coordinateSystemModule="coordinateSystem", which restores the old effective value of the only changed line.Qtenv,
examples/mobility,inet -u Qtenv -c SatelliteMobility, canvas ofSatelliteNetwork.europe.budapestfitted to a 584 x 455 pixel view, then exported with Qtenv's image export, which writes the whole canvas at the fitted zoom: 2048 x 712 pixels on master and 565 x 352 pixels on this branch. On master the fitted zoom is 0.001, the lowest zoom that Qtenv allows, and the canvas is an empty grey background:On this branch the fitted zoom is 0.452 and the canvas shows the Óbuda street map:
The world and Europe canvases of the same run still show their maps:
examples/openstreetmap(inet -u Qtenv, unchanged by this pull request) still draws the Óbuda map:Fingerprints, with opp_repl at
39e15bcd6e(its currentmain):opp_run_fingerprint_tests -m release -f 'examples/(mobility|openstreetmap)'Master and this branch: 33 PASS each. The visualizer returns from
initialize()early without a graphical user interface, so the default fingerprint ingredients (tplx, ~tNl and ~tND) cannot see it.The graphical fingerprint (tyf) runs with
cmdenv-fake-gui, so the visualizer draws, and its background box (in the display strings, y) and street figures (f) enter the hash:opp_run_fingerprint_tests -m release -f 'examples/(mobility|openstreetmap)' --ingredients tyfThe stored
SatelliteMobilityrow, 772e-b194, was recorded with the fake GUI probabilities 0.1 that opp_repl used before its commit 5049cc8fbe. Since that commit opp_repl runs tyf with 0.001, the values of INET's former fingerprinttest. TheSatelliteMobilityvalue under both argument sets:Commit 1 re-records the row from 772e-b194 to 332a-ea89, which the opp_repl runner change alone causes, on the same INET code. Commit 2 moves it from 332a-ea89 to 4268-429c, because the street figures and the background box are now computed in the anchored frame.
At each of the two commits,
opp_run_fingerprint_tests -m release --no-build -f 'examples/(mobility|openstreetmap)'gives 33 PASS, andopp_run_fingerprint_tests -m release --no-build -w examples/mobility -c '^SatelliteMobility$' --ingredients tyfgives PASS, against 332a-ea89 after commit 1 and 4268-429c after commit 2. With the re-recorded row, the full tyf run above gives 30 PASS and 2 FAIL on this branch. The two failures,AttachedMobilityandSuperpositioningMobility, fail on master too, and this change does not reach them.examples/openstreetmappasses on both.Two other changes also move this row from 332a-ea89, after the same commit 1: pull request #1397 (the Europe map image) and a change that adds titles above the sky view plots, not filed yet. Whichever of the three merges later must re-record the row again on the merged code.
Gates, on this description without its title line:
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.