Boavizta / boaviztapi

šŸ›  Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Impossible values got from usage impact #101

Closed bpetit closed 2 years ago

bpetit commented 2 years ago

Bug description

With :

I get gwp usage impact of 0.995 kgCO2eq in verbose USAGE-1.

To Reproduce

Send a request with the exact same parameters, on api version 0.1.1. I'll confirm it still happens in 0.1.2

Expected behavior

A possible value for use impact gwp.

JSON OUTPUT

          "USAGE-1": {
            "unit": 1,
            "hash": 0,
            "hours_use_time": {
              "input_value": 1,
              "used_value": 1,
              "status": "UNCHANGED"
            },
            "hours_electrical_consumption": {
              "input_value": 10.153711771428572,
              "used_value": 10.153711771428572,
              "status": "UNCHANGED"
            },
            "usage_location": {
              "input_value": "FRA",
              "used_value": "FRA",
              "status": "UNCHANGED"
            },
            "gwp_factor": {
              "input_value": null,
              "used_value": 0.098,
              "status": "SET"
            },
            "pe_factor": {
              "input_value": null,
              "used_value": 11.289,
              "status": "SET"
            },
            "adp_factor": {
              "input_value": null,
              "used_value": 4.86e-8,
              "status": "SET"
            },
            "impacts": {
              "gwp": {
                "value": 0.995,
                "unit": "kgCO2eq"
              },
              "pe": {
                "value": 115,
                "unit": "MJ"
              },
              "adp": {
                "value": 4.93e-7,
                "unit": "kgSbeq"
              }
            }
          }
        }
      }
    }
  }
bpetit commented 2 years ago

It seems either the unit is wrong (should be gCO2eq ?) or there is a 1000 factor lost somewhere ?

bpetit commented 2 years ago

Seems fixed in 0.1.2, I get 0.000902.

Closing the issue !