| 233 | return transformed_points |
| 234 | |
| 235 | def getAllvType(self): |
| 236 | conn = sqlite3.connect(self.dataBase) |
| 237 | cur = conn.cursor() |
| 238 | cur.execute( |
| 239 | """SELECT DISTINCT vTypeID, length, width, maxAccel, maxDecel, maxSpeed |
| 240 | from vehicleINFO;""") |
| 241 | |
| 242 | dbvTypes = cur.fetchall() |
| 243 | for dbvType in dbvTypes: |
| 244 | vTypeIns = vehType(dbvType[0]) |
| 245 | vTypeIns.length = dbvType[1] |
| 246 | vTypeIns.width = dbvType[2] |
| 247 | vTypeIns.maxAccel = dbvType[3] |
| 248 | vTypeIns.maxDecel = dbvType[4] |
| 249 | vTypeIns.maxSpeed = dbvType[5] |
| 250 | self.allvTypes[dbvType[0]] = vTypeIns |
| 251 | |
| 252 | cur.close() |
| 253 | conn.close() |
| 254 | |
| 255 | def dbTrajectory(self, vehid: str, currFrame: int) -> dict: |
| 256 | conn = sqlite3.connect(self.dataBase) |