Skip to content

The reliable pluggable engine to enhance ONE Record BookingOption data with calculated CO₂ emissions and CO₂ compensation costs.

License

Notifications You must be signed in to change notification settings

riege/one-record-hackathon2023-carbulator

Repository files navigation

one-record-hackathon2023-carbulator

The Carbulator

For more background information, see devpost https://devpost.com/software/the-carbulator.

This project has been created during IATA ONE Record Hackathon – hosted by Lufthansa Cargo, 23-25 June 2023, see https://onerecord-fra.devpost.com/

Toolbox

This project uses public available tools / libraries, mainly

Developer Info

Basic startup

Make sure the repository is checked out and everything starts from that directory.

Build the project (you need a Java compiler):

./gradlew shadowJar

Then start the engine with default parameter:

java -jar engine/build/libs/engine-all.jar

Best viewed in a 100x40 character terminal..

Commandline Options

During the Hackathon event and development, the Carbulator Engine connected to a local CarbonCare API server copy, which was added to the local network. This server was already using the new CarbonCare calculation API 3.0 (see link below) which will get productive officially on July 1st, 2023 and which uses the new CO2 calculation standard ISO-14083:2023.

For future production usage, the address of CarbonCare API server needs to be provided together with a APIKEY. Commandline options to the Carbulator Engine are:

CarbonCare API key

-a,--apikey

URL Prefix of the CarbonCare server API URL

-h,--hosturlprefix

Port for CarbonCare server API URL

-p,--hostport

Input single JSON bookingOption (filename/URL), multiple use possible

-i,--input

Output file name for carbonated JSON array of BookingOptions

-o,--output

Developer Source Code Info

Java class DemoDataGenerator generates ONE Record BookingOption .json files into engine/src/main/resources.

Note that CommandLine#getInputSources() uses (some) of these files as default input for the CarbulatorEngine class.

This approach (generating files + parsing them) has been choosen intentionally to

  • ensure JSON example files are correct as per Ontology
  • allow to feed other JSON files to CarbulatorEngine as well, as long as their content matches the BookingOption requirements and rules.

About

The reliable pluggable engine to enhance ONE Record BookingOption data with calculated CO₂ emissions and CO₂ compensation costs.

Resources

License

Stars

Watchers

Forks