@@ 21,11 21,15 @@ genreq() {
TOLAT=$4
TOLON=$5
echo '{
- load: {filter: {mdbid: ['$FEEDID']}},
- from: {lat: '$FROMLAT', lon: '$FROMLON'},
- to: {lat: '$TOLAT', lon: '$TOLON'},
- max_walk_seconds: 99999999999999,
- max_transfer_seconds: 600
+ "route_params": {
+ "feed_ids": ['$FEEDID'],
+ "from": ['$FROMLAT', '$FROMLON'],
+ "to": ['$TOLAT', '$TOLON'],
+ "max_walk_seconds": 99999999999999,
+ "transfer_categories": ["f", "i"],
+ "output_formats": ["legs", "diagnostics", "mapurl", "request"],
+ "max_transfer_seconds": 600
+ }
}'
}
@@ 37,7 41,7 @@ route() {
# TODO: fix this is broken since API update
echo "$FEEDID" | grep '[0-9]+'
BBOX="$(
- ./mobroute msstatus -f '{filter: {mdbid: ['"$FEEDID"']}}' | jq '.[0].bbox' | grep -oE '[0-9,.-]+' | tr -d "\n"
+ ./mobroute mobsql -mp '{"mobsql_params": {"op": "status", "feed_ids": ['"$FEEDID"']}}' | jq '.[0].bbox' | grep -oE '[0-9,.-]+' | tr -d "\n"
)"
LATA="$(echo $BBOX | cut -d, -f1)"
@@ 52,7 56,7 @@ route() {
TOLAT="$(rnd $LATA $LATB $INTERVAL)"
TOLON="$(rnd $LONA $LONB $INTERVAL)"
- ./mobroute route -p "$(genreq $FEEDID $FROMLAT $FROMLON $TOLAT $TOLON)"
+ ./mobroute route -rp "$(genreq $FEEDID $FROMLAT $FROMLON $TOLAT $TOLON)"
}
if [ "$#" -eq 1 ]; then