TriHuynh00 / AC3R-Demo

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

Specify crash components and moving direction #18

Closed TriHuynh00 closed 3 years ago

TriHuynh00 commented 3 years ago

Find the code piece where Vuong can extract crash component and moving direction of the vehicle

TriHuynh00 commented 3 years ago

The list of vehicles is AccidentConstructor.vehicleList Since this is an ArrayList<VehicleAttr>, Vuong can loop through each VehicleAttr element of the list to get the moving direction and damaged component as follows:

To get the moving direction, use getTravellingDirection(). This will return a String To get the list of damaged component, use getDamagedComponents(). This will return a LinkedList<String>

The returned value can then be added into the JSON object