Implement a function that processes a series of vessel route coordinates and identifies potential deviations based on predefined threshold limits.
Use consecutive coordinates to evaluate each route leg. Return the zero-based indices of coordinates whose leg from the preceding coordinate exceeds either threshold.
Function signature: def detect_route_deviations(coordinates, thresholds):
coordinates is a list of [latitude, longitude] pairs. thresholds is a dictionary with latitude and longitude limits. The first coordinate cannot be flagged. Return a list of flagged coordinate indices.
def detect_route_deviations(coordinates, thresholds):