A method for creating, storing, and updating local dynamic map database with safety attribute, for a street or highway, said method comprising:
- a central computer obtaining basic safety messages in an intended region of map, wherein the basic safety messages include vehicle data;
- filtering out a first basic safety message data out of said basic safety messages which falls outside of said intended region of map;
- adaptively defining said intended region of map, using speed profiles data in each road segment of interest;
- wherein a high average speed road segment requires greater map coverage than a low average speed road segment;
- receiving path history or trajectory from an at least one vehicle;
- checking accuracy of said path history or trajectory;
- when said accuracy of said path history or trajectory is better than a first accuracy threshold distance, storing said path history or trajectory, instead of actual locations reported by said at least one vehicle;
- when said accuracy of said path history or trajectory is worse than said first accuracy threshold distance, storing said actual locations reported by said at least one vehicle;
- storing a location, heading, speed, and timestamp of each of said basic safety messages received;
- and
- when corresponding number of vehicles for stored data is above a first number of vehicle threshold, then starting generation of a temporary map;
- said central computer further:
- generating lanes, wherein generating lanes includes:
- assigning equal weights for all paths at beginning, as an initialization step;
- combining paths or parts of paths which have a separation distance of smaller than a threshold fraction of a lane width, to produce a resultant path, to indicate that said paths or parts of paths are actually the same;
- wherein weight of said resultant path is calculated using the equation:
- (1/sqrt(((1/w1)2*(1/w2)2)/((1/w1)2+(1/w2)2)))
- wherein sqrt is the square root function, w1 is weight of a first path, and w2 is weight of a second path;
- combining paths which start and end with same heading angles;
- combining parts of paths of vehicles which have same headings in said parts;
- updating weights of the paths or parts of the paths of combined paths which are headed in same direction, using the equation:
- (1/sqrt(((1/w1)2*(1/w2)2)/((1/w1)2+(1/w2)2)))
- detecting lane changes in captured data, wherein detecting lane changes includes using statistical median operation to filter outliers in positions and paths for lane change detection;
- determining an intersection region and splitting lanes wherein determining an intersection region and splitting lanes includes:
- identifying an intersection diamond region using speed profiles of vehicles, heading angles of said vehicles, and intersection of lanes, generated from said vehicles' travel paths;
- obtaining intersection of lanes, generated from said vehicles' travel paths;
- constructing intersection points of lanes for each of lanes which differ in heading angle by more than a threshold angle value;
- constructing a convex polygon using said intersection points of lanes;
- expanding a convex polygon by adding a certain amount of width, equal to a specific fraction of lane width on each of sides;
- splitting lanes, based on intersection region polygon;
- determining lane type as ingress or egress, wherein determining lane type includes determining a difference in angle between vehicle heading and lane heading;
- combining incoming and outgoing lanes which fall on one side of said polygon and have either same or exactly opposite heading angle, with difference of approximately 180 degrees;
- determining connected lanes;
- determining movement states for each of said ingress lanes
- based on connected egress lane's maneuver code,
- wherein connection maneuvers comprise:
- left-turn, straight, or right-turn;
- updating said map data;
- generating lanes for said street or highway.