liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
package com.xiaopeng.order.utils;
import com.xiaopeng.order.utils.holiday.HolidayUtil;
 
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
 
/**
 * 出租车计费引擎服务
 */
public class TaxiPricingDemoService {
 
 
    public static void main(String[] args) {
        PricingConfig config = setupMockConfig();
//
        Date orderTime = new Date();
//
        // 模拟总里程 25.0 km,以触发多级远途加价
        double totalMillige = 8.946;
        Calendar cal = Calendar.getInstance();
        cal.set(2026, Calendar.APRIL, 15, 22, 4, 50);
        orderTime = cal.getTime();
        // 模拟 GPS 轨迹点
        List<GpsPoint> points = createMockGpsPoints(orderTime);
 
        TaxiPricingService service = new TaxiPricingService();
        Map<String, BigDecimal> bill = service.calculateOrderPrice(orderTime, totalMillige, points, config,0);
 
        System.err.println("======= 订单计费账单 =======");
        bill.forEach((detail, price) -> System.err.println(detail + ": " + price + " 元"));
 
        BigDecimal totalAmount = bill.values().stream().reduce(BigDecimal.ZERO, BigDecimal::add);
        System.err.println("--------------------------");
        System.err.println("应付总额: " + totalAmount + " 元");
 
        List<GpsPoint> mockGpsPoints = createMockGpsPoints(orderTime);
        double sum = mockGpsPoints.stream().mapToDouble(GpsPoint::getDistance).sum();
        System.err.println(sum);
 
    }
 
 
 
    public static class TaxiPricingService {
        public Map<String, BigDecimal> calculateOrderPrice(Date orderTime, double totalMileageKm, List<GpsPoint> points, PricingConfig config,Integer holiday) {
            Map<String, BigDecimal> result = new LinkedHashMap<>();
            BigDecimal totalMileage = BigDecimal.valueOf(totalMileageKm);
 
            PricingRule baseRule = config.findMatchedRule(orderTime,holiday);
            result.put("起步价(" + baseRule.ruleName + ")"+"|"+baseRule.start+"-"+baseRule.end+"|"+baseRule.baseMin+"&"+baseRule.baseKm, baseRule.baseFare);
 
            if (totalMileage.compareTo(baseRule.baseKm) <= 0) {
                return formatMap(result);
            }
 
            BigDecimal remainBaseM = baseRule.baseKm.multiply(new BigDecimal("1000"));
            BigDecimal remainBaseMs = baseRule.baseMin.multiply(new BigDecimal("60000"));
            BigDecimal currentTotalM = BigDecimal.ZERO;
            BigDecimal currentTotalMs = BigDecimal.ZERO;
 
            boolean isOverBaseM = false;
            boolean isOverBaseMs = false;
 
            // 超出里程和分钟数的集合
            Map<String, BigDecimal> bill = new LinkedHashMap<>();
            Map<String, BigDecimal> activeRuleNameRate = new LinkedHashMap<>();
            Set<String> activeRuleNameList = new HashSet<>();
 
            for (int i = 1; i < points.size(); i++) {
                GpsPoint curr = points.get(i);
                GpsPoint prev = points.get(i - 1);
 
                BigDecimal segM = BigDecimal.valueOf(curr.getDistance());
                BigDecimal segMs = BigDecimal.valueOf(curr.getLocatetime() - prev.getLocatetime());
                currentTotalM = currentTotalM.add(segM); // 累计当前已行驶的总里程
                currentTotalMs = currentTotalMs.add(segMs); // 累计当前已行驶的总时间
 
                PricingRule activeRule = config.findMatchedRule(new Date(curr.getLocatetime()),holiday);
 
                // 扣除起步额度逻辑
                BigDecimal billM = BigDecimal.ZERO;
                if (currentTotalM.compareTo(remainBaseM) > 0) {
//                    billM = currentTotalM.subtract(remainBaseM);
                    isOverBaseM = true;
                }
                BigDecimal billMs = BigDecimal.ZERO;
                if (currentTotalMs.compareTo(remainBaseMs) > 0) {
//                    billMs = currentTotalMs.subtract(remainBaseMs);
                    isOverBaseMs = true;
                }
                // 1. 基础费率计算
//                BigDecimal distFee = billM.divide(new BigDecimal(1000), 2, RoundingMode.HALF_UP).multiply(activeRule.perKmRate);
//                BigDecimal timeFee = billMs.multiply(activeRule.perMinRate);
 
                // 2. 远途加价计算 (基于区间判定)
//                BigDecimal longExtra = calculateLongDistExtra(currentTotalM, billM, config.longSteps);
 
//                BigDecimal totalSeg = distFee.add(timeFee).add(longExtra);
                // 超出里程
                if (isOverBaseM) {
                    bill.put(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ml", bill.getOrDefault(activeRule.ruleName + "|"+ activeRule.start + "-" + activeRule.end + "_Ml", BigDecimal.ZERO).add(segM));
                }
                // 超出时间
                if (isOverBaseMs) {
                    bill.put(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ms", bill.getOrDefault(activeRule.ruleName + "|" + activeRule.start + "-" + activeRule.end + "_Ms", BigDecimal.ZERO).add(segMs));
                }
 
                // 若不存在规则名称,则添加
                activeRuleNameRate.computeIfAbsent(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ml", k -> activeRule.perKmRate); // 超出里程的加价
                activeRuleNameRate.computeIfAbsent(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ms",k ->activeRule.perMinRate); // 超出时间的加价
 
                activeRuleNameList.add(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ml");
                activeRuleNameList.add(activeRule.ruleName + "|"+activeRule.start + "-" + activeRule.end + "_Ms");
//                result.put(activeRule.ruleName, result.getOrDefault(activeRule.ruleName, BigDecimal.ZERO).add(totalSeg));
            }
            // 1. 基础费率计算
            for (String ruleName : activeRuleNameList) {
                String[] split = ruleName.split("_");
                if(ruleName.endsWith("_Ml")){
                    BigDecimal exceedValue = bill.get(ruleName);
                    if(Objects.nonNull(exceedValue)){
                        result.put("distance"+split[0], result.getOrDefault(split[0], BigDecimal.ZERO).add(exceedValue));
                        exceedValue = exceedValue.divide(new BigDecimal(1000), 2, RoundingMode.HALF_UP);
                    }else{
                        exceedValue = BigDecimal.ZERO;
                    }
                    BigDecimal exceedRate = activeRuleNameRate.get(ruleName);
                    result.put(split[0], result.getOrDefault(split[0], BigDecimal.ZERO).add(exceedValue.multiply(exceedRate)));
                }else{
                    BigDecimal exceedValue = bill.get(ruleName);
                    if(Objects.nonNull(exceedValue)){
                        exceedValue = exceedValue.divide(new BigDecimal(60000), 2, RoundingMode.HALF_UP);
                    }else{
                        exceedValue = BigDecimal.ZERO;
                    }
                    BigDecimal exceedRate = activeRuleNameRate.get(ruleName);
                    result.put("时长费"+split[0]+"&"+exceedValue, result.getOrDefault(split[0], BigDecimal.ZERO).add(exceedValue.multiply(exceedRate)));
                }
            }
            // 2. 远途加价计算 (基于区间判定)
            BigDecimal longExtra = calculateLongDistExtra(BigDecimal.valueOf(totalMileageKm).subtract(remainBaseM.divide(new BigDecimal(1000))), config.longSteps);
            // 计算远途里程
            BigDecimal longExtraValue = calculateLongDistExtra(BigDecimal.valueOf(totalMileageKm).subtract(remainBaseM.divide(new BigDecimal(1000))), config.longSteps);
            result.put("远途费&"+longExtraValue, longExtra);
            return formatMap(result);
        }
 
        /**
         * 远途加价核心逻辑:判断当前行驶到的里程处于哪个加价区间
         */
        private BigDecimal calculateLongDistExtra(BigDecimal billM, List<LongRangeStep> steps) {
            if (billM.compareTo(BigDecimal.ZERO) <= 0) return BigDecimal.ZERO;
 
            // 当前点所在的公里数
            BigDecimal extraStart = BigDecimal.ZERO;
            BigDecimal extraRate = BigDecimal.ZERO;
            BigDecimal totalExtra = BigDecimal.ZERO;
            BigDecimal remainingDistance = billM;
 
            // 匹配区间规则
            // 分段累进计费
            for (LongRangeStep step : steps) {
               if (remainingDistance.compareTo(BigDecimal.ZERO) <= 0) {
                   break;
               }
 
               // 计算当前区间的宽度
               BigDecimal rangeWidth = step.numEnd.subtract(step.numStart);
 
               // 计算在当前区间应计费的距离
               BigDecimal distanceInThisRange = remainingDistance.min(rangeWidth);
 
               // 如果还有剩余距离需要计入当前区间
               if (distanceInThisRange.compareTo(BigDecimal.ZERO) > 0) {
                   totalExtra = totalExtra.add(distanceInThisRange.multiply(step.addPrice));
                   remainingDistance = remainingDistance.subtract(distanceInThisRange);
               }
            }
            return totalExtra;
        }
        /**
         * 计算远途费的里程
         */
        private BigDecimal calculateLongDistExtraValue(BigDecimal billM, List<LongRangeStep> steps) {
            if (billM.compareTo(BigDecimal.ZERO) <= 0) return BigDecimal.ZERO;
 
            // 当前点所在的公里数
            BigDecimal extraStart = BigDecimal.ZERO;
            BigDecimal extraRate = BigDecimal.ZERO;
 
            // 匹配区间规则
            for (LongRangeStep step : steps) {
                if (step.isMatch(billM)) {
                    extraRate = step.addPrice;
                    extraStart = step.numStart;
                    break;
                }
            }
            return billM.subtract(extraStart);
        }
 
        private Map<String, BigDecimal> formatMap(Map<String, BigDecimal> map) {
            return map.entrySet().stream().collect(Collectors.toMap(
                    Map.Entry::getKey, e -> e.getValue().setScale(2, RoundingMode.HALF_UP), (a, b) -> b, LinkedHashMap::new));
        }
    }
 
    // --- 远途区间模型 ---
    public static class LongRangeStep {
        BigDecimal numStart; // 超过公里数
        BigDecimal numEnd;   // 不足公里数
        BigDecimal addPrice; // 加收单价
 
        public LongRangeStep(double start, double end, double price) {
            this.numStart = BigDecimal.valueOf(start);
            this.numEnd = BigDecimal.valueOf(end);
            this.addPrice = BigDecimal.valueOf(price);
        }
 
        public boolean isMatch(BigDecimal currentKm) {
            // [numStart, numEnd)
            return currentKm.compareTo(numStart) >= 0 && currentKm.compareTo(numEnd) < 0;
        }
    }
 
    public static class PricingConfig {
        public PricingRule holiday;
        public List<PricingRule> peaks = new ArrayList<>();
        public PricingRule night;
        public List<PricingRule> normals = new ArrayList<>();
        public List<LongRangeStep> longSteps = new ArrayList<>(); // 修改为区间列表
 
        public PricingRule findMatchedRule(Date date,Integer isHoliday) {
            LocalTime t = date.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();
            if (isHoliday==1){
                return holiday;
            }
            for (PricingRule r : peaks) if (r.isMatch(t)) return r;
            if (night.isMatch(t)) return night;
            for (PricingRule r : normals) if (r.isMatch(t)) return r;
            return normals.get(0);
        }
    }
 
    public static class PricingRule {
        public String ruleName;
        public LocalTime start, end;
        public BigDecimal baseFare, baseKm, baseMin, perKmRate, perMinRate;
 
        public PricingRule(String n, String s, String e, double bf, double bk, double bm, double pkr, double pmr) {
            this.ruleName = n;
            this.start = LocalTime.parse(s);
            this.end = LocalTime.parse(e);
            this.baseFare = BigDecimal.valueOf(bf);
            this.baseKm = BigDecimal.valueOf(bk);
            this.baseMin = BigDecimal.valueOf(bm);
            this.perKmRate = BigDecimal.valueOf(pkr);
            this.perMinRate = BigDecimal.valueOf(pmr);
        }
 
        public boolean isMatch(LocalTime now) {
            return start.isBefore(end) ? (!now.isBefore(start) && !now.isAfter(end)) : (!now.isBefore(start) || !now.isAfter(end));
        }
    }
 
    public static class GpsPoint {
        private double distance;
        private long locatetime;
        public GpsPoint(double d, long t) { this.distance = d; this.locatetime = t; }
        public double getDistance() { return distance; }
        public long getLocatetime() { return locatetime; }
    }
 
    private static PricingConfig    setupMockConfig() {
        PricingConfig config = new PricingConfig();
        config.peaks.add(new PricingRule("高峰期", "04:00", "05:00", 15, 1, 1, 4, 4));
        config.peaks.add(new PricingRule("高峰期", "15:00", "16:00", 15, 1, 1, 4, 4));
        config.night = new PricingRule("夜间行驶", "20:04", "23:00", 15, 1, 1, 3, 3);
        config.holiday = new PricingRule("节假日", "00:00", "23:59", 20, 1, 1, 4, 4);
        config.normals.add(new PricingRule("普通时段", "00:00", "23:59", 10.0, 1, 1, 3, 3));
 
        // --- 远途加价区间配置 (关键修改) ---
        // 1. 超过 num1(12) 不足 num2(20), 加收 num3(1.2)
        config.longSteps.add(new LongRangeStep(1, 3, 3));
        // 2. 超过 num4(20) 不足 num5(35), 加收 num6(2.0)
        config.longSteps.add(new LongRangeStep(3, 5, 5));
        // 3. 超过 num7(35) 以后, 加收 num8(3.5) -> numEnd 传个极大值
        config.longSteps.add(new LongRangeStep(5, 999999, 6));
 
        return config;
    }
 
    public static List<GpsPoint> createMockGpsPoints(Date startTime) {
        List<GpsPoint> list = new ArrayList<>();
        long startTs = startTime.getTime();
        list.add(new GpsPoint(0, startTs));
        // 模拟行驶了 20km
        list.add(new GpsPoint(120, startTs + 2 * 10 * 1000));
        list.add(new GpsPoint(204, startTs + 2 * 20 * 1000));
        list.add(new GpsPoint(231, startTs + 2 * 30 * 1000));
        list.add(new GpsPoint(252, startTs + 2 * 40 * 1000));
        list.add(new GpsPoint(188, startTs + 2 * 50 * 1000));
        list.add(new GpsPoint(150, startTs + 2 * 60 * 1000));
        list.add(new GpsPoint(126, startTs + 2 * 70 * 1000));
        list.add(new GpsPoint(138, startTs + 2 * 80 * 1000));
        list.add(new GpsPoint(119, startTs + 2 * 90 * 1000));
        list.add(new GpsPoint(147, startTs + 2 * 100 * 1000));
        list.add(new GpsPoint(155, startTs + 2 * 110 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 120 * 1000));
        list.add(new GpsPoint(172, startTs + 2 * 130 * 1000));
        list.add(new GpsPoint(202, startTs + 2 * 140 * 1000));
        list.add(new GpsPoint(162, startTs + 2 * 150 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 160 * 1000));
        list.add(new GpsPoint(132, startTs + 2 * 170 * 1000));
        list.add(new GpsPoint(122, startTs + 2 * 180 * 1000));
        list.add(new GpsPoint(262, startTs + 2 * 190 * 1000));
        list.add(new GpsPoint(242, startTs + 2 * 200 * 1000));
        list.add(new GpsPoint(282, startTs + 2 * 210 * 1000));
        list.add(new GpsPoint(222, startTs + 2 * 220 * 1000));
        list.add(new GpsPoint(212, startTs + 2 * 230 * 1000));
        list.add(new GpsPoint(142, startTs + 2 * 240 * 1000));
        list.add(new GpsPoint(262, startTs + 2 * 250 * 1000));
        list.add(new GpsPoint(169, startTs + 2 * 260 * 1000));
        list.add(new GpsPoint(170, startTs + 2 * 270 * 1000));
        list.add(new GpsPoint(180, startTs + 2 * 280 * 1000));
        list.add(new GpsPoint(165, startTs + 2 * 290 * 1000));
        list.add(new GpsPoint(180, startTs + 2 * 300 * 1000));
        list.add(new GpsPoint(198, startTs + 2 * 310 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 320 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 330 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 340 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 350 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 360 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 370 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 380 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 390 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 400 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 410 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 420 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 430 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 440 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 450 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 460 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 470 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 490 * 1000));
        list.add(new GpsPoint(182, startTs + 2 * 500 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 510 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 520 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 530 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 540 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 550 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 560 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 570 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 590 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 600 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 1980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 2980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3180 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3280 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3380 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3480 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3580 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3680 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3780 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3880 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 3980 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4080 * 1000));
//        list.add(new GpsPoint(182, startTs + 2 * 4180 * 1000));
        return list;
    }
}