@@ -54,11 +54,11 @@ TEST(Traffic, BasicUpdates) {
54
54
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
55
55
current->breakpoint1 = 255 ;
56
56
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
57
- current->overall_speed = 0 ;
58
- current->speed1 = 0 ;
57
+ current->overall_encoded_speed = 0 ;
58
+ current->encoded_speed1 = 0 ;
59
59
} else {
60
- current->overall_speed = 24 >> 1 ;
61
- current->speed1 = 24 >> 1 ;
60
+ current->overall_encoded_speed = 24 >> 1 ;
61
+ current->encoded_speed1 = 24 >> 1 ;
62
62
}
63
63
};
64
64
test::customize_live_traffic_data (map.config , cb_setter_24kmh);
@@ -82,9 +82,9 @@ TEST(Traffic, BasicUpdates) {
82
82
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
83
83
current->breakpoint1 = 255 ;
84
84
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
85
- current->overall_speed = 0 ;
85
+ current->overall_encoded_speed = 0 ;
86
86
} else {
87
- current->overall_speed = UNKNOWN_TRAFFIC_SPEED_RAW - 1 ;
87
+ current->overall_encoded_speed = UNKNOWN_TRAFFIC_SPEED_RAW - 1 ;
88
88
}
89
89
};
90
90
test::customize_live_traffic_data (map.config , cb_setter_max);
@@ -210,8 +210,8 @@ TEST(Traffic, CutGeoms) {
210
210
0u ,
211
211
0u ,
212
212
};
213
- ts.overall_speed = 42 >> 1 ;
214
- ts.speed1 = 42 >> 1 ;
213
+ ts.overall_encoded_speed = 42 >> 1 ;
214
+ ts.encoded_speed1 = 42 >> 1 ;
215
215
ts.congestion1 = baldr::MAX_CONGESTION_VAL - 1 ;
216
216
ts.breakpoint1 = 127 ;
217
217
@@ -221,8 +221,8 @@ TEST(Traffic, CutGeoms) {
221
221
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
222
222
current->breakpoint1 = 255 ;
223
223
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
224
- current->overall_speed = 0 ;
225
- current->speed1 = 0 ;
224
+ current->overall_encoded_speed = 0 ;
225
+ current->encoded_speed1 = 0 ;
226
226
current->breakpoint1 = 255 ;
227
227
} else {
228
228
*current = ts;
@@ -279,13 +279,13 @@ TEST(Traffic, CutGeoms) {
279
279
0u ,
280
280
0u ,
281
281
};
282
- ts.overall_speed = 30 >> 1 ;
282
+ ts.overall_encoded_speed = 30 >> 1 ;
283
283
284
- ts.speed1 = 20 >> 1 ;
284
+ ts.encoded_speed1 = 20 >> 1 ;
285
285
ts.congestion1 = baldr::MAX_CONGESTION_VAL - 1 ;
286
286
ts.breakpoint1 = 100 ;
287
287
288
- ts.speed2 = 40 >> 1 ;
288
+ ts.encoded_speed2 = 40 >> 1 ;
289
289
ts.congestion2 = 1 ; // low but not unknown - 0 = unknown
290
290
ts.breakpoint2 = 200 ;
291
291
@@ -297,8 +297,8 @@ TEST(Traffic, CutGeoms) {
297
297
const_cast <valhalla::baldr::TrafficSpeed*>(tile.speeds + index );
298
298
current->breakpoint1 = 255 ;
299
299
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
300
- current->overall_speed = 0 ;
301
- current->speed1 = 0 ;
300
+ current->overall_encoded_speed = 0 ;
301
+ current->encoded_speed1 = 0 ;
302
302
} else {
303
303
*current = ts;
304
304
}
@@ -360,17 +360,17 @@ TEST(Traffic, CutGeoms) {
360
360
0u ,
361
361
0u ,
362
362
};
363
- ts.overall_speed = 36 >> 1 ;
363
+ ts.overall_encoded_speed = 36 >> 1 ;
364
364
365
- ts.speed1 = 20 >> 1 ;
365
+ ts.encoded_speed1 = 20 >> 1 ;
366
366
ts.congestion1 = baldr::MAX_CONGESTION_VAL - 1 ;
367
367
ts.breakpoint1 = 100 ;
368
368
369
- ts.speed2 = 40 >> 1 ;
369
+ ts.encoded_speed2 = 40 >> 1 ;
370
370
ts.congestion2 = 1 ;
371
371
ts.breakpoint2 = 200 ;
372
372
373
- ts.speed3 = 60 >> 1 ;
373
+ ts.encoded_speed3 = 60 >> 1 ;
374
374
ts.congestion3 = 1 ;
375
375
376
376
auto cb_setter_speed = [&map, &ts](baldr::GraphReader& reader, baldr::TrafficTile& tile,
@@ -379,8 +379,8 @@ TEST(Traffic, CutGeoms) {
379
379
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
380
380
current->breakpoint1 = 255 ;
381
381
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
382
- current->overall_speed = 0 ;
383
- current->speed1 = 0 ;
382
+ current->overall_encoded_speed = 0 ;
383
+ current->encoded_speed1 = 0 ;
384
384
} else {
385
385
*current = ts;
386
386
}
@@ -479,17 +479,17 @@ TEST(Traffic, CutGeoms) {
479
479
0u ,
480
480
0u ,
481
481
};
482
- ts.overall_speed = 36 >> 1 ;
482
+ ts.overall_encoded_speed = 36 >> 1 ;
483
483
484
- ts.speed1 = 20 >> 1 ;
484
+ ts.encoded_speed1 = 20 >> 1 ;
485
485
ts.congestion1 = baldr::MAX_CONGESTION_VAL - 1 ;
486
486
ts.breakpoint1 = 100 ;
487
487
488
- ts.speed2 = 40 >> 1 ;
488
+ ts.encoded_speed2 = 40 >> 1 ;
489
489
ts.congestion2 = 1 ;
490
490
ts.breakpoint2 = 200 ;
491
491
492
- ts.speed3 = 60 >> 1 ;
492
+ ts.encoded_speed3 = 60 >> 1 ;
493
493
ts.congestion3 = 50 ;
494
494
495
495
auto cb_setter_speed = [&map, &ts](baldr::GraphReader& reader, baldr::TrafficTile& tile,
@@ -498,8 +498,8 @@ TEST(Traffic, CutGeoms) {
498
498
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
499
499
current->breakpoint1 = 255 ;
500
500
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
501
- current->overall_speed = 0 ;
502
- current->speed1 = 0 ;
501
+ current->overall_encoded_speed = 0 ;
502
+ current->encoded_speed1 = 0 ;
503
503
} else {
504
504
*current = ts;
505
505
}
@@ -716,13 +716,13 @@ TEST(Traffic, CutGeoms) {
716
716
0u ,
717
717
0u ,
718
718
};
719
- ts.overall_speed = 36 >> 1 ;
719
+ ts.overall_encoded_speed = 36 >> 1 ;
720
720
721
- ts.speed1 = 20 >> 1 ;
721
+ ts.encoded_speed1 = 20 >> 1 ;
722
722
ts.congestion1 = baldr::MAX_CONGESTION_VAL - 1 ;
723
723
ts.breakpoint1 = 100 ;
724
724
725
- ts.speed2 = 40 >> 1 ;
725
+ ts.encoded_speed2 = 40 >> 1 ;
726
726
ts.congestion2 = 1 ;
727
727
728
728
// Regression is when breakpoint2 is set to 255,
@@ -731,7 +731,7 @@ TEST(Traffic, CutGeoms) {
731
731
ts.breakpoint2 = 255 ;
732
732
733
733
// This needs to be set
734
- ts.speed3 = 60 >> 1 ;
734
+ ts.encoded_speed3 = 60 >> 1 ;
735
735
ts.congestion3 = 50 ;
736
736
737
737
auto cb_setter_speed = [&map, &ts](baldr::GraphReader& reader, baldr::TrafficTile& tile,
@@ -740,8 +740,8 @@ TEST(Traffic, CutGeoms) {
740
740
auto BD = gurka::findEdge (reader, map.nodes , " BD" , " D" , tile_id);
741
741
current->breakpoint1 = 255 ;
742
742
if (std::get<1 >(BD) != nullptr && std::get<0 >(BD).id () == index ) {
743
- current->overall_speed = 0 ;
744
- current->speed1 = 0 ;
743
+ current->overall_encoded_speed = 0 ;
744
+ current->encoded_speed1 = 0 ;
745
745
} else {
746
746
*current = ts;
747
747
}
@@ -835,8 +835,8 @@ std::shared_ptr<baldr::GraphReader> WaypointsOnClosuresTest::clean_reader;
835
835
namespace {
836
836
inline void SetLiveSpeed (baldr::TrafficSpeed* live_speed, uint64_t speed) {
837
837
live_speed->breakpoint1 = 255 ;
838
- live_speed->overall_speed = speed >> 1 ;
839
- live_speed->speed1 = speed >> 1 ;
838
+ live_speed->overall_encoded_speed = speed >> 1 ;
839
+ live_speed->encoded_speed1 = speed >> 1 ;
840
840
}
841
841
} // namespace
842
842
0 commit comments