Algorithms for Constructing Vehicle Trajectories in Urban Networks Using Inertial Sensors Data from Mobile Devices