compare :id - Andrewyg/unmanned-car GitHub Wiki

Request method: GET

Path: /compare/:id

Parameters:

  • Replace :id in URI to the database UUID of the related result. Protocol supports using current in the :id to use the current database. WARNING: Only run with current if you have NOT run /operate

  • Set query after the URL with following parameters (if using current).

{
    left: "The time it takes to run the left turning action",
    straight: "Same as left just for straight".
    right: "Same as left just for right",
    car: "The time it takes for a car to run through the length of a car",
    LightHS: "The time length of straight going light of a horizontal street",
    LightHL: "The time length of left turning light of a horizontal street",
    LightVS: "The time length of straight going light of a vertical street",
    LightVL: "The time length of left turning light of a vertical street"
}

Returning data:

{
    "normalInsTakenTime": "Number, the time it takes for normal light control to run through",
    "computerControledInsTakenTime": "Number, the total time it need for CCIns",
    "refCIns":"UUID of the intersection it's using",
    "refResult":"UUID of related result",
    "time": {
        "left": 0,
        "straight":1,
        "right":1,
        "car":1,
        "lights": {
            "horizontal": {
                "left":80,
                "straight":60,
                "right":60
            },
            "vertical": {
                "left":80,
                "straight":60,
                "right":60
            }
        }
    }
}