-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AER3-429 Standard road emission factors #19
Merged
Merged
Conversation
This file contains 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
Not sure yet if this is final: road has some weird stuff in it due to the difference between SRM1/SRM2, strict and non-strict speed enforcement, etc.
The SRM1/SRM2 part is annoying, would rather have columns in the database so we didn't have to do this determination ourselves. But since we're working on existing database structure...
Saves some repetition in the service definition.
This way we can add more information like the speed profile category, the year and the vehicle type. While this information is (indirectly) supplied by the client in the URL, this is more in line with how we're working for farms so far: always return the code that is used as well. Since this isn't really a category (unique by 1 code), did not inherit from the Category object for this wrapping object. Could perhaps combine something to make a surrogate unique code, but that seems overkill at the moment.
Road structure has changed a bit since last time this PR was changed, so stuff had to be adjusted. It is now partially implemented, but at least it's mergeable again. Not entirely sure if API definition is complete like this, think this is the bare minimum.
BertScholten
force-pushed
the
api_road
branch
from
December 21, 2023 15:41
96af6d1
to
b1fc6d2
Compare
As it was, a circular error would appear, because we've mapped everything under /api/v1/, which is directly used within a Controller. As that controller did not have something mapped for '/error', an error would occur, and that in turn would try to lookup something mapped for '/error', which... Also means we can skip the whitelabel configuration.
JornC
approved these changes
Dec 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Methods to obtain the emission factors for the standard road categories (light traffic, medium freight, heavy freight and autobus).
This is quite different from farm lodgings, and isn't that straight forward: the speed profiles and different applications in SRM1/SRM2 (for non urban roads) make it complicated. The idea is to first pick a road type, then pick a speed profile based on that road type and some other properties, and use that along with the vehicle type and year to arrive at the correct emission factors.