fryktoria / On-the-Fly-Shortest-Path

QGIS plugin to interactively find shortest path between points over a line network and calculate the Fiber Loss Budget of a fiber optic network (backbone or FTTH)
GNU General Public License v3.0
6 stars 0 forks source link

Incorrect Fiber Loss Calculation in QGIS #9

Closed parydeogracias closed 3 months ago

parydeogracias commented 3 months ago

Description

The fiber loss calculation in the QGIS plugin appears to be incorrect. The attenuation values obtained from the plugin are significantly higher than expected, which suggests a potential bug or misconfiguration in the plugin.

Configuration Parameters

Below are the configuration parameters used:

Results

The results obtained from the plugin are as follows:

Expected Results

The expected attenuation based on the configured parameters should be much lower. The expected total attenuation is calculated as follows:

Observed Issue

The calculated total loss by the plugin is 270013.25 dB, which is unrealistic for a distance of 9.7 Km.

Steps to Reproduce

  1. Configure the parameters as described above in the QGIS plugin.
  2. Run the fiber loss calculation.
  3. Compare the results with the expected values.

Environment

Screenshots

Configuration:

image

Results:

image

Additional Information

The significant discrepancy suggests a potential bug in the plugin's loss calculation algorithm or an issue with the parameter interpretation. Verification of the units and conversion factors used by the plugin might also be necessary.

Thank you for your attention to this matter.

fryktoria commented 3 months ago

I see that the distance unit in the Results window is "metre" (sorry for the missing accent but I do not run a French keyboard). Do you see a warning with the text "Base distance unit is not meters but ....... . Unit conversion is taking place" when you run the calculation? If yes, what is the distance unit reported by the plugin in place of the dots?

Seems like an issue with the Regional Settings of your PC and the language settings of QGIS. Can you please switch to US or UK and make the test?

parydeogracias commented 3 months ago

No, I don't have a message, but against all odds, I now have a good result. image

I will now close the incident as the problem no longer persists. If that's okay with you.

fryktoria commented 3 months ago

It is strange. Can you please also provide a screenshot of the Network Analysis tab? The loss on path is calculated directly from the length and as I saw, the length is correct. So my initial testing on the regional settings should not be valid (there are several issues with the handling of units in QGIS so it was the first suspicious issue.) Please leave the issue open for a few days/weeks, to see if it reappears!

parydeogracias commented 3 months ago

As requested, here is the capture. Ok to leave the issue open. image

fryktoria commented 3 months ago

Thank you. I reproduced the problem changing the language settings of QGIS to french. I will analyze it.

fryktoria commented 3 months ago

...and the warning "Base distance unit is not meters but metres . Unit conversion is taking place" appears on the top part of the map. It shows only for 5 seconds, so probably you have missed it.

parydeogracias commented 3 months ago

Oh, okay. Thank you!

fryktoria commented 3 months ago

Issue confirmed. It applies to all cases where the QGIS language setting does not report the meter length unit as "meters". There was a mechanism to identify and correct such cases, but only the identification part worked properly by presenting the message "Base distance unit is not meters but ....... Unit conversion is taking place" . The fix will be applied in the plugin upcoming release 1.3.1.

fryktoria commented 3 months ago

Issue fixed in 1.3.1. New release 1.3.1, allong with the new PON profile functionality will be available from the QGIS plugin directory in a few days. The new release is already available from Github Releases as a zip file. You may download and test.

parydeogracias commented 3 months ago

Thank you so much!!!!!🎉🥳

parydeogracias commented 3 months ago

Version 1.3.1 works perfectly well. Thanks again!