Skip to content

fix (routeparams): correct count and array lengths in from_file - #220

Open
amansingh1207 wants to merge 1 commit into
52North:mainfrom
amansingh1207:fix/219-routeparams-from-file
Open

amansingh1207 wants to merge 1 commit into
52North:mainfrom
amansingh1207:fix/219-routeparams-from-file

Conversation

@amansingh1207

Copy link
Copy Markdown

Related Issue:

Fixes Issue #219

Changes:

  • Modified WeatherRoutingTool/routeparams.py from_file, get_full_fuel, get_fuel_per_dist, get_mean_power
  • Modified tests/test_routeparams.py regression asserts

Further Details:

Summary:

Before: 4 points -> count 3, status 4 vs speed 3, fuel missed last segment (two off-by-ones cancelled for fuel). After: count 2, all Type1 len 3, fuel sums all segments.

Dependencies:

None

PR Checklist:

  • have filled the 52North CLA
  • provide unit tests in tests, all pass
  • flake8 clean with --max-line-length=120
  • follow contribution guidelines

from_file used count-1 instead of count-2 and left status/message unsliced, while fuel/power loops missed last segment. Fix round-trip and totals.

Closes 52North#219

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant