| | |
| | | <action android:name="android.intent.action.BOOT_COMPLETED"/> |
| | | </intent-filter> |
| | | </receiver> |
| | | <receiver android:name="safeluck.drive.evaluation.receiver.ShutdownBroadcastReceiver"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.ACTION_SHUTDOWN"/> |
| | | <category android:name="android.intent.category.HOME"/> |
| | | </intent-filter> |
| | | </receiver> |
| | | <receiver android:name="safeluck.drive.evaluation.receiver.ReBootBroadcastReceiver"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.REBOOT"/> |
| | | <category android:name="android.intent.category.HOME"/> |
| | | </intent-filter> |
| | | </receiver> |
| | | <receiver android:name="safeluck.drive.evaluation.receiver.ShutdownBroadcastReceiver"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.ACTION_SHUTDOWN"/> |
| | | <category android:name="android.intent.category.HOME"/> |
| | | </intent-filter> |
| | | </receiver> |
| | | <receiver android:name="safeluck.drive.evaluation.receiver.ReBootBroadcastReceiver"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.REBOOT"/> |
| | | <category android:name="android.intent.category.HOME"/> |
| | | </intent-filter> |
| | | </receiver> |
| | | </application> |
| | | |
| | | </manifest> |
| | |
| | | [{ |
| | | "id": 863, |
| | | "item": 1, |
| | | "point": [{ |
| | | "x-y": [-9.3806, 37.3791, -8.9130, 36.4974, -8.1991, 36.8640, -7.6962, 35.7786, -6.6023, 36.2578, -7.0759, 37.3599, -6.4065, 37.7090, -6.8984, 38.6962] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": 864, |
| | | "id": 876, |
| | | "item": 3, |
| | | "point": [{ |
| | | "x-y": [-5.3806, 37.3791, -4.9130, 36.4974, -4.1991, 36.8640, -3.6962, 35.7786, -2.6023, 36.2578, -3.0759, 37.3599, -2.4065, 37.7090, -2.8984, 38.6962] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": 865, |
| | | "x-y": [16589.2108, -7592.2752, 16587.738, -7588.9626, 16581.1917, -7592.3313, 16580.1238, -7590.1814, 16573.4773, -7593.6051, 16574.5939, -7595.7506, 16568.6578, -7598.8277, 16570.2548, -7602.0429] |
| | | }] |
| | | }, { |
| | | "id": 879, |
| | | "item": 2, |
| | | "point": [{ |
| | | "x-y": [-1.9065, 30.7090, -2.5759, 30.3599, -2.1023, 29.2578, -2.4669, 29.0981, -2.9503, 30.1946, -3.3247, 30.0293, -2.8316, 28.9383, -3.1962, 28.7786, -3.6991, 29.8640] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": 866, |
| | | "x-y": [16631.9724, -7572.0083, 16640.7097, -7567.8933, 16638.8423, -7563.8859, 16639.3253, -7563.5842, 16641.2092, -7567.6242, 16641.4985, -7567.4958, 16639.6009, -7563.438, 16640.095, -7563.1417, 16642.0225, -7567.2532] |
| | | }] |
| | | }, { |
| | | "id": 877, |
| | | "item": 1, |
| | | "point": [{ |
| | | "x-y": [16606.5718, -7592.7425, 16609.7972, -7598.9155, 16615.6195, -7595.8881, 16617.9794, -7600.5532, 16620.2055, -7599.3555, 16617.8385, -7594.7065, 16623.7326, -7591.5665, 16620.5822, -7585.3858] |
| | | }] |
| | | }, { |
| | | "id": 878, |
| | | "item": 5, |
| | | "point": [{ |
| | | "x-y": [1.1016, 31.6962, 1.5935, 30.7090, 0.9241, 30.3599, 1.3977, 29.2578, 0.3038, 28.7786, -0.6667, 30.7457] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": 867, |
| | | "x-y": [16601.7211, -7627.4499, 16604.7674, -7625.387, 16607.3525, -7630.2736, 16611.6697, -7628.0306, 16613.0442, -7631.3969, 16605.8191, -7635.1681] |
| | | }] |
| | | }, { |
| | | "id": 875, |
| | | "item": 4, |
| | | "point": [{ |
| | | "x-y": [-1.6249, 32.5992, -1.7749, 32.8655, -1.9249, 33.0460, -2.0749, 33.1807, -2.2249, 33.2842, -2.3749, 33.3635, -2.5249, 33.4228, -2.6749, 33.4643, -2.8249, 33.4897, -2.9749, 33.4998, -3.1249, 33.4948, -3.2749, 33.4746, -3.4249, 33.4386, -3.5749, 33.3855, -3.7249, 33.3132, -3.8749, 33.2184, -4.0249, 33.0953, -4.1749, 32.9550, -4.3249, 32.8386, -4.4749, 32.7428, -4.6249, 32.6645, -4.7749, 32.6014, -4.9249, 32.5520, -5.0749, 32.5153, -5.2249, 32.4906, -5.3749, 32.4774, -5.5249, 32.4755, -5.6749, 32.4849, -5.8249, 32.5057, -5.9749, 32.5384, -6.1249, 32.5834, -6.2749, 32.6418, -6.4249, 32.7149, -6.5749, 32.8045, -6.7249, 32.9136, -6.8749, 33.0466, -7.0249, 33.2110, -7.1749, 33.4213, -7.3249, 33.7149, -7.4749, 34.4749] |
| | | "x-y": [16582.5745, -7625.2715, 16583.3317, -7626.2782, 16584.3733, -7627.0041, 16585.3725, -7627.3071, 16586.6709, -7627.2873, 16587.8216, -7626.8839, 16588.8947, -7626.0781, 16589.5949, -7624.9904, 16590.0621, -7623.8121, 16590.628, -7622.7458, 16591.3904, -7621.7376, 16592.2946, -7620.9083, 16593.2589, -7620.2455, 16594.1722, -7619.8063, 16595.3586, -7619.4565, 16596.6087, -7619.2749, 16598.3161, -7619.4024, 16599.5229, -7619.7126, 16600.5292, -7620.151, 16601.5604, -7620.8035, 16602.481, -7621.6376, 16603.0784, -7622.348, 16603.3629, -7622.755] |
| | | },{ |
| | | "x-y": [-1.1249, 32.6956, -1.2749, 33.0119, -1.4249, 33.2325, -1.5749, 33.4032, -1.7249, 33.5408, -1.8749, 33.6535, -2.0249, 33.7462, -2.1749, 33.8219, -2.3249, 33.8826, -2.4749, 33.9298, -2.6249, 33.9645, -2.7749, 33.9873, -2.9249, 33.9986, -3.0749, 33.9986, -3.2249, 33.9873, -3.3749, 33.9646, -3.5249, 33.9299, -3.6749, 33.8827, -3.8249, 33.8220, -3.9749, 33.7463, -4.1249, 33.6537, -4.2749, 33.5410, -4.4249, 33.4037, -4.5749, 33.2749, -4.7249, 33.1758, -4.8749, 33.1001, -5.0249, 33.0440, -5.1749, 33.0052, -5.3249, 32.9824, -5.4749, 32.9749, -5.6249, 32.9824, -5.7749, 33.0052, -5.9249, 33.0440, -6.0749, 33.1001, -6.2249, 33.1758, -6.3749, 33.2749, -6.5249, 33.4037, -6.6749, 33.5749, -6.8249, 33.8210, -6.9749, 34.4749] |
| | | } |
| | | "x-y": [16579.3086, -7626.9764, 16579.8354, -7627.7888, 16580.3393, -7628.4316, 16581.181, -7629.2701, 16582.0667, -7629.9052, |
| | | 16583.1605, -7630.4413, 16584.3072, -7630.818, 16585.5416, -7630.993, 16586.918, -7630.9599, 16588.0948, -7630.7205, 16589.1489, -7630.3119, 16590.3826, -7629.6211, 16591.2856, -7628.8977, 16592.0383, -7628.0128, |
| | | |
| | | 16592.8408, -7626.7007, 16593.3354, -7625.4394, 16593.886, -7624.4265, 16594.9656, -7623.4808, 16596.0498, -7623.0286, 16597.3348, -7622.955, 16598.4564, -7623.2286, |
| | | 16599.4254, -7623.7931, 16600.1166, -7624.5026 |
| | | ] |
| | | } |
| | | ] |
| | | }] |
| | | }] |
| | |
| | | { |
| | | "points": [0, 1, 1.6, 1, 2.55, 1, 3.05, 1, 4.55, 1, 5.003, 1, 6.003, 1, 9.003, 1, 9.003, 4, 0, 0.5, 9.003, 0.5, 0, 0, 1.6, 0, 2.55, 0, 3.05, 0, 4.55, 0, 5.003, 0, 5.003, -2, 5.003, -3, 5.003, -4, 6.003, -4, 7.003, -4, 9.003, -4, 10.003, -4, 10.003, -3, 10.003, 4, 6.003, 0, 9.003, 0, 6.003, 0, 6.003, -3, 9.003, -3, 9.003, 0, 5.503, 0, 5.503, -2, 5.503, -3.5, 7.003, -3.5, 9.503, -3.5, 9.503, 4, 1.6, 1, 1.6, 0, 2.55, 1, 2.55, 0, 3.05, 0, 3.05, 1, 4.55, 1, 4.55, 0, 5.003, 1, 5.003, 0, 6.003, 0, 6.003, 1, 6.003, -2, 5.003, -2, 6.003, -3, 5.003, -3, 5.003, -4, 6.003, -4, 9.003, -1, 10.003, -1, 9.003, 0, 10.003, 0, 10.003, 1, 9.003, 1,11.003,4,11.003,-4,10.5003,4,10.5003,-4, |
| | | 10.003,3,9.003,3,10.003,4,9.003,4,11.003,4,10.003,4,11.003,3,10.003,3,11.003,1,10.003,1,11.003,0,10.003,0,11.003,-1,10.003,-1,11.003,-2,10.003,-2,10.5003,-3,10.5003,-3,11.003,-3,10.003,-3], |
| | | "maps": [{ |
| | | "id": 1000, |
| | | "item": 100, |
| | | "area": [45, 38, 39, 46], |
| | | "id": 8890, |
| | | "item": 106, |
| | | "stop_flag": 0, |
| | | "stop_line": [41, 42], |
| | | "red_line": [ |
| | | [0, 1, 2, 3, 4, 5, 6, 7, 8], |
| | | [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], |
| | | [26, 27], |
| | | [28, 29, 30, 31], |
| | | [62,63] |
| | | [43, 44] |
| | | ], |
| | | "tts": "路口右转弯" |
| | | }, { |
| | | "area": [53, 48, 49, 54], |
| | | "id": 8891, |
| | | "item": 107, |
| | | "stop_flag": 0, |
| | | "stop_line": [51, 52], |
| | | "tts": "通过人行横道" |
| | | }, { |
| | | "area": [], |
| | | "id": 8892, |
| | | "item": 102, |
| | | "stop_flag": 0, |
| | | "stop_line": [], |
| | | "tts": "加减档" |
| | | }, { |
| | | "area": [63, 58, 59, 64], |
| | | "id": 8893, |
| | | "item": 110, |
| | | "stop_flag": 0, |
| | | "stop_line": [61, 62], |
| | | "tts": "前方掉头" |
| | | }, { |
| | | "area": [71, 66, 67, 72], |
| | | "id": 8894, |
| | | "item": 101, |
| | | "road_edge_line": [ |
| | | [73, 74] |
| | | ], |
| | | "stop_flag": 0, |
| | | "stop_line": [69, 70], |
| | | "tts": "直线行驶" |
| | | }, { |
| | | "area": [], |
| | | "id": 8895, |
| | | "item": 103, |
| | | "road_edge_line": [ |
| | | [77, 78] |
| | | ], |
| | | "stop_flag": 0, |
| | | "stop_line": [], |
| | | "tts": "靠边停车" |
| | | }, { |
| | | "area": [87, 80, 81, 88], |
| | | "id": 8896, |
| | | "item": 105, |
| | | "stop_flag": 0, |
| | | "stop_line": [83, 84], |
| | | "red_line": [ |
| | | [85, 86] |
| | | ], |
| | | "tts": "路口左转弯" |
| | | }, { |
| | | "area": [95, 90, 91, 96], |
| | | "id": 8897, |
| | | "item": 108, |
| | | "stop_flag": 0, |
| | | "stop_line": [93, 94], |
| | | "tts": "通过学校区域" |
| | | }, { |
| | | "area": [103, 98, 99, 104], |
| | | "id": 8898, |
| | | "item": 109, |
| | | "stop_flag": 0, |
| | | "stop_line": [101, 102], |
| | | "tts": "通过公共汽车站" |
| | | }, { |
| | | "area": [111, 106, 107, 112], |
| | | "id": 8900, |
| | | "item": 104, |
| | | "stop_flag": 0, |
| | | "stop_line": [109, 110], |
| | | "tts": "通过路口" |
| | | }, { |
| | | "all_trigger_line": [ |
| | | [8890, 45, 46], |
| | | [8891, 53, 54], |
| | | [8892, 55, 56], |
| | | [8893, 63, 64], |
| | | [8894, 71, 72], |
| | | [8895, 75, 76], |
| | | [8896, 87, 88], |
| | | [8897, 95, 96], |
| | | [8898, 103, 104], |
| | | [8900, 111, 112] |
| | | ], |
| | | "green_line": [ |
| | | [9, 10], |
| | | [32, 33, 34, 35, 36, 37], |
| | | [64, 65] |
| | | [27, 28], |
| | | [33, 34] |
| | | ], |
| | | "all_trigger_line": [ |
| | | [1002, 39, 38], |
| | | [1003, 45, 44], |
| | | [1004, 57, 56], |
| | | [1005, 51, 50], |
| | | [1006, 66, 67], |
| | | [1007, 73,74], |
| | | [1008, 77,78] |
| | | ], |
| | | "id": 8899, |
| | | "item": 100, |
| | | "red_area": [ |
| | | [40, 41, 42, 43] |
| | | ] |
| | | }, { |
| | | "id": 1003, |
| | | "item": 106, |
| | | "tts": "前方右转", |
| | | "stop_line": [47, 46], |
| | | "area": [44,45,48, 49], |
| | | [47, 48, 49, 50] |
| | | ], |
| | | "red_line": [ |
| | | [26, 6] |
| | | [0, 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], |
| | | [29, 30], |
| | | [31, 32], |
| | | [35, 36] |
| | | ], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1002, |
| | | "item": 107, |
| | | "tts": "前方通过人行横道", |
| | | "stop_line": [41, 40], |
| | | "area": [38,39,42,43], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1004, |
| | | "item": 104, |
| | | "tts": "直行通过路口", |
| | | "stop_line": [59, 58], |
| | | "area": [56,57,60,61], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1005, |
| | | "item": 105, |
| | | "tts": "前方左转弯", |
| | | "stop_line": [53, 52], |
| | | "area": [50,51,54,55], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1006, |
| | | "item": 110, |
| | | "tts": "前方掉头", |
| | | "stop_line": [68, 69], |
| | | "area": [67,69,70,72], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1007, |
| | | "item": 102, |
| | | "tts": "加减档位", |
| | | "stop_line": [75, 76], |
| | | "area": [73,74,76,75], |
| | | "stop_flag": 0 |
| | | }, { |
| | | "id": 1008, |
| | | "item": 101, |
| | | "tts": "直线行驶", |
| | | "road_edge_line": [[81, 82]], |
| | | "stop_line": [79, 80], |
| | | "area": [77,78,84,83], |
| | | "stop_flag": 0 |
| | | }] |
| | | }], |
| | | "points": [-8647.003, 14590.7213, -8643.5524, 14578.1376, -8643.4688, 14577.3293, -8643.4743, 14576.6703, -8643.6189, 14575.6231, -8643.8986, 14574.7303, -8644.429, 14573.7859, -8645.0267, 14573.0804, -8645.7975, 14572.5144, -8646.6964, 14572.0564, -8647.9003, 14571.5898, -8649.254, 14571.2718, -8651.2344, 14570.9548, -8676.9505, 14567.7086, -8677.008, 14564.2895, -8647.9699, 14568.5768, -8677.1016, 14560.8499, -8648.6754, 14565.6031, -8647.0386, 14565.793, -8645.5361, 14565.9325, -8643.9894, 14565.9878, -8642.4894, 14565.828, -8641.1371, 14565.3513, -8640.1083, 14564.4899, -8639.3371, 14563.1737, -8638.7768, 14561.5024, -8615.0639, 14476.9774, -8611.3183, 14477.2584, -8643.7051, 14592.6597, -8640.3308, 14593.415, -8608.1896, 14478.7504, -8607.5516, 14478.8765, -8639.2427, 14591.991, -8636.3273, 14594.4586, -8603.9223, 14479.1086, -8600.1545, 14479.3763, -8632.4911, 14594.4536, -8643.6786, 14578.4015, -8641.0622, 14569.2537, -8634.1519, 14571.662, -8636.5751, 14580.2974, -8643.6786, 14578.4015, -8636.5751, 14580.2974, -8641.0622, 14569.2537, -8634.1519, 14571.662, -8646.4285, 14588.016, -8639.2769, 14589.9255, -8634.4653, 14545.6261, -8632.5501, 14538.899, -8625.5379, 14540.9341, -8627.4065, 14547.6014, -8634.4653, 14545.6261, -8627.4065, 14547.6014, -8637.2035, 14555.2439, -8630.1052, 14557.2304, -8626.3309, 14516.8481, -8618.8811, 14518.887, -8615.147, 14476.9265, -8612.3882, 14467.0731, -8597.9713, 14471.9742, -8600.4647, 14480.9003, -8615.147, 14476.9265, -8600.4647, 14480.9003, -8617.8432, 14486.5562, -8603.1551, 14490.5316, -8607.0038, 14504.1069, -8616.1047, 14536.1608, -8623.4875, 14535.0492, -8614.6801, 14502.1867, -8607.0038, 14504.1069, -8614.6801, 14502.1867, -8604.2725, 14494.4871, -8612.0914, 14492.5276, -8607.3643, 14503.5206, -8616.3071, 14536.8527, -8620.0983, 14550.3554, -8627.0878, 14547.8972, -8619.878, 14549.5298, -8626.2008, 14572.0174, -8630.8126, 14588.3057, -8634.1112, 14600.1533, -8640.9894, 14596.3771, -8635.6092, 14577.056, -8630.8126, 14588.3057, -8635.6092, 14577.056, -8634.1112, 14600.1533, -8640.9894, 14596.3771, -8628.1304, 14578.6721, -8632.9266, 14567.4225, -8667.0986, 14568.9677, -8676.8874, 14567.7089, -8676.2956, 14564.3175, -8666.6833, 14565.7012, -8667.0986, 14568.9677, -8666.6833, 14565.7012, -8657.1803, 14570.2432, -8656.7853, 14567.126, -8670.2809, 14561.9004, -8665.0482, 14562.7364, -8665.7617, 14565.9309, -8670.5605, 14565.2382, -8670.5605, 14565.2382, -8666.6833, 14565.7012, -8680.1557, 14560.3228, -8680.4579, 14563.8095, -8640.9128, 14566.6535, -8636.7411, 14567.4991, -8637.4664, 14570.3833, -8642.6811, 14569.5229, -8640.9128, 14566.6535, -8642.6811, 14569.5229, -8650.7135, 14564.6669, -8652.5477, 14567.895] |
| | | } |
| | |
| | | { |
| | | "main_ant": [-0.9569, 31.3885], |
| | | "axial": [0, 3], |
| | | "left_front_tire": [1, 0], |
| | | "right_front_tire": [5, 0], |
| | | "left_rear_tire": [2, 3], |
| | | "right_rear_tire": [4, 3], |
| | | "point": [-1.0215, 31.0763, -0.941, 31.0707, -0.8699, 31.4113, -0.9644, 31.4313, -1.0579, 31.4422, -1.1203, 31.0904] |
| | | "axial": [0, 12], |
| | | "body": [0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 18, 19], |
| | | "left_front_tire": [8, 9], |
| | | "left_rear_tire": [10, 11], |
| | | "main_ant": [-9151.5063, 13030.5118], |
| | | "point": [-9149.6063, 13033.0768, -9149.9978, 13033.3124, -9150.3258, 13033.3485, -9150.8341, 13032.8985, -9151.7318, 13031.6639, -9152.3573, 13030.83, -9152.5214, 13030.5639, -9152.602, 13030.3105, |
| | | |
| | | -9150.8053, 13032.8843, |
| | | -9150.6537, 13032.7602, |
| | | -9152.3352, 13030.8124, -9152.221, 13030.7008, |
| | | -9152.092, 13029.7892, -9151.4638, 13029.4333, -9151.2111, 13029.568, -9150.9808, 13029.8341, -9150.3546, 13030.6796, -9149.458, 13031.8642, |
| | | -9149.1611, 13032.4276, |
| | | -9149.2827, 13032.7653, |
| | | -9149.4842, 13031.8708, -9149.6176, 13031.9937, -9151.0011, 13029.8717, -9151.1367, 13029.9878], |
| | | "right_front_tire": [20, 21], |
| | | "right_rear_tire": [22, 23] |
| | | } |
| | |
| | | } else { |
| | | MyLog.i("读取Assert目录下初始化的地图") |
| | | var buffer: StringBuffer? |
| | | buffer = FileUtil.readAssetTxtFile(applicationContext, safeluck.drive.evaluation.Constant.ROAD_MAP) |
| | | if (buffer != null) { |
| | | AYSdk.getInstance().sendCmd(safeluck.drive.evaluation.Constant.PUSH_ROAD_MAP_INFO, buffer.toString()) |
| | | } else { |
| | | MyLog.i( String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().absolutePath + "/" + applicationContext.packageName)) |
| | | CThreadPoolExecutor.runOnMainThread { Toast.makeText(app.getAppContext(), String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().absolutePath + "/" + applicationContext.packageName), Toast.LENGTH_SHORT).show() } |
| | | } |
| | | // buffer = FileUtil.readAssetTxtFile(applicationContext, safeluck.drive.evaluation.Constant.ROAD_MAP) |
| | | // if (buffer != null) { |
| | | // AYSdk.getInstance().sendCmd(safeluck.drive.evaluation.Constant.PUSH_ROAD_MAP_INFO, buffer.toString()) |
| | | // } else { |
| | | // MyLog.i( String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().absolutePath + "/" + applicationContext.packageName)) |
| | | // CThreadPoolExecutor.runOnMainThread { Toast.makeText(app.getAppContext(), String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().absolutePath + "/" + applicationContext.packageName), Toast.LENGTH_SHORT).show() } |
| | | // } |
| | | buffer = FileUtil.readAssetTxtFile(applicationContext, safeluck.drive.evaluation.Constant.MAP) |
| | | if (buffer != null) { |
| | | AYSdk.getInstance().sendCmd(safeluck.drive.evaluation.Constant.PUSH_MAP_INFO, buffer.toString()) |
| | |
| | | |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForI; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForIII; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusInitWorker; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusOutWorker; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusWoker; |
| | |
| | | |
| | | if(!TextUtils.isEmpty(json)){ |
| | | Data judgeData = new Data.Builder().putString(Constant.TTS,json).build(); |
| | | JsonArray jsonArray = (JsonArray) JsonParser.parseString(json); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JsonObject jsonObject = jsonArray.get(i).getAsJsonObject(); |
| | | int emp_id = jsonObject.get("wrong_id").getAsInt(); |
| | | if (emp_id>1000){ |
| | | CriteriaForIII ttsStr=WorkRoomDataBase.getWorkRoomDataBase(this).getCriteriaIIIDao().queryItemForCriteriaIIINoLive(emp_id-1000); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格" : "扣" + |
| | | ttsStr.getScore_deducting() + "分")); |
| | | }else{ |
| | | CriteriaForI ttsStr = WorkRoomDataBase.getWorkRoomDataBase(this).getCriteriaIDao().queryItemForCriteriaINoLive(emp_id); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格" : "扣" + |
| | | ttsStr.getScore_deducting() + "分")); |
| | | } |
| | | |
| | | } |
| | | |
| | | OneTimeWorkRequest ttswoker = new OneTimeWorkRequest.Builder(TTSWorker.class).setInputData(judgeData).build(); |
| | | WorkManager.getInstance(getAppContext()).enqueue(ttswoker); |
| | | |
| | |
| | | } |
| | | }); |
| | | StringBuffer buffer; |
| | | buffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.ROAD_MAP); |
| | | if (buffer != null){ |
| | | |
| | | AYSdk.getInstance().sendCmd(Constant.PUSH_ROAD_MAP_INFO,buffer.toString()); |
| | | }else{ |
| | | MyLog.d(TAG,String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | CThreadPoolExecutor.runOnMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | Toast.makeText(getAppContext(), String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName()), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | // buffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.ROAD_MAP); |
| | | // if (buffer != null){ |
| | | // |
| | | // AYSdk.getInstance().sendCmd(Constant.PUSH_ROAD_MAP_INFO,buffer.toString()); |
| | | // }else{ |
| | | // MyLog.d(TAG,String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName())); |
| | | // CThreadPoolExecutor.runOnMainThread(new Runnable() { |
| | | // @Override |
| | | // public void run() { |
| | | // Toast.makeText(getAppContext(), String.format("地图模型未拷入[%s]目录下", Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+getApplicationContext().getPackageName()), Toast.LENGTH_SHORT).show(); |
| | | // } |
| | | // }); |
| | | // |
| | | // } |
| | | buffer =FileUtil.readAssetTxtFile(getApplicationContext(),Constant.MAP); |
| | | if (buffer != null){ |
| | | |
| | |
| | | |
| | | Log.d(TAG, "DrawMap max_x " + max_x + " max_y " + max_y + " min_x " + min_x + " min_y " + min_y); |
| | | |
| | | Log.i(TAG,String.format("screen_width - base_x - 10=%f,screen_height - base_y - 10=%f,max_x - min_x=%f,max_y - min_y=%f",screen_width - base_x - 10,screen_height - base_y - 10 |
| | | ,max_x - min_x,max_y - min_y)); |
| | | long scale_x = Math.round((screen_width - base_x - 10) / (max_x - min_x)); |
| | | long scale_y = Math.round((screen_height - base_y - 10) / (max_y - min_y)); |
| | | |
| | | Log.i(TAG,String.format("scale_x=%d,scale_y=%d",scale_x,scale_y)); |
| | | |
| | | if (scale_x >= scale_y) { |
| | | scale_x = scale_y; |
| | | } else { |
| | |
| | | import java.math.BigDecimal; |
| | | import java.security.SecureRandom; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Calendar; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | import javax.crypto.Cipher; |
| | |
| | | int unsignedTime= parseUnsignedInt(String.valueOf(longCurrTIme),10); |
| | | System.out.println("unsigned int time = "+unsignedTime); |
| | | |
| | | Point p1 = new Point(1.0,2.0); |
| | | Point p2 = new Point(1.0,2.0); |
| | | System.out.println(Calc3Point(p1,p2,10.0).toString()); |
| | | double[] map={ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 16579.3086, -7626.9764,16579.8354, -7627.7888, 16580.3393, -7628.4316, 16581.181, -7629.2701,16582.0667, -7629.9052, |
| | | // 16583.1605, -7630.4413,16584.3072, -7630.818, 16585.5416, |
| | | // -7630.993, 16586.918, -7630.9599, 16588.0948, -7630.7205,16589.1489, -7630.3119, 16590.3826, -7629.6211, 16591.2856, -7628.8977,16592.0383, -7628.0128, |
| | | // |
| | | // 16592.8408, -7626.7007, 16593.3354, -7625.4394,16593.886, -7624.4265, 16594.9656, -7623.4808,16596.0498, -7623.0286, 16597.3348, -7622.955,16598.4564, -7623.2286, |
| | | // 16599.4254, -7623.7931,16600.1166, -7624.5026, |
| | | }; |
| | | |
| | | for (int i = 0; i < map.length; i++) { |
| | | Arrays.asList(map[i]); |
| | | } |
| | | |
| | | Point p1 = new Point(2.55,1.0); |
| | | Point p2 = new Point(1.55,1.0); |
| | | System.out.println(Calc3Point(p1,p2,1.0).toString()); |
| | | } |
| | | |
| | | public static Point Calc3Point(Point p1,Point p2,double L ){ |
| | |
| | | p3.setX(x3); |
| | | p3.setY(y3); |
| | | |
| | | p3 = rotatePoint(p3, p2, 0); |
| | | p3 = rotatePoint(p3, p2, 270); |
| | | |
| | | |
| | | return p3; |
| | |
| | | //不管什么模式全部报 语音 |
| | | if (emp_id>1000){ |
| | | var ttsStr=WorkRoomDataBase.getWorkRoomDataBase(applicationContext).criteriaIIIDao.queryItemForCriteriaIIINoLive(emp_id-1000) |
| | | ExamPlatformData.getInstance().tts.speak(ttsStr.getDeducting_reason() + if (ttsStr.getScore_deducting() == 100) "不合格" else "扣" + |
| | | ttsStr.getScore_deducting() + "分") |
| | | // ExamPlatformData.getInstance().tts.speak(ttsStr.getDeducting_reason() + if (ttsStr.getScore_deducting() == 100) "不合格" else "扣" + |
| | | // ttsStr.getScore_deducting() + "分") |
| | | jkMessage0203.fail_item_id = ttsStr.item_id |
| | | jkMessage0203.fail_score = ttsStr.score_deducting |
| | | jkMessage0203.fail_reason = ttsStr.deducting_reason |
| | | }else{ |
| | | var ttsStr=WorkRoomDataBase.getWorkRoomDataBase(applicationContext).criteriaIDao.queryItemForCriteriaINoLive(emp_id) |
| | | ExamPlatformData.getInstance().tts.speak(ttsStr.getDeducting_reason() + if (ttsStr.getScore_deducting() == 100) "不合格" else "扣" + |
| | | ttsStr.getScore_deducting() + "分") |
| | | // ExamPlatformData.getInstance().tts.speak(ttsStr.getDeducting_reason() + if (ttsStr.getScore_deducting() == 100) "不合格" else "扣" + |
| | | // ttsStr.getScore_deducting() + "分") |
| | | jkMessage0203.fail_item_id =ttsStr.item_id |
| | | jkMessage0203.fail_score = ttsStr.score_deducting |
| | | jkMessage0203.fail_reason = ttsStr.deducting_reason |
| | |
| | | } |
| | | } |
| | | |
| | | CarModel->antPitch = antPitch; |
| | | CarModel->antPitch = -0.6;//antPitch;///////////////////////////////////// |
| | | |
| | | CarModel->pointNum = pointNum; |
| | | CarModel->carDesc = (struct car_desc_ *)malloc(sizeof(struct car_desc_) * pointNum); |
| | |
| | | |
| | | static void ExecuteExam(const struct RtkTime* rtkTime) |
| | | { |
| | | // DEBUG("ExecuteExam 111111111"); |
| | | { |
| | | static const char *NAME[] = {"OBD_SPEED", |
| | | "ENGINE_RPM", |
| | |
| | | int cs_temp[CAR_STATUS_END]; |
| | | |
| | | for (int i = 0; i < CAR_STATUS_END; ++i) { |
| | | // DEBUG("读取......"); |
| | | cs_temp[i] = ReadCarStatus(i); |
| | | |
| | | // DEBUG("读取 %d <---- %d", i, cs_temp[i]); |
| | | } |
| | | |
| | | for (int i = 0; i < CAR_STATUS_END; ++i) { |
| | | for (int i = 0; i < 2; ++i) { |
| | | if (cs_temp[i] != cs[i]) { |
| | | DEBUG("车辆状态 %s = %d", NAME[i], cs_temp[i]); |
| | | |
| | | cs[i] = cs_temp[i]; |
| | | } |
| | | } |
| | | |
| | | for (int i = 2; i < CAR_STATUS_END; ++i) { |
| | | if (cs_temp[i] != cs[i]) { |
| | | DEBUG("车辆状态 %s = %s", NAME[i], VALUE[ cs_temp[i] ]); |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //DEBUG("-------------- 1111111111"); |
| | | |
| | | if (ReadCarStatus(ENGINE_RPM) < ENGINE_MIN_ROTATE) { |
| | | if (engineRuning) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // DEBUG("ExecuteExam 1111111111 ----------------------"); |
| | | } |
| | | |
| | | static void ExecuteExam(double speed, int move, double azimuth, const struct RtkTime* rtkTime) |
| | | { |
| | | // DEBUG("ExecuteExam 2222222"); |
| | | if (move != 0) { |
| | | if (ReadCarStatus(SEATBELT) == EJECT_SEATBELT && !reportSeatbeltEject) { |
| | | DEBUG("不系安全带"); |
| | |
| | | CurrExamMapIndex = -1; |
| | | } |
| | | } |
| | | // DEBUG("ExecuteExam 2222222 -----------------------"); |
| | | } |
| | | |
| | | static void EngineStartHold(union sigval sig) { |
| | |
| | | { |
| | | carModel->basePoint = main_ant; |
| | | |
| | | |
| | | // DEBUG("俯仰角 %f", pitch); |
| | | carModel->yaw = azimuth; |
| | | carModel->pitch = pitch; |
| | | carModel->tm = *rtkTime; |
| | | |
| | | pitch = pitch - carModel->antPitch; |
| | | |
| | | // DEBUG("xz俯仰角 %f", pitch); |
| | | |
| | | for (int i = 0; i < carModel->pointNum; ++i) { |
| | | double qrx = carModel->carDesc[i].distance * sin(toRadians(carModel->carDesc[i].angle)); |
| | | double qry = |
| | | carModel->carDesc[i].distance * cos(toRadians(carModel->carDesc[i].angle)) * |
| | | carModel->carDesc[i].distance * cos(toRadians(carModel->carDesc[i].angle)) / |
| | | cos(toRadians(pitch)); |
| | | |
| | | double projectDistance = sqrt(pow(qrx, 2) + pow(qry, 2)); |
| | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | DEBUG("############## 地图解析出错###################"); |
| | | } |
| | | break; |
| | | } |
| | |
| | | } |
| | | // MA_SendGpsBrief(&brief); |
| | | RequestRtkDownload(gps, 1); |
| | | |
| | | DEBUG("GPS_UPDATE_EVT ================"); |
| | | } |
| | | if (events & RTK_UPDATE_EVT) { |
| | | DEBUG("RTK_UPDATE_EVT length %d", length); |
| | |
| | | } |
| | | |
| | | UpdateRTKInfo(rtk); |
| | | |
| | | DEBUG("RTK_UPDATE_EVT ================="); |
| | | } |
| | | if (events & MCU_UPDATE_EVT) { |
| | | DEBUG("MCU_UPDATE_EVT length %d", length); |
| | |
| | | double dis1 = DistanceOfHead2Stopline(map, car); |
| | | double dis2 = DistanceOfTire2Edge(map, car); |
| | | |
| | | DEBUG("DIS1 = %f DIS2 = %f", dis1, dis2); |
| | | |
| | | if (dis1 > STOP_DISTANCE_THRESHOLD_RED) { |
| | | // 距离停止线前后超出50厘米 |
| | | AddExamFault(12, rtkTime); |