feat(pbf): parse TripUpdate enitity
This commit is contained in:
parent
0fa2cd5e4c
commit
7352a42b2c
23
pbf/index.js
23
pbf/index.js
|
@ -33,6 +33,9 @@ async function run() {
|
||||||
let entityVhclCount=0;
|
let entityVhclCount=0;
|
||||||
let entityTrpCount=0;
|
let entityTrpCount=0;
|
||||||
let entityTrpTrpCount=0;
|
let entityTrpTrpCount=0;
|
||||||
|
let entityTrpTrpTrpIdCount=0;
|
||||||
|
let entityTrpTrpRtIdCount=0;
|
||||||
|
let entityTrpTrpRtId_Count=0;
|
||||||
let entityTrpVhclCount=0;
|
let entityTrpVhclCount=0;
|
||||||
let entityTrpStuCount=0;
|
let entityTrpStuCount=0;
|
||||||
let entityAlrtCount=0;
|
let entityAlrtCount=0;
|
||||||
|
@ -62,6 +65,23 @@ async function run() {
|
||||||
if(trip){
|
if(trip){
|
||||||
entityTrpTrpCount++;
|
entityTrpTrpCount++;
|
||||||
const {trip_id,route_id,direction_id,start_time,start_date,schedule_relationship}=trip;
|
const {trip_id,route_id,direction_id,start_time,start_date,schedule_relationship}=trip;
|
||||||
|
if(trip_id){
|
||||||
|
entityTrpTrpTrpIdCount++;
|
||||||
|
if(entityTrpTrpTrpIdCount % 100 == 0){
|
||||||
|
debug('route_id: '+route_id);
|
||||||
|
debug('trip_id: '+trip_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(route_id){
|
||||||
|
entityTrpTrpRtIdCount++;
|
||||||
|
if(!/[^a-z]/i.test(route_id)){
|
||||||
|
debug('This is ODD!');
|
||||||
|
debug('route_id: '+route_id);
|
||||||
|
debug('trip_id: '+trip_id);
|
||||||
|
}else if(route_id.includes("_")){
|
||||||
|
entityTrpTrpRtId_Count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(vehicle){
|
if(vehicle){
|
||||||
entityTrpVhclCount++;
|
entityTrpVhclCount++;
|
||||||
|
@ -81,6 +101,9 @@ async function run() {
|
||||||
debug('entityVhclCount: '+entityVhclCount);
|
debug('entityVhclCount: '+entityVhclCount);
|
||||||
debug('entityTrpCount: '+entityTrpCount);
|
debug('entityTrpCount: '+entityTrpCount);
|
||||||
debug('entityTrpTrpCount: '+entityTrpTrpCount);
|
debug('entityTrpTrpCount: '+entityTrpTrpCount);
|
||||||
|
debug('entityTrpTrpTrpIdCount: '+entityTrpTrpTrpIdCount);
|
||||||
|
debug('entityTrpTrpRtIdCount: '+entityTrpTrpRtIdCount);
|
||||||
|
debug('entityTrpTrpRtId_Count: '+entityTrpTrpRtId_Count);
|
||||||
debug('entityTrpVhclCount: '+entityTrpVhclCount);
|
debug('entityTrpVhclCount: '+entityTrpVhclCount);
|
||||||
debug('entityTrpStuCount: '+entityTrpStuCount);
|
debug('entityTrpStuCount: '+entityTrpStuCount);
|
||||||
debug('entityAlrtCount: '+entityAlrtCount);
|
debug('entityAlrtCount: '+entityAlrtCount);
|
||||||
|
|
Loading…
Reference in New Issue