TriHuynh00 / AC3R-Demo

Automatic Crash Constructor from Crash Report (A3CR) Demo of constructing simulations from crash reports
11 stars 6 forks source link

Create JSON file from AC3R Street Object #12

Closed TriHuynh00 closed 3 years ago

TriHuynh00 commented 3 years ago

First, create a JSON object storing the nodes of each road in the following format:

{ "v1_road": [{x1, y1,z1} ..., {xn, yn, zn}] "v2_road": [{x1, y1,z1} ..., {xn, yn, zn}] "v1_speed": [speed_1, ..., speed_n-1] "v2_speed": [speed_1, ..., speed_n-1] }

The information of the road geometry can be found in the Street model, line 351 of AccidentConstructor class.

Second, create a parameter to specify the output location of this JSON file.

This JSON file is inputted into Sameed code to be processed.

alessiogambi commented 3 years ago

@TriHuynh00 Note that the arrays of speed should have one element less than the array of waypoints

harveyvn commented 3 years ago

This issue is solved with the PR https://github.com/TriHuynh00/AC3R-Demo/pull/13