diff --git a/.overlay_init b/.overlay_init new file mode 100644 index 000000000..e69de29bb diff --git a/CHANGELOGS.md b/CHANGELOGS.md index d11981a8c..c592f9cd0 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,6 +1,14 @@ dragonpilot 0.9.8 ======================= * Up to comma.ai openpilot master branch commit 01c2174d5968266b87f1d1fecefce5affaeaa624 (2024-07-02) +* DP HIGHLIGHT: + * (TESTING) Tē-Tôo / Map Module + * Road Name Display (Online using OSM) + * Speed Camera Warning (Online using OSM: Untested) + * Speed Camera Warning (Taiwan, Offline) + * Dynamic End-to-End w/ Toggleable Road Condition Detection. + * Device Auto Shutdown Toggle. + * Device Audible Alert Mode Toggle. dragonpilot [2024.07.01] ======================= diff --git a/body/board/obj/body.bin b/body/board/obj/body.bin index 3d07a548b..974cbb03b 100755 Binary files a/body/board/obj/body.bin and b/body/board/obj/body.bin differ diff --git a/body/board/obj/body.bin.signed b/body/board/obj/body.bin.signed index e85da8fcd..b019b6c9c 100644 Binary files a/body/board/obj/body.bin.signed and b/body/board/obj/body.bin.signed differ diff --git a/body/board/obj/body.elf b/body/board/obj/body.elf index c86b65d86..534231b66 100755 Binary files a/body/board/obj/body.elf and b/body/board/obj/body.elf differ diff --git a/body/board/obj/bootstub.body.bin b/body/board/obj/bootstub.body.bin index 3d743a67d..bb23a6eac 100755 Binary files a/body/board/obj/bootstub.body.bin and b/body/board/obj/bootstub.body.bin differ diff --git a/body/board/obj/bootstub.body.elf b/body/board/obj/bootstub.body.elf index 5f1fba285..109e15399 100755 Binary files a/body/board/obj/bootstub.body.elf and b/body/board/obj/bootstub.body.elf differ diff --git a/body/board/obj/gitversion.h b/body/board/obj/gitversion.h index e86d30929..1d1b00780 100644 --- a/body/board/obj/gitversion.h +++ b/body/board/obj/gitversion.h @@ -1 +1 @@ -const uint8_t gitversion[8] = "3c873995"; +const uint8_t gitversion[8] = "3a83aa9c"; diff --git a/cereal/custom.capnp b/cereal/custom.capnp index 93e0df312..02e963d2c 100644 --- a/cereal/custom.capnp +++ b/cereal/custom.capnp @@ -26,7 +26,33 @@ enum LaneChangeAssistMode { auto @3; } -struct CustomReserved2 @0xf35cc4560bbf6ec2 { +struct TeToo @0xf35cc4560bbf6ec2 { + lat @0 :Float32; + lon @1 :Float32; + bearing @2 :Float32; + name @3 :Text; + maxspeed @4 :Float32; + tags @5 :Text; + + updatingData @6 :Bool; + nearestFeatures @7 :List(Feature); + + struct Feature { + id @0 :Text; + type @1 :FeatureType; + lat @2 :Float32; + lon @3 :Float32; + bearing @4 :Float32; + distance @5 :Float32; + tags @6 :Text; + probability @7 :Float32; + } + + enum FeatureType { + trafficSignal @0; + speedCamera @1; + } + } struct CustomReserved3 @0xda96579883444c35 { diff --git a/cereal/gen/cpp/custom.capnp.c++ b/cereal/gen/cpp/custom.capnp.c++ index 986d16b19..568e1c120 100644 --- a/cereal/gen/cpp/custom.capnp.c++ +++ b/cereal/gen/cpp/custom.capnp.c++ @@ -192,32 +192,364 @@ const ::capnp::_::RawSchema s_db95ceb5f50cf43d = { }; #endif // !CAPNP_LITE CAPNP_DEFINE_ENUM(LaneChangeAssistMode_db95ceb5f50cf43d, db95ceb5f50cf43d); -static const ::capnp::_::AlignedData<17> b_f35cc4560bbf6ec2 = { +static const ::capnp::_::AlignedData<151> b_f35cc4560bbf6ec2 = { { 0, 0, 0, 0, 5, 0, 6, 0, 194, 110, 191, 11, 86, 196, 92, 243, - 13, 0, 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 1, 0, 3, 0, 89, 10, 85, 29, 102, 186, 38, 181, - 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 21, 0, 0, 0, 234, 0, 0, 0, - 33, 0, 0, 0, 7, 0, 0, 0, + 3, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 154, 0, 0, 0, + 29, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 53, 0, 0, 0, 199, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 117, 115, 116, 111, 109, 46, 99, - 97, 112, 110, 112, 58, 67, 117, 115, - 116, 111, 109, 82, 101, 115, 101, 114, - 118, 101, 100, 50, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, } + 97, 112, 110, 112, 58, 84, 101, 84, + 111, 111, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 1, 0, 1, 0, + 12, 14, 188, 178, 108, 117, 214, 149, + 9, 0, 0, 0, 66, 0, 0, 0, + 243, 89, 193, 168, 200, 76, 33, 210, + 5, 0, 0, 0, 98, 0, 0, 0, + 70, 101, 97, 116, 117, 114, 101, 0, + 70, 101, 97, 116, 117, 114, 101, 84, + 121, 112, 101, 0, 0, 0, 0, 0, + 32, 0, 0, 0, 3, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 209, 0, 0, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 204, 0, 0, 0, 3, 0, 1, 0, + 216, 0, 0, 0, 2, 0, 1, 0, + 1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 213, 0, 0, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 208, 0, 0, 0, 3, 0, 1, 0, + 220, 0, 0, 0, 2, 0, 1, 0, + 2, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 1, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 217, 0, 0, 0, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 212, 0, 0, 0, 3, 0, 1, 0, + 224, 0, 0, 0, 2, 0, 1, 0, + 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 221, 0, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 216, 0, 0, 0, 3, 0, 1, 0, + 228, 0, 0, 0, 2, 0, 1, 0, + 4, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 225, 0, 0, 0, 74, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 224, 0, 0, 0, 3, 0, 1, 0, + 236, 0, 0, 0, 2, 0, 1, 0, + 5, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 233, 0, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 228, 0, 0, 0, 3, 0, 1, 0, + 240, 0, 0, 0, 2, 0, 1, 0, + 6, 0, 0, 0, 128, 0, 0, 0, + 0, 0, 1, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 237, 0, 0, 0, 106, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 236, 0, 0, 0, 3, 0, 1, 0, + 248, 0, 0, 0, 2, 0, 1, 0, + 7, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 1, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 245, 0, 0, 0, 130, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 244, 0, 0, 0, 3, 0, 1, 0, + 16, 1, 0, 0, 2, 0, 1, 0, + 108, 97, 116, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 108, 111, 110, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 98, 101, 97, 114, 105, 110, 103, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 110, 97, 109, 101, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 109, 97, 120, 115, 112, 101, 101, 100, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 116, 97, 103, 115, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 117, 112, 100, 97, 116, 105, 110, 103, + 68, 97, 116, 97, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 110, 101, 97, 114, 101, 115, 116, 70, + 101, 97, 116, 117, 114, 101, 115, 0, + 14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 1, 0, + 16, 0, 0, 0, 0, 0, 0, 0, + 12, 14, 188, 178, 108, 117, 214, 149, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, } }; ::capnp::word const* const bp_f35cc4560bbf6ec2 = b_f35cc4560bbf6ec2.words; #if !CAPNP_LITE +static const ::capnp::_::RawSchema* const d_f35cc4560bbf6ec2[] = { + &s_95d6756cb2bc0e0c, +}; +static const uint16_t m_f35cc4560bbf6ec2[] = {2, 0, 1, 4, 3, 7, 5, 6}; +static const uint16_t i_f35cc4560bbf6ec2[] = {0, 1, 2, 3, 4, 5, 6, 7}; const ::capnp::_::RawSchema s_f35cc4560bbf6ec2 = { - 0xf35cc4560bbf6ec2, b_f35cc4560bbf6ec2.words, 17, nullptr, nullptr, - 0, 0, nullptr, nullptr, nullptr, { &s_f35cc4560bbf6ec2, nullptr, nullptr, 0, 0, nullptr }, false + 0xf35cc4560bbf6ec2, b_f35cc4560bbf6ec2.words, 151, d_f35cc4560bbf6ec2, m_f35cc4560bbf6ec2, + 1, 8, i_f35cc4560bbf6ec2, nullptr, nullptr, { &s_f35cc4560bbf6ec2, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE +static const ::capnp::_::AlignedData<140> b_95d6756cb2bc0e0c = { + { 0, 0, 0, 0, 5, 0, 6, 0, + 12, 14, 188, 178, 108, 117, 214, 149, + 19, 0, 0, 0, 1, 0, 3, 0, + 194, 110, 191, 11, 86, 196, 92, 243, + 2, 0, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 218, 0, 0, 0, + 33, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 29, 0, 0, 0, 199, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 99, 117, 115, 116, 111, 109, 46, 99, + 97, 112, 110, 112, 58, 84, 101, 84, + 111, 111, 46, 70, 101, 97, 116, 117, + 114, 101, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, + 32, 0, 0, 0, 3, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 209, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 204, 0, 0, 0, 3, 0, 1, 0, + 216, 0, 0, 0, 2, 0, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 213, 0, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 208, 0, 0, 0, 3, 0, 1, 0, + 220, 0, 0, 0, 2, 0, 1, 0, + 2, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 217, 0, 0, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 212, 0, 0, 0, 3, 0, 1, 0, + 224, 0, 0, 0, 2, 0, 1, 0, + 3, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 1, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 221, 0, 0, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 216, 0, 0, 0, 3, 0, 1, 0, + 228, 0, 0, 0, 2, 0, 1, 0, + 4, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 225, 0, 0, 0, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 220, 0, 0, 0, 3, 0, 1, 0, + 232, 0, 0, 0, 2, 0, 1, 0, + 5, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 1, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 229, 0, 0, 0, 74, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 228, 0, 0, 0, 3, 0, 1, 0, + 240, 0, 0, 0, 2, 0, 1, 0, + 6, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 237, 0, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 232, 0, 0, 0, 3, 0, 1, 0, + 244, 0, 0, 0, 2, 0, 1, 0, + 7, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 1, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 241, 0, 0, 0, 98, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 240, 0, 0, 0, 3, 0, 1, 0, + 252, 0, 0, 0, 2, 0, 1, 0, + 105, 100, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 116, 121, 112, 101, 0, 0, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0, + 243, 89, 193, 168, 200, 76, 33, 210, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 108, 97, 116, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 108, 111, 110, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 98, 101, 97, 114, 105, 110, 103, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 100, 105, 115, 116, 97, 110, 99, 101, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 116, 97, 103, 115, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 112, 114, 111, 98, 97, 98, 105, 108, + 105, 116, 121, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, } +}; +::capnp::word const* const bp_95d6756cb2bc0e0c = b_95d6756cb2bc0e0c.words; +#if !CAPNP_LITE +static const ::capnp::_::RawSchema* const d_95d6756cb2bc0e0c[] = { + &s_d2214cc8a8c159f3, +}; +static const uint16_t m_95d6756cb2bc0e0c[] = {4, 5, 0, 2, 3, 7, 6, 1}; +static const uint16_t i_95d6756cb2bc0e0c[] = {0, 1, 2, 3, 4, 5, 6, 7}; +const ::capnp::_::RawSchema s_95d6756cb2bc0e0c = { + 0x95d6756cb2bc0e0c, b_95d6756cb2bc0e0c.words, 140, d_95d6756cb2bc0e0c, m_95d6756cb2bc0e0c, + 1, 8, i_95d6756cb2bc0e0c, nullptr, nullptr, { &s_95d6756cb2bc0e0c, nullptr, nullptr, 0, 0, nullptr }, false +}; +#endif // !CAPNP_LITE +static const ::capnp::_::AlignedData<28> b_d2214cc8a8c159f3 = { + { 0, 0, 0, 0, 5, 0, 6, 0, + 243, 89, 193, 168, 200, 76, 33, 210, + 19, 0, 0, 0, 2, 0, 0, 0, + 194, 110, 191, 11, 86, 196, 92, 243, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 250, 0, 0, 0, + 33, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 29, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 99, 117, 115, 116, 111, 109, 46, 99, + 97, 112, 110, 112, 58, 84, 101, 84, + 111, 111, 46, 70, 101, 97, 116, 117, + 114, 101, 84, 121, 112, 101, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, + 8, 0, 0, 0, 1, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 114, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 98, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 116, 114, 97, 102, 102, 105, 99, 83, + 105, 103, 110, 97, 108, 0, 0, 0, + 115, 112, 101, 101, 100, 67, 97, 109, + 101, 114, 97, 0, 0, 0, 0, 0, } +}; +::capnp::word const* const bp_d2214cc8a8c159f3 = b_d2214cc8a8c159f3.words; +#if !CAPNP_LITE +static const uint16_t m_d2214cc8a8c159f3[] = {1, 0}; +const ::capnp::_::RawSchema s_d2214cc8a8c159f3 = { + 0xd2214cc8a8c159f3, b_d2214cc8a8c159f3.words, 28, nullptr, m_d2214cc8a8c159f3, + 0, 2, nullptr, nullptr, nullptr, { &s_d2214cc8a8c159f3, nullptr, nullptr, 0, 0, nullptr }, false +}; +#endif // !CAPNP_LITE +CAPNP_DEFINE_ENUM(FeatureType_d2214cc8a8c159f3, d2214cc8a8c159f3); static const ::capnp::_::AlignedData<17> b_da96579883444c35 = { { 0, 0, 0, 0, 5, 0, 6, 0, 53, 76, 68, 131, 152, 87, 150, 218, @@ -431,15 +763,27 @@ constexpr ::capnp::_::RawSchema const* LongitudinalPlanExt::_capnpPrivate::schem #endif // !CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL #endif // !CAPNP_LITE -// CustomReserved2 +// TeToo #if CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr uint16_t CustomReserved2::_capnpPrivate::dataWordSize; -constexpr uint16_t CustomReserved2::_capnpPrivate::pointerCount; +constexpr uint16_t TeToo::_capnpPrivate::dataWordSize; +constexpr uint16_t TeToo::_capnpPrivate::pointerCount; #endif // !CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL #if !CAPNP_LITE #if CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr ::capnp::Kind CustomReserved2::_capnpPrivate::kind; -constexpr ::capnp::_::RawSchema const* CustomReserved2::_capnpPrivate::schema; +constexpr ::capnp::Kind TeToo::_capnpPrivate::kind; +constexpr ::capnp::_::RawSchema const* TeToo::_capnpPrivate::schema; +#endif // !CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL +#endif // !CAPNP_LITE + +// TeToo::Feature +#if CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL +constexpr uint16_t TeToo::Feature::_capnpPrivate::dataWordSize; +constexpr uint16_t TeToo::Feature::_capnpPrivate::pointerCount; +#endif // !CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL +#if !CAPNP_LITE +#if CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL +constexpr ::capnp::Kind TeToo::Feature::_capnpPrivate::kind; +constexpr ::capnp::_::RawSchema const* TeToo::Feature::_capnpPrivate::schema; #endif // !CAPNP_NEED_REDUNDANT_CONSTEXPR_DECL #endif // !CAPNP_LITE diff --git a/cereal/gen/cpp/custom.capnp.h b/cereal/gen/cpp/custom.capnp.h index e544bdc75..cc340ff0e 100644 --- a/cereal/gen/cpp/custom.capnp.h +++ b/cereal/gen/cpp/custom.capnp.h @@ -29,6 +29,13 @@ enum class LaneChangeAssistMode_db95ceb5f50cf43d: uint16_t { }; CAPNP_DECLARE_ENUM(LaneChangeAssistMode, db95ceb5f50cf43d); CAPNP_DECLARE_SCHEMA(f35cc4560bbf6ec2); +CAPNP_DECLARE_SCHEMA(95d6756cb2bc0e0c); +CAPNP_DECLARE_SCHEMA(d2214cc8a8c159f3); +enum class FeatureType_d2214cc8a8c159f3: uint16_t { + TRAFFIC_SIGNAL, + SPEED_CAMERA, +}; +CAPNP_DECLARE_ENUM(FeatureType, d2214cc8a8c159f3); CAPNP_DECLARE_SCHEMA(da96579883444c35); CAPNP_DECLARE_SCHEMA(80ae746ee2596b11); CAPNP_DECLARE_SCHEMA(a5cd762cd951a455); @@ -74,15 +81,33 @@ struct LongitudinalPlanExt { typedef ::capnp::schemas::LaneChangeAssistMode_db95ceb5f50cf43d LaneChangeAssistMode; -struct CustomReserved2 { - CustomReserved2() = delete; +struct TeToo { + TeToo() = delete; + + class Reader; + class Builder; + class Pipeline; + struct Feature; + typedef ::capnp::schemas::FeatureType_d2214cc8a8c159f3 FeatureType; + + + struct _capnpPrivate { + CAPNP_DECLARE_STRUCT_HEADER(f35cc4560bbf6ec2, 3, 3) + #if !CAPNP_LITE + static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } + #endif // !CAPNP_LITE + }; +}; + +struct TeToo::Feature { + Feature() = delete; class Reader; class Builder; class Pipeline; struct _capnpPrivate { - CAPNP_DECLARE_STRUCT_HEADER(f35cc4560bbf6ec2, 0, 0) + CAPNP_DECLARE_STRUCT_HEADER(95d6756cb2bc0e0c, 3, 2) #if !CAPNP_LITE static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } #endif // !CAPNP_LITE @@ -363,9 +388,9 @@ private: }; #endif // !CAPNP_LITE -class CustomReserved2::Reader { +class TeToo::Reader { public: - typedef CustomReserved2 Reads; + typedef TeToo Reads; Reader() = default; inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} @@ -380,6 +405,25 @@ public: } #endif // !CAPNP_LITE + inline float getLat() const; + + inline float getLon() const; + + inline float getBearing() const; + + inline bool hasName() const; + inline ::capnp::Text::Reader getName() const; + + inline float getMaxspeed() const; + + inline bool hasTags() const; + inline ::capnp::Text::Reader getTags() const; + + inline bool getUpdatingData() const; + + inline bool hasNearestFeatures() const; + inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Reader getNearestFeatures() const; + private: ::capnp::_::StructReader _reader; template @@ -392,9 +436,9 @@ private: friend class ::capnp::Orphanage; }; -class CustomReserved2::Builder { +class TeToo::Builder { public: - typedef CustomReserved2 Builds; + typedef TeToo Builds; Builder() = delete; // Deleted to discourage incorrect usage. // You can explicitly initialize to nullptr instead. @@ -408,6 +452,42 @@ public: inline ::kj::StringTree toString() const { return asReader().toString(); } #endif // !CAPNP_LITE + inline float getLat(); + inline void setLat(float value); + + inline float getLon(); + inline void setLon(float value); + + inline float getBearing(); + inline void setBearing(float value); + + inline bool hasName(); + inline ::capnp::Text::Builder getName(); + inline void setName( ::capnp::Text::Reader value); + inline ::capnp::Text::Builder initName(unsigned int size); + inline void adoptName(::capnp::Orphan< ::capnp::Text>&& value); + inline ::capnp::Orphan< ::capnp::Text> disownName(); + + inline float getMaxspeed(); + inline void setMaxspeed(float value); + + inline bool hasTags(); + inline ::capnp::Text::Builder getTags(); + inline void setTags( ::capnp::Text::Reader value); + inline ::capnp::Text::Builder initTags(unsigned int size); + inline void adoptTags(::capnp::Orphan< ::capnp::Text>&& value); + inline ::capnp::Orphan< ::capnp::Text> disownTags(); + + inline bool getUpdatingData(); + inline void setUpdatingData(bool value); + + inline bool hasNearestFeatures(); + inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Builder getNearestFeatures(); + inline void setNearestFeatures( ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Reader value); + inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Builder initNearestFeatures(unsigned int size); + inline void adoptNearestFeatures(::capnp::Orphan< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>&& value); + inline ::capnp::Orphan< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>> disownNearestFeatures(); + private: ::capnp::_::StructBuilder _builder; template @@ -418,9 +498,130 @@ private: }; #if !CAPNP_LITE -class CustomReserved2::Pipeline { +class TeToo::Pipeline { public: - typedef CustomReserved2 Pipelines; + typedef TeToo Pipelines; + + inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} + inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) + : _typeless(kj::mv(typeless)) {} + +private: + ::capnp::AnyPointer::Pipeline _typeless; + friend class ::capnp::PipelineHook; + template + friend struct ::capnp::ToDynamic_; +}; +#endif // !CAPNP_LITE + +class TeToo::Feature::Reader { +public: + typedef Feature Reads; + + Reader() = default; + inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} + + inline ::capnp::MessageSize totalSize() const { + return _reader.totalSize().asPublic(); + } + +#if !CAPNP_LITE + inline ::kj::StringTree toString() const { + return ::capnp::_::structString(_reader, *_capnpPrivate::brand()); + } +#endif // !CAPNP_LITE + + inline bool hasId() const; + inline ::capnp::Text::Reader getId() const; + + inline ::cereal::TeToo::FeatureType getType() const; + + inline float getLat() const; + + inline float getLon() const; + + inline float getBearing() const; + + inline float getDistance() const; + + inline bool hasTags() const; + inline ::capnp::Text::Reader getTags() const; + + inline float getProbability() const; + +private: + ::capnp::_::StructReader _reader; + template + friend struct ::capnp::ToDynamic_; + template + friend struct ::capnp::_::PointerHelpers; + template + friend struct ::capnp::List; + friend class ::capnp::MessageBuilder; + friend class ::capnp::Orphanage; +}; + +class TeToo::Feature::Builder { +public: + typedef Feature Builds; + + Builder() = delete; // Deleted to discourage incorrect usage. + // You can explicitly initialize to nullptr instead. + inline Builder(decltype(nullptr)) {} + inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} + inline operator Reader() const { return Reader(_builder.asReader()); } + inline Reader asReader() const { return *this; } + + inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } +#if !CAPNP_LITE + inline ::kj::StringTree toString() const { return asReader().toString(); } +#endif // !CAPNP_LITE + + inline bool hasId(); + inline ::capnp::Text::Builder getId(); + inline void setId( ::capnp::Text::Reader value); + inline ::capnp::Text::Builder initId(unsigned int size); + inline void adoptId(::capnp::Orphan< ::capnp::Text>&& value); + inline ::capnp::Orphan< ::capnp::Text> disownId(); + + inline ::cereal::TeToo::FeatureType getType(); + inline void setType( ::cereal::TeToo::FeatureType value); + + inline float getLat(); + inline void setLat(float value); + + inline float getLon(); + inline void setLon(float value); + + inline float getBearing(); + inline void setBearing(float value); + + inline float getDistance(); + inline void setDistance(float value); + + inline bool hasTags(); + inline ::capnp::Text::Builder getTags(); + inline void setTags( ::capnp::Text::Reader value); + inline ::capnp::Text::Builder initTags(unsigned int size); + inline void adoptTags(::capnp::Orphan< ::capnp::Text>&& value); + inline ::capnp::Orphan< ::capnp::Text> disownTags(); + + inline float getProbability(); + inline void setProbability(float value); + +private: + ::capnp::_::StructBuilder _builder; + template + friend struct ::capnp::ToDynamic_; + friend class ::capnp::Orphanage; + template + friend struct ::capnp::_::PointerHelpers; +}; + +#if !CAPNP_LITE +class TeToo::Feature::Pipeline { +public: + typedef Feature Pipelines; inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) @@ -1003,6 +1204,330 @@ inline void LongitudinalPlanExt::Builder::setAltDrivingPersonalityIsActive(bool ::capnp::bounded<2>() * ::capnp::ELEMENTS, value); } +inline float TeToo::Reader::getLat() const { + return _reader.getDataField( + ::capnp::bounded<0>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Builder::getLat() { + return _builder.getDataField( + ::capnp::bounded<0>() * ::capnp::ELEMENTS); +} +inline void TeToo::Builder::setLat(float value) { + _builder.setDataField( + ::capnp::bounded<0>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Reader::getLon() const { + return _reader.getDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Builder::getLon() { + return _builder.getDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS); +} +inline void TeToo::Builder::setLon(float value) { + _builder.setDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Reader::getBearing() const { + return _reader.getDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Builder::getBearing() { + return _builder.getDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS); +} +inline void TeToo::Builder::setBearing(float value) { + _builder.setDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS, value); +} + +inline bool TeToo::Reader::hasName() const { + return !_reader.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); +} +inline bool TeToo::Builder::hasName() { + return !_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); +} +inline ::capnp::Text::Reader TeToo::Reader::getName() const { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} +inline ::capnp::Text::Builder TeToo::Builder::getName() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} +inline void TeToo::Builder::setName( ::capnp::Text::Reader value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), value); +} +inline ::capnp::Text::Builder TeToo::Builder::initName(unsigned int size) { + return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), size); +} +inline void TeToo::Builder::adoptName( + ::capnp::Orphan< ::capnp::Text>&& value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); +} +inline ::capnp::Orphan< ::capnp::Text> TeToo::Builder::disownName() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} + +inline float TeToo::Reader::getMaxspeed() const { + return _reader.getDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Builder::getMaxspeed() { + return _builder.getDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS); +} +inline void TeToo::Builder::setMaxspeed(float value) { + _builder.setDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS, value); +} + +inline bool TeToo::Reader::hasTags() const { + return !_reader.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); +} +inline bool TeToo::Builder::hasTags() { + return !_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); +} +inline ::capnp::Text::Reader TeToo::Reader::getTags() const { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} +inline ::capnp::Text::Builder TeToo::Builder::getTags() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} +inline void TeToo::Builder::setTags( ::capnp::Text::Reader value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), value); +} +inline ::capnp::Text::Builder TeToo::Builder::initTags(unsigned int size) { + return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), size); +} +inline void TeToo::Builder::adoptTags( + ::capnp::Orphan< ::capnp::Text>&& value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value)); +} +inline ::capnp::Orphan< ::capnp::Text> TeToo::Builder::disownTags() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} + +inline bool TeToo::Reader::getUpdatingData() const { + return _reader.getDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS); +} + +inline bool TeToo::Builder::getUpdatingData() { + return _builder.getDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS); +} +inline void TeToo::Builder::setUpdatingData(bool value) { + _builder.setDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS, value); +} + +inline bool TeToo::Reader::hasNearestFeatures() const { + return !_reader.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS).isNull(); +} +inline bool TeToo::Builder::hasNearestFeatures() { + return !_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS).isNull(); +} +inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Reader TeToo::Reader::getNearestFeatures() const { + return ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::get(_reader.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS)); +} +inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Builder TeToo::Builder::getNearestFeatures() { + return ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::get(_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS)); +} +inline void TeToo::Builder::setNearestFeatures( ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Reader value) { + ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::set(_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS), value); +} +inline ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>::Builder TeToo::Builder::initNearestFeatures(unsigned int size) { + return ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::init(_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS), size); +} +inline void TeToo::Builder::adoptNearestFeatures( + ::capnp::Orphan< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>&& value) { + ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::adopt(_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS), kj::mv(value)); +} +inline ::capnp::Orphan< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>> TeToo::Builder::disownNearestFeatures() { + return ::capnp::_::PointerHelpers< ::capnp::List< ::cereal::TeToo::Feature, ::capnp::Kind::STRUCT>>::disown(_builder.getPointerField( + ::capnp::bounded<2>() * ::capnp::POINTERS)); +} + +inline bool TeToo::Feature::Reader::hasId() const { + return !_reader.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); +} +inline bool TeToo::Feature::Builder::hasId() { + return !_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); +} +inline ::capnp::Text::Reader TeToo::Feature::Reader::getId() const { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} +inline ::capnp::Text::Builder TeToo::Feature::Builder::getId() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} +inline void TeToo::Feature::Builder::setId( ::capnp::Text::Reader value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), value); +} +inline ::capnp::Text::Builder TeToo::Feature::Builder::initId(unsigned int size) { + return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), size); +} +inline void TeToo::Feature::Builder::adoptId( + ::capnp::Orphan< ::capnp::Text>&& value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); +} +inline ::capnp::Orphan< ::capnp::Text> TeToo::Feature::Builder::disownId() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( + ::capnp::bounded<0>() * ::capnp::POINTERS)); +} + +inline ::cereal::TeToo::FeatureType TeToo::Feature::Reader::getType() const { + return _reader.getDataField< ::cereal::TeToo::FeatureType>( + ::capnp::bounded<0>() * ::capnp::ELEMENTS); +} + +inline ::cereal::TeToo::FeatureType TeToo::Feature::Builder::getType() { + return _builder.getDataField< ::cereal::TeToo::FeatureType>( + ::capnp::bounded<0>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setType( ::cereal::TeToo::FeatureType value) { + _builder.setDataField< ::cereal::TeToo::FeatureType>( + ::capnp::bounded<0>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Feature::Reader::getLat() const { + return _reader.getDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Feature::Builder::getLat() { + return _builder.getDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setLat(float value) { + _builder.setDataField( + ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Feature::Reader::getLon() const { + return _reader.getDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Feature::Builder::getLon() { + return _builder.getDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setLon(float value) { + _builder.setDataField( + ::capnp::bounded<2>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Feature::Reader::getBearing() const { + return _reader.getDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Feature::Builder::getBearing() { + return _builder.getDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setBearing(float value) { + _builder.setDataField( + ::capnp::bounded<3>() * ::capnp::ELEMENTS, value); +} + +inline float TeToo::Feature::Reader::getDistance() const { + return _reader.getDataField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Feature::Builder::getDistance() { + return _builder.getDataField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setDistance(float value) { + _builder.setDataField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS, value); +} + +inline bool TeToo::Feature::Reader::hasTags() const { + return !_reader.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); +} +inline bool TeToo::Feature::Builder::hasTags() { + return !_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); +} +inline ::capnp::Text::Reader TeToo::Feature::Reader::getTags() const { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} +inline ::capnp::Text::Builder TeToo::Feature::Builder::getTags() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} +inline void TeToo::Feature::Builder::setTags( ::capnp::Text::Reader value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), value); +} +inline ::capnp::Text::Builder TeToo::Feature::Builder::initTags(unsigned int size) { + return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), size); +} +inline void TeToo::Feature::Builder::adoptTags( + ::capnp::Orphan< ::capnp::Text>&& value) { + ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value)); +} +inline ::capnp::Orphan< ::capnp::Text> TeToo::Feature::Builder::disownTags() { + return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( + ::capnp::bounded<1>() * ::capnp::POINTERS)); +} + +inline float TeToo::Feature::Reader::getProbability() const { + return _reader.getDataField( + ::capnp::bounded<5>() * ::capnp::ELEMENTS); +} + +inline float TeToo::Feature::Builder::getProbability() { + return _builder.getDataField( + ::capnp::bounded<5>() * ::capnp::ELEMENTS); +} +inline void TeToo::Feature::Builder::setProbability(float value) { + _builder.setDataField( + ::capnp::bounded<5>() * ::capnp::ELEMENTS, value); +} + } // namespace CAPNP_END_HEADER diff --git a/cereal/gen/cpp/log.capnp.c++ b/cereal/gen/cpp/log.capnp.c++ index 53a984b6d..098e1da10 100644 --- a/cereal/gen/cpp/log.capnp.c++ +++ b/cereal/gen/cpp/log.capnp.c++ @@ -27868,7 +27868,7 @@ const ::capnp::_::RawSchema s_dc24138990726023 = { 0, 4, i_dc24138990726023, nullptr, nullptr, { &s_dc24138990726023, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE -static const ::capnp::_::AlignedData<2199> b_d314cfd957229c11 = { +static const ::capnp::_::AlignedData<2198> b_d314cfd957229c11 = { { 0, 0, 0, 0, 5, 0, 6, 0, 17, 156, 34, 87, 217, 207, 20, 211, 10, 0, 0, 0, 1, 0, 2, 0, @@ -28651,143 +28651,143 @@ static const ::capnp::_::AlignedData<2199> b_d314cfd957229c11 = { 81, 0, 148, 255, 0, 0, 0, 0, 0, 0, 1, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 19, 0, 0, 130, 0, 0, 0, + 17, 19, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 19, 0, 0, 3, 0, 1, 0, - 28, 19, 0, 0, 2, 0, 1, 0, + 12, 19, 0, 0, 3, 0, 1, 0, + 24, 19, 0, 0, 2, 0, 1, 0, 82, 0, 147, 255, 0, 0, 0, 0, 0, 0, 1, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 25, 19, 0, 0, 130, 0, 0, 0, + 21, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 24, 19, 0, 0, 3, 0, 1, 0, - 36, 19, 0, 0, 2, 0, 1, 0, + 20, 19, 0, 0, 3, 0, 1, 0, + 32, 19, 0, 0, 2, 0, 1, 0, 83, 0, 146, 255, 0, 0, 0, 0, 0, 0, 1, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 33, 19, 0, 0, 130, 0, 0, 0, + 29, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 19, 0, 0, 3, 0, 1, 0, - 44, 19, 0, 0, 2, 0, 1, 0, + 28, 19, 0, 0, 3, 0, 1, 0, + 40, 19, 0, 0, 2, 0, 1, 0, 84, 0, 145, 255, 0, 0, 0, 0, 0, 0, 1, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 41, 19, 0, 0, 130, 0, 0, 0, + 37, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 19, 0, 0, 3, 0, 1, 0, - 52, 19, 0, 0, 2, 0, 1, 0, + 36, 19, 0, 0, 3, 0, 1, 0, + 48, 19, 0, 0, 2, 0, 1, 0, 85, 0, 144, 255, 0, 0, 0, 0, 0, 0, 1, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 19, 0, 0, 130, 0, 0, 0, + 45, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 48, 19, 0, 0, 3, 0, 1, 0, - 60, 19, 0, 0, 2, 0, 1, 0, + 44, 19, 0, 0, 3, 0, 1, 0, + 56, 19, 0, 0, 2, 0, 1, 0, 86, 0, 143, 255, 0, 0, 0, 0, 0, 0, 1, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 57, 19, 0, 0, 130, 0, 0, 0, + 53, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 56, 19, 0, 0, 3, 0, 1, 0, - 68, 19, 0, 0, 2, 0, 1, 0, + 52, 19, 0, 0, 3, 0, 1, 0, + 64, 19, 0, 0, 2, 0, 1, 0, 87, 0, 142, 255, 0, 0, 0, 0, 0, 0, 1, 0, 115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 65, 19, 0, 0, 130, 0, 0, 0, + 61, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 64, 19, 0, 0, 3, 0, 1, 0, - 76, 19, 0, 0, 2, 0, 1, 0, + 60, 19, 0, 0, 3, 0, 1, 0, + 72, 19, 0, 0, 2, 0, 1, 0, 88, 0, 141, 255, 0, 0, 0, 0, 0, 0, 1, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 73, 19, 0, 0, 130, 0, 0, 0, + 69, 19, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 72, 19, 0, 0, 3, 0, 1, 0, - 84, 19, 0, 0, 2, 0, 1, 0, + 68, 19, 0, 0, 3, 0, 1, 0, + 80, 19, 0, 0, 2, 0, 1, 0, 50, 0, 140, 255, 0, 0, 0, 0, 0, 0, 1, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 19, 0, 0, 194, 0, 0, 0, + 77, 19, 0, 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 84, 19, 0, 0, 3, 0, 1, 0, - 96, 19, 0, 0, 2, 0, 1, 0, + 80, 19, 0, 0, 3, 0, 1, 0, + 92, 19, 0, 0, 2, 0, 1, 0, 51, 0, 139, 255, 0, 0, 0, 0, 0, 0, 1, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 93, 19, 0, 0, 226, 0, 0, 0, + 89, 19, 0, 0, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 100, 19, 0, 0, 3, 0, 1, 0, - 112, 19, 0, 0, 2, 0, 1, 0, + 96, 19, 0, 0, 3, 0, 1, 0, + 108, 19, 0, 0, 2, 0, 1, 0, 52, 0, 138, 255, 0, 0, 0, 0, 0, 0, 1, 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 19, 0, 0, 210, 0, 0, 0, + 105, 19, 0, 0, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 116, 19, 0, 0, 3, 0, 1, 0, - 128, 19, 0, 0, 2, 0, 1, 0, + 112, 19, 0, 0, 3, 0, 1, 0, + 124, 19, 0, 0, 2, 0, 1, 0, 73, 0, 137, 255, 0, 0, 0, 0, 0, 0, 1, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 125, 19, 0, 0, 202, 0, 0, 0, + 121, 19, 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 132, 19, 0, 0, 3, 0, 1, 0, - 144, 19, 0, 0, 2, 0, 1, 0, + 128, 19, 0, 0, 3, 0, 1, 0, + 140, 19, 0, 0, 2, 0, 1, 0, 74, 0, 136, 255, 0, 0, 0, 0, 0, 0, 1, 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 19, 0, 0, 234, 0, 0, 0, + 137, 19, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 148, 19, 0, 0, 3, 0, 1, 0, - 160, 19, 0, 0, 2, 0, 1, 0, + 144, 19, 0, 0, 3, 0, 1, 0, + 156, 19, 0, 0, 2, 0, 1, 0, 75, 0, 135, 255, 0, 0, 0, 0, 0, 0, 1, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 157, 19, 0, 0, 218, 0, 0, 0, + 153, 19, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 164, 19, 0, 0, 3, 0, 1, 0, - 176, 19, 0, 0, 2, 0, 1, 0, + 160, 19, 0, 0, 3, 0, 1, 0, + 172, 19, 0, 0, 2, 0, 1, 0, 15, 0, 134, 255, 0, 0, 0, 0, 0, 0, 1, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 173, 19, 0, 0, 154, 0, 0, 0, + 169, 19, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 176, 19, 0, 0, 3, 0, 1, 0, - 188, 19, 0, 0, 2, 0, 1, 0, + 172, 19, 0, 0, 3, 0, 1, 0, + 184, 19, 0, 0, 2, 0, 1, 0, 76, 0, 133, 255, 0, 0, 0, 0, 0, 0, 1, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 185, 19, 0, 0, 186, 0, 0, 0, + 181, 19, 0, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 188, 19, 0, 0, 3, 0, 1, 0, - 200, 19, 0, 0, 2, 0, 1, 0, + 184, 19, 0, 0, 3, 0, 1, 0, + 196, 19, 0, 0, 2, 0, 1, 0, 77, 0, 132, 255, 0, 0, 0, 0, 0, 0, 1, 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 197, 19, 0, 0, 186, 0, 0, 0, + 193, 19, 0, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 200, 19, 0, 0, 3, 0, 1, 0, - 212, 19, 0, 0, 2, 0, 1, 0, + 196, 19, 0, 0, 3, 0, 1, 0, + 208, 19, 0, 0, 2, 0, 1, 0, 78, 0, 131, 255, 0, 0, 0, 0, 0, 0, 1, 0, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 209, 19, 0, 0, 186, 0, 0, 0, + 205, 19, 0, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 212, 19, 0, 0, 3, 0, 1, 0, - 224, 19, 0, 0, 2, 0, 1, 0, + 208, 19, 0, 0, 3, 0, 1, 0, + 220, 19, 0, 0, 2, 0, 1, 0, 24, 0, 130, 255, 0, 0, 0, 0, 0, 0, 1, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 221, 19, 0, 0, 82, 0, 0, 0, + 217, 19, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 220, 19, 0, 0, 3, 0, 1, 0, - 232, 19, 0, 0, 2, 0, 1, 0, + 216, 19, 0, 0, 3, 0, 1, 0, + 228, 19, 0, 0, 2, 0, 1, 0, 41, 0, 129, 255, 0, 0, 0, 0, 0, 0, 1, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 229, 19, 0, 0, 138, 0, 0, 0, + 225, 19, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 232, 19, 0, 0, 3, 0, 1, 0, - 244, 19, 0, 0, 2, 0, 1, 0, + 228, 19, 0, 0, 3, 0, 1, 0, + 240, 19, 0, 0, 2, 0, 1, 0, 108, 111, 103, 77, 111, 110, 111, 84, 105, 109, 101, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, @@ -29872,8 +29872,7 @@ static const ::capnp::_::AlignedData<2199> b_d314cfd957229c11 = { 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 99, 117, 115, 116, 111, 109, 82, 101, - 115, 101, 114, 118, 101, 100, 50, 0, + 116, 101, 84, 111, 111, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 194, 110, 191, 11, 86, 196, 92, 243, 0, 0, 0, 0, 0, 0, 0, 0, @@ -30161,10 +30160,10 @@ static const ::capnp::_::RawSchema* const d_d314cfd957229c11[] = { &s_fe346a9de48d9b50, &s_fe35ad896ffaeacf, }; -static const uint16_t m_d314cfd957229c11[] = {98, 101, 30, 20, 55, 42, 60, 63, 5, 23, 127, 69, 22, 28, 35, 7, 107, 109, 110, 111, 112, 113, 114, 115, 116, 124, 125, 126, 6, 70, 87, 76, 71, 59, 92, 128, 85, 26, 10, 91, 21, 48, 3, 41, 40, 99, 100, 1, 65, 64, 32, 96, 19, 8, 46, 25, 72, 51, 44, 37, 62, 36, 61, 94, 16, 14, 122, 119, 120, 117, 121, 118, 49, 18, 0, 24, 108, 95, 78, 105, 103, 9, 75, 82, 104, 83, 38, 84, 27, 68, 54, 58, 56, 47, 53, 45, 12, 81, 80, 33, 89, 90, 31, 13, 2, 86, 15, 17, 4, 11, 73, 97, 123, 52, 66, 43, 34, 39, 102, 57, 50, 106, 79, 93, 67, 74, 88, 77, 29}; +static const uint16_t m_d314cfd957229c11[] = {98, 101, 30, 20, 55, 42, 60, 63, 5, 23, 127, 69, 22, 28, 35, 7, 107, 110, 111, 112, 113, 114, 115, 116, 124, 125, 126, 6, 70, 87, 76, 71, 59, 92, 128, 85, 26, 10, 91, 21, 48, 3, 41, 40, 99, 100, 1, 65, 64, 32, 96, 19, 8, 46, 25, 72, 51, 44, 37, 62, 36, 61, 94, 16, 14, 122, 119, 120, 117, 121, 118, 49, 18, 0, 24, 108, 95, 78, 105, 103, 9, 75, 82, 104, 83, 38, 84, 27, 68, 54, 58, 56, 47, 53, 45, 12, 81, 80, 33, 89, 90, 31, 13, 2, 86, 15, 17, 4, 11, 73, 109, 97, 123, 52, 66, 43, 34, 39, 102, 57, 50, 106, 79, 93, 67, 74, 88, 77, 29}; static const uint16_t i_d314cfd957229c11[] = {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, 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, 0, 67}; const ::capnp::_::RawSchema s_d314cfd957229c11 = { - 0xd314cfd957229c11, b_d314cfd957229c11.words, 2199, d_d314cfd957229c11, m_d314cfd957229c11, + 0xd314cfd957229c11, b_d314cfd957229c11.words, 2198, d_d314cfd957229c11, m_d314cfd957229c11, 88, 129, i_d314cfd957229c11, nullptr, nullptr, { &s_d314cfd957229c11, nullptr, nullptr, 0, 0, nullptr }, true }; #endif // !CAPNP_LITE diff --git a/cereal/gen/cpp/log.capnp.h b/cereal/gen/cpp/log.capnp.h index 4c20c59b7..d426e223f 100644 --- a/cereal/gen/cpp/log.capnp.h +++ b/cereal/gen/cpp/log.capnp.h @@ -2544,7 +2544,7 @@ struct Event { UI_PLAN_D_E_P_R_E_C_A_T_E_D, CONTROLS_STATE_EXT, LONGITUDINAL_PLAN_EXT, - CUSTOM_RESERVED2, + TE_TOO, CUSTOM_RESERVED3, CUSTOM_RESERVED4, CUSTOM_RESERVED5, @@ -19684,9 +19684,9 @@ public: inline bool hasLongitudinalPlanExt() const; inline ::cereal::LongitudinalPlanExt::Reader getLongitudinalPlanExt() const; - inline bool isCustomReserved2() const; - inline bool hasCustomReserved2() const; - inline ::cereal::CustomReserved2::Reader getCustomReserved2() const; + inline bool isTeToo() const; + inline bool hasTeToo() const; + inline ::cereal::TeToo::Reader getTeToo() const; inline bool isCustomReserved3() const; inline bool hasCustomReserved3() const; @@ -20655,13 +20655,13 @@ public: inline void adoptLongitudinalPlanExt(::capnp::Orphan< ::cereal::LongitudinalPlanExt>&& value); inline ::capnp::Orphan< ::cereal::LongitudinalPlanExt> disownLongitudinalPlanExt(); - inline bool isCustomReserved2(); - inline bool hasCustomReserved2(); - inline ::cereal::CustomReserved2::Builder getCustomReserved2(); - inline void setCustomReserved2( ::cereal::CustomReserved2::Reader value); - inline ::cereal::CustomReserved2::Builder initCustomReserved2(); - inline void adoptCustomReserved2(::capnp::Orphan< ::cereal::CustomReserved2>&& value); - inline ::capnp::Orphan< ::cereal::CustomReserved2> disownCustomReserved2(); + inline bool isTeToo(); + inline bool hasTeToo(); + inline ::cereal::TeToo::Builder getTeToo(); + inline void setTeToo( ::cereal::TeToo::Reader value); + inline ::cereal::TeToo::Builder initTeToo(); + inline void adoptTeToo(::capnp::Orphan< ::cereal::TeToo>&& value); + inline ::capnp::Orphan< ::cereal::TeToo> disownTeToo(); inline bool isCustomReserved3(); inline bool hasCustomReserved3(); @@ -53230,57 +53230,57 @@ inline ::capnp::Orphan< ::cereal::LongitudinalPlanExt> Event::Builder::disownLon ::capnp::bounded<0>() * ::capnp::POINTERS)); } -inline bool Event::Reader::isCustomReserved2() const { - return which() == Event::CUSTOM_RESERVED2; +inline bool Event::Reader::isTeToo() const { + return which() == Event::TE_TOO; } -inline bool Event::Builder::isCustomReserved2() { - return which() == Event::CUSTOM_RESERVED2; +inline bool Event::Builder::isTeToo() { + return which() == Event::TE_TOO; } -inline bool Event::Reader::hasCustomReserved2() const { - if (which() != Event::CUSTOM_RESERVED2) return false; +inline bool Event::Reader::hasTeToo() const { + if (which() != Event::TE_TOO) return false; return !_reader.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); } -inline bool Event::Builder::hasCustomReserved2() { - if (which() != Event::CUSTOM_RESERVED2) return false; +inline bool Event::Builder::hasTeToo() { + if (which() != Event::TE_TOO) return false; return !_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); } -inline ::cereal::CustomReserved2::Reader Event::Reader::getCustomReserved2() const { - KJ_IREQUIRE((which() == Event::CUSTOM_RESERVED2), +inline ::cereal::TeToo::Reader Event::Reader::getTeToo() const { + KJ_IREQUIRE((which() == Event::TE_TOO), "Must check which() before get()ing a union member."); - return ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::get(_reader.getPointerField( + return ::capnp::_::PointerHelpers< ::cereal::TeToo>::get(_reader.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS)); } -inline ::cereal::CustomReserved2::Builder Event::Builder::getCustomReserved2() { - KJ_IREQUIRE((which() == Event::CUSTOM_RESERVED2), +inline ::cereal::TeToo::Builder Event::Builder::getTeToo() { + KJ_IREQUIRE((which() == Event::TE_TOO), "Must check which() before get()ing a union member."); - return ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::get(_builder.getPointerField( + return ::capnp::_::PointerHelpers< ::cereal::TeToo>::get(_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS)); } -inline void Event::Builder::setCustomReserved2( ::cereal::CustomReserved2::Reader value) { +inline void Event::Builder::setTeToo( ::cereal::TeToo::Reader value) { _builder.setDataField( - ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::CUSTOM_RESERVED2); - ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::set(_builder.getPointerField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::TE_TOO); + ::capnp::_::PointerHelpers< ::cereal::TeToo>::set(_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS), value); } -inline ::cereal::CustomReserved2::Builder Event::Builder::initCustomReserved2() { +inline ::cereal::TeToo::Builder Event::Builder::initTeToo() { _builder.setDataField( - ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::CUSTOM_RESERVED2); - return ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::init(_builder.getPointerField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::TE_TOO); + return ::capnp::_::PointerHelpers< ::cereal::TeToo>::init(_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS)); } -inline void Event::Builder::adoptCustomReserved2( - ::capnp::Orphan< ::cereal::CustomReserved2>&& value) { +inline void Event::Builder::adoptTeToo( + ::capnp::Orphan< ::cereal::TeToo>&& value) { _builder.setDataField( - ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::CUSTOM_RESERVED2); - ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::adopt(_builder.getPointerField( + ::capnp::bounded<4>() * ::capnp::ELEMENTS, Event::TE_TOO); + ::capnp::_::PointerHelpers< ::cereal::TeToo>::adopt(_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); } -inline ::capnp::Orphan< ::cereal::CustomReserved2> Event::Builder::disownCustomReserved2() { - KJ_IREQUIRE((which() == Event::CUSTOM_RESERVED2), +inline ::capnp::Orphan< ::cereal::TeToo> Event::Builder::disownTeToo() { + KJ_IREQUIRE((which() == Event::TE_TOO), "Must check which() before get()ing a union member."); - return ::capnp::_::PointerHelpers< ::cereal::CustomReserved2>::disown(_builder.getPointerField( + return ::capnp::_::PointerHelpers< ::cereal::TeToo>::disown(_builder.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS)); } diff --git a/cereal/libcereal_shared.so b/cereal/libcereal_shared.so index eb01bd93b..b9d3b9928 100755 Binary files a/cereal/libcereal_shared.so and b/cereal/libcereal_shared.so differ diff --git a/cereal/log.capnp b/cereal/log.capnp index b53324f3f..ee047f00e 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -2351,7 +2351,7 @@ struct Event { # *********** Custom: reserved for forks *********** controlsStateExt @107 :Custom.ControlsStateExt; longitudinalPlanExt @108 :Custom.LongitudinalPlanExt; - customReserved2 @109 :Custom.CustomReserved2; + teToo @109 :Custom.TeToo; customReserved3 @110 :Custom.CustomReserved3; customReserved4 @111 :Custom.CustomReserved4; customReserved5 @112 :Custom.CustomReserved5; diff --git a/cereal/messaging/__init__.py b/cereal/messaging/__init__.py index 4ba55cf7b..8dfa42056 100644 --- a/cereal/messaging/__init__.py +++ b/cereal/messaging/__init__.py @@ -17,8 +17,8 @@ from cereal.services import SERVICE_LIST NO_TRAVERSAL_LIMIT = 2**64-1 -def log_from_bytes(dat: bytes) -> capnp.lib.capnp._DynamicStructReader: - with log.Event.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg: +def log_from_bytes(dat: bytes, struct: capnp.lib.capnp._StructModule = log.Event) -> capnp.lib.capnp._DynamicStructReader: + with struct.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg: return msg diff --git a/cereal/messaging/bridge b/cereal/messaging/bridge index 256d003b6..ef95e2503 100755 Binary files a/cereal/messaging/bridge and b/cereal/messaging/bridge differ diff --git a/cereal/services.h b/cereal/services.h index c5e400a44..e8949ff34 100644 --- a/cereal/services.h +++ b/cereal/services.h @@ -54,7 +54,7 @@ static std::map services = { { "wideRoadEncodeIdx", {"wideRoadEncodeIdx", false, 20, 1}}, { "wideRoadCameraState", {"wideRoadCameraState", true, 20, 20}}, { "drivingModelData", {"drivingModelData", true, 20, 10}}, - { "modelV2", {"modelV2", true, 20, 0}}, + { "modelV2", {"modelV2", true, 20, -1}}, { "managerState", {"managerState", true, 2, 1}}, { "uploaderState", {"uploaderState", true, 0, 1}}, { "navInstruction", {"navInstruction", true, 1, 10}}, @@ -80,6 +80,7 @@ static std::map services = { { "customReservedRawData2", {"customReservedRawData2", true, 0, -1}}, { "controlsStateExt", {"controlsStateExt", false, 100, 10}}, { "longitudinalPlanExt", {"longitudinalPlanExt", false, 20, 5}}, + { "teToo", {"teToo", false, 5, -1}}, }; #endif diff --git a/cereal/services.py b/cereal/services.py index 261d838aa..98925bdcd 100755 --- a/cereal/services.py +++ b/cereal/services.py @@ -61,7 +61,7 @@ _services: dict[str, tuple] = { "wideRoadEncodeIdx": (False, 20., 1), "wideRoadCameraState": (True, 20., 20), "drivingModelData": (True, 20., 10), - "modelV2": (True, 20., 0), + "modelV2": (True, 20.), "managerState": (True, 2., 1), "uploaderState": (True, 0., 1), "navInstruction": (True, 1., 10), @@ -91,6 +91,7 @@ _services: dict[str, tuple] = { # dp "controlsStateExt": (False, 100., 10), "longitudinalPlanExt": (False, 20., 5), + "teToo": (False, 5), } SERVICE_LIST = {name: Service(*vals) for idx, (name, vals) in enumerate(_services.items())} diff --git a/common/params_pyx.so b/common/params_pyx.so index 6732b13e3..a8c2de56c 100755 Binary files a/common/params_pyx.so and b/common/params_pyx.so differ diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..46ff2463e --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +/site/ diff --git a/docs/CARS.md b/docs/CARS.md index 769fe6e27..8fafc483f 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -4,7 +4,7 @@ A supported vehicle is one that just works when you install a comma device. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified. -# 288 Supported Cars +# 287 Supported Cars |Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|Hardware Needed
 |Video| |---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| @@ -25,8 +25,7 @@ A supported vehicle is one that just works when you install a comma device. All |Chrysler|Pacifica 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| |Chrysler|Pacifica 2019-20|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| |Chrysler|Pacifica 2021-23|All|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| -|Chrysler|Pacifica Hybrid 2017|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| -|Chrysler|Pacifica Hybrid 2018|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| +|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| |Chrysler|Pacifica Hybrid 2019-24|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 RJ45 cable (7 ft)
- 1 comma 3X
- 1 comma power v2
- 1 harness box
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| |comma|body|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|None|| |CUPRA|Ateca 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,12](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 USB-C coupler
- 1 VW J533 connector
- 1 comma 3X
- 1 harness box
- 1 long OBD-C cable
- 1 mount
- 1 right angle OBD-C cable (1.5 ft)
Buy Here
|| diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 09103e206..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -OPENPILOT_ROOT = `git rev-parse --show-toplevel` - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -DOCSDIR = "$(OPENPILOT_ROOT)/docs" -SOURCEDIR = "$(OPENPILOT_ROOT)/build/docs" -DOCSBUILDDIR = "$(OPENPILOT_ROOT)/build/docs" -BUILDDIR = "$(OPENPILOT_ROOT)/build" - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(DOCSBUILDDIR)" $(SPHINXOPTS) $(O) - -clean: - @echo "Cleaning build folder..." - rm -rf "$(BUILDDIR)" - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @echo "Cleaning build folder..." - rm -rf "$(BUILDDIR)" - mkdir -p "$(DOCSBUILDDIR)" - - @echo "Copying docs & config to build folder..." - cp -a "$(DOCSDIR)" "$(BUILDDIR)" - cd "$(OPENPILOT_ROOT)" && \ - find . -type f \( -name "*.md" -o -name "*.rst" -o -name "*.png" -o -name "*.jpg" -o -name "*.svg" \) \ - -not -path "*/.*" \ - -not -path "./build/*" \ - -not -path "./docs/*" \ - -not -path "./xx/*" \ - -exec cp --parents "{}" ./build/docs/ \; - - @echo "Building rst files..." - sphinx-apidoc -o "$(DOCSBUILDDIR)" ../ \ - ../xx ../rednose_repo ../notebooks ../panda_jungle \ - ../third_party \ - ../panda/examples \ - ../scripts \ - ../selfdrive/modeld \ - ../selfdrive/debug \ - $(shell find .. -type d -name "*test* -not -path "**.venv**" \") - - @echo "Building html files..." - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(DOCSBUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md index 838b00e7a..a16c77253 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,22 @@ -# openpilot-docs +# openpilot docs -These docs are autogenerated from [this folder](https://github.com/commaai/openpilot/tree/master/docs) in the main openpilot repository. \ No newline at end of file +This is the source for [docs.comma.ai](https://docs.comma.ai). +The site is updated on pushes to master by this [workflow](../.github/workflows/docs.yaml). + +## development +``` +# install the docs dependencies +pip install .[docs] + +cd docs/ + +# for a development server +mkdocs serve + +# build the site +mkdocs build +``` + +References: +* https://www.mkdocs.org/getting-started/ +* https://github.com/ntno/mkdocs-terminal diff --git a/docs/WORKFLOW.md b/docs/WORKFLOW.md index 1babe3c94..10cf244fd 100644 --- a/docs/WORKFLOW.md +++ b/docs/WORKFLOW.md @@ -9,6 +9,7 @@ Most development happens on normal Ubuntu workstations, and not in cars or direc ```bash # get the latest stuff git pull +git lfs pull git submodule update --init --recursive # update dependencies diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico deleted file mode 100644 index 976929954..000000000 Binary files a/docs/_static/favicon.ico and /dev/null differ diff --git a/docs/_static/logo.png b/docs/_static/logo.png deleted file mode 100644 index 269956508..000000000 Binary files a/docs/_static/logo.png and /dev/null differ diff --git a/docs/_static/robots.txt b/docs/_static/robots.txt deleted file mode 100644 index 3bcd24fb5..000000000 --- a/docs/_static/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Sitemap: https://docs.comma.ai/sitemap.xml \ No newline at end of file diff --git a/docs/c_docs.rst b/docs/c_docs.rst deleted file mode 100644 index 0d65423c0..000000000 --- a/docs/c_docs.rst +++ /dev/null @@ -1,87 +0,0 @@ -openpilot -========== - - -opendbc ------- -.. autodoxygenindex:: - :project: opendbc_can - - -cereal ------- - -messaging -^^^^^^^^^ -.. autodoxygenindex:: - :project: msgq_repo_msgq - -visionipc -^^^^^^^^^ -.. autodoxygenindex:: - :project: msgq_repo_msgq_visionipc - - -selfdrive ---------- - -camerad -^^^^^^^ -.. autodoxygenindex:: - :project: system_camerad_cameras - -locationd -^^^^^^^^^ -.. autodoxygenindex:: - :project: selfdrive_locationd - -ui -^^ - -.. autodoxygenindex:: - :project: selfdrive_ui - -replay -"""""" -.. autodoxygenindex:: - :project: tools_replay - -qt -"" -.. autodoxygenindex:: - :project: selfdrive_ui_qt_offroad - -proclogd -^^^^^^^^ -.. autodoxygenindex:: - :project: system_proclogd - -modeld -^^^^^^ -.. autodoxygenindex:: - :project: selfdrive_modeld_transforms -.. autodoxygenindex:: - :project: selfdrive_modeld_models -.. autodoxygenindex:: - :project: selfdrive_modeld_runners - -common -^^^^^^ -.. autodoxygenindex:: - :project: common - -sensorsd -^^^^^^^^ -.. autodoxygenindex:: - :project: system_sensord_sensors - -pandad -^^^^^^ -.. autodoxygenindex:: - :project: selfdrive_pandad - - -rednose -------- -.. autodoxygenindex:: - :project: rednose_repo_rednose_helpers diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 9a8d64669..000000000 --- a/docs/conf.py +++ /dev/null @@ -1,147 +0,0 @@ -# type: ignore - -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys -from os.path import exists - -from openpilot.common.basedir import BASEDIR -from openpilot.system.version import get_version - -sys.path.insert(0, os.path.abspath('.')) -sys.path.insert(0, os.path.abspath('..')) - -VERSION = get_version() - - -# -- Project information ----------------------------------------------------- - -project = 'openpilot docs' -copyright = '2021, comma.ai' # noqa: A001 -author = 'comma.ai' -version = VERSION -release = VERSION -language = 'en' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', # Auto-generate docs - 'sphinx.ext.viewcode', # Add view code link to modules - 'sphinx_rtd_theme', # Read The Docs theme - 'myst_parser', # Markdown parsing - 'breathe', # Doxygen C/C++ integration - 'sphinx_sitemap', # sitemap generation for SEO -] - -myst_html_meta = { - "description": "openpilot docs", - "keywords": "op, openpilot, docs, documentation", - "robots": "all,follow", - "googlebot": "index,follow,snippet,archive", - "property=og:locale": "en_US", - "property=og:site_name": "docs.comma.ai", - "property=og:url": "https://docs.comma.ai", - "property=og:title": "openpilot Documentation", - "property=og:type": "website", - "property=og:image:type": "image/jpeg", - "property=og:image:width": "400", - "property=og:image": "https://docs.comma.ai/_static/logo.png", - "property=og:image:url": "https://docs.comma.ai/_static/logo.png", - "property=og:image:secure_url": "https://docs.comma.ai/_static/logo.png", - "property=og:description": "openpilot Documentation", - "property=twitter:card": "summary_large_image", - "property=twitter:logo": "https://docs.comma.ai/_static/logo.png", - "property=twitter:title": "openpilot Documentation", - "property=twitter:description": "openpilot Documentation" -} - -html_baseurl = 'https://docs.comma.ai/' -sitemap_filename = "sitemap.xml" - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - - -# -- c docs configuration --------------------------------------------------- - -# Breathe Configuration -# breathe_default_project = "c_docs" -breathe_build_directory = f"{BASEDIR}/build/docs/html/xml" -breathe_separate_member_pages = True -breathe_default_members = ('members', 'private-members', 'undoc-members') -breathe_domain_by_extension = { - "h": "cc", -} -breathe_implementation_filename_extensions = ['.c', '.cc'] -breathe_doxygen_config_options = {} -breathe_projects_source = {} - -# only document files that have accompanying .cc files next to them -print("searching for c_docs...") -for root, _, files in os.walk(BASEDIR): - found = False - breath_src = {} - breathe_srcs_list = [] - - for file in files: - ccFile = os.path.join(root, file)[:-2] + ".cc" - - if file.endswith(".h") and exists(ccFile): - f = os.path.join(root, file) - - parent_dir_abs = os.path.dirname(f) - parent_dir = parent_dir_abs[len(BASEDIR) + 1:] - parent_project = parent_dir.replace('/', '_') - print(f"\tFOUND: {f} in {parent_project}") - - breathe_srcs_list.append(file) - found = True - - if found: - breath_src[parent_project] = (parent_dir_abs, breathe_srcs_list) - breathe_projects_source.update(breath_src) - -print(f"breathe_projects_source: {breathe_projects_source.keys()}") - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_rtd_theme' -html_show_copyright = True - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] -html_logo = '_static/logo.png' -html_favicon = '_static/favicon.ico' -html_theme_options = { - 'logo_only': False, - 'display_version': True, - 'vcs_pageview_mode': 'blob', - 'style_nav_header_background': '#000000', -} -html_extra_path = ['_static'] diff --git a/docs/new/docs/car-porting/brand-port.md b/docs/docs/car-porting/brand-port.md similarity index 100% rename from docs/new/docs/car-porting/brand-port.md rename to docs/docs/car-porting/brand-port.md diff --git a/docs/new/docs/car-porting/model-port.md b/docs/docs/car-porting/model-port.md similarity index 100% rename from docs/new/docs/car-porting/model-port.md rename to docs/docs/car-porting/model-port.md diff --git a/docs/docs/car-porting/what-is-a-car-port.md b/docs/docs/car-porting/what-is-a-car-port.md new file mode 100644 index 000000000..b918bb50e --- /dev/null +++ b/docs/docs/car-porting/what-is-a-car-port.md @@ -0,0 +1,22 @@ +# What is a car port? + +A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. All car ports live in `openpilot/selfdrive/car/`. + +The complexity of a car port varies depending on many factors including: +* existing openpilot support for similar cars +* architecture and APIs available in the car + + +# Structure of a car port +* `interface.py`: Interface for the car, defines the CarInterface class +* `carstate.py`: Reads CAN from car and builds openpilot CarState message +* `carcontroller.py`: Builds CAN messages to send to car +* `values.py`: Limits for actuation, general constants for cars, and supported car documentation +* `radar_interface.py`: Interface for parsing radar points from the car + + +# Overiew + +[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube: + +https://youtu.be/KcfzEHB6ms4?si=5szh1PX6TksOCKmM diff --git a/docs/docs/contributing/architecture.md b/docs/docs/contributing/architecture.md new file mode 100644 index 000000000..c79bec1ac --- /dev/null +++ b/docs/docs/contributing/architecture.md @@ -0,0 +1 @@ +# Architecture diff --git a/docs/docs/contributing/roadmap.md b/docs/docs/contributing/roadmap.md new file mode 100644 index 000000000..64ccdb3b7 --- /dev/null +++ b/docs/docs/contributing/roadmap.md @@ -0,0 +1,5 @@ +# Roadmap + +Coming soon... + +For now, check out our GitHub [milestones](https://github.com/commaai/openpilot/milestones) and [bounties](https://comma.ai/bounties). diff --git a/docs/new/docs/getting-started/what-is-openpilot.md b/docs/docs/getting-started/what-is-openpilot.md similarity index 62% rename from docs/new/docs/getting-started/what-is-openpilot.md rename to docs/docs/getting-started/what-is-openpilot.md index de45ae035..b3c56c841 100644 --- a/docs/new/docs/getting-started/what-is-openpilot.md +++ b/docs/docs/getting-started/what-is-openpilot.md @@ -1,6 +1,6 @@ # What is openpilot? -[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md). +[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md). ## How do I use it? diff --git a/docs/docs/how-to/connect-to-comma.md b/docs/docs/how-to/connect-to-comma.md new file mode 100644 index 000000000..53460ac99 --- /dev/null +++ b/docs/docs/how-to/connect-to-comma.md @@ -0,0 +1,76 @@ +# connect to a comma 3/3X + +A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console). + +## Serial Console + +On both the comma three and 3X, the serial console is accessible from the main OBD-C port. +Connect the comma 3/3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power. + +On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/serial/connect.sh` can be used to connect. + +On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script. + +## SSH + +In order to SSH into your device, you'll need a GitHub account with SSH keys. See this [GitHub article](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) for getting your account setup with SSH keys. + +* Enable SSH in your device's settings +* Enter your GitHub username in the device's settings +* Connect to your device + * Username: `comma` + * Port: `22` + +Here's an example command for connecting to your device using its tethered connection:
+`ssh comma@192.168.43.1` + +For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding). + +### Notes + +The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username. + +The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed. + +#### ssh.comma.ai proxy + +With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere. + +With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`. + +``` +Host comma-* + Port 22 + User comma + IdentityFile ~/.ssh/my_github_key + ProxyCommand ssh %h@ssh.comma.ai -W %h:%p + +Host ssh.comma.ai + Hostname ssh.comma.ai + Port 22 + IdentityFile ~/.ssh/my_github_key +``` + +## One-off connection + +``` +ssh -i ~/.ssh/my_github_key -o ProxyCommand="ssh -i ~/.ssh/my_github_key -W %h:%p -p %p %h@ssh.comma.ai" comma@ffffffffffffffff +``` +(Replace `ffffffffffffffff` with your dongle_id) + +## ssh.comma.ai host key fingerprint + +``` +Host key fingerprint is SHA256:X22GOmfjGb9J04IA2+egtdaJ7vW9Fbtmpz9/x8/W1X4 ++---[RSA 4096]----+ +| | +| | +| . | +| + o | +| S = + +..| +| + @ = .=| +| . B @ ++=| +| o * B XE| +| .o o OB/| ++----[SHA256]-----+ +``` diff --git a/docs/docs/how-to/first-pr.md b/docs/docs/how-to/first-pr.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/new/docs/how-to/turning-the-speed-blue.md b/docs/docs/how-to/turning-the-speed-blue.md similarity index 100% rename from docs/new/docs/how-to/turning-the-speed-blue.md rename to docs/docs/how-to/turning-the-speed-blue.md diff --git a/docs/docs/index.md b/docs/docs/index.md new file mode 120000 index 000000000..74ea27aee --- /dev/null +++ b/docs/docs/index.md @@ -0,0 +1 @@ +getting-started/what-is-openpilot.md \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 0fb2617a5..000000000 --- a/docs/index.md +++ /dev/null @@ -1,42 +0,0 @@ -# openpilot Documentation - -```{include} README.md -``` - -```{toctree} -:caption: 'General' -:maxdepth: 4 - -CARS.md -CONTRIBUTING.md -INTEGRATION.md -LIMITATIONS.md -SAFETY.md -``` - -```{toctree} -:caption: 'Overview' -:maxdepth: 2 - -overview.rst -``` - -## API Documentation - -- {ref}`genindex` -- {ref}`modindex` -- {ref}`search` - -```{toctree} -:caption: 'Python API' -:maxdepth: 2 - -modules.rst -``` - -```{toctree} -:caption: 'C/C++ API' -:maxdepth: 4 - -c_docs.rst -``` \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml new file mode 100644 index 000000000..45a1503b0 --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,32 @@ +site_name: openpilot docs +docs_dir: docs +repo_url: https://github.com/commaai/openpilot/ +site_url: https://docs.comma.ai + +strict: true + +theme: + name: terminal + features: + - navigation.side.toc.hide + +nav: + - Getting Started: + - What is openpilot?: getting-started/what-is-openpilot.md + - How-to: + #- Make my first pull request: how-to/first-pr.md + - Connect to a comma 3/3X: how-to/connect-to-comma.md + - Car Porting: + - What is a car port?: car-porting/what-is-a-car-port.md + - Porting a car brand: car-porting/brand-port.md + - Porting a car model: car-porting/model-port.md + - Contributing: + - Roadmap: contributing/roadmap.md + #- Architecture: contributing/architecture.md + - Contributing: https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md + - Links: + - Blog: https://blog.comma.ai + - Bounties: https://comma.ai/bounties + - GitHub: https://github.com/commaai + - Discord: https://discord.comma.ai + - X: https://x.com/comma_ai diff --git a/docs/new/README.md b/docs/new/README.md deleted file mode 100644 index 13980d1e1..000000000 --- a/docs/new/README.md +++ /dev/null @@ -1,12 +0,0 @@ -This is the source for a new https://docs.comma.ai. It's not hosted anywhere yet, but it's easy to run locally. - -https://www.mkdocs.org/getting-started/ - -``` -pip install mkdocs mkdocs-terminal -mkdocs serve -``` - -inspiration: -* https://rerun.io/docs/ -* https://docs.expo.dev/ diff --git a/docs/new/docs/car-porting/what-is-a-car-port.md b/docs/new/docs/car-porting/what-is-a-car-port.md deleted file mode 100644 index d089d9513..000000000 --- a/docs/new/docs/car-porting/what-is-a-car-port.md +++ /dev/null @@ -1,9 +0,0 @@ -# What is a car port? - -All car ports live in `openpilot/selfdrive/car/`. - -* interface.py: Interface for the car, defines the CarInterface class -* carstate.py: Reads CAN from car and builds openpilot CarState message -* carcontroller.py: Builds CAN messages to send to car -* values.py: Limits for actuation, general constants for cars, and supported car documentation -* radar_interface.py: Interface for parsing radar points from the car diff --git a/docs/new/mkdocs.yml b/docs/new/mkdocs.yml deleted file mode 100644 index b0f571954..000000000 --- a/docs/new/mkdocs.yml +++ /dev/null @@ -1,18 +0,0 @@ -site_name: openpilot docs -docs_dir: docs -repo_url: https://github.com/commaai/openpilot/ - -theme: - name: terminal - features: - - navigation.side.toc.hide - -nav: - - Getting Started: - - What is openpilot?: getting-started/what-is-openpilot.md - - How-to: - - Turn the speed blue: how-to/turning-the-speed-blue.md - - Car Porting: - - What is a car port?: car-porting/what-is-a-car-port.md - - Porting a car brand: car-porting/brand-port.md - - Porting a car model: car-porting/model-port.md diff --git a/docs/overview.rst b/docs/overview.rst deleted file mode 100644 index 8c552077f..000000000 --- a/docs/overview.rst +++ /dev/null @@ -1,72 +0,0 @@ -openpilot -========= - -.. toctree:: - :maxdepth: 4 - - Debugging - system/loggerd/README.md - Driver Monitoring - Process Replay - -cereal -========= - -.. toctree:: - :maxdepth: 4 - - cereal/README.md - cereal/messaging/msgq.md - -models -========= - -.. toctree:: - :maxdepth: 4 - - models/README.md - -opendbc -========= - -.. toctree:: - :maxdepth: 4 - - opendbc/README.md - -panda -========= - -.. toctree:: - :maxdepth: 4 - - panda/README.md - panda/UPDATING.md - panda/board/README.md - panda/drivers/linux/README.md - panda/drivers/windows/README.md - - -rednose -========= -.. toctree:: - :maxdepth: 4 - - rednose_repo/README.md - - -tools -========= -.. toctree:: - :maxdepth: 4 - - tools/CTF.md - tools/joystick/README.md - tools/lib/README.md - tools/plotjuggler/README.md - tools/replay/README.md - tools/serial/README.md - Simulator - tools/ssh/README.md - Webcam - tools/cabana/README.md diff --git a/dp_ext/selfdrive/assets/images/camera.svg b/dp_ext/selfdrive/assets/images/camera.svg new file mode 100644 index 000000000..d7ac7a2cb --- /dev/null +++ b/dp_ext/selfdrive/assets/images/camera.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/dp_ext/selfdrive/controls/lib/dynamic_endtoend_controller.py b/dp_ext/selfdrive/controls/lib/dynamic_endtoend_controller.py index e458ade80..967f6690c 100644 --- a/dp_ext/selfdrive/controls/lib/dynamic_endtoend_controller.py +++ b/dp_ext/selfdrive/controls/lib/dynamic_endtoend_controller.py @@ -23,6 +23,7 @@ # # Version = 2024-03-29 from common.numpy_fast import interp +from openpilot.common.params import Params # d-e2e, from modeldata.h TRAJECTORY_SIZE = 33 @@ -88,6 +89,7 @@ class DynamicEndtoEndController: self._mode_prev = 'acc' self._mode_changed = False self._frame = 0 + self._road_condition_detection = Params().get_bool('dp_long_de2e_road_condition') self._lead_gmac = GenericMovingAverageCalculator(window_size=LEAD_WINDOW_SIZE) self._has_lead_filtered = False @@ -213,7 +215,7 @@ class DynamicEndtoEndController: # when detecting slow down scenario: blended # e.g. traffic light, curve, stop sign etc. - if self._has_slow_down: + if self._road_condition_detection and self._has_slow_down: self._set_mode('blended') return @@ -261,7 +263,7 @@ class DynamicEndtoEndController: # when detecting slow down scenario: blended # e.g. traffic light, curve, stop sign etc. - if self._has_slow_down: + if self._road_condition_detection and self._has_slow_down: self._set_mode('blended') return diff --git a/dp_ext/selfdrive/tetood/assets/taiwan_speed_camera_2024_06_07.csv b/dp_ext/selfdrive/tetood/assets/taiwan_speed_camera_2024_06_07.csv new file mode 100644 index 000000000..01b2fb3de --- /dev/null +++ b/dp_ext/selfdrive/tetood/assets/taiwan_speed_camera_2024_06_07.csv @@ -0,0 +1,2237 @@ +CityName,RegionName,Address,DeptNm,BranchNm,Longitude,Latitude,direct,limit +設置縣市,設置市區鄉鎮,設置地址,管轄警局,管轄分局,經度,緯度,拍攝方向,速限 +連江縣,南竿鄉,介壽村47-10號前,連江縣警察局,南竿警察所,119.95137,26.160198,順向(往介壽村方向),30 +連江縣,北竿鄉,塘岐村168號前,連江縣警察局,北竿警察所,119.99763,26.223022,順向(往機場方向),30 +連江縣,北竿鄉,板里村46號前,連江縣警察局,北竿警察所,119.97415,26.216692,順向(往白沙方向),30 +金門縣,金城鎮,西海路水頭路段,金門縣警察局,金城分局,118.29999,24.411718,東西雙向,50 +金門縣,福建省金門縣金城鎮,西海路金城消防分隊路段,金門縣警察局,金城分局,118.31096,24.419662,南北雙向,50 +金門縣,金城鎮,西海路空中大學路段(空中大學附近),金門縣警察局,金城分局,118.31264,24.422647,東西雙向,50 +金門縣,金城鎮,環島南路小西門路段,金門縣警察局,金城分局,118.32414,24.413134,東西雙向,60 +金門縣,金沙鎮,環島北路4段洋山路段(警光會館附近),金門縣警察局,金湖分局,118.40696,24.486645,東西雙向,60 +金門縣,金沙鎮,高陽路蔡厝路段,金門縣警察局,金湖分局,118.419556,24.47699,東西雙向,60 +金門縣,金湖鎮,環島南路環保公園路段(環保局附近),金門縣警察局,金湖分局,118.370316,24.44133,東西雙向,60 +金門縣,福建省金門縣金湖鎮,瓊徑路小徑路段(小徑茶室附近),金門縣警察局,金湖分局,118.38353,24.449205,南北雙向,50 +金門縣,金湖鎮,環島南路后園路段(168加油站附近),金門縣警察局,金湖分局,118.4034,24.437878,東西雙向,50 +金門縣,福建省金門縣金湖鎮,太湖路鑑潭山莊路段(鑑潭山莊附近),金門縣警察局,金湖分局,118.40811,24.44457,東西雙向,50 +金門縣,金湖鎮,黃海路監理站路段,金門縣警察局,金湖分局,118.41738,24.446644,南北雙向,50 +金門縣,金湖鎮,金港路料羅路段,金門縣警察局,金湖分局,118.43421,24.419786,南北雙向,50 +金門縣,金寧鄉,慈湖路湖下路段,金門縣警察局,金城分局,118.309654,24.449041,南北雙向,50 +金門縣,金寧鄉,環島北路鎮西路段,金門縣警察局,金城分局,118.33072,24.448359,東西雙向,60 +金門縣,金寧鄉,環島南路后湖路段,金門縣警察局,金城分局,118.3318,24.416346,東西雙向,60 +金門縣,金寧鄉,桃園路金寧加油站路段(金寧加油站附近),金門縣警察局,金城分局,118.337685,24.430235,東西雙向,60 +金門縣,金寧鄉,環島北路頂堡路段(環北頂林路口附近),金門縣警察局,金城分局,118.33837,24.44981,東西雙向,60 +金門縣,金寧鄉,伯玉路盤果路口,金門縣警察局,金城分局,118.340614,24.441227,東往西向,70 +金門縣,金寧鄉,環島南路中心教練場路段(中心教練場附近),金門縣警察局,金城分局,118.34236,24.4258,東西雙向,60 +金門縣,金寧鄉,桃園路雙乳山路段,金門縣警察局,金城分局,118.35565,24.436016,東西雙向,60 +金門縣,金寧鄉,環島北路后盤山路段,金門縣警察局,金城分局,118.35793,24.453362,東西雙向,60 +金門縣,金湖鎮,黃海路陽明湖路段(陽明營區附近),金門縣警察局,金湖分局,118.43147,24.458809,南北雙向,60 +宜蘭縣,宜蘭市,中山路1段560號前北上,宜蘭縣政府警察局,宜蘭分局,121.76105,24.738028,南向北,60 +宜蘭縣,宜蘭市,宜16線5.5K南津路東向,宜蘭縣政府警察局,宜蘭分局,121.76466,24.71843,東西雙向,50 +宜蘭縣,宜蘭市,宜16線5.5K南津路東向,宜蘭縣政府警察局,宜蘭分局,121.76525,24.718306,東西雙向,50 +宜蘭縣,宜蘭市,台9線79k+550m環市東路與192甲線路口北上,宜蘭縣政府警察局,宜蘭分局,121.770744,24.767035,南向北,70 +宜蘭縣,宜蘭市,台9線80k+700m環市東路黎霧橋南端南下,宜蘭縣政府警察局,宜蘭分局,121.771355,24.756819,北向南,70 +宜蘭縣,宜蘭市,台9線81k+595m環市東路北上,宜蘭縣政府警察局,宜蘭分局,121.77163,24.74875,南向北,70 +宜蘭縣,宜蘭市,191線與宜14線路口北上,宜蘭縣政府警察局,宜蘭分局,121.78176,24.744093,南向北,60 +宜蘭縣,羅東鎮,公正路324號東西雙向,宜蘭縣政府警察局,羅東分局,121.76142,24.68059,東向西,40 +宜蘭縣,蘇澳鎮,台9線100k+242m新城段北上,宜蘭縣政府警察局,蘇澳分局,121.821266,24.615463,南北雙向,60 +宜蘭縣,蘇澳鎮,台9線117k+772m新澳隧道北上,宜蘭縣政府警察局,蘇澳分局,121.83023,24.490236,南向北,40 +宜蘭縣,蘇澳鎮,台9線102k+200m聖湖段南下,宜蘭縣政府警察局,蘇澳分局,121.83417,24.60313,南北雙向,60 +宜蘭縣,蘇澳鎮,台9線109k+240m東澳隧道南下,宜蘭縣政府警察局,蘇澳分局,121.84039,24.551931,北向南,70 +宜蘭縣,蘇澳鎮,台9線103k+562m南下,宜蘭縣政府警察局,蘇澳分局,121.84053,24.59536,南北雙向,50 +宜蘭縣,蘇澳鎮,蘇澳鎮台9線108k+269m至南澳鄉台9線110k+995m東澳隧道南下-1,宜蘭縣政府警察局,蘇澳分局,121.84233,24.560524,北向南,70 +宜蘭縣,蘇澳鎮,台2線164k+390m港邊段南下,宜蘭縣政府警察局,蘇澳分局,121.85278,24.611954,南北雙向,70 +宜蘭縣,蘇澳鎮,台2線166k+259m蘇澳港段南下,宜蘭縣政府警察局,蘇澳分局,121.856255,24.598513,南北雙向,60 +宜蘭縣,蘇澳鎮,台2戊線12k+215m移山路北上,宜蘭縣政府警察局,蘇澳分局,121.8595,24.590792,南北雙向,60 +宜蘭縣,頭城鎮,台9線56k+600m至68k+600m北往南-1,宜蘭縣政府警察局,礁溪分局,121.77586,24.865316,南北雙向,40 +宜蘭縣,頭城鎮,台9線68k+600m至56k+600m南往北-2,宜蘭縣政府警察局,礁溪分局,121.77586,24.865316,南北雙向,40 +宜蘭縣,頭城鎮,台9線69k+20m北宜路一段南下,宜蘭縣政府警察局,礁溪分局,121.79265,24.84562,南北雙向,60 +宜蘭縣,頭城鎮,台9線68.6K北宜路一段南下,宜蘭縣政府警察局,礁溪分局,121.79389,24.849024,南北雙向,40 +宜蘭縣,頭城鎮,台9線56k+600m至68k+600m北往南-2,宜蘭縣政府警察局,礁溪分局,121.79389,24.849024,南北雙向,40 +宜蘭縣,頭城鎮,台9線68k+600m至56k+600m南往北-1,宜蘭縣政府警察局,礁溪分局,121.79389,24.849024,南北雙向,40 +宜蘭縣,頭城鎮,宜3線3k+850m宜三路南下,宜蘭縣政府警察局,礁溪分局,121.79603,24.84921,南北雙向,50 +宜蘭縣,頭城鎮,191甲線2k+50m中崙段南下,宜蘭縣政府警察局,礁溪分局,121.80138,24.828068,南北雙向,60 +宜蘭縣,頭城鎮,台2線139k+738m竹安段南下,宜蘭縣政府警察局,礁溪分局,121.82069,24.824112,南北雙向,60 +宜蘭縣,頭城鎮,台2線133k+769m港口段南下,宜蘭縣政府警察局,礁溪分局,121.83554,24.871765,南北雙向,60 +宜蘭縣,頭城鎮,台2線129k+309m梗枋國小南下,宜蘭縣政府警察局,礁溪分局,121.86346,24.900974,南北雙向,50 +宜蘭縣,頭城鎮,台2線128k+754m梗枋段南下,宜蘭縣政府警察局,礁溪分局,121.86673,24.90387,南北雙向,60 +宜蘭縣,頭城鎮,台2線128k+65m梗枋地磅站北上,宜蘭縣政府警察局,礁溪分局,121.87091,24.906073,南北雙向,60 +宜蘭縣,頭城鎮,台2線128k+65m梗枋地磅站北上,宜蘭縣政府警察局,礁溪分局,121.87091,24.906073,南北雙向,60 +宜蘭縣,頭城鎮,台2線123k+642m大溪段北上,宜蘭縣政府警察局,礁溪分局,121.89127,24.939224,南北雙向,50 +宜蘭縣,頭城鎮,台2線122k+634m大溪段南下,宜蘭縣政府警察局,礁溪分局,121.90011,24.941515,北向南,60 +宜蘭縣,頭城鎮,台2線118k+49m大里段南下,宜蘭縣政府警察局,礁溪分局,121.92609,24.970085,南北雙向,50 +宜蘭縣,礁溪鄉,191線4K瑪僯段北上,宜蘭縣政府警察局,礁溪分局,121.780426,24.791037,南向北,60 +宜蘭縣,礁溪鄉,份尾三路北上(份尾橋南側100公尺處),宜蘭縣政府警察局,礁溪分局,121.78401,24.8297,南北雙向,50 +宜蘭縣,礁溪鄉,191甲線6k+600m玉田段北上,宜蘭縣政府警察局,礁溪分局,121.784225,24.789581,南北雙向,60 +宜蘭縣,礁溪鄉,宜4線4k+280m大塭段東向,宜蘭縣政府警察局,礁溪分局,121.810684,24.818115,東西雙向,50 +宜蘭縣,礁溪鄉,頭城鎮台2線131k+121m外澳段,宜蘭縣政府警察局,礁溪分局,121.85049,24.891298,南北雙向,50 +宜蘭縣,壯圍鄉,191線與雪隧路口南下,宜蘭縣政府警察局,礁溪分局,121.77852,24.766775,北向南,60 +宜蘭縣,壯圍鄉,宜16線7k+500m新南段西向,宜蘭縣政府警察局,礁溪分局,121.783035,24.720304,東西雙向,50 +宜蘭縣,壯圍鄉,宜16線9k+500m美福段東向,宜蘭縣政府警察局,礁溪分局,121.80265,24.719269,東西雙向,50 +宜蘭縣,壯圍鄉,宜20線1k+150m新南段西向,宜蘭縣政府警察局,礁溪分局,121.808556,24.727465,東西雙向,60 +宜蘭縣,壯圍鄉,台2線147k+40m過嶺國小南下,宜蘭縣政府警察局,礁溪分局,121.81548,24.758747,南北雙向,60 +宜蘭縣,壯圍鄉,台2線148k+400m北上,宜蘭縣政府警察局,礁溪分局,121.816315,24.746742,南北雙向,60 +宜蘭縣,壯圍鄉,台2線142k+480m大福段北上,宜蘭縣政府警察局,礁溪分局,121.81658,24.79972,南北雙向,60 +宜蘭縣,壯圍鄉,台2線150k+199m公館段南下,宜蘭縣政府警察局,礁溪分局,121.81915,24.73036,南北雙向,60 +宜蘭縣,員山鄉,台7線113k+357m內城段東向,宜蘭縣政府警察局,宜蘭分局,121.700935,24.717842,東西雙向,60 +宜蘭縣,員山鄉,宜18-2線9k深溝段西向,宜蘭縣政府警察局,宜蘭分局,121.709625,24.707457,東西雙向,60 +宜蘭縣,員山鄉,台7線115k+865m八甲段西向,宜蘭縣政府警察局,宜蘭分局,121.71639,24.732752,東西雙向,60 +宜蘭縣,員山鄉,宜61線900m深溝段南下,宜蘭縣政府警察局,宜蘭分局,121.717964,24.720016,南北雙向,60 +宜蘭縣,員山鄉,宜61線1k+200m深溝段北上,宜蘭縣政府警察局,宜蘭分局,121.71865,24.71743,南北雙向,60 +宜蘭縣,員山鄉,宜18-2線溪洲路346號東向,宜蘭縣政府警察局,宜蘭分局,121.738594,24.714243,東西雙向,50 +宜蘭縣,員山鄉,宜18-2線溪洲路150號西向,宜蘭縣政府警察局,宜蘭分局,121.748116,24.719,東西雙向,50 +宜蘭縣,冬山鄉,台9線94k+450m冬山段南下,宜蘭縣政府警察局,羅東分局,121.78557,24.645603,北向南,60 +宜蘭縣,五結鄉,宜22線1k+500m二結段東向,宜蘭縣政府警察局,羅東分局,121.76619,24.710798,東西雙向,60 +宜蘭縣,五結鄉,台7丙線28k+98m中山路東向,宜蘭縣政府警察局,羅東分局,121.78949,24.672573,東西雙向,60 +宜蘭縣,五結鄉,191線與宜24線路口南下,宜蘭縣政府警察局,羅東分局,121.791145,24.688986,北向南,60 +宜蘭縣,五結鄉,191線與196線路口北上,宜蘭縣政府警察局,羅東分局,121.79258,24.683813,南向北,60 +宜蘭縣,五結鄉,五結鄉191線與傳藝路口南下,宜蘭縣政府警察局,羅東分局,121.79319,24.680323,北向南,60 +宜蘭縣,五結鄉,五結鄉台7丙線29K+743M親河路西向,宜蘭縣政府警察局,羅東分局,121.80519,24.673485,東西雙向,60 +宜蘭縣,五結鄉,宜22線6k錦草段西向,宜蘭縣政府警察局,羅東分局,121.81058,24.709387,東西雙向,60 +宜蘭縣,五結鄉,台2線157k+652m利澤段北上,宜蘭縣政府警察局,羅東分局,121.82835,24.664686,南向北,60 +宜蘭縣,三星鄉,196線3k+800m萬富東向,宜蘭縣政府警察局,三星分局,121.67725,24.677273,東西雙向,60 +宜蘭縣,三星鄉,台7丙線18k+342m大隱段東向,宜蘭縣政府警察局,三星分局,121.697624,24.667261,東西雙向,60 +宜蘭縣,三星鄉,台7丙線19k+865m大隱段西向,宜蘭縣政府警察局,三星分局,121.71217,24.670204,東西雙向,60 +宜蘭縣,三星鄉,196線7k+900m大埔段西向,宜蘭縣政府警察局,三星分局,121.71839,24.687069,東西雙向,60 +宜蘭縣,三星鄉,宜61線3k+600m大洲段南下,宜蘭縣政府警察局,三星分局,121.72788,24.69807,北向南,60 +宜蘭縣,三星鄉,宜61線3k+800m大洲段北上,宜蘭縣政府警察局,三星分局,121.72893,24.696066,南北雙向,60 +宜蘭縣,三星鄉,196線11k大洲段東向,宜蘭縣政府警察局,三星分局,121.74223,24.700827,東西雙向,50 +宜蘭縣,南澳鄉,台9線137K+295m至141K+458m谷風隧道南下-2,宜蘭縣政府警察局,蘇澳分局,121.7648,24.330963,北向南,70 +宜蘭縣,南澳鄉,台9線141K+420m至137K+205m谷風隧道北上-2,宜蘭縣政府警察局,蘇澳分局,121.76504,24.332409,南向北,70 +宜蘭縣,南澳鄉,台9線139k+667m谷風隧道北上,宜蘭縣政府警察局,蘇澳分局,121.7668,24.347893,南向北,70 +宜蘭縣,南澳鄉,台9線138k+677m谷風隧道南下,宜蘭縣政府警察局,蘇澳分局,121.771545,24.355694,北向南,70 +宜蘭縣,南澳鄉,台9線129k+404m至131k+860m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.77481,24.433311,北向南,70 +宜蘭縣,南澳鄉,台9線137K+295m至141K+458m谷風隧道南下-1,宜蘭縣政府警察局,蘇澳分局,121.77798,24.365217,北向南,70 +宜蘭縣,南澳鄉,台9線141K+420m至137K+205m谷風隧道北上-1,宜蘭縣政府警察局,蘇澳分局,121.77935,24.366602,南向北,70 +宜蘭縣,南澳鄉,台9線130k+347m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.780174,24.426088,南向北,70 +宜蘭縣,南澳鄉,台9線134k+538m至136k+883m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.780304,24.369637,北向南,70 +宜蘭縣,南澳鄉,台9線136k+912m至134k+405m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.780426,24.369045,南向北,70 +宜蘭縣,南澳鄉,台9線130k+492m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.78068,24.42525,北向南,70 +宜蘭縣,南澳鄉,台9線135K+910m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.78324,24.377888,北向南,70 +宜蘭縣,南澳鄉,台9線135K+841m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.7837,24.378277,南向北,70 +宜蘭縣,南澳鄉,台9線131K+860m至134K+538m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.78547,24.390112,北向南,70 +宜蘭縣,南澳鄉,台9線134k+405m至131k+849m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.785706,24.390938,南向北,70 +宜蘭縣,南澳鄉,台9線133k+289m觀音隧道南下,宜蘭縣政府警察局,蘇澳分局,121.78592,24.401218,北向南,70 +宜蘭縣,南澳鄉,台9線131K+849m至129K+360m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.78607,24.413862,南向北,70 +宜蘭縣,南澳鄉,台9線133k+174m觀音隧道北上,宜蘭縣政府警察局,蘇澳分局,121.78618,24.401888,南向北,70 +宜蘭縣,南澳鄉,台9線123k+570m南澳段南下,宜蘭縣政府警察局,蘇澳分局,121.80645,24.46758,南北雙向,50 +宜蘭縣,南澳鄉,蘇澳鎮台9線108k+269m至南澳鄉台9線110k+995m東澳隧道南下-2,宜蘭縣政府警察局,蘇澳分局,121.83616,24.536652,北向南,70 +宜蘭縣,南澳鄉,南澳鄉台9線110k+960m至蘇澳鎮台9線108k+224m東澳隧道北上-1,宜蘭縣政府警察局,蘇澳分局,121.836655,24.536793,南向北,70 +宜蘭縣,南澳鄉,台9線110k+300m東澳隧道北上,宜蘭縣政府警察局,蘇澳分局,121.83988,24.547905,南向北,70 +宜蘭縣,南澳鄉,南澳鄉台9線110k+960m至蘇澳鎮台9線108k+224m東澳隧道北上-2,宜蘭縣政府警察局,蘇澳分局,121.84309,24.5618,南向北,70 +新竹縣,竹北市,竹北市西濱路一段與西濱路二段 265 巷口,新竹縣政府警察局,竹縣警局交通隊,120.95332,24.86823,往北,70 +新竹縣,竹北市,中正西路118線3km+500處,新竹縣政府警察局,竹北分局,120.97137,24.84157,東西雙向,50 +新竹縣,竹北市,中華路1432號前(台1線65.5公里)南向,新竹縣政府警察局,新湖分局,120.99152,24.863388,南北雙向,60 +新竹縣,竹北市,西濱公路與埔和路口(台15線64.4公里)南向,新竹縣政府警察局,新湖分局,120.99606,24.931686,北向南,60 +新竹縣,竹北市,竹北市台1線中華路佑順加油站前,新竹縣政府警察局,竹北分局,120.99748,24.826073,南往北,50 +新竹縣,竹北市,台一線大眉南下路口,新竹縣政府警察局,竹北分局,121.002075,24.855177,北往南,50 +新竹縣,竹北市,中華路212號前(台1線70.1公里),新竹縣政府警察局,竹北分局,121.00238,24.831179,南向北,50 +新竹縣,竹北市,中華路1138號前,新竹縣政府警察局,竹北分局,121.00254,24.855085,南向北,50 +新竹縣,竹北市,竹北市興隆路與莊敬南路口(新竹地方法院前),新竹縣政府警察局,竹北分局,121.01772,24.812561,西往東,50 +新竹縣,竹北市,竹北市自強北路與十興路口,新竹縣政府警察局,竹北分局,121.03342,24.826258,北往南,50 +新竹縣,竹北市,竹北市光明六路東二段與嘉豐南路一段口,新竹縣政府警察局,竹北分局,121.03497,24.812794,西往東,50 +新竹縣,竹北市,東興路二段316號前(120線7.1公里)雙向,新竹縣政府警察局,竹北分局,121.05501,24.797277,東西雙向,60 +新竹縣,竹東鎮,台三線北上91.2公里,新竹縣政府警察局,竹東分局,120.98595,24.697054,南北雙向,60 +新竹縣,竹東鎮,峨嵋鄉89.4公里,新竹縣政府警察局,竹東分局,120.99249,24.69987,往南,60 +新竹縣,竹東鎮,中興路四段372號前(122線14公里)西向,新竹縣政府警察局,竹東分局,121.02924,24.779507,東向西,50 +新竹縣,竹東鎮,台68線12.55公里(快速道路)西向,新竹縣政府警察局,竹東分局,121.029686,24.79777,東向西,90 +新竹縣,竹東鎮,竹東鎮公道路616號前,新竹縣政府警察局,竹東分局,121.03005,24.787918,西往東,50 +新竹縣,竹東鎮,台68線12.85公里(快速道路)東向,新竹縣政府警察局,竹東分局,121.03352,24.795456,西向東,90 +新竹縣,竹東鎮,中盛村路口(台3線86.5公里)南向,新竹縣政府警察局,竹東分局,121.03471,24.697115,南北雙向,60 +新竹縣,竹東鎮,台3線中豐路老爺山莊路口,新竹縣政府警察局,竹東分局,121.078285,24.723764,南向北,50 +新竹縣,竹東鎮,竹122線18KM+160(中興路一段94-2號),新竹縣政府警察局,竹東分局,121.08006,24.747807,東西雙向,50 +新竹縣,竹東鎮,竹東鎮台68線竹東匝道口與北興路三段,新竹縣政府警察局,竹東分局,121.08052,24.749659,北往南,50 +新竹縣,新埔鎮,新埔鎮文山里竹118線12K處,新竹縣政府警察局,新埔分局,121.05021,24.826906,西往東,50 +新竹縣,新埔鎮,文山路亞東段369號西向,新竹縣政府警察局,新埔分局,121.05786,24.825338,東向西,60 +新竹縣,新埔鎮,新關路1046巷口東向,新竹縣政府警察局,新埔分局,121.09389,24.822088,西往東,60 +新竹縣,關西鎮,石光里702號前(118線19.1公里)西向,新竹縣政府警察局,新埔分局,121.115875,24.816027,東往西,60 +新竹縣,關西鎮,竹118線22.7K,新竹縣政府警察局,新埔分局,121.15133,24.805145,東往西,50 +新竹縣,關西鎮,南新里新城9鄰1號(台3線62公里)北向,新竹縣政府警察局,新埔分局,121.17297,24.765247,南往北,50 +新竹縣,關西鎮,190號東光陸橋(台3線60.6公里)南向,新竹縣政府警察局,新埔分局,121.17617,24.775278,北向南,50 +新竹縣,關西鎮,關西鎮台3線59km,新竹縣政府警察局,新埔分局,121.18595,24.788391,南往北,50 +新竹縣,關西鎮,關西鎮中豐公路牛欄河6鄰63號,新竹縣政府警察局,新埔分局,121.19896,24.811626,南向北,60 +新竹縣,湖口鄉,新豐鄉新興路與康樂路口,新竹縣政府警察局,竹縣警局交通隊,120.99183,24.86469,往南,50 +新竹縣,湖口鄉,湖口鄉台1線新興路與中華路口65.5公里北上,新竹縣政府警察局,新湖分局,121.00688,24.8795,往北,60 +新竹縣,湖口鄉,湖口鄉成功路與三元路路口,新竹縣政府警察局,新湖分局,121.02174,24.889975,西往東,60 +新竹縣,湖口鄉,八德路一段35號前(台1線61公里)南向,新竹縣政府警察局,新湖分局,121.02346,24.885187,北向南,70 +新竹縣,湖口鄉,台1線中山路口南向,新竹縣政府警察局,新湖分局,121.03631,24.880438,北向南,70 +新竹縣,湖口鄉,台1線54KM+900處,新竹縣政府警察局,新湖分局,121.082695,24.886557,南北雙向,70 +新竹縣,新豐鄉,新豐鄉新興路與康樂路口,新竹縣政府警察局,新湖分局,120.991875,24.864685,北往南,50 +新竹縣,新豐鄉,台15線62公里南向,新竹縣政府警察局,新湖分局,120.99692,24.932375,北向南,60 +新竹縣,芎林鄉,芎林鄉富林路一段竹120線15.5K處,新竹縣政府警察局,橫山分局,0.0,0.0,西往東,60 +新竹縣,芎林鄉,富林路三段、文德路口(120線10.4公里)東向,新竹縣政府警察局,橫山分局,121.07388,24.774717,東向西,60 +新竹縣,芎林鄉,富林路二段竹林交流道(120線11.5公里)西向,新竹縣政府警察局,橫山分局,121.08224,24.765705,東向西,60 +新竹縣,橫山鄉,橫山鄉中豐路二段12巷口(台3線),新竹縣政府警察局,橫山分局,0.0,0.0,西往東,60 +新竹縣,橫山鄉,中豐路一段、站前街口(台3線72.9公里)南向,新竹縣政府警察局,橫山分局,121.11652,24.720446,南北雙向,60 +新竹縣,寶山鄉,寶山鄉寶山路二段竹83線0km+800,新竹縣政府警察局,竹東分局,0.0,0.0,南往北,50 +新竹縣,寶山鄉,雙林路一般竹47-1線4km處,新竹縣政府警察局,竹東分局,120.95864,24.744226,南向北,50 +新竹縣,寶山鄉,雙園路2段(竹82線1公里)南向,新竹縣政府警察局,竹東分局,120.99643,24.766848,北向南,50 +新竹縣,寶山鄉,竹83線4km+150,新竹縣政府警察局,竹東分局,121.033325,24.728348,西往東,50 +苗栗縣,苗栗市,台13線35.2公里處,苗栗縣警察局,苗栗分局,120.792854,24.522364,南向北,60 +苗栗縣,苗栗市,新川里柑園5號前處,苗栗縣警察局,苗栗分局,120.80374,24.578798,東向西,60 +苗栗縣,苗栗市,台13線30.3公里處(苗商後方),苗栗縣警察局,苗栗分局,120.81373,24.557383,南北雙向,50 +苗栗縣,苗栗市,台13線31.1公里處(信義街口),苗栗縣警察局,苗栗分局,120.813934,24.550495,南向北,50 +苗栗縣,苗栗市,英才路與文發路 口,苗栗縣警察局,苗栗分局,120.81526,24.590336,東向西,50 +苗栗縣,苗栗市,中正路905號前公車停靠區及禁臨停區,苗栗縣警察局,苗栗分局,120.81608,24.551743,南北雙向,50 +苗栗縣,苗栗市,台6線(經國路)14.5公里處,苗栗縣警察局,苗栗分局,120.83144,24.551407,東西雙向,70 +苗栗縣,苑裡鎮,台1線140.8公里處(臨海路口),苗栗縣警察局,通霄分局,120.64825,24.4435,北向南,60 +苗栗縣,苑裡鎮,苑北里中山路與成功路口處,苗栗縣警察局,通霄分局,120.65332,24.44647,北向南,50 +苗栗縣,苑裡鎮,140線與苗47之1線口處,苗栗縣警察局,通霄分局,120.6551,24.41928,西向東,50 +苗栗縣,苑裡鎮,140線與121線口處,苗栗縣警察局,通霄分局,120.67131,24.394587,東向西,60 +苗栗縣,苑裡鎮,140線8.1公里處,苗栗縣警察局,通霄分局,120.68583,24.37995,西向東,60 +苗栗縣,通霄鎮,台1線137.2公里處(五福國小陸橋下),苗栗縣警察局,通霄分局,120.66622,24.469824,南向北,60 +苗栗縣,通霄鎮,台61線北向122.6公里至115.6公里,苗栗縣警察局,通霄分局,120.67632,24.494154,南向北,90 +苗栗縣,通霄鎮,台61線南向122.2公里至130.2公里,苗栗縣警察局,通霄分局,120.67696,24.497608,北向南,90 +苗栗縣,通霄鎮,台1線134.7公里與121線口處,苗栗縣警察局,通霄分局,120.68407,24.48168,北向南,60 +苗栗縣,通霄鎮,128線2.4公里處,苗栗縣警察局,通霄分局,120.69913,24.496456,東向西,60 +苗栗縣,通霄鎮,台1線124.8公里處(啟新國中前),苗栗縣警察局,通霄分局,120.709694,24.56362,南向北,60 +苗栗縣,通霄鎮,台61線114.3公里處,苗栗縣警察局,通霄分局,120.7139,24.559273,南向北,90 +苗栗縣,竹南鎮,台1線124.1公里處(拱天宮前),苗栗縣警察局,通霄分局,120.7121,24.569326,北向南,60 +苗栗縣,竹南鎮,台61線90.4公里與苗3-3線路口處,苗栗縣警察局,竹南分局,120.81119,24.657883,北向南,80 +苗栗縣,竹南鎮,台1己線1.3公里與明勝路口處,苗栗縣警察局,竹南分局,120.85556,24.671747,東向西,60 +苗栗縣,竹南鎮,台61線91公里快(側)車道與博愛街口處,苗栗縣警察局,竹南分局,120.85995,24.693743,南向北,40 +苗栗縣,竹南鎮,台61線88.15公里處,苗栗縣警察局,竹南分局,120.86775,24.717684,南北雙向,80 +苗栗縣,竹南鎮,台1己線3公里處,苗栗縣警察局,竹南分局,120.87099,24.671583,西向東,60 +苗栗縣,竹南鎮,環市路與公教路口處(清寧橋前),苗栗縣警察局,竹南分局,120.87718,24.692722,東向西,60 +苗栗縣,竹南鎮,竹南火車站前後圓環,苗栗縣警察局,竹南分局,120.879974,24.686905,東西南北,30 +苗栗縣,竹南鎮,台13線永貞路與公園路口處,苗栗縣警察局,竹南分局,120.88542,24.690916,北向南,60 +苗栗縣,竹南鎮,永貞路與勝利街口處,苗栗縣警察局,竹南分局,120.885445,24.69521,北向南,60 +苗栗縣,竹南鎮,台13線2.5公里與友義路口處,苗栗縣警察局,竹南分局,120.90459,24.723228,南向北,60 +苗栗縣,竹南鎮,台1線與苗2線口處(科學路口),苗栗縣警察局,竹南分局,120.92211,24.713758,南向北,70 +苗栗縣,頭份市,台1線與苗10線口處,苗栗縣警察局,頭份分局,120.878746,24.66203,北向南,70 +苗栗縣,頭份市,台1線98.3公里處,苗栗縣警察局,頭份分局,120.88218,24.663143,南向北,70 +苗栗縣,頭份市,台13線12.1公里處(尖山國小前),苗栗縣警察局,頭份分局,120.88288,24.65347,南向北,60 +苗栗縣,頭份市,中華路440號處,苗栗縣警察局,頭份分局,120.89102,24.674002,南向北,60 +苗栗縣,頭份市,台1線95.2公里處(紡安紡織公司口),苗栗縣警察局,頭份分局,120.89492,24.683172,南向北,60 +苗栗縣,頭份市,中央路(頭份國中前),苗栗縣警察局,頭份分局,120.90152,24.692188,東西雙向,50 +苗栗縣,頭份市,台1線91.6公里與科東二路口處,苗栗縣警察局,頭份分局,120.90206,24.68516,北向南,60 +苗栗縣,頭份市,中華路與自強路口,苗栗縣警察局,頭份分局,120.9131,24.690813,北向南,60 +苗栗縣,頭份市,正興路與水源路口處,苗栗縣警察局,頭份分局,120.91392,24.674433,北向南,60 +苗栗縣,頭份市,124甲線與中華路口,苗栗縣警察局,頭份分局,120.91523,24.69308,東向西,50 +苗栗縣,頭份市,124甲線1公里東向與土牛社區路口處,苗栗縣警察局,頭份分局,120.92369,24.690245,西向東,50 +苗栗縣,頭份市,124甲線1公里西向與土牛社區路口處,苗栗縣警察局,頭份分局,120.92423,24.68992,東向西,50 +苗栗縣,頭份市,中正一路與124甲線路口,苗栗縣警察局,頭份分局,120.92912,24.686438,東向西,50 +苗栗縣,頭份市,124線8.45公里處,苗栗縣警察局,頭份分局,120.93603,24.685402,東向西,50 +苗栗縣,頭份市,124線9.8公里處,苗栗縣警察局,頭份分局,120.94835,24.680124,西向東,50 +苗栗縣,頭份市,124線10.75公里處,苗栗縣警察局,頭份分局,120.95703,24.681976,東向西,50 +苗栗縣,後龍鎮,台61線與苗11線口處,苗栗縣警察局,竹南分局,120.78327,24.637379,南向北,80 +苗栗縣,後龍鎮,台6線3.7公里處(後龍交流道附近),苗栗縣警察局,竹南分局,120.78955,24.594868,西向東,60 +苗栗縣,後龍鎮,台1線與成功路口處,苗栗縣警察局,竹南分局,120.79464,24.61392,南向北,60 +苗栗縣,後龍鎮,台61線97.55公里處,苗栗縣警察局,竹南分局,120.81203,24.657776,南北雙向,80 +苗栗縣,後龍鎮,台13甲線12.4公里處,苗栗縣警察局,竹南分局,120.832245,24.607538,北向南,60 +苗栗縣,卓蘭鎮,台3線142.2公里處,苗栗縣警察局,大湖分局,120.82357,24.338886,南向北,60 +苗栗縣,卓蘭鎮,台3線146.8公里處(豐田國小旁),苗栗縣警察局,大湖分局,120.823845,24.3246,北向南,60 +苗栗縣,大湖鄉,台3線141公里處,苗栗縣警察局,大湖分局,120.8283,24.348303,北向南,60 +苗栗縣,大湖鄉,台3線137.2公里,苗栗縣警察局,大湖分局,120.842674,24.37388,南向北,60 +苗栗縣,大湖鄉,台3線與苗55線口處(南湖國小前),苗栗縣警察局,大湖分局,120.86043,24.395475,南向北,60 +苗栗縣,大湖鄉,台3線131.6公里處,苗栗縣警察局,大湖分局,120.86529,24.409588,南向北,60 +苗栗縣,大湖鄉,台3線與中原路口處,苗栗縣警察局,大湖分局,120.86771,24.428797,南向北,60 +苗栗縣,公館鄉,台72線24公里處,苗栗縣警察局,苗栗分局,120.81822,24.46855,東西雙向,80 +苗栗縣,公館鄉,119甲線(沿山道)3.4公里處,苗栗縣警察局,苗栗分局,120.835365,24.512255,北向南,60 +苗栗縣,銅鑼鄉,台13線與苗38-1線口處(外環道與九湖橋頭),苗栗縣警察局,苗栗分局,120.78136,24.478888,北向南,60 +苗栗縣,銅鑼鄉,台13線與128線口處,苗栗縣警察局,苗栗分局,120.78141,24.494358,北向南,60 +苗栗縣,銅鑼鄉,128線與苗27線口處,苗栗縣警察局,苗栗分局,120.80876,24.498888,北向南,60 +苗栗縣,銅鑼鄉,台72線與119甲線口處,苗栗縣警察局,苗栗分局,120.80923,24.47729,東向西,80 +苗栗縣,南庄鄉,台3線與苗20線口處,苗栗縣警察局,頭份分局,120.955826,24.639528,南向北,60 +苗栗縣,頭屋鄉,台13線24.2公里處,苗栗縣警察局,苗栗分局,120.85494,24.576845,北向南,50 +苗栗縣,三義鄉,140線15.3公里處,苗栗縣警察局,苗栗分局,120.74204,24.35014,東西向,50 +苗栗縣,三義鄉,140線16.2公里至23.1公里至25.1公里,苗栗縣警察局,苗栗分局,120.744514,24.345043,東西雙向,50 +苗栗縣,三義鄉,台13線52.4公里處(龍騰派出所前),苗栗縣警察局,苗栗分局,120.74986,24.378527,北向南,60 +苗栗縣,三義鄉,140線20.2公里處,苗栗縣警察局,苗栗分局,120.77479,24.323368,東西雙向,50 +苗栗縣,造橋鄉,台13甲線北向11公里至9.8公里,苗栗縣警察局,竹南分局,120.839836,24.616726,北向,50 +苗栗縣,造橋鄉,台1線102.8公里處(育達科技大學前),苗栗縣警察局,竹南分局,120.845,24.646929,南向北,70 +苗栗縣,造橋鄉,台13甲線10.1公里處,苗栗縣警察局,竹南分局,120.84604,24.622055,南北雙向,50 +苗栗縣,造橋鄉,台13甲線南向9.8公里至11公里,苗栗縣警察局,竹南分局,120.84835,24.624105,南向,50 +苗栗縣,造橋鄉,台13甲線北向9.5公里至8.3公里,苗栗縣警察局,竹南分局,120.85055,24.625143,北向,60 +苗栗縣,造橋鄉,台1線與苗9線口處(談文派出所前),苗栗縣警察局,竹南分局,120.85221,24.653536,南向北,70 +苗栗縣,造橋鄉,台13甲線南向8.3公里至9.5公里,苗栗縣警察局,竹南分局,120.85721,24.632866,南向,60 +苗栗縣,三灣鄉,台3線102.8公里處,苗栗縣警察局,頭份分局,120.94928,24.616138,南北雙向,60 +苗栗縣,三灣鄉,台3線101.5公里處(大河老街口),苗栗縣警察局,頭份分局,120.949905,24.619045,南向北,60 +苗栗縣,三灣鄉,台3線103.2公里至108公里,苗栗縣警察局,頭份分局,120.952415,24.61412,南北雙向,60 +苗栗縣,三灣鄉,台3線104.9公里處,苗栗縣警察局,頭份分局,120.9586,24.604675,南向北,60 +苗栗縣,三灣鄉,台3線95.5公里處,苗栗縣警察局,頭份分局,120.96546,24.665936,南向北,60 +苗栗縣,獅潭鄉,台3線108公里處,苗栗縣警察局,大湖分局,120.71483,23.803984,南、北雙向,60 +苗栗縣,獅潭鄉,台3線114.3公里至122.8公里,苗栗縣警察局,大湖分局,120.88974,24.476599,南北雙向,60 +苗栗縣,獅潭鄉,台3線120.9公里處,苗栗縣警察局,大湖分局,120.89901,24.488768,北向南,60 +苗栗縣,獅潭鄉,台3線115.4公里處,苗栗縣警察局,大湖分局,120.91459,24.529861,南向北,60 +苗栗縣,獅潭鄉,台3線111.8公里處,苗栗縣警察局,大湖分局,120.916466,24.52958,北向南,60 +苗栗縣,獅潭鄉,台3線113.5公里處,苗栗縣警察局,大湖分局,120.916466,24.52958,北向南,60 +苗栗縣,獅潭鄉,台3線113.1公里處(獅潭國中旁),苗栗縣警察局,大湖分局,120.921745,24.5422,北向南,60 +彰化縣,彰化市,彰化市新平路與環和路口(省道),彰化縣警察局,彰化分局,120.52154,24.065105,路口科技執法,60 +彰化縣,彰化市,金馬、忠誠路口,彰化縣警察局,彰化分局,120.53111,24.08472,南向,70 +彰化縣,彰化市,彰化市中華路與中正路口(省道),彰化縣警察局,彰化分局,120.5367,24.076794,路口科技執法,40 +彰化縣,彰化市,建國北路,彰化縣警察局,彰化分局,120.55056,24.09194,西向,50 +彰化縣,彰化市,中興路與介壽橋口,彰化縣警察局,彰化分局,120.5525,24.07028,西向,50 +彰化縣,彰化市,中山、中正路口,彰化縣警察局,彰化分局,120.5525,24.08389,北向,50 +彰化縣,彰化市,金馬路一段、泰和路二段415巷口,彰化縣警察局,彰化分局,120.55722,24.09833,北向,70 +彰化縣,彰化市,彰化市金馬東路與金馬東路317巷口,彰化縣警察局,彰化分局,120.57575,24.093752,南向,70 +彰化縣,彰化市,台1線186.95公里,彰化縣警察局,彰化分局,120.58028,24.10111,北向,70 +彰化縣,彰化市,彰化市縣139線7.7公里處,彰化縣警察局,彰化分局,120.59235,24.036015,南北雙向,40 +彰化縣,彰化市,台74甲線3.4公里(機慢車道速限40),彰化縣警察局,彰化分局,120.59366,24.07311,南向,70 +彰化縣,彰化市,台74甲線2.2公里(機慢車道速限40),彰化縣警察局,彰化分局,120.59444,24.08222,南北雙向,70 +彰化縣,彰化市,台14線、福興路口,彰化縣警察局,彰化分局,120.62194,24.04528,東向,70 +彰化縣,鹿港鎮,台61線168.1到177公里(快速道路區間測速)(20公噸以上大貨車速限80),彰化縣警察局,鹿港分局,120.42038,24.081823,北向,90 +彰化縣,鹿港鎮,台17線31.7公里,彰化縣警察局,鹿港分局,120.44583,24.08639,北向,70 +彰化縣,鹿港鎮,台17線31.3公里(長安宮前),彰化縣警察局,鹿港分局,120.44806,24.09083,南北雙向,70 +彰化縣,鹿港鎮,鹿港鎮鹿和路2段507號前,彰化縣警察局,鹿港分局,120.46234,24.074379,東西雙向,60 +彰化縣,和美鎮,線東路五段291號南側170公尺處,彰化縣警察局,和美分局,120.48998,24.12682,南北雙向,60 +彰化縣,和美鎮,和美鎮和港路與西興路、北明路口,彰化縣警察局,和美分局,120.49588,24.114037,北向,60 +彰化縣,和美鎮,和美鎮台61乙與彰新路6段路口,彰化縣警察局,和美分局,120.50728,24.149288,東西雙向,60 +彰化縣,和美鎮,和美鎮濱海路與工一路口,彰化縣警察局,和美分局,120.5189,24.1529,路口科技執法,50 +彰化縣,和美鎮,彰美、中興路口,彰化縣警察局,和美分局,120.52417,24.09917,西向,60 +彰化縣,線西鄉,台61線170.11公里(快速道路)(20公噸以上大貨車速限80),彰化縣警察局,和美分局,120.44376,24.13864,南向,90 +彰化縣,伸港鄉,伸港鄉濱海路與工五路口,彰化縣警察局,和美分局,120.51881,24.153168,東西雙向,60 +彰化縣,福興鄉,福興鄉臨海路(台17線)與福正路口,彰化縣警察局,鹿港分局,120.420235,24.047426,南北雙向,70 +彰化縣,福興鄉,沿海路、龍舟路路口,彰化縣警察局,鹿港分局,120.431015,24.048855,西向,50 +彰化縣,福興鄉,福興鄉縣道144線與南環路口,彰化縣警察局,鹿港分局,120.44422,24.03323,東向,70 +彰化縣,福興鄉,福興鄉彰鹿路6段與彰鹿路6段314巷路口,彰化縣警察局,鹿港分局,120.462975,24.046333,西向,60 +彰化縣,福興鄉,番花路1段885號前(縣道),彰化縣警察局,鹿港分局,120.47009,24.019672,由西往東,60 +彰化縣,福興鄉,台19線、番花路口,彰化縣警察局,鹿港分局,120.48861,24.01611,南向,60 +彰化縣,秀水鄉,彰鹿路、民意街口,彰化縣警察局,鹿港分局,120.49667,24.050226,東西雙向,60 +彰化縣,秀水鄉,彰水路1段台19線、安鶴路口,彰化縣警察局,鹿港分局,120.51111,24.05056,北向,60 +彰化縣,花壇鄉,台1線194.496K(省道),彰化縣警察局,彰化分局,120.53299,24.050976,南向,70 +彰化縣,花壇鄉,台1線198.4公里,彰化縣警察局,彰化分局,120.53889,24.02694,南北雙向,70 +彰化縣,花壇鄉,中山路1段95號(福安宮前),彰化縣警察局,彰化分局,120.54389,24.02167,北向,70 +彰化縣,花壇鄉,台74甲線與彰員路口(機慢車道速限40),彰化縣警察局,彰化分局,120.55556,24.02333,南北雙向,70 +彰化縣,花壇鄉,花壇鄉台74甲線與灣福路口(機慢車道速限40),彰化縣警察局,彰化分局,120.57299,24.031174,南北雙向,70 +彰化縣,芬園鄉,彰化縣縣道139線8.537K處,彰化縣警察局,彰化分局,120.593895,24.03417,南北雙向,40 +彰化縣,芬園鄉,彰南路5段與環中路9段路口(省道),彰化縣警察局,彰化分局,120.622215,24.043566,由南往北,70 +彰化縣,芬園鄉,芬園鄉大彰路與縣安路口,彰化縣警察局,彰化分局,120.62687,24.010653,東向,50 +彰化縣,員林市,員林市員埔路與三潭巷路口,彰化縣警察局,員林分局,120.557594,23.971558,東西雙向,60 +彰化縣,員林市,莒光路、員鹿路路口,彰化縣警察局,員林分局,120.56619,23.957155,南向,60 +彰化縣,員林市,員林市萬年路3段與靜修路口,彰化縣警察局,員林分局,120.57383,23.962563,北向,50 +彰化縣,員林市,員林大道(30米外環道)、員集路口,彰化縣警察局,員林分局,120.57598,23.947823,西向,50 +彰化縣,員林市,員林市東彰路與員集路口,彰化縣警察局,員林分局,120.57929,23.92596,東西雙向,70 +彰化縣,溪湖鎮,溪湖鎮彰水路台19線、海豐路口,彰化縣警察局,溪湖分局,120.48286,23.93747,南向,70 +彰化縣,田中鎮,田中鎮斗中路與大社南路(彰95高鐵站連接道路)路口,彰化縣警察局,田中分局,120.57679,23.86265,西向,60 +彰化縣,田中鎮,縣141線13.3公里南下,彰化縣警察局,田中分局,120.59444,23.84583,南向,60 +彰化縣,大村鄉,台1線201.4公里,彰化縣警察局,員林分局,120.56194,23.94417,南北雙向,70 +彰化縣,埔鹽鄉,埔鹽鄉彰水路二段與中山路口,彰化縣警察局,溪湖分局,120.47615,23.997437,北向,60 +彰化縣,埔心鄉,埔心鄉員林大道(30米外環道)與員鹿路路口,彰化縣警察局,溪湖分局,120.56222,23.95708,南向,50 +彰化縣,永靖鄉,永靖鄉中山路1段與中山路1段 351巷路口,彰化縣警察局,員林分局,120.54631,23.922073,南向,70 +彰化縣,社頭鄉,永靖鄉東彰路7段與湳底路口,彰化縣警察局,田中分局,120.5705,23.911493,往南,70 +彰化縣,社頭鄉,社頭鄉員集路(縣141線)與崙饒口,彰化縣警察局,田中分局,120.576904,23.935686,南北雙向,50 +彰化縣,社頭鄉,社頭鄉 中山路與和平三路口,彰化縣警察局,田中分局,120.58377,23.893862,南北雙向,60 +彰化縣,社頭鄉,縣141線6.6公里北上,彰化縣警察局,田中分局,120.585,23.86278,北向,60 +彰化縣,二水鄉,縣152線與二水鄉外環道(外環道路口),彰化縣警察局,田中分局,120.61972,23.80611,南向,50 +彰化縣,二水鄉,二水鄉縣141線21.594公里(二水鄉南通路二段398號對面),彰化縣警察局,田中分局,120.62801,23.801483,南向,60 +彰化縣,二水鄉,縣152線與二水鄉外環道(往名間方向),彰化縣警察局,田中分局,120.67444,23.81694,南向,50 +彰化縣,北斗鎮,斗苑路2段、斗苑路2段307巷口,彰化縣警察局,北斗分局,120.51024,23.878145,東西雙向,60 +彰化縣,二林鎮,二林鎮太平路與修心路口(縣道),彰化縣警察局,芳苑分局,120.411224,23.918367,由西往東,60 +彰化縣,田尾鄉,台1線214.6公里南下,彰化縣警察局,北斗分局,120.50639,23.86167,南向,50 +彰化縣,田尾鄉,台1線214公里北上,彰化縣警察局,北斗分局,120.50722,23.8625,北向,70 +彰化縣,埤頭鄉,彰水路、庄子路口,彰化縣警察局,北斗分局,120.46079,23.894117,北向,70 +彰化縣,埤頭鄉,台19線25.3公里北上東外環,彰化縣警察局,北斗分局,120.46972,23.89861,北向,70 +彰化縣,埤頭鄉,埤頭鄉東環路與庄子路282巷路口,彰化縣警察局,北斗分局,120.476715,23.896597,南向,70 +彰化縣,埤頭鄉,埤頭鄉斗苑東路與中南路口,彰化縣警察局,北斗分局,120.47823,23.889475,西向,60 +彰化縣,埤頭鄉,埤頭鄉縣152線16.5公里,彰化縣警察局,北斗分局,120.53134,23.832464,東西雙向,60 +彰化縣,芳苑鄉,台17線與新上路口,彰化縣警察局,芳苑分局,120.311615,23.904112,南向,70 +彰化縣,芳苑鄉,台17線59.3公里(芳苑鄉芳新路芳苑段801號),彰化縣警察局,芳苑分局,120.312164,23.915792,南北雙向,70 +彰化縣,芳苑鄉,芳苑鄉斗苑路頂後段與路平路口,彰化縣警察局,芳苑分局,120.340614,23.910868,東西雙向,60 +彰化縣,芳苑鄉,台17線、中正路口,彰化縣警察局,芳苑分局,120.34302,23.971603,北向,70 +彰化縣,竹塘鄉,竹塘鄉中央路二段大湖路口,彰化縣警察局,芳苑分局,120.42628,23.862356,南向,70 +彰化縣,溪州鄉,台1線219.7公里(溪洲外環道),彰化縣警察局,北斗分局,120.47028,23.83444,北向,70 +彰化縣,溪州鄉,台1線218.4公里處(溪州鄉中山路4段287號),彰化縣警察局,北斗分局,120.48311,23.848318,南北雙向,70 +南投縣,南投市,139線35.95公里處,南投縣政府警察局,南投分局,120.637566,23.91971,北向南,50 +南投縣,南投市,南投市139丙線0.5公里處,南投縣政府警察局,南投分局,120.66724,23.914396,南北雙向,50 +南投縣,南投市,南投市南崗三路及成功三路口,南投縣政府警察局,南投分局,120.66728,23.930708,南北雙向,60 +南投縣,南投市,華陽路850號前,南投縣政府警察局,南投分局,120.678246,23.930109,南北雙向,60 +南投縣,南投市,南投市南崗一路與民族路口,南投縣政府警察局,南投分局,120.67985,23.90651,南北雙向,60 +南投縣,南投市,東閔路1.35公里,南投縣政府警察局,中興分局,120.686226,23.93615,南北雙向,60 +南投縣,南投市,臺3線215.5公里,南投縣政府警察局,南投分局,120.68987,23.888296,南北雙向,60 +南投縣,南投市,南投市臺14乙線及南陽路口,南投縣政府警察局,南投分局,120.690674,23.907316,南北雙向,50 +南投縣,南投市,名間鄉臺16線及臺3線路口,南投縣政府警察局,南投分局,120.71021,23.832108,東西雙向,60 +南投縣,埔里鎮,臺21線49.9公里,南投縣政府警察局,埔里分局,120.93764,23.948853,南向北,60 +南投縣,埔里鎮,埔里鎮中山路三段、鐵山路、大城路及蘭陽街口,南投縣政府警察局,埔里分局,120.94789,23.97118,東北雙向,50 +南投縣,埔里鎮,埔里鎮信義路、中山路三段與南安路口闖紅燈、未依標線指示行駛及測速,南投縣政府警察局,埔里分局,120.95306,23.970133,東西雙向,50 +南投縣,埔里鎮,埔里鎮中山路三段與大城路口,南投縣政府警察局,埔里分局,120.95886,23.968464,東西雙向,40 +南投縣,埔里鎮,埔里鎮和平東路與中正路口闖紅燈、違規停(臨)車、未依標線指示行駛、測速,南投縣政府警察局,埔里分局,120.97403,23.956371,東西雙向,50 +南投縣,埔里鎮,埔里鎮中山路一段及信義路口,南投縣政府警察局,埔里分局,120.97911,23.9741,東西雙向,50 +南投縣,草屯鎮,臺14乙線5.9公里,南投縣政府警察局,草屯分局,120.65508,23.963615,南北雙向,70 +南投縣,草屯鎮,草屯鎮新豐路、博愛路及仁愛街口,南投縣政府警察局,草屯分局,120.67889,23.986898,東西雙向,60 +南投縣,草屯鎮,臺63甲線1.2公里,南投縣政府警察局,草屯分局,120.67963,23.996204,南北雙向,60 +南投縣,草屯鎮,草屯鎮成功路、草溪路及中興路口,南投縣政府警察局,草屯分局,120.68033,23.974607,南北雙向,60 +南投縣,草屯鎮,草屯鎮成功路及博愛路口,南投縣政府警察局,草屯分局,120.68294,23.986221,西南雙向,60 +南投縣,草屯鎮,草屯鎮臺3甲、太平路及中興路口,南投縣政府警察局,草屯分局,120.68397,23.974297,東西雙向,50 +南投縣,草屯鎮,草屯鎮中正路與博愛路口,南投縣政府警察局,草屯分局,120.68671,23.98525,東西雙向,60 +南投縣,草屯鎮,草屯鎮富林路一段579號,南投縣政府警察局,草屯分局,120.69073,23.971088,東西雙向,40 +南投縣,草屯鎮,草屯鎮中正路與大覺路口,南投縣政府警察局,草屯分局,120.69453,24.004614,南北雙向,60 +南投縣,草屯鎮,臺14線富功國小前,南投縣政府警察局,草屯分局,120.69843,23.97888,東向西,50 +南投縣,草屯鎮,東草屯交流道永安路1.8公里闖紅燈、未依標線指示行駛及測速,南投縣政府警察局,草屯分局,120.722466,23.996405,南北雙向,50 +南投縣,竹山鎮,大明路與前山路口闖紅燈及未依標線指示行駛,南投縣政府警察局,竹山分局,120.6793,23.757366,南向北,60 +南投縣,竹山鎮,大明路與枋坪巷口(克明宮前),南投縣政府警察局,竹山分局,120.682755,23.759756,東西雙向,60 +南投縣,竹山鎮,竹山鎮集山路三段與大智路口,南投縣政府警察局,竹山分局,120.69381,23.7613,東西雙向,60 +南投縣,竹山鎮,社寮產業運輸道路2.15公里處,南投縣政府警察局,竹山分局,120.705376,23.808374,南北雙向,40 +南投縣,竹山鎮,臺3線227.7公里,南投縣政府警察局,竹山分局,120.70938,23.789066,南北雙向,60 +南投縣,竹山鎮,社寮產業運輸道路4.5公里處,南投縣政府警察局,竹山分局,120.72166,23.82349,南北雙向,40 +南投縣,集集鎮,臺16線2.37公里,南投縣政府警察局,集集分局,120.730965,23.834896,東西雙向,70 +南投縣,集集鎮,臺16線4.8公里闖紅燈、未依標線指示行駛及測速,南投縣政府警察局,集集分局,120.75247,23.828299,東向西,70 +南投縣,集集鎮,臺16線與集鹿路口,南投縣政府警察局,集集分局,120.78453,23.822039,東西雙向,70 +南投縣,名間鄉,彰南路與名松路一段路口,南投縣政府警察局,南投分局,120.69959,23.842667,南北雙向,60 +南投縣,鹿谷鄉,鹿谷鄉151線10.07公里處,南投縣政府警察局,竹山分局,120.768555,23.73256,南北雙向,50 +南投縣,中寮鄉,中寮鄉139線47.5公里處,南投縣政府警察局,草屯分局,120.71774,23.894646,東西雙向,50 +南投縣,魚池鄉,魚池鄉臺21線53.9K至51.1K(區間測速),南投縣政府警察局,集集分局,120.92913,23.94172,南北雙向,60 +南投縣,國姓鄉,國姓鄉臺14線40.1公里處,南投縣政府警察局,埔里分局,120.84806,24.01532,南北雙向,70 +南投縣,水里鄉,水里鄉臺16線27.5公里,南投縣政府警察局,集集分局,120.927956,23.79456,南北,30 +南投縣,信義鄉,臺21線93.1公里處(臺21線與敦福路口),南投縣政府警察局,信義分局,120.87654,23.662935,南向北,50 +南投縣,仁愛鄉,仁愛鄉臺14線70.7公里處,南投縣政府警察局,仁愛分局,121.084465,24.002531,東西雙向,50 +南投縣,仁愛鄉,臺14甲線7.95公里處,南投縣政府警察局,仁愛分局,121.15568,24.045826,北向南,30 +雲林縣,,臺61線南下218k+250m至226k+250m(區間平均速率自動偵測照相系統路段),雲林縣警察局,臺西分局,120.27286,23.774952,南下,90 +雲林縣,斗六市,台1丁線公路與久安路口,雲林縣警察局,斗六分局,120.50823,23.691448,西向東,70 +雲林縣,斗六市,斗六市明德路與公明路路口,雲林縣警察局,斗六分局,120.532234,23.69978,東向西,50 +雲林縣,斗六市,大學路與雲林科技大學前路口,雲林縣警察局,斗六分局,120.53308,23.695944,西向東,60 +雲林縣,斗六市,斗六市大學路與中山路路口,雲林縣警察局,斗六分局,120.53748,23.696798,西向東,60 +雲林縣,斗六市,斗六市大學路與鎮南路路口,雲林縣警察局,斗六分局,120.542336,23.697744,西向東,60 +雲林縣,斗六市,台3線公路252k+65m處,雲林縣警察局,斗六分局,120.54649,23.699762,南向北,60 +雲林縣,斗六市,斗六市明德北路與育英北街路口,雲林縣警察局,斗六分局,120.55062,23.717327,東向西,60 +雲林縣,斗六市,154乙縣道13k+200m處(環科大前),雲林縣警察局,斗六分局,120.55256,23.680202,南北雙向,60 +雲林縣,斗六市,斗六市台3線公路與成功路口,雲林縣警察局,斗六分局,120.55346,23.702805,南向北,70 +雲林縣,斗六市,斗六市雲科路一段與科班路路口(158縣道43.7K),雲林縣警察局,斗六分局,120.56408,23.73015,西向東,50 +雲林縣,斗六市,台3線公路248k+970m處,雲林縣警察局,斗六分局,120.568954,23.717222,南向北,60 +雲林縣,斗南鎮,台78線快速公路29k+400m處(西向東),雲林縣警察局,斗南分局,120.45189,23.673025,西向東,100 +雲林縣,斗南鎮,台78線快速公路29k+400m處(東向西),雲林縣警察局,斗南分局,120.45193,23.67321,東向西,100 +雲林縣,斗南鎮,斗南鎮延平路與大同路路口,雲林縣警察局,斗南分局,120.47628,23.676558,南向北,50 +雲林縣,斗南鎮,斗南鎮延平路與大業路路口,雲林縣警察局,斗南分局,120.479965,23.69333,南向北,60 +雲林縣,斗南鎮,斗南鎮延平路與光華路路口,雲林縣警察局,斗南分局,120.48054,23.68612,北向南,60 +雲林縣,斗南鎮,台1線公路與文昌路口(南向北),雲林縣警察局,斗南分局,120.480835,23.679546,南向北,60 +雲林縣,斗南鎮,台1線公路與文昌路口(北向南),雲林縣警察局,斗南分局,120.48086,23.68034,北向南,60 +雲林縣,斗南鎮,斗南鎮台1丁線12k+800m(新光陸橋-斗南往斗六),雲林縣警察局,斗南分局,120.49234,23.68357,西向東,60 +雲林縣,斗南鎮,斗南鎮新生二路東明橋北端,雲林縣警察局,斗南分局,120.49306,23.683113,南向北,50 +雲林縣,斗南鎮,斗南鎮台1丁線12k+700m(新光陸橋東側-斗六往斗南),雲林縣警察局,斗南分局,120.49349,23.683903,東向西,60 +雲林縣,虎尾鎮,虎尾鎮 158 縣道與雲 97 鄉道路口 (21k+630m 處),雲林縣警察局,虎尾分局,120.385086,23.708435,東向西,70 +雲林縣,虎尾鎮,科虎三路18號(元翎科技公司),保二總隊,保二三大隊,120.396,23.736464,北往南,60 +雲林縣,虎尾鎮,虎尾鎮文科路與廉使路路口,雲林縣警察局,虎尾分局,120.42356,23.717049,西向東,60 +雲林縣,虎尾鎮,虎尾鎮林森路一段與公安路口,雲林縣警察局,虎尾分局,120.4334,23.70914,北向南,50 +雲林縣,虎尾鎮,158縣道與博愛路口,雲林縣警察局,虎尾分局,120.43605,23.719143,西向東,60 +雲林縣,虎尾鎮,158縣道與林森路一段路口,雲林縣警察局,虎尾分局,120.44133,23.717178,東向西,60 +雲林縣,虎尾鎮,虎尾鎮文科路與光復路路口,雲林縣警察局,虎尾分局,120.44583,23.709593,西向東,60 +雲林縣,虎尾鎮,145乙縣道與雲71線路口前(東向西),雲林縣警察局,虎尾分局,120.458275,23.735708,東向西,60 +雲林縣,虎尾鎮,台1線公路與雲74線路口(惠來派出所前),雲林縣警察局,虎尾分局,120.488914,23.728313,南北雙向,70 +雲林縣,西螺鎮,西螺鎮 145 縣道 16k+650m 處,雲林縣警察局,西螺分局,120.425934,23.747486,南北雙向,50 +雲林縣,西螺鎮,154甲縣道1k處(高鐵橋下),雲林縣警察局,西螺分局,120.43022,23.785646,東西雙向,60 +雲林縣,西螺鎮,145縣道與福來路20巷路口(12.6k處-北向),雲林縣警察局,西螺分局,120.44506,23.778845,南向北,60 +雲林縣,西螺鎮,西螺鎮大同路與興農東(西)路口,雲林縣警察局,西螺分局,120.46766,23.795057,東西雙向,50 +雲林縣,西螺鎮,台1線公路與振興路口(北向南),雲林縣警察局,西螺分局,120.47047,23.790655,北向南,50 +雲林縣,西螺鎮,台1線公路與振興路口(南向北),雲林縣警察局,西螺分局,120.47076,23.79007,南向北,50 +雲林縣,土庫鎮,158縣道18k處,雲林縣警察局,虎尾分局,120.35221,23.701073,西向東,70 +雲林縣,土庫鎮,145縣道29k處(土庫外環道),雲林縣警察局,虎尾分局,120.38855,23.670492,南北雙向,60 +雲林縣,土庫鎮,土庫鎮建國路與林森路路口,雲林縣警察局,虎尾分局,120.395,23.679155,南向北,50 +雲林縣,北港鎮,台19線公路與145線道路口,雲林縣警察局,北港分局,120.2994,23.583763,北向南,50 +雲林縣,北港鎮,北港鎮145縣道40k+750m處,雲林縣警察局,北港分局,120.32356,23.596136,南北雙向,60 +雲林縣,大埤鄉,大埤鄉157線公路2k+130m,雲林縣警察局,斗南分局,120.45549,23.658314,南北雙向,60 +雲林縣,大埤鄉,台1線公路247k+500m處(豐田段),雲林縣警察局,斗南分局,120.46827,23.63372,南向北,70 +雲林縣,大埤鄉,台1線公路246k+400m處(豐田段),雲林縣警察局,斗南分局,120.46946,23.639185,北向南,70 +雲林縣,莿桐鄉,台1線公路235k+592m處,雲林縣警察局,斗六分局,120.494446,23.742592,南北雙向,60 +雲林縣,莿桐鄉,台1線公路與中正路口,雲林縣警察局,斗六分局,120.49677,23.75775,北向南,70 +雲林縣,莿桐鄉,156縣道與莿桐外環道(孩沙里)路口,雲林縣警察局,斗六分局,120.506424,23.766708,北向南,60 +雲林縣,莿桐鄉,台1丁線公路與農校路口,雲林縣警察局,斗六分局,120.508675,23.750402,北向南,60 +雲林縣,林內鄉,台3線公路238k+268m處,雲林縣警察局,斗六分局,120.644,23.770504,南向北,60 +雲林縣,二崙鄉,二崙鄉台19線公路40km+200m,雲林縣警察局,西螺分局,120.38286,23.800879,南北雙向,60 +雲林縣,二崙鄉,二崙鄉裕民路,雲林縣警察局,西螺分局,120.40996,23.755796,南北雙向,50 +雲林縣,崙背鄉,崙背鄉156縣道7k+700m,雲林縣警察局,西螺分局,120.33265,23.767534,東西雙向,60 +雲林縣,麥寮鄉,工業路與雲3號路口(西向東),雲林縣警察局,臺西分局,120.2346,23.792048,西向東,60 +雲林縣,麥寮鄉,工業路與4k+500m處路口,雲林縣警察局,臺西分局,120.23678,23.79157,西向東,70 +雲林縣,麥寮鄉,麥寮鄉台17線公路與工業路口,雲林縣警察局,臺西分局,120.27038,23.789198,西向東,70 +雲林縣,麥寮鄉,台17線公路與工業路口,雲林縣警察局,臺西分局,120.271,23.788769,南向北,60 +雲林縣,麥寮鄉,台17線公路與154縣道路口(橋頭),雲林縣警察局,臺西分局,120.278656,23.796333,北向南,60 +雲林縣,東勢鄉,雲113公路湖東橋前路段,雲林縣警察局,臺西分局,120.24066,23.655548,東向西,60 +雲林縣,東勢鄉,新坤路與158甲縣道路口,雲林縣警察局,臺西分局,120.253296,23.721405,北向南,60 +雲林縣,東勢鄉,東勢鄉 153 縣道安南與昌南路口 (4k+700m 處),雲林縣警察局,臺西分局,120.25464,23.698496,南向北,60 +雲林縣,東勢鄉,153縣道1k處,雲林縣警察局,臺西分局,120.25528,23.738638,北向南,60 +雲林縣,東勢鄉,東勢鄉153縣道與158甲縣道路口,雲林縣警察局,臺西分局,120.25655,23.721605,北向南,60 +雲林縣,東勢鄉,153線與158甲線縣道路口,雲林縣警察局,臺西分局,120.25662,23.720882,南向北,60 +雲林縣,東勢鄉,153縣道嘉勝路與守密街路口(南向),雲林縣警察局,臺西分局,120.25901,23.665485,北向南,50 +雲林縣,東勢鄉,台78線快速公路13k處(西向東),雲林縣警察局,臺西分局,120.30067,23.684862,西向東,100 +雲林縣,東勢鄉,台78線快速公路13k處(東向西),雲林縣警察局,臺西分局,120.3066,23.685007,東向西,100 +雲林縣,褒忠鄉,台19線公路53k+500m處,雲林縣警察局,虎尾分局,120.324425,23.708206,南北雙向,70 +雲林縣,臺西鄉,155縣道民權路47-8號前,雲林縣警察局,臺西分局,120.20016,23.703785,北向南,50 +雲林縣,臺西鄉,155縣道4k+800m處,雲林縣警察局,臺西分局,120.20882,23.669996,南北雙向,60 +雲林縣,臺西鄉,臺西鄉台61線快速道路226K+850m,雲林縣警察局,臺西分局,120.220314,23.727283,北向,90 +雲林縣,元長鄉,元長鄉台19線64k+450m,雲林縣警察局,虎尾分局,120.30748,23.611443,南北雙向,60 +雲林縣,元長鄉,160縣道20k+947m處(子茂段),雲林縣警察局,虎尾分局,120.337105,23.658632,東西雙向,60 +雲林縣,四湖鄉,155線四湖國中前,雲林縣警察局,臺西分局,120.22754,23.630302,北向南,60 +雲林縣,四湖鄉,四湖鄉 160 縣道 12k+600m 處,雲林縣警察局,臺西分局,120.26395,23.647627,東西雙向,60 +雲林縣,口湖鄉,口湖鄉台61線快速道路246K+100m,雲林縣警察局,北港分局,120.15164,23.585243,南向,90 +雲林縣,口湖鄉,台17線公路97k+842m處,雲林縣警察局,北港分局,120.16689,23.623926,南北雙向,70 +嘉義縣,太保市,台18線1.5K(往西),嘉義縣警察局,嘉縣警局交通隊,120.32873,23.472519,由東向西,70 +嘉義縣,太保市,太保市159線與嘉64線路口,嘉義縣警察局,,120.38451,23.496267,雙向,50 +嘉義縣,朴子市,朴子市光復新路與台19線路口,嘉義縣警察局,嘉縣警局交通隊,120.24383,23.455318,雙向,50 +嘉義縣,朴子市,朴子市168線與157線路口,嘉義縣警察局,嘉縣警局交通隊,120.254814,23.46616,由西往東,50 +嘉義縣,朴子市,朴子市168線與朴子七路路口,嘉義縣警察局,嘉縣警局交通隊,120.28565,23.461458,雙向,50 +嘉義縣,大林鎮,大林鎮台1線與中山路口,嘉義縣警察局,嘉縣警局交通隊,120.45609,23.606342,雙向,50 +嘉義縣,大林鎮,大林鎮162線10.953K,嘉義縣警察局,嘉縣警局交通隊,120.4908,23.604876,東西雙向,60 +嘉義縣,民雄鄉,民雄鄉164線與嘉81路口,嘉義縣警察局,嘉縣警局交通隊,120.42705,23.549925,雙向,60 +嘉義縣,民雄鄉,民雄鄉台1線258K與東榮路口,嘉義縣警察局,嘉縣警局交通隊,120.43358,23.557116,由南往北,50 +嘉義縣,民雄鄉,民雄鄉台1線與164線路口,嘉義縣警察局,嘉縣警局交通隊,120.43407,23.549187,雙向,50 +嘉義縣,民雄鄉,民雄鄉台1線255.5K(鎮北段),嘉義縣警察局,嘉縣警局交通隊,120.43957,23.578737,南北雙向,70 +嘉義縣,民雄鄉,民雄鄉台1線與中山路工業一路口,嘉義縣警察局,嘉縣警局交通隊,120.440254,23.520376,北向南,50 +嘉義縣,民雄鄉,民雄鄉166線與嘉109線路口,嘉義縣警察局,嘉縣警局交通隊,120.47472,23.522432,雙向,50 +嘉義縣,新港鄉,159線新港鄉南壇斷水月橋,嘉義縣警察局,嘉縣警局交通隊,120.32311,23.560371,東向西,60 +嘉義縣,新港鄉,159線南壇段水月橋,嘉義縣警察局,民雄分局,120.32498,23.560232,由東向西,60 +嘉義縣,新港鄉,新港鄉159線與166線路口,嘉義縣警察局,嘉縣警局交通隊,120.35586,23.523249,南向北,60 +嘉義縣,六腳鄉,六腳鄉157線29.8K(蒜頭大橋),嘉義縣警察局,嘉縣警局交通隊,120.28789,23.48825,雙向,50 +嘉義縣,六腳鄉,台19線73.1K(六美國小),嘉義縣警察局,朴子分局,120.292694,23.539839,由南向北,50 +嘉義縣,東石鄉,台61線東石鄉264.336K處(往北),嘉義縣警察局,嘉縣警局交通隊,120.16569,23.441223,往北,90 +嘉義縣,東石鄉,台61線東石鄉257.31K處(往南),嘉義縣警察局,嘉縣警局交通隊,120.17244,23.503832,往南,90 +嘉義縣,東石鄉,台82線4.65K,嘉義縣警察局,朴子分局,120.19099,23.45666,雙向,70 +嘉義縣,東石鄉,東石鄉157線與嘉7線路口,嘉義縣警察局,嘉縣警局交通隊,120.21225,23.462511,雙向,50 +嘉義縣,鹿草鄉,鹿草鄉163線21.65K,嘉義縣警察局,嘉縣警局交通隊,120.30153,23.398693,雙向,50 +嘉義縣,水上鄉,水上鄉台1線277.51K(南靖段),嘉義縣警察局,嘉縣警局交通隊,120.38366,23.40862,南北雙向,70 +嘉義縣,水上鄉,水上鄉台1線275.3K龍德路口,嘉義縣警察局,水上分局,120.39391,23.426891,由北往南,50 +嘉義縣,水上鄉,水上鄉台1線與168線路口,嘉義縣警察局,,120.39813,23.433348,雙向,50 +嘉義縣,中埔鄉,中埔鄉忠義路與大義路口,嘉義縣警察局,嘉縣警局交通隊,120.47146,23.459585,雙向,50 +嘉義縣,中埔鄉,番路鄉台18線30.02K日安社區路口,嘉義縣警察局,中埔分局,120.56846,23.45109,由東往西,60 +嘉義縣,中埔鄉,中埔鄉台3線305.8K,嘉義縣警察局,,120.57901,23.382618,雙向,40 +嘉義縣,梅山鄉,台3線272.2K(大南國小),嘉義縣警察局,竹崎分局,120.553925,23.558527,由北向南,60 +嘉義縣,大埔鄉,曾文水庫道路9.8k,保七總隊,保七二大隊,120.53687,23.24949,西向,40 +屏東縣,屏東市,堤防路段南北雙向,屏東縣政府警察局,屏東分局,120.447914,22.673306,南北雙向,60 +屏東縣,屏東市,189線10.1K大溪路口南下,屏東縣政府警察局,屏東分局,120.45391,22.639193,北向南,70 +屏東縣,屏東市,高屏大橋屏東端南北雙向,屏東縣政府警察局,屏東分局,120.45488,22.652136,南北雙向,70 +屏東縣,屏東市,台1線建國路與和生路口,屏東縣政府警察局,屏東分局,120.4657,22.655245,南向,70 +屏東縣,屏東市,屏東市機場北路500號前,屏東縣政府警察局,屏東分局,120.47138,22.686283,雙向,40 +屏東縣,屏東市,屏東市屏42線4.6K機場北路段,屏東縣政府警察局,屏東分局,120.47336,22.67714,南北雙向,40 +屏東縣,屏東市,台27線62.1K公館外環道南北雙向,屏東縣政府警察局,屏東分局,120.482124,22.619041,南北雙向,60 +屏東縣,屏東市,台27線59.73K復興南路與公成路南北雙向,屏東縣政府警察局,屏東分局,120.48557,22.640203,南北雙向,70 +屏東縣,屏東市,屏東市逢甲路與復興路口,屏東縣政府警察局,屏東分局,120.48883,22.67112,北向,50 +屏東縣,屏東市,屏東市復興北路與逢甲路口,屏東縣政府警察局,屏東分局,120.48896,22.671589,南向,50 +屏東縣,屏東市,屏東市中正路與勝利路口,屏東縣政府警察局,屏東分局,120.49087,22.678587,北向,50 +屏東縣,屏東市,屏東市中正路與勝利路口,屏東縣政府警察局,屏東分局,120.49098,22.679312,南向,50 +屏東縣,屏東市,台3線429.8K忠孝路段南北雙向,屏東縣政府警察局,,120.49361,22.695242,南北雙向,70 +屏東縣,屏東市,屏東市和生路一段與工業六路口南下,屏東縣政府警察局,屏東分局,120.497734,22.654818,北向南,60 +屏東縣,屏東市,屏東市台3線428.15K處,屏東縣政府警察局,屏東分局,120.499374,22.70581,雙向,70 +屏東縣,屏東市,屏東市台3線428.15K處,屏東縣政府警察局,屏東分局,120.499374,22.70581,雙向,70 +屏東縣,屏東市,台3線428.8K海豐果菜市場附近南北雙向,屏東縣政府警察局,屏東分局,120.49994,22.70484,南北雙向,70 +屏東縣,屏東市,屏東市民生路與瑞民路口,屏東縣政府警察局,屏東分局,120.50624,22.662788,雙向,50 +屏東縣,屏東市,屏東市民生東路與安心四橫巷口,屏東縣政府警察局,,120.51235,22.65938,南往北,50 +屏東縣,屏東市,屏東市民生東路與安心四橫巷口,屏東縣政府警察局,屏東分局,120.51235,22.65938,南向北,50 +屏東縣,屏東市,屏東市屏17線10K,屏東縣政府警察局,屏縣警局交通隊,120.51959,22.702332,南北雙向,60 +屏東縣,潮州鎮,台一線417.5K潮州段南北雙向,屏東縣政府警察局,潮州分局,120.54044,22.53663,南北雙向,70 +屏東縣,潮州鎮,屏85線與屏83線路口南下,屏東縣政府警察局,潮州分局,120.54082,22.56965,北向南,60 +屏東縣,潮州鎮,台一線415K南北雙向,屏東縣政府警察局,潮州分局,120.55583,22.55167,南北雙向,70 +屏東縣,潮州鎮,潮州鎮185甲線15.62K處,屏東縣政府警察局,,120.58669,22.542807,雙向,60 +屏東縣,東港鎮,大鵬灣環灣道路3K南北雙向處,屏東縣政府警察局,東港分局,120.4703,22.440039,南北雙向處,40 +屏東縣,東港鎮,中正路三段與新厝路,屏東縣政府警察局,東港分局,120.478874,22.491724,東向西,60 +屏東縣,東港鎮,台17線258.5K東港大鵬灣段南北雙向,屏東縣政府警察局,東港分局,120.481926,22.456896,南北雙向,70 +屏東縣,東港鎮,大鵬灣環灣道路12K處南北雙向,屏東縣政府警察局,東港分局,120.49351,22.441694,南北雙向,40 +屏東縣,恆春鎮,台26線20K省北路二段南北雙向,屏東縣政府警察局,恆春分局,120.7301,22.045582,南北雙向,70 +屏東縣,恆春鎮,台26線22.9K南北雙向,屏東縣政府警察局,恆春分局,120.74307,22.024391,北向南,60 +屏東縣,恆春鎮,台26線28.8公里處南北雙向,屏東縣政府警察局,恆春分局,120.75299,21.97737,南北雙向,70 +屏東縣,恆春鎮,台26線28K核三廠前北上,屏東縣政府警察局,恆春分局,120.7586,21.96524,南向北,70 +屏東縣,恆春鎮,台26線31.11K南灣段,屏東縣政府警察局,恆春分局,120.76714,21.958733,南北雙向,60 +屏東縣,萬丹鄉,萬丹鄉188線16.65K萬順路一段東西雙向,屏東縣政府警察局,屏東分局,120.483116,22.568169,東西雙向,50 +屏東縣,萬丹鄉,萬丹鄉西環路與和平西路口,屏東縣政府警察局,屏東分局,120.48716,22.589525,北向南,50 +屏東縣,萬丹鄉,台27線65.6K丹榮路段南北雙向,屏東縣政府警察局,屏東分局,120.49234,22.589718,南北雙向,70 +屏東縣,萬丹鄉,萬丹鄉187甲線14.67K大學路段南北雙向,屏東縣政府警察局,屏東分局,120.49876,22.591784,南北雙向,50 +屏東縣,長治鄉,屏21線神農西路段南北雙向,屏東縣政府警察局,屏東分局,120.53357,22.712818,南北雙向,50 +屏東縣,長治鄉,屏21線農科路與神農西路口,屏東縣政府警察局,屏東分局,120.53376,22.713966,北向南,60 +屏東縣,長治鄉,屏26線神農德華路口東西雙向,屏東縣政府警察局,屏東分局,120.53903,22.716288,東西雙向,50 +屏東縣,長治鄉,台24線7.98K長治鄉中興路段東西雙向,屏東縣政府警察局,屏東分局,120.54267,22.693243,東西雙向,60 +屏東縣,麟洛鄉,麟洛鄉中山路與民權路口,屏東縣政府警察局,,120.5258,22.651611,南下,50 +屏東縣,九如鄉,台3線427.4K九如機場西側外環道南下,屏東縣政府警察局,里港分局,120.48813,22.710312,北向南,60 +屏東縣,九如鄉,台3線426.3K九如玉水路段南北雙向,屏東縣政府警察局,里港分局,120.48843,22.717932,南北雙向,70 +屏東縣,九如鄉,台三線423.66K九如林森路口南下,屏東縣政府警察局,里港分局,120.48953,22.736687,北向南,50 +屏東縣,里港鄉,台3線里港鄉420.5K處南北雙向,屏東縣政府警察局,里港分局,120.49375,22.769915,南北雙向,50 +屏東縣,里港鄉,里港鄉台3線418.9K鐵店路口南下,屏東縣政府警察局,里港分局,120.498055,22.778225,北向南,50 +屏東縣,里港鄉,里港鄉台3線415.7K北向,屏東縣政府警察局,里港分局,120.50132,22.803162,南往北,50 +屏東縣,里港鄉,里港鄉台3線415.7K南向,屏東縣政府警察局,里港分局,120.50132,22.803162,北往南,60 +屏東縣,里港鄉,台3線414.7K土庫段南北雙向,屏東縣政府警察局,里港分局,120.506744,22.816883,南北雙向,50 +屏東縣,鹽埔鄉,台27線45K鹽埔彭厝路段南北雙向,屏東縣政府警察局,里港分局,120.55449,22.74935,南北雙向,60 +屏東縣,鹽埔鄉,台24線14.87K東西雙向,屏東縣政府警察局,屏東分局,120.59917,22.718996,東西雙向,70 +屏東縣,高樹鄉,高樹鄉185線0.95K處,屏東縣政府警察局,里港分局,120.64389,22.871248,南北雙向,50 +屏東縣,萬巒鄉,萬巒鄉185線39.43K處,屏東縣政府警察局,,120.620445,22.59836,雙向,60 +屏東縣,內埔鄉,台一線405.4K內埔豐田段南北雙向,屏東縣政府警察局,內埔分局,120.55209,22.626106,南北雙向,70 +屏東縣,內埔鄉,台1線408.7公里學人路段,屏東縣政府警察局,內埔分局,120.5597,22.599407,北向南,50 +屏東縣,內埔鄉,台1線408.7公里學人路段,屏東縣政府警察局,內埔分局,120.5597,22.599407,南向北,50 +屏東縣,內埔鄉,內埔屏光路與復興路口,屏東縣政府警察局,內埔分局,120.55973,22.608566,北向南,70 +屏東縣,內埔鄉,屏東縣187丙線17.4K科大路南北雙向,屏東縣政府警察局,內埔分局,120.578575,22.644043,南北雙向,60 +屏東縣,竹田鄉,189線20.1K大湖橋北上,屏東縣政府警察局,潮州分局,120.510124,22.579426,南向北,70 +屏東縣,竹田鄉,台88線20.6K快速道路南下,屏東縣政府警察局,潮州分局,120.522575,22.570126,北向南,90 +屏東縣,竹田鄉,台88線20.6K快速道路北上,屏東縣政府警察局,潮州分局,120.52277,22.570349,南向北,90 +屏東縣,竹田鄉,台一線410.97K水源路段南北雙向,屏東縣政府警察局,潮州分局,120.54868,22.582087,南北雙向,70 +屏東縣,新埤鄉,新埤鄉189線31.85K北向,屏東縣政府警察局,潮州分局,120.54937,22.48785,北向,50 +屏東縣,新埤鄉,新埤鄉189線31.85K南向,屏東縣政府警察局,潮州分局,120.54937,22.48785,南向,60 +屏東縣,新埤鄉,新埤鄉屏112線2.58K處,屏東縣政府警察局,潮州分局,120.5725,22.504642,雙向,50 +屏東縣,新埤鄉,新埤鄉185線50.56K處,屏東縣政府警察局,,120.600334,22.512333,雙向,50 +屏東縣,新埤鄉,新埤鄉185線56.9K處,屏東縣政府警察局,屏縣警局交通隊,120.60919,22.46825,雙向,60 +屏東縣,枋寮鄉,台一線435.6k南北雙向,屏東縣政府警察局,枋寮分局,120.59174,22.394459,北向南,70 +屏東縣,枋寮鄉,枋寮鄉185線62.62K處,屏東縣政府警察局,,120.60589,22.42014,雙向,60 +屏東縣,新園鄉,台17線253.5K與學仁路口北上,屏東縣政府警察局,東港分局,120.4554,22.487032,南向北,70 +屏東縣,新園鄉,台17線東港大橋端,屏東縣政府警察局,東港分局,120.45672,22.480722,南向北,50 +屏東縣,新園鄉,台27線74.3K興安段北向,屏東縣政府警察局,東港分局,120.46287,22.524467,南向北,60 +屏東縣,新園鄉,台27線74.3K興安段南向,屏東縣政府警察局,東港分局,120.46287,22.524467,北向南,70 +屏東縣,新園鄉,台27線71.1K仙公廟南北雙向,屏東縣政府警察局,東港分局,120.46594,22.551575,南北雙向,60 +屏東縣,崁頂鄉,崁頂鄉187線32K南北雙向,屏東縣政府警察局,東港分局,120.49575,22.501558,南北雙向,50 +屏東縣,崁頂鄉,屏75線3.8K與崁頂南二高平面道路路口南下,屏東縣政府警察局,東港分局,120.51875,22.541096,北向南,50 +屏東縣,崁頂鄉,屏75線3.9K與崁頂南二高平面道路路口北上,屏東縣政府警察局,東港分局,120.51883,22.54065,南向北,50 +屏東縣,南州鄉,南州鄉187乙線19.66K處,屏東縣政府警察局,東港分局,120.49082,22.485254,雙向,60 +屏東縣,南州鄉,187乙線南州鄉勝利路段,屏東縣政府警察局,東港分局,120.52966,22.48964,西向東,50 +屏東縣,佳冬鄉,台一線428.9k南北雙向,屏東縣政府警察局,枋寮分局,120.55739,22.44863,南向北,70 +屏東縣,佳冬鄉,台1線429.5K-433K戰備跑道南向(區間測速),屏東縣政府警察局,枋寮分局,120.56299,22.442354,南向,70 +屏東縣,佳冬鄉,佳和路與佳農路口,屏東縣政府警察局,枋寮分局,120.56386,22.409676,南向北,60 +屏東縣,佳冬鄉,台一線431.07K戰備道南北雙向,屏東縣政府警察局,枋寮分局,120.57348,22.431042,南北雙向,70 +屏東縣,佳冬鄉,台1線433K-429.5K戰備跑道北向(區間測速),屏東縣政府警察局,枋寮分局,120.58444,22.416803,北向,70 +屏東縣,車城鄉,台26線16.5K車城分駐所前南下,屏東縣政府警察局,恆春分局,120.71401,22.072859,北向南,50 +屏東縣,滿州鄉,滿州鄉屏200線8.2K處,屏東縣政府警察局,恆春分局,120.80329,22.008698,雙向,60 +屏東縣,枋山鄉,台一線444.29K,屏東縣政府警察局,屏縣警局交通隊,120.62501,22.326096,南北雙向,70 +屏東縣,枋山鄉,台一線460.2K楓港段南北雙向,屏東縣政府警察局,枋寮分局,120.688126,22.203466,南北雙向,70 +屏東縣,枋山鄉,台26線3.7k南北雙向,屏東縣政府警察局,枋寮分局,120.69289,22.181366,北向南,70 +屏東縣,枋山鄉,台26線7.87K,屏東縣政府警察局,屏縣警局交通隊,120.70069,22.14475,北向,50 +屏東縣,枋山鄉,台26線7.87K,屏東縣政府警察局,屏縣警局交通隊,120.70069,22.14475,南向,50 +屏東縣,瑪家鄉,185線32.13K佳義路段南北雙向,屏東縣政府警察局,內埔分局,120.631424,22.662312,南北雙向,50 +屏東縣,獅子鄉,台一線447.89K內獅段南北雙向,屏東縣政府警察局,枋寮分局,120.64377,22.300001,南北雙向,70 +屏東縣,獅子鄉,台26線尖山段13.7K-8.5K北向(區間測速),屏東縣政府警察局,枋寮分局,120.70213,22.14019,北向,70 +屏東縣,獅子鄉,台26線尖山段8.4K-13.2K南向(區間測速),屏東縣政府警察局,枋寮分局,120.71747,22.09586,南向,70 +屏東縣,獅子鄉,台9線446.4K丹路外環道,屏東縣政府警察局,枋寮分局,120.74505,22.204168,雙向,40 +屏東縣,獅子鄉,台9線468.1K丹路段,屏東縣政府警察局,枋寮分局,120.74949,22.204988,東向西,40 +屏東縣,獅子鄉,台9線草埔國小前,屏東縣政府警察局,屏縣警局交通隊,120.80282,22.23517,南北雙向,40 +屏東縣,獅子鄉,獅子鄉台9線460.1K草埔橋口,屏東縣政府警察局,,120.803444,22.237247,北向,40 +屏東縣,獅子鄉,台9線草埔森永隧道437.2-434.3K北向(區間測速),屏東縣政府警察局,,120.80455,22.240208,北向,70 +屏東縣,獅子鄉,獅子鄉台9線436.53K草埔隧道南向,屏東縣政府警察局,,120.81045,22.244919,南向,70 +屏東縣,獅子鄉,獅子鄉台9線436.58K草埔隧道北向,屏東縣政府警察局,,120.81402,22.24568,北向,70 +屏東縣,獅子鄉,台9線草埔森永隧道434.4K-437.2 K南向(區間測速),屏東縣政府警察局,,120.8281,22.252628,南向,70 +臺東縣,臺東市,臺9線373.73K(建和國小前),臺東縣警察局,臺東分局,121.0496,22.716475,南北雙向,60 +臺東縣,臺東市,臺9線369.95K(蘇巴陽段),臺東縣警察局,臺東分局,121.05567,22.748358,南北雙向,70 +臺東縣,臺東市,臺11線176K(知本派出所前),臺東縣警察局,臺東分局,121.05725,22.705956,南北雙向兼闖紅燈,70 +臺東縣,臺東市,臺11線174.05K(知本開發隊),臺東縣警察局,臺東分局,121.06951,22.710464,南北雙向,50 +臺東縣,臺東市,臺9線365.23K(體育中學前),臺東縣警察局,臺東分局,121.07541,22.77143,南北雙向,60 +臺東縣,臺東市,臺9線353.21K(綠色隧道北端),臺東縣警察局,臺東分局,121.09504,22.800642,南北雙向,60 +臺東縣,臺東市,臺9線362.65K(中興陸橋南端),臺東縣警察局,臺東分局,121.10084,22.77357,南北雙向,60 +臺東縣,臺東市,臺11線170.1K(豐源大橋),臺東縣警察局,臺東分局,121.102104,22.726719,南北雙向,70 +臺東縣,臺東市,臺9線354.63K(十股段),臺東縣警察局,臺東分局,121.105995,22.79259,南北雙向,60 +臺東縣,臺東市,東49-1線與臺東市更生北路633巷路口(南王橋),臺東縣警察局,臺東分局,121.10995,22.780073,南北雙向,50 +臺東縣,臺東市,臺11線168K(台糖加油站北方),臺東縣警察局,臺東分局,121.12073,22.728771,南北雙向,70 +臺東縣,臺東市,中興路2段138巷與水防道路岔口處(太平溪右岸光明社區),臺東縣警察局,臺東分局,121.13055,22.76834,雙向測速,30 +臺東縣,臺東市,馬亨亨大道(貓山段),臺東縣警察局,臺東分局,121.13283,22.78048,東向西,60 +臺東縣,臺東市,臺9線358.75K(公東高工),臺東縣警察局,臺東分局,121.13614,22.768127,南北雙向兼闖紅燈,60 +臺東縣,臺東市,臺11線158.884K(富岡段),臺東縣警察局,臺東分局,121.18004,22.783747,南北雙向,70 +臺東縣,成功鎮,臺11線126.18K(小馬)至130.86K(北東河),臺東縣警察局,成功分局,121.32352,23.00771,雙向測速科技執法,60 +臺東縣,成功鎮,臺11線123.75K(都歷段),臺東縣警察局,成功分局,121.33215,23.027685,南北雙向,50 +臺東縣,成功鎮,臺11線114K(大同路與漢口街口),臺東縣警察局,成功分局,121.3768,23.103252,雙向測速兼北上闖紅燈,50 +臺東縣,成功鎮,臺11線112.4K(芝田段),臺東縣警察局,成功分局,121.38325,23.10879,南北雙向,50 +臺東縣,成功鎮,臺11線106.9K(美山段),臺東縣警察局,成功分局,121.39859,23.153555,南北雙向,50 +臺東縣,關山鎮,臺9線324.5K(瑞豐所前),臺東縣警察局,關山分局,121.14093,22.987513,南北雙向,60 +臺東縣,關山鎮,臺9線321.17K(月眉),臺東縣警察局,關山分局,121.15198,23.01624,南北雙向,60 +臺東縣,關山鎮,臺9線315.82K(米國學校),臺東縣警察局,關山分局,121.16925,23.061531,南北雙向,60 +臺東縣,卑南鄉,臺9乙線7.4k(利嘉段),臺東縣警察局,臺東分局,121.063995,22.775743,南北雙向,40 +臺東縣,卑南鄉,臺9線350.73k(美濃段),臺東縣警察局,臺東分局,121.090614,22.82124,南北雙向,60 +臺東縣,卑南鄉,臺9線352.33K(賓朗段),臺東縣警察局,臺東分局,121.09232,22.807804,南北雙向,60 +臺東縣,卑南鄉,臺11線152.58K(莿桐段),臺東縣警察局,臺東分局,121.185974,22.828314,南北雙向,60 +臺東縣,鹿野鄉,臺9線340.89K(鹿鳴橋北端),臺東縣警察局,關山分局,121.09514,22.893963,南北雙向,60 +臺東縣,鹿野鄉,臺9線340.37K(四維段),臺東縣警察局,關山分局,121.0965,22.898182,南北雙向,60 +臺東縣,鹿野鄉,臺9線333.85K(鹿野),臺東縣警察局,關山分局,121.13658,22.914585,南北雙向,50 +臺東縣,鹿野鄉,臺9線330.89K(永隆段),臺東縣警察局,關山分局,121.14304,22.938217,南北雙向,60 +臺東縣,池上鄉,臺9線309.21K(新興段),臺東縣警察局,關山分局,121.202835,23.107685,南北雙向,60 +臺東縣,池上鄉,臺9線307.55K(池上),臺東縣警察局,關山分局,121.21221,23.12015,南北雙向,50 +臺東縣,東河鄉,臺11線141.7K(興隆國小前),臺東縣警察局,成功分局,121.2478,22.895144,南北雙向,50 +臺東縣,東河鄉,臺11線137.48K(隆昌段),臺東縣警察局,成功分局,121.267784,22.925764,南北雙向,50 +臺東縣,東河鄉,臺11線130.81K(北東河)至126.13K(小馬),臺東縣警察局,成功分局,121.30569,22.96981,雙向測速科技執法,60 +臺東縣,長濱鄉,臺30線27.7K(玉長公路),臺東縣警察局,成功分局,121.374016,23.266714,東西雙向,50 +臺東縣,長濱鄉,臺11線97.15K(烏石鼻),臺東縣警察局,成功分局,121.41418,23.22996,南北雙向,60 +臺東縣,長濱鄉,臺11線94.42K(八桑安),臺東縣警察局,成功分局,121.41799,23.25344,南北雙向,50 +臺東縣,長濱鄉,臺11線90.95K(竹湖段),臺東縣警察局,成功分局,121.42773,23.28243,南北雙向,70 +臺東縣,長濱鄉,臺11線84.13K(長光段),臺東縣警察局,成功分局,121.46233,23.329168,南北雙向,50 +臺東縣,長濱鄉,臺11線78.3K(大俱來),臺東縣警察局,成功分局,121.47184,23.379984,南北雙向,50 +臺東縣,太麻里鄉,臺9線405.74K(大溪段),臺東縣警察局,大武分局,120.945015,22.462353,南北雙向,50 +臺東縣,太麻里鄉,臺9線398.65K(金崙大橋南端),臺東縣警察局,大武分局,120.965706,22.522211,南北雙向兼南下闖紅燈,60 +臺東縣,太麻里鄉,臺9線391.88K(新香蘭段),臺東縣警察局,大武分局,120.99005,22.575094,南北雙向,60 +臺東縣,太麻里鄉,臺9線390.32K(香蘭國小),臺東縣警察局,大武分局,120.99458,22.58744,南北雙向兼南下闖紅燈,60 +臺東縣,太麻里鄉,臺9線388.24K (太麻里街口),臺東縣警察局,大武分局,121.00136,22.60339,南北雙向,60 +臺東縣,太麻里鄉,臺9線385.38K(北里段),臺東縣警察局,大武分局,121.012535,22.626123,南北雙向,70 +臺東縣,太麻里鄉,臺9線383.65K(代天宮),臺東縣警察局,大武分局,121.0167,22.640696,南北雙向,60 +臺東縣,太麻里鄉,臺9線380.97K(華源段),臺東縣警察局,大武分局,121.028694,22.662472,南北雙向,60 +臺東縣,太麻里鄉,臺9線379.43K(三和國小),臺東縣警察局,大武分局,121.03803,22.67261,南北雙向,60 +臺東縣,太麻里鄉,臺9線378K(美和所前),臺東縣警察局,大武分局,121.043526,22.684458,南北雙向,70 +臺東縣,大武鄉,臺9線417.86K(大武國中),臺東縣警察局,大武分局,120.90737,22.363562,南北雙向兼闖紅燈,50 +臺東縣,大武鄉,臺9線415.75K(大鳥村口),臺東縣警察局,大武分局,120.91234,22.382149,南北雙向,60 +臺東縣,達仁鄉,臺9線433.72K(草埔森永隧道南下),臺東縣警察局,大武分局,120.832146,22.25845,南下兼科技執法偵測,70 +臺東縣,達仁鄉,臺9線433.72K(草埔森永隧道北上),臺東縣警察局,大武分局,120.833466,22.2591,北上兼科技執法偵測,70 +臺東縣,達仁鄉,臺9戊線9.92K(壽卡休憩亭)至3.94K森永區間測速,臺東縣警察局,大武分局,120.84108,22.254738,雙向測速科技執法,40 +臺東縣,達仁鄉,臺9戊線3.94K(森永所)至9.92K壽卡休息亭區間測速,臺東縣警察局,大武分局,120.86456,22.277948,雙向測速科技執法,40 +臺東縣,達仁鄉,臺9線427.43K(達仁消防隊旁),臺東縣警察局,大武分局,120.87637,22.293703,雙向暨科技執法偵測,70 +臺東縣,達仁鄉,臺9線426.29K(達仁圖書館),臺東縣警察局,大武分局,120.88693,22.2947,南北雙向,60 +花蓮縣,花蓮市,花蓮市中央路與中山路口,花蓮縣警察局,花蓮分局,121.59436,23.995966,南下,50 +花蓮縣,花蓮市,中央路與豐村路口,花蓮縣警察局,花蓮分局,121.599724,24.002083,北上車道,50 +花蓮縣,花蓮市,尚志路18-1號前,花蓮縣警察局,花蓮分局,121.61,23.989222,南下車道,50 +花蓮縣,花蓮市,府前路與北興路口,花蓮縣警察局,花蓮分局,121.6183,24.006317,南下,60 +花蓮縣,鳳林鎮,公正街與信義路口,花蓮縣警察局,鳳林分局,121.452415,23.74475,北上車道,70 +花蓮縣,玉里鎮,興國路與自由街口,花蓮縣警察局,玉里分局,121.32008,23.3355,南下車道,60 +花蓮縣,玉里鎮,台30線27.2K,花蓮縣警察局,玉里分局,121.369484,23.26736,東往西向,50 +花蓮縣,玉里鎮,縣道193線95.4K,花蓮縣警察局,玉里分局,121.38723,23.445353,北上車道,50 +花蓮縣,新城鄉,台9線179.02K,花蓮縣警察局,新城分局,121.608475,24.072582,北上車道,70 +花蓮縣,吉安鄉,台9丙線9.159K,花蓮縣警察局,吉安分局,121.54195,23.942873,西往東,50 +花蓮縣,吉安鄉,台9丙線7.33K,花蓮縣警察局,吉安分局,121.55067,23.954082,南下車道,50 +花蓮縣,吉安鄉,中央路與稻香路口,花蓮縣警察局,吉安分局,121.56716,23.964924,南下車道,60 +花蓮縣,吉安鄉,吉豐路與吉興路口,花蓮縣警察局,吉安分局,121.569275,23.95881,北上,60 +花蓮縣,吉安鄉,吉豐路與吉興路口,花蓮縣警察局,吉安分局,121.569275,23.95881,南下,60 +花蓮縣,吉安鄉,知卡宣大道與永華二街口,花蓮縣警察局,吉安分局,121.58009,23.940998,西往東,60 +花蓮縣,吉安鄉,中央路與建國路口,花蓮縣警察局,吉安分局,121.5879,23.987082,南下車道,50 +花蓮縣,吉安鄉,中央路與建國路口,花蓮縣警察局,吉安分局,121.58793,23.987007,北上,50 +花蓮縣,壽豐鄉,台9線211.57K,花蓮縣警察局,吉安分局,121.49324,23.845201,北上,50 +花蓮縣,壽豐鄉,台11丙線14.2K,花蓮縣警察局,吉安分局,121.50567,23.829111,北上車道,70 +花蓮縣,壽豐鄉,志學村中山路與中正路口,花蓮縣警察局,吉安分局,121.53001,23.907051,北上車道,50 +花蓮縣,壽豐鄉,臺11線24K+176.14-26K+623.9,花蓮縣警察局,吉安分局,121.56065,23.778915,南下,50 +花蓮縣,壽豐鄉,台11丙線4.4K,花蓮縣警察局,吉安分局,121.56071,23.898764,南下車道,70 +花蓮縣,壽豐鄉,臺11線26K+581.92-24K+127.73,花蓮縣警察局,吉安分局,121.56092,23.767664,北上,50 +花蓮縣,壽豐鄉,台11線23.4公里,花蓮縣警察局,吉安分局,121.56104,23.780403,南下,50 +花蓮縣,光復鄉,台9線233.92K,花蓮縣警察局,鳳林分局,121.4195,23.678417,南下車道,60 +花蓮縣,豐濱鄉,台11線43.95K,花蓮縣警察局,鳳林分局,121.534386,23.647057,北上車道,60 +花蓮縣,瑞穗鄉,台9線255.4K,花蓮縣警察局,鳳林分局,121.368385,23.498083,南下車道,70 +花蓮縣,瑞穗鄉,台9線250.8K,花蓮縣警察局,鳳林分局,121.377365,23.537682,南下,70 +花蓮縣,瑞穗鄉,臺9線248.1K,花蓮縣警察局,鳳林分局,121.381966,23.561146,南下車道,70 +花蓮縣,瑞穗鄉,台9線262.5K,花蓮縣警察局,鳳林分局,121.38253,23.56691,南下車道,60 +花蓮縣,瑞穗鄉,縣道193線89.12K,花蓮縣警察局,鳳林分局,121.3959,23.49179,西往東,50 +花蓮縣,瑞穗鄉,縣道193線89.15K,花蓮縣警察局,鳳林分局,121.396095,23.491833,東往西,50 +花蓮縣,富里鄉,台9線299.82K,花蓮縣警察局,玉里分局,121.24275,23.173555,北上車道,60 +花蓮縣,秀林鄉,台9線190.37K,花蓮縣警察局,新城分局,121.61717,23.982086,北上,50 +花蓮縣,秀林鄉,台9線166.5K,花蓮縣警察局,新城分局,121.63917,24.117222,南下車道,50 +花蓮縣,秀林鄉,台9線167.5K,花蓮縣警察局,新城分局,121.65052,24.1578,北上車道,50 +花蓮縣,秀林鄉,臺9‌線‌155K+207-‌157K+976‌(仁水隧道),花蓮縣警察局,新城分局,121.70049,24.228474,南下,50 +花蓮縣,秀林鄉,臺9‌線‌‌157K+888‌-155K+122(仁水隧道),花蓮縣警察局,新城分局,121.70073,24.228992,北上,50 +花蓮縣,秀林鄉,臺9丁線59.5K-64K,花蓮縣警察局,新城分局,121.72361,24.245474,南北雙向,40 +花蓮縣,秀林鄉,臺9‌線‌149K+257-‌151K+756、臺9‌線151K+756-153K+987‌,花蓮縣警察局,新城分局,121.72425,24.267155,南下,70 +花蓮縣,秀林鄉,臺9‌線‌151K+434-‌149K+066、臺9‌線153K+718‌-151K+434‌‌,花蓮縣警察局,新城分局,121.724724,24.266893,北上,70 +花蓮縣,秀林鄉,台9線146.272K,花蓮縣警察局,新城分局,121.750694,24.30211,北上車道,50 +澎湖縣,馬公市,縣道203線中華路與林森路口(闖紅燈),澎湖縣政府警察局,馬公分局,119.57703,23.572325,東向西,50 +澎湖縣,馬公市,縣道201線井垵段5.6K,澎湖縣政府警察局,馬公分局,119.57787,23.519863,東向西,50 +澎湖縣,馬公市,馬公市中華路與六合路岔路口(兼闖紅燈),澎湖縣政府警察局,馬公分局,119.58217,23.56999,東往西,50 +澎湖縣,馬公市,縣道205線前寮段5.8K,澎湖縣政府警察局,馬公分局,119.58419,23.553822,西向東,50 +澎湖縣,馬公市,馬公市新店路與文山路口(闖紅燈),澎湖縣政府警察局,馬公分局,119.58558,23.563847,北向南,50 +澎湖縣,馬公市,縣道204線與新店路岔路口(兼闖紅燈),澎湖縣政府警察局,馬公分局,119.58748,23.564888,東往西,50 +澎湖縣,馬公市,縣道203線西文里97-2號,澎湖縣政府警察局,馬公分局,119.58885,23.56912,東向西,50 +澎湖縣,馬公市,縣道204線中正國中前路口(闖紅燈),澎湖縣政府警察局,馬公分局,119.59828,23.55948,東向西,50 +澎湖縣,馬公市,縣道203線與東衛岔路口(兼闖紅燈),澎湖縣政府警察局,馬公分局,119.59869,23.569029,東往西,50 +澎湖縣,馬公市,縣道204線光華段2.6K,澎湖縣政府警察局,馬公分局,119.603134,23.557316,西向東,50 +澎湖縣,馬公市,縣道201線鐵線段1.95K,澎湖縣政府警察局,馬公分局,119.60335,23.536844,南向北,70 +澎湖縣,馬公市,縣道203線安宅段5.3K,澎湖縣政府警察局,馬公分局,119.60373,23.578081,北向南,50 +澎湖縣,馬公市,縣道201線興仁岔路口,澎湖縣政府警察局,馬公分局,119.6105,23.552406,北向南,50 +澎湖縣,馬公市,縣道202線成功段1.6K,澎湖縣政府警察局,馬公分局,119.61402,23.571623,北向南,70 +澎湖縣,馬公市,縣道204線興仁段4K,澎湖縣政府警察局,馬公分局,119.61489,23.549904,東向西,50 +澎湖縣,馬公市,縣道204線烏崁段4.6K,澎湖縣政府警察局,馬公分局,119.62043,23.548962,南向北,50 +澎湖縣,馬公市,縣道204線隘門村116-6號旁,澎湖縣政府警察局,馬公分局,119.634254,23.560274,南往北,50 +澎湖縣,湖西鄉,縣道203線許家段6.1K,澎湖縣政府警察局,馬公分局,119.63154,23.560314,南向北,50 +澎湖縣,湖西鄉,馬公機場出入口(闖紅燈),澎湖縣政府警察局,馬公分局,119.63206,23.558592,南向北,50 +澎湖縣,湖西鄉,縣道204線隘門段6.7K,澎湖縣政府警察局,馬公分局,119.63483,23.5608,南向北,50 +澎湖縣,湖西鄉,縣道202線西溪段5K,澎湖縣政府警察局,馬公分局,119.63691,23.581766,西向東,50 +澎湖縣,湖西鄉,縣道204線林投段7.8K,澎湖縣政府警察局,馬公分局,119.64445,23.563566,西向東,50 +澎湖縣,湖西鄉,縣道202線湖西段7.1k,澎湖縣政府警察局,馬公分局,119.656944,23.584229,西向東,50 +澎湖縣,湖西鄉,縣道202號菓葉段9.9K,澎湖縣政府警察局,馬公分局,119.65956,23.584875,南向北,50 +澎湖縣,湖西鄉,澎14號南寮村121號旁,澎湖縣政府警察局,馬公分局,119.667145,23.58425,南向北,40 +澎湖縣,白沙鄉,縣道203線通梁段20.77K,澎湖縣政府警察局,白沙分局,119.55488,23.658146,南往北,50 +澎湖縣,白沙鄉,縣道203線通梁段19.9K,澎湖縣政府警察局,白沙分局,119.5603,23.660503,西向東,50 +澎湖縣,白沙鄉,縣道203線後寮段17.8K,澎湖縣政府警察局,白沙分局,119.57477,23.66744,北向南,70 +澎湖縣,白沙鄉,澎8號道瓦硐段,澎湖縣政府警察局,白沙分局,119.58657,23.654982,東向西,50 +澎湖縣,白沙鄉,縣道203線講美段12.3K,澎湖縣政府警察局,白沙分局,119.597244,23.63371,南往北,50 +澎湖縣,白沙鄉,縣道203線港子段14K,澎湖縣政府警察局,白沙分局,119.599335,23.649065,北向南,50 +澎湖縣,白沙鄉,縣道203線講美段11.72K,澎湖縣政府警察局,白沙分局,119.60078,23.63084,東向西,50 +澎湖縣,白沙鄉,白沙鄉赤崁村聯外橋樑北端出口岔路,澎湖縣政府警察局,白沙分局,119.60277,23.66645,南向北,40 +澎湖縣,白沙鄉,縣道203線中屯段9.5K,澎湖縣政府警察局,白沙分局,119.61315,23.601107,北向南,50 +澎湖縣,西嶼鄉,縣道203線池東段30.4K,澎湖縣政府警察局,白沙分局,119.50949,23.599384,北向南,50 +澎湖縣,西嶼鄉,縣道203線二崁與大池岔路口,澎湖縣政府警察局,白沙分局,119.51426,23.61425,南向北,70 +澎湖縣,西嶼鄉,縣道203線合界段24.8K,澎湖縣政府警察局,白沙分局,119.52867,23.63674,西向東,70 +基隆市,,台62甲線3號隧道內南下3.69k處,基隆市警察局,第二分局,121.77956,25.12413,北向南,60 +基隆市,,台62甲線3號隧道內北上3.7k處,基隆市警察局,第二分局,121.77979,25.124203,南向北,60 +基隆市,中正區,中正路信五路口,基隆市警察局,第二分局,121.74588,25.134869,南向北,50 +基隆市,中正區,信一路義三路口,基隆市警察局,第二分局,121.74642,25.129612,東向西,50 +基隆市,中正區,中正路中船路口(南口),基隆市警察局,第二分局,121.74951,25.137762,北向南,50 +基隆市,中正區,台62甲線、東海街口,基隆市警察局,第二分局,121.753204,25.139427,南向北,40 +基隆市,中正區,台62甲1號隧道出口(0.7K處),基隆市警察局,第二分局,121.75845,25.139378,南向北,40 +基隆市,中正區,台62甲線2號隧道至東海街出口(南往北)區間測速,基隆市警察局,第二分局,121.76448,25.137392,南往北,40 +基隆市,中正區,北寧路(海洋大學前),基隆市警察局,第二分局,121.777985,25.151018,南向北,50 +基隆市,中正區,調和街154之3號旁,基隆市警察局,第二分局,121.79846,25.13211,北向南,50 +基隆市,中正區,調和街242號對面處,基隆市警察局,第二分局,121.799614,25.129747,南向北,50 +基隆市,七堵區,明德三路(長春貨櫃),基隆市警察局,第三分局,121.68742,25.075933,南向北,50 +基隆市,七堵區,大埔交流道、大同街口,基隆市警察局,第三分局,121.69048,25.112968,西向東,40 +基隆市,七堵區,新台五線五堵橋頭(台5線19K+107),基隆市警察局,第三分局,121.6918,25.076023,南向北,60 +基隆市,七堵區,萬瑞快速道路(台62線)3.4K(西行),基隆市警察局,第三分局,121.6935,25.115122,東向西,80 +基隆市,七堵區,萬瑞快速道路(台62線)3K+290(東行),基隆市警察局,第三分局,121.69441,25.116095,西向東,80 +基隆市,七堵區,實踐路294巷口,基隆市警察局,第三分局,121.69552,25.087847,北向南,50 +基隆市,七堵區,大華二路46號對面處,基隆市警察局,第三分局,121.69604,25.101782,東西雙向,50 +基隆市,七堵區,新台五路、福三街口(南向北),基隆市警察局,第三分局,121.69804,25.08034,南向北,50 +基隆市,七堵區,新台五路、福三街口(北向南),基隆市警察局,第三分局,121.69829,25.080408,北向南,50 +基隆市,七堵區,工建西路、工建路口,基隆市警察局,第三分局,121.69939,25.092577,北向南,50 +基隆市,七堵區,明德二路(台五線20K+422)南向,基隆市警察局,第三分局,121.703125,25.081993,北向南,50 +基隆市,七堵區,明德二路(台5線20.5K處)北向,基隆市警察局,第三分局,121.70324,25.081923,南向北,50 +基隆市,七堵區,明德二路2之1號前,基隆市警察局,第三分局,121.707184,25.090446,南向北,50 +基隆市,七堵區,光明路106號前,基隆市警察局,第三分局,121.71404,25.095709,北向南,50 +基隆市,七堵區,八堵路185巷口(北上),基隆市警察局,第三分局,121.726135,25.103292,南向北,50 +基隆市,七堵區,八堵路185巷口(南下),基隆市警察局,第三分局,121.726135,25.103992,北向南,50 +基隆市,七堵區,八堵路國安路口,基隆市警察局,第三分局,121.73506,25.110722,南向北,50 +基隆市,七堵區,萬瑞快速道路(台62線)11K+280(西行),基隆市警察局,第三分局,121.75308,25.10187,東向西,80 +基隆市,七堵區,萬瑞快速道路(台62線)11K+470(東行),基隆市警察局,第三分局,121.754326,25.102283,西向東,80 +基隆市,暖暖區,源遠路、水源路口,基隆市警察局,第三分局,121.73433,25.104801,西向東,50 +基隆市,暖暖區,過港路、寧靜街口,基隆市警察局,第三分局,121.737564,25.1053,東向西,50 +基隆市,暖暖區,源遠路、暖暖街口,基隆市警察局,第三分局,121.73952,25.102694,西向東,50 +基隆市,暖暖區,東勢街、暖濃橋口,基隆市警察局,第三分局,121.74865,25.083538,南向北,40 +基隆市,暖暖區,台62線快速道路11.3K至6.2K(東往西)區間測速,基隆市警察局,第三分局,121.7531,25.10219,東向西,80 +基隆市,暖暖區,源遠路249巷口,基隆市警察局,第三分局,121.75474,25.098783,東向西,50 +基隆市,暖暖區,東勢街與東安一號橋口,基隆市警察局,第三分局,121.75572,25.076906,南向北,40 +基隆市,暖暖區,基平隧道北端出口處往基隆,基隆市警察局,第三分局,121.75822,25.074478,南向北,40 +基隆市,暖暖區,基平隧道5K+120往基隆,基隆市警察局,第三分局,121.762505,25.06859,南向北,50 +基隆市,仁愛區,29號橋,基隆市警察局,第一分局,121.73601,25.123318,南向北,50 +基隆市,仁愛區,南榮路509巷口,基隆市警察局,第一分局,121.74012,25.113022,南向北,50 +基隆市,仁愛區,南榮路64巷口,基隆市警察局,第一分局,121.74293,25.123219,北向南,50 +基隆市,仁愛區,南榮路393巷口,基隆市警察局,第一分局,121.74368,25.11819,北向南,50 +基隆市,中山區,文化路116號前,基隆市警察局,第四分局,121.7342,25.153727,西向東,50 +基隆市,中山區,西岸高架橋南下0K+460處,基隆市警察局,第四分局,121.737,25.13015,北向南,50 +基隆市,中山區,中華路97巷口,基隆市警察局,第四分局,121.738014,25.147667,西向東,50 +基隆市,中山區,中山二路、健民街口(南向),基隆市警察局,第四分局,121.73884,25.141909,北向南,50 +基隆市,中山區,西岸高架橋北端路口處,基隆市警察局,第四分局,121.73922,25.133802,南向北,50 +基隆市,中山區,中山二路、健民街口(北向),基隆市警察局,第四分局,121.73923,25.141153,南向北,50 +基隆市,中山區,中山二路65巷口,基隆市警察局,第四分局,121.74045,25.13845,南向北,50 +基隆市,中山區,中山一路、港西街口,基隆市警察局,第四分局,121.740974,25.136154,北向南,50 +基隆市,中山區,中山二路36巷口,基隆市警察局,第四分局,121.740974,25.138008,北向南,50 +基隆市,安樂區,基金三路、武隆街口,基隆市警察局,第四分局,121.695404,25.157051,西向東,50 +基隆市,安樂區,基金三路、武聖街口,基隆市警察局,第四分局,121.695755,25.156769,東向西,50 +基隆市,安樂區,基金三路、武訓街口(東向),基隆市警察局,第四分局,121.699745,25.149271,西向東,50 +基隆市,安樂區,基金三路、武訓街口(西向),基隆市警察局,第四分局,121.70003,25.148745,東向西,50 +基隆市,安樂區,北濱公路(台2線)、武聖街144巷口,基隆市警察局,第四分局,121.70153,25.162273,西向東,50 +基隆市,安樂區,萬瑞快速公路(台62線)、基金二路一巷口,基隆市警察局,第四分局,121.703316,25.141867,東向西,40 +基隆市,安樂區,基金一路135巷口,基隆市警察局,第四分局,121.70965,25.14201,西向東,50 +基隆市,安樂區,基金一路208巷口,基隆市警察局,第四分局,121.70991,25.141825,東向西,50 +基隆市,安樂區,基金一路、5B匝道口,基隆市警察局,第四分局,121.71468,25.13953,東向西,50 +基隆市,安樂區,麥金路、樂利三街口,基隆市警察局,第四分局,121.71967,25.12792,東向西,50 +基隆市,安樂區,麥金路749號前,基隆市警察局,第四分局,121.72058,25.133339,西向東,50 +基隆市,安樂區,麥金路222號(長庚醫院)前,基隆市警察局,第四分局,121.72226,25.120644,東向西,50 +基隆市,安樂區,安樂路二段127號(中華電信)前,基隆市警察局,第四分局,121.72526,25.122475,南向北,50 +基隆市,安樂區,麥金路12號前,基隆市警察局,第四分局,121.72644,25.116156,東向西,50 +基隆市,安樂區,基金三路下坡路段,基隆市警察局,第四分局,121.73231,25.1274,西向東,50 +基隆市,安樂區,安樂路一段、崇德街口,基隆市警察局,第四分局,121.733025,25.12841,南向北,50 +基隆市,信義區,信二、義一路口,基隆市警察局,第二分局,121.74495,25.131996,北向南,50 +基隆市,信義區,仁一、月眉路口,基隆市警察局,第二分局,121.75589,25.128004,西向東,50 +基隆市,信義區,培德路2巷口,基隆市警察局,第二分局,121.76861,25.128143,東向西,50 +基隆市,信義區,台62甲線孝東匝道口,基隆市警察局,第二分局,121.77779,25.127695,南向北,40 +基隆市,信義區,台62甲線3號隧道內北上3.7K處,基隆市警察局,第二分局,121.77931,25.124163,北上,60 +基隆市,信義區,台62甲線3號隧道內南下3.69K處,基隆市警察局,第二分局,121.77956,25.12413,南下,60 +基隆市,信義區,深澳坑路118號前,基隆市警察局,第二分局,121.78308,25.12693,西向東,50 +基隆市,信義區,深澳坑路240號旁,基隆市警察局,第二分局,121.79007,25.12427,西向東,50 +新竹市,東區,東大路三段110巷口(往南寮-機場彎道),新竹市警察局,第一分局,120.95478,24.829601,東向西,50 +新竹市,東區,火車站前,新竹市警察局,第二分局,120.97159,24.801601,雙向,50 +新竹市,東區,東大高架民族路上方,新竹市警察局,第二分局,120.973694,24.80587,西向東,50 +新竹市,東區,中央路、民權路口,新竹市警察局,第二分局,120.974434,24.808844,往北,50 +新竹市,東區,高峰路168號旁,新竹市警察局,第三分局,120.97511,24.788465,往市區,40 +新竹市,東區,公道五路四段127號前,新竹市警察局,第一分局,120.97564,24.825012,西向東,40 +新竹市,東區,中央路、民生路口,新竹市警察局,第二分局,120.977264,24.809816,往北,50 +新竹市,東區,寶山路317巷口(高峰植物園),新竹市警察局,第二分局,120.98239,24.788258,東向西,50 +新竹市,東區,自由路、民族路口,新竹市警察局,第二分局,120.982635,24.810917,東向西,50 +新竹市,東區,中華路二段2號,新竹市警察局,第二分局,120.98313,24.809292,南往北,50 +新竹市,東區,高翠路311號前,新竹市警察局,第三分局,120.98497,24.778402,雙向,40 +新竹市,東區,高翠路292巷口,新竹市警察局,第三分局,120.98529,24.788721,往高峰路,40 +新竹市,東區,中華路一段2巷137號,新竹市警察局,第二分局,120.98689,24.822033,西向東,40 +新竹市,東區,光復路二段、忠孝路口,新竹市警察局,第二分局,120.98983,24.800165,東向西,50 +新竹市,東區,溪埔路、經國路一段156巷50弄口,新竹市警察局,第二分局,120.99061,24.817444,北向南,50 +新竹市,東區,新竹科學園區園區三路近研新四路,保二總隊,保二三大隊,120.99193,24.782099,往南,50 +新竹市,東區,新竹科學園區園區三路世界先進前,保二總隊,保二三大隊,120.99644,24.775665,往南,50 +新竹市,東區,園區三路121號台積電旁,保二總隊,保二第三大隊,120.99819,24.774435,西向東,50 +新竹市,東區,新竹科學園區園區三路台積電二五廠前,保二總隊,保二三大隊,120.998215,24.774504,往東,50 +新竹市,東區,新竹科學園區新安路近展業一路口,保二總隊,保二三大隊,121.00155,24.781939,往東,50 +新竹市,東區,新竹科學園區新安路近園區一路,保二總隊,保二三大隊,121.006386,24.780663,往北,50 +新竹市,東區,新竹科學園區園區一路近竹村一路口,保二總隊,保二三大隊,121.006836,24.784254,往東,50 +新竹市,東區,新竹科學園區園區一路近竹村一路口,保二總隊,保二三大隊,121.006836,24.784254,往西,50 +新竹市,東區,新竹科學園區園區一路慈雲路橋下,保二總隊,保二三大隊,121.00824,24.78629,往東,50 +新竹市,東區,新竹科學園區園區三路辰鴻加油站對面,保二總隊,保二三大隊,121.00926,24.771814,往北,50 +新竹市,東區,新竹科學園區竹村七路近靜心湖出入口,保二總隊,保二三大隊,121.01094,24.77858,往南,40 +新竹市,東區,慈雲路、埔頂二路口,新竹市警察局,第二分局,121.01215,24.791552,雙向,50 +新竹市,東區,慈雲路、公道五路口,新竹市警察局,第二分局,121.01323,24.79537,南向北,50 +新竹市,東區,新竹科學園區.園區一路近園區三路口,保二總隊,保二三大隊,121.014,24.775927,往東,50 +新竹市,東區,關新路、關新一街口(往光復路),新竹市警察局,第二分局,121.01837,24.784632,北往南,30 +新竹市,東區,新竹科學園區力行路近世界先進便道,保二總隊,保二三大隊,121.02655,24.770788,往北,50 +新竹市,北區,延平路二段961之1號旁,新竹市警察局,第一分局,120.92646,24.811949,南北,50 +新竹市,北區,西濱路、榮濱南路口,新竹市警察局,第一分局,120.927216,24.832527,南往北,60 +新竹市,北區,台68線榮濱路匝道口,新竹市警察局,第一分局,120.9341,24.845257,東向西,50 +新竹市,北區,西濱路、東大路四段口(北上),新竹市警察局,第一分局,120.93412,24.842299,南向北,50 +新竹市,北區,西濱路、東大路四段口(南下),新竹市警察局,第一分局,120.9342,24.842539,北向南,50 +新竹市,北區,舊港1-1號前(舊港大橋),新竹市警察局,第一分局,120.94274,24.844084,北向南,50 +新竹市,北區,公到五路五段、東大路三段430巷口,新竹市警察局,第一分局,120.94409,24.838078,東往西(雙向),50 +新竹市,北區,天府路一段、東大路三段291巷口,新竹市警察局,第一分局,120.94431,24.833956,西向東,50 +新竹市,北區,經國路二段、延平路一段口,新竹市警察局,第一分局,120.95555,24.805037,北向南,50 +新竹市,北區,公道五路四段、防汛道路,新竹市警察局,第一分局,120.95854,24.830074,東向西,50 +新竹市,北區,武陵路61巷口,新竹市警察局,第一分局,120.96524,24.817877,北向南,50 +新竹市,北區,台68線東大路匝道口,新竹市警察局,第一分局,120.96534,24.817825,北向南,40 +新竹市,北區,都城隍廟周邊道路,新竹市警察局,第一分局,120.96564,24.804623,雙向,50 +新竹市,北區,武陵路196巷口(武陵匝道口、荷蘭村),新竹市警察局,第一分局,120.968094,24.820688,北向南,50 +新竹市,北區,公道五路三段700號,新竹市警察局,第一分局,120.98121,24.821245,往西,50 +新竹市,北區,新竹市北區經國路1段176號,新竹市警察局,第二分局,120.98728,24.815268,往南,50 +新竹市,香山區,台61線西濱快速公路85.2公里處,新竹市警察局,第三分局,120.88559,24.736444,南北,80 +新竹市,香山區,中華路五段832號前(香山火車),新竹市警察局,第三分局,120.913246,24.76286,北向南,60 +新竹市,香山區,中華路五段320巷口,新竹市警察局,第三分局,120.919235,24.78108,南向北,60 +新竹市,香山區,西濱快速公路、宮口街口,新竹市警察局,第三分局,120.919395,24.793509,南向北,80 +新竹市,香山區,中華路五段208巷口,新竹市警察局,第三分局,120.92019,24.784409,北向南,60 +新竹市,香山區,西濱路港南國小前,新竹市警察局,第三分局,120.92257,24.81397,南向北,60 +新竹市,香山區,南隘路2段76號對面(南隘國小),新竹市警察局,第三分局,120.93,24.726501,雙向,50 +新竹市,香山區,台1線79公里,新竹市警察局,第三分局,120.9357,24.790733,往南,60 +新竹市,香山區,新竹市香山區五福路二段120巷口,新竹市警察局,第三分局,120.93832,24.751755,北往南,50 +新竹市,香山區,新竹市香山區景觀大道、五福路二段口,新竹市警察局,第三分局,120.953094,24.75506,北往南,50 +新竹市,香山區,景觀大道4.7公里,新竹市警察局,第三分局,120.9583,24.761814,往茄苳交流道,70 +嘉義市,東區,文化路694巷口,嘉義市政府警察局,第二分局,120.44253,23.497126,北向南,50 +嘉義市,東區,忠孝路(台1線263公里處),嘉義市政府警察局,第二分局,120.44435,23.51212,北向南,50 +嘉義市,東區,忠孝路與義教街口,嘉義市政府警察局,第二分局,120.4515,23.498264,南向北(超速闖紅燈),50 +嘉義市,東區,彌陀路162巷口,嘉義市政府警察局,第二分局,120.46644,23.468079,南向北,50 +嘉義市,東區,林森東路612巷口斜對面,嘉義市政府警察局,第二分局,120.47364,23.491884,東向西,50 +嘉義市,東區,大雅路一段470號前,嘉義市政府警察局,第二分局,120.473755,23.491804,西向東,50 +嘉義市,東區,嘉義市彌陀路與學府路口,嘉義市政府警察局,第二分局,120.49665,23.46444,北向南,50 +嘉義市,西區,北港路與竹仔腳路口,嘉義市政府警察局,第一分局,120.39789,23.491566,西向東,50 +嘉義市,西區,高鐵大道925號前,嘉義市政府警察局,第一分局,120.40342,23.486872,東西雙向,70 +嘉義市,西區,北港路1158號前,嘉義市政府警察局,第一分局,120.403595,23.490175,西向東,50 +嘉義市,西區,高鐵大道與四維路口,嘉義市政府警察局,第一分局,120.42458,23.479553,西向東(超速闖紅燈),50 +嘉義市,西區,博愛路與自強街口,嘉義市政府警察局,第一分局,120.425064,23.464802,南北雙向,50 +嘉義市,西區,北港路與中興路口,嘉義市政府警察局,第一分局,120.43007,23.479925,東向西,50 +嘉義市,西區,高鐵大道與福義街口,嘉義市政府警察局,第一分局,120.4309,23.477198,東向西(超速闖紅燈),50 +嘉義市,西區,嘉義市垂楊大橋與新建街口,嘉義市政府警察局,第一分局,120.43792,23.472664,西向東(闖紅燈),50 +嘉義市,西區,博愛路二段與中興路口,嘉義市政府警察局,第一分局,120.438644,23.480522,南北雙向(超速闖紅燈),50 +嘉義市,西區,湖子內路與環湖一街口,嘉義市政府警察局,第一分局,120.43907,23.444014,南北雙向(超速闖紅燈),50 +嘉義市,西區,新民路416巷口,嘉義市政府警察局,第一分局,120.44056,23.459938,南向北,50 +嘉義市,西區,嘉義市中山路與中正路口,嘉義市政府警察局,嘉市警局交通隊,120.44178,23.478798,南北雙向(超速闖紅燈),50 +嘉義市,西區,嘉義市中山路與林森西路口,嘉義市政府警察局,嘉市警局交通隊,120.442024,23.479103,南北雙向(超速闖紅燈),50 +嘉義市,西區,湖子內路100號前,嘉義市政府警察局,第一分局,120.44225,23.453062,南向北,50 +嘉義市,西區,世賢路四段與美源街、興安街口,嘉義市政府警察局,嘉市警局交通隊,120.447655,23.462564,東西雙向(超速、闖紅燈),50 +嘉義市,西區,興業東路與國華街口,嘉義市政府警察局,第一分局,120.449135,23.4687,西向東(闖紅燈),50 +臺北市,,自強隧道區間測速(雙向)(暫停執法),臺北市政府警察局,,121.54943,25.090372,南北雙向,50 +臺北市,,辛亥隧道區間測速(雙向)(暫停執法),臺北市政府警察局,,121.5559,25.011496,南北雙向,50 +臺北市,松山區,復興北路車行地下道南出口處,臺北市政府警察局,松山分局,121.54438,25.066849,往南,40 +臺北市,松山區,民生東路四段97巷口,臺北市政府警察局,松山分局,121.552055,25.05797,西向東,50 +臺北市,松山區,民權東路4段 民權公園前,臺北市政府警察局,松山分局,121.55749,25.06205,東西雙向,50 +臺北市,松山區,健康路300號,臺北市政府警察局,松山分局,121.5656,25.054245,往東,50 +臺北市,松山區,塔悠路近撫遠街261巷口,臺北市政府警察局,松山分局,121.568436,25.06195,往南,50 +臺北市,信義區,忠孝東路四段逸仙路口附近,臺北市政府警察局,信義分局,121.55998,25.04131,東西雙向,50 +臺北市,信義區,市民大道五段50號前,臺北市政府警察局,信義分局,121.56399,25.047602,往東,50 +臺北市,信義區,忠孝東路5段210號,臺北市政府警察局,信義分局,121.57064,25.04102,往東,50 +臺北市,大安區,和平東路一段國立師範大學前(西向東),臺北市政府警察局,大安分局,121.52677,25.026665,往東,50 +臺北市,大安區,新生南路金華街(北向南),臺北市政府警察局,大安分局,121.53368,25.030283,往南,50 +臺北市,大安區,新生南路三段58號台大側門,臺北市政府警察局,大安分局,121.53406,25.020033,往北,50 +臺北市,大安區,建國南路2段179號往北,臺北市政府警察局,大安分局,121.53691,25.048212,往北,50 +臺北市,大安區,建國高架道和平東路上方(北向南),臺北市政府警察局,大安分局,121.53762,25.026205,往南,70 +臺北市,大安區,市民大道三段214號前(西向東),臺北市政府警察局,大安分局,121.53994,25.044518,往東,40 +臺北市,大安區,基隆路 長興街,臺北市政府警察局,大安分局,121.54371,25.016603,往北,50 +臺北市,大安區,基隆高架道下敦化南路段(南向北),臺北市政府警察局,大安分局,121.545944,25.018555,往北,60 +臺北市,大安區,辛亥路3段157巷,臺北市政府警察局,,121.54879,25.01714,往西,50 +臺北市,大安區,辛亥路三段157巷(下北二高)(東向西),臺北市政府警察局,大安分局,121.54883,25.017244,往西,50 +臺北市,中山區,新生北路高架道民族東路入口(往南),臺北市政府警察局,中山分局,121.5277,25.066557,往南,70 +臺北市,中山區,北安路 海軍司令部前,臺北市政府警察局,中山分局,121.53627,25.077879,往西,50 +臺北市,中山區,建國高架道長春路入口(北向南),臺北市政府警察局,中山分局,121.53678,25.052633,往南,70 +臺北市,中山區,明水路325號,臺北市政府警察局,中山分局,121.540924,25.077658,東西雙向,50 +臺北市,中山區,復興北路(車行地下道北出口處),臺北市政府警察局,中山分局,121.54434,25.071774,往北,40 +臺北市,中山區,樂群一路(基湖路口西往東天橋下(金泰公園)),臺北市政府警察局,中山分局,121.566376,25.076668,往東,50 +臺北市,中正區,中華路1段53號前(南向北),臺北市政府警察局,中正一局,121.50858,25.043074,往北,50 +臺北市,中正區,重慶南路3段27巷口(往北),臺北市政府警察局,中正二局,121.515686,25.028524,南北雙向,50 +臺北市,中正區,市民大道高架 京站百貨前,臺北市政府警察局,中正一局,121.51977,25.048206,往東,80 +臺北市,中正區,水源快速道路同安街口(快車道),臺北市政府警察局,中正第二分局,121.52033,25.020802,往北,60 +臺北市,中正區,仁愛路臨沂街口(東向西),臺北市政府警察局,中正一局,121.53017,25.038351,往西,50 +臺北市,中正區,水源快道路往南(景福匝道口),臺北市政府警察局,中正第二分局,121.53528,24.999609,往南,60 +臺北市,大同區,環河北路近敦煌路(北向南),臺北市政府警察局,大同分局,121.50822,25.079073,往南,60 +臺北市,大同區,承德路3段 敦煌路,臺北市政府警察局,大同分局,121.51978,25.074602,南北雙向,50 +臺北市,大同區,承德路4段 通河街,臺北市政府警察局,大同分局,121.52216,25.080551,南北雙向,50 +臺北市,萬華區,萬板大橋台北端引道(往台北市),臺北市政府警察局,萬華分局,121.48961,25.03056,往市區,50 +臺北市,萬華區,艋舺大道297號台糖公司前(東向西),臺北市政府警察局,萬華分局,121.49679,25.033098,往西,50 +臺北市,萬華區,萬大路華中橋頭(南北雙向),臺北市政府警察局,萬華分局,121.49712,25.019234,南北雙向,50 +臺北市,萬華區,環河南路1段77號對面(北向南),臺北市政府警察局,萬華分局,121.50114,25.044512,往南,50 +臺北市,萬華區,水源路205號前(東向西),臺北市政府警察局,萬華分局,121.50312,25.01948,往西,60 +臺北市,文山區,羅斯福路5段240號(往南),臺北市政府警察局,文山二局,121.53909,25.001425,往南,50 +臺北市,文山區,羅斯福路6段226號(往南),臺北市政府警察局,文山二局,121.54062,24.992655,往南,50 +臺北市,文山區,辛亥路6段 懷恩隧道出口,臺北市政府警察局,文山一局,121.551506,24.99144,往南,50 +臺北市,文山區,辛亥路4段辛亥隧道出口(往南),臺北市政府警察局,文山二局,121.557304,25.009743,往南,50 +臺北市,文山區,信義快速道路(北往南文山隧道出口處),臺北市政府警察局,文山一局,121.581245,25.008957,往南,70 +臺北市,文山區,木柵路五段(西向東) 100之3號,臺北市政府警察局,文山一局,121.59344,24.9989,往東,50 +臺北市,南港區,市民大道七段與忠孝東路六段159巷口,臺北市政府警察局,南港分局,121.58609,25.050062,往東,50 +臺北市,南港區,市民大道7段 近昆陽街口,臺北市政府警察局,南港分局,121.59186,25.050976,往西,50 +臺北市,南港區,忠孝東路七段511號,臺北市政府警察局,南港分局,121.61159,25.052607,往東,50 +臺北市,南港區,市民大道8段與東南街口(東往西),臺北市政府警察局,南港分局,121.61222,25.05411,往西,50 +臺北市,南港區,市民大道8段 500號,臺北市政府警察局,南港分局,121.613174,25.053974,往東,50 +臺北市,南港區,三重路19-5號前(北向南),臺北市政府警察局,南港分局,121.614105,25.057318,往南,50 +臺北市,內湖區,承德路四段320號(福港街口),臺北市政府警察局,內湖分局,121.51826,25.089705,北往南,50 +臺北市,內湖區,內湖路1段324號,臺北市政府警察局,內湖分局,121.56998,25.08173,往東,50 +臺北市,內湖區,行善路233號,臺北市政府警察局,內湖分局,121.58296,25.060823,往東,50 +臺北市,內湖區,環東大道(南京東路6段368巷口上方),臺北市政府警察局,內湖分局,121.586334,25.059874,往西,80 +臺北市,內湖區,成功路2段373號,臺北市政府警察局,內湖分局,121.59,25.074547,往北,50 +臺北市,內湖區,金湖路200號前,臺北市政府警察局,內湖分局,121.60028,25.077787,往北,50 +臺北市,內湖區,成功路5段152巷口,臺北市政府警察局,內湖分局,121.604034,25.083036,往東,50 +臺北市,內湖區,民權東路六段423巷口(東向西),臺北市政府警察局,內湖分局,121.60418,25.071262,往西,50 +臺北市,士林區,環河北路3段葫蘆街口,臺北市政府警察局,士林分局,121.50743,25.082521,往北,50 +臺北市,士林區,承德路四段百齡高中前(南向北),臺北市政府警察局,士林分局,121.52306,25.08667,往北,50 +臺北市,士林區,仰德大道2段29巷,臺北市政府警察局,士林分局,121.54252,25.104025,往下山方向,40 +臺北市,士林區,仰德大道2段115巷口,臺北市政府警察局,士林分局,121.546036,25.10817,下山,40 +臺北市,士林區,仰德大道四段75號前(下山方向),臺北市政府警察局,士林分局,121.54652,25.132162,下山,40 +臺北市,北投區,學園路 台北藝術大學門口,臺北市政府警察局,北投分局,121.46587,25.130178,下山方向,30 +臺北市,北投區,大度路往台北方向,臺北市政府警察局,北投分局,121.47776,25.122429,往南,70 +臺北市,北投區,大度路往淡水方向,臺北市政府警察局,北投分局,121.480316,25.122408,往北,70 +臺北市,北投區,大業路412號前,臺北市政府警察局,北投分局,121.49684,25.13034,往北,60 +臺北市,北投區,洲美快速道路(南向避車彎處),臺北市政府警察局,北投分局,121.49871,25.107931,往南,80 +臺北市,北投區,洲美快速道路(北向避車彎處),臺北市政府警察局,北投分局,121.49899,25.106007,往北,80 +臺北市,北投區,立賢路101號,臺北市政府警察局,北投分局,121.50257,25.114443,往北,50 +臺北市,北投區,承德路6段,臺北市政府警察局,北投分局,121.51186,25.104881,往南,60 +臺北市,北投區,承德路6段,臺北市政府警察局,北投分局,121.51211,25.103973,往北,60 +臺北市,北投區,陽金公路53號燈桿後方竹子湖路2-2號對面,臺北市政府警察局,北投分局,121.543755,25.164951,往市區,40 +高雄市,鼓山區,鼓山三路、青峰街,高雄市政府警察局,鼓山分局,120.27578,22.659279,北向南,50 +高雄市,鼓山區,蓬萊路32號前,高雄市政府警察局,鼓山分局,120.27912,22.620316,南向北,40 +高雄市,鼓山區,鼓山區鼓山一路/大公路,高雄市政府警察局,鼓山分局,120.280136,22.629168,南向東,50 +高雄市,鼓山區,鼓山區華安街/馬卡道路口,高雄市政府警察局,鼓山分局,120.28151,22.64722,南、北向西,50 +高雄市,鼓山區,鼓山區馬卡道路/青海路,高雄市政府警察局,鼓山分局,120.281845,22.651901,北向南,50 +高雄市,鼓山區,鼓山區北斗街/鼓山二路,高雄市政府警察局,,120.28246,22.632725,東西雙向,50 +高雄市,鼓山區,左營高架橋(中華陸橋)往南下橋處,高雄市政府警察局,鼓山分局,120.28902,22.667456,北向南,40 +高雄市,鼓山區,鼓山區中華一路/美術館路,高雄市政府警察局,鼓山分局,120.2919,22.65469,南、北向西,60 +高雄市,鼓山區,鼓山區美術館路/中華一路口,高雄市政府警察局,鼓山分局,120.29202,22.65469,北往南、西往北,50 +高雄市,鼓山區,中華一路與大順一路口,高雄市政府警察局,鼓山分局,120.29224,22.65287,南向北,60 +高雄市,鼓山區,中華一路與美術北三路口,高雄市政府警察局,鼓山分局,120.29245,22.662758,北向南,60 +高雄市,鼓山區,鼓山區大順一路/龍勝路口,高雄市政府警察局,,120.29575,22.65434,西往北,50 +高雄市,鼓山區,明誠三路與南屏路口(西向東),高雄市政府警察局,鼓山分局,120.2999,22.661104,西向東,50 +高雄市,鼓山區,鼓山區大順一路/博愛一路口,高雄市政府警察局,鼓山分局,120.3033,22.65607,西往北,50 +高雄市,左營區,左營區介壽路與先鋒路口,高雄市政府警察局,左營分局,120.282486,22.681307,西向東,50 +高雄市,左營區,左營高架橋(中華陸橋)往北下橋處,高雄市政府警察局,左營分局,120.28896,22.669052,南向北,40 +高雄市,左營區,左營區翠華路與華榮路口,高雄市政府警察局,左營分局,120.291405,22.67238,北向南,60 +高雄市,左營區,左營區軍校路國軍高雄總醫院左營分院前,高雄市政府警察局,,120.29237,22.702114,北向南,50 +高雄市,左營區,左營區翠華路與勝利路口,高雄市政府警察局,左營分局,120.294815,22.675985,北向南,60 +高雄市,左營區,左營區翠華路與崇德路口,高雄市政府警察局,左營分局,120.2974,22.678238,南向北,60 +高雄市,左營區,華夏路337巷口,高雄市政府警察局,左營分局,120.297554,22.67165,南向北,50 +高雄市,左營區,華夏路與新莊仔路,高雄市政府警察局,左營分局,120.299515,22.674582,南向北,60 +高雄市,左營區,左營區新莊一路/新榮街口,高雄市政府警察局,,120.30196,22.67068,西向東,50 +高雄市,左營區,左營區翠華路與站前南路,高雄市政府警察局,左營分局,120.302666,22.687275,南向北,60 +高雄市,左營區,翠華路與明潭路口,高雄市政府警察局,左營分局,120.302864,22.689344,北向南,60 +高雄市,左營區,博愛二路與裕誠路口,高雄市政府警察局,左營分局,120.30315,22.665878,北向南,50 +高雄市,左營區,左營區新莊一路/博愛二路,高雄市政府警察局,左營分局,120.30338,22.6703,東、西向南,50 +高雄市,左營區,博愛二路與新庄仔路口,高雄市政府警察局,左營分局,120.303406,22.669987,南向北,50 +高雄市,左營區,高鐵路與曾子路,高雄市政府警察局,左營分局,120.30349,22.683207,北向南,50 +高雄市,左營區,博愛三、文自路口,高雄市政府警察局,左營分局,120.3045,22.672869,北向南,60 +高雄市,左營區,博愛、崇德路口,高雄市政府警察局,左營分局,120.30538,22.674622,南向北,50 +高雄市,左營區,大中高架道路華夏匝道口,高雄市政府警察局,左營分局,120.30621,22.684856,西向東,60 +高雄市,左營區,高鐵路與大中二路口,高雄市政府警察局,左營分局,120.30643,22.68523,北向南,50 +高雄市,左營區,大中高架道路文川匝道口,高雄市政府警察局,左營分局,120.30761,22.68351,東向西,60 +高雄市,左營區,大中二路與華夏路口,高雄市政府警察局,左營分局,120.30762,22.68328,西向東,40 +高雄市,左營區,左營區大順一路/自由一、二路口,高雄市政府警察局,,120.30879,22.65653,西往北、東往南,50 +高雄市,左營區,新莊仔路與自由二路,高雄市政府警察局,左營分局,120.309616,22.668627,西向東,50 +高雄市,左營區,左營區高鐵路/重愛路,高雄市政府警察局,左營分局,120.31106,22.68936,東、西向南,50 +高雄市,左營區,左營區大中二路/文自路,高雄市政府警察局,,120.31126,22.680328,西向東,50 +高雄市,左營區,左營區自由三路/孟子路,高雄市政府警察局,左營分局,120.31195,22.6738,東、西向北,50 +高雄市,左營區,民族一路與大中一路,高雄市政府警察局,左營分局,120.31905,22.67854,南向北,60 +高雄市,左營區,左營區民族一路/榮佑路,高雄市政府警察局,左營分局,120.31988,22.68201,南、北向東,60 +高雄市,左營區,左營區民族一路/重愛路,高雄市政府警察局,左營分局,120.319885,22.683315,北向南,60 +高雄市,楠梓區,德中路與大學二十九路口(向南),高雄市政府警察局,,120.27692,22.723606,北向南,60 +高雄市,楠梓區,德中路與大學二十九路口,高雄市政府警察局,楠梓分局,120.27737,22.722902,南向北,60 +高雄市,楠梓區,楠梓區藍田路/藍昌路,高雄市政府警察局,楠梓分局,120.291725,22.727095,東、西向北,50 +高雄市,楠梓區,左楠、後昌路口,高雄市政府警察局,楠梓分局,120.302536,22.707396,南向北,50 +高雄市,楠梓區,楠梓區左楠路與外環西路,高雄市政府警察局,楠梓分局,120.302734,22.711885,南向北,50 +高雄市,楠梓區,德民路與德惠路口,高雄市政府警察局,楠梓分局,120.30323,22.725397,東向西,50 +高雄市,楠梓區,加昌路與左楠路口,高雄市政府警察局,楠梓分局,120.30393,22.717358,西向東,50 +高雄市,楠梓區,德民路與海專路口(機車道),高雄市政府警察局,楠梓分局,120.31035,22.726524,西向東,40 +高雄市,楠梓區,楠梓區加昌路/瑞屏路,高雄市政府警察局,,120.31293,22.721043,東向西,50 +高雄市,楠梓區,高楠公路與德民路口,高雄市政府警察局,楠梓分局,120.320145,22.732939,南向北,60 +高雄市,楠梓區,高楠、水管路口(機車道),高雄市政府警察局,楠梓分局,120.324486,22.707129,北向南,40 +高雄市,楠梓區,高楠公路1015-6號前,高雄市政府警察局,楠梓分局,120.325356,22.717821,南向北,60 +高雄市,楠梓區,高楠公路金屬研發中心前,高雄市政府警察局,楠梓分局,120.32598,22.714525,南向北,60 +高雄市,楠梓區,楠梓區鳳楠路/興西路口,高雄市政府警察局,楠梓分局,120.331764,22.72169,東西雙向,50 +高雄市,楠梓區,楠梓區興西路與鳳楠路,高雄市政府警察局,,120.33213,22.721943,北向南,50 +高雄市,楠梓區,旗楠路與土庫一路口,高雄市政府警察局,楠梓分局,120.33286,22.735596,東向西,50 +高雄市,楠梓區,旗楠、常德路口,高雄市政府警察局,楠梓分局,120.336876,22.740108,東向西,60 +高雄市,三民區,九如三路(中都街與九如大橋中段),高雄市政府警察局,三民第一分局,120.28611,22.643929,東向西,50 +高雄市,三民區,中山一路/建國二路口,高雄市政府警察局,三民第一分局,120.30254,22.63729,南向北,30 +高雄市,三民區,博愛一路/九如二路口,高雄市政府警察局,三民第一分局,120.302605,22.64164,北向南,30 +高雄市,三民區,自由一路與同盟一路,高雄市政府警察局,三民第一分局,120.30907,22.650259,北向南,50 +高雄市,三民區,同盟路高醫大門,高雄市政府警察局,三民第一分局,120.31007,22.649115,西向東,50 +高雄市,三民區,民族、承德路口,高雄市政府警察局,三民第二分局,120.3142,22.642303,南向北,60 +高雄市,三民區,民族一路與十全一路口,高雄市政府警察局,三民第二分局,120.31434,22.644857,北向南,60 +高雄市,三民區,九如一路與民族一路口,高雄市政府警察局,三民第二分局,120.31469,22.64043,東向西,50 +高雄市,三民區,民族一路與建工路口,高雄市政府警察局,三民第二分局,120.31487,22.64735,南向北,40 +高雄市,三民區,河堤、民族一路543巷路口,高雄市政府警察局,三民第二分局,120.31492,22.666988,北向南,50 +高雄市,三民區,民族一路268號前,高雄市政府警察局,三民第二分局,120.31495,22.649855,南北向,60 +高雄市,三民區,三民區大順一路/民族一路口,高雄市政府警察局,三民第二分局,120.31528,22.65546,西往北、東往南,50 +高雄市,三民區,民族一路與裕誠路,高雄市政府警察局,三民第二分局,120.31608,22.663786,北向南,60 +高雄市,三民區,民族、裕誠路口(機車道),高雄市政府警察局,三民第二分局,120.31617,22.663822,南向北,40 +高雄市,三民區,明誠一路與民族一路口,高雄市政府警察局,三民第二分局,120.31624,22.659792,東向西,50 +高雄市,三民區,三民區天祥一路/鼎中路,高雄市政府警察局,三民第二分局,120.319855,22.667519,南、北向西,50 +高雄市,三民區,明誠一路 528 號對面,高雄市政府警察局,三民第二分局,120.320015,22.65996,西向東,50 +高雄市,三民區,九如、平等路口,高雄市政府警察局,三民第二分局,120.32043,22.639828,西向東,50 +高雄市,三民區,鼎山街與明誠一路,高雄市政府警察局,三民第二分局,120.322,22.659908,南向北,50 +高雄市,三民區,大中路、鼎中路口東向西左側路口,高雄市政府警察局,三民第二分局,120.32344,22.676521,東向西,50 +高雄市,三民區,大中路、鼎中路口東向西右側路口,高雄市政府警察局,三民第二分局,120.32359,22.676704,東向西,50 +高雄市,三民區,三民區大中一路/鼎中路口,高雄市政府警察局,三民第二分局,120.32367,22.67661,東向西,50 +高雄市,三民區,三民區大順二路/建工路口,高雄市政府警察局,三民第二分局,120.32407,22.64976,西往北、東往南,50 +高雄市,三民區,明誠一路280號,高雄市政府警察局,三民第二分局,120.32598,22.6596,東向西,50 +高雄市,三民區,三民區大順二路/九如一路口,高雄市政府警察局,三民第二分局,120.32788,22.63925,北往東、南往西,50 +高雄市,三民區,明誠、大裕路口,高雄市政府警察局,三民第二分局,120.32843,22.659721,西向東,50 +高雄市,三民區,三民區建工路/大昌二路,高雄市政府警察局,三民第二分局,120.3295,22.652142,西往南,50 +高雄市,三民區,九如一路與大昌二路口,高雄市政府警察局,三民第二分局,120.33165,22.63851,西向東,50 +高雄市,三民區,大昌二路420巷,高雄市政府警察局,三民第二分局,120.331825,22.649923,南向北,50 +高雄市,三民區,大昌二路28號,高雄市政府警察局,三民第一分局,120.33226,22.641333,南向北,50 +高雄市,三民區,三民區九如一路/光武路口,高雄市政府警察局,三民第二分局,120.33506,22.637945,東、西向北,50 +高雄市,三民區,中山高西側便道、九如路口,高雄市政府警察局,三民第二分局,120.336784,22.63776,北向南,50 +高雄市,三民區,九如、中山高東側便道,高雄市政府警察局,三民第二分局,120.33778,22.637417,東向西,50 +高雄市,三民區,三民區澄清路與九如一路口,高雄市政府警察局,三民第二分局,120.344444,22.636728,北向南,50 +高雄市,新興區,新興區林森一路/七賢一路,高雄市政府警察局,新興分局,120.30474,22.634373,南、北向東,50 +高雄市,新興區,新興區六合一路/林森一路,高雄市政府警察局,新興分局,120.30478,22.632717,東、西向北,50 +高雄市,新興區,民生路與仁愛路口,高雄市政府警察局,新興分局,120.30685,22.627457,西向東,50 +高雄市,新興區,新興區中正三路/復興一路,高雄市政府警察局,新興分局,120.30814,22.631071,東、西向南,50 +高雄市,新興區,新興區五福二路/復興二路,高雄市政府警察局,新興分局,120.30828,22.62545,東、西向南,50 +高雄市,前金區,前金區大同二路/中華三路,高雄市政府警察局,新興分局,120.29649,22.62745,東、西向南,50 +高雄市,前金區,前金區五福三路/自強二路,高雄市政府警察局,新興分局,120.29682,22.62147,西往南,50 +高雄市,前金區,中華三路與民生二路口,高雄市政府警察局,新興分局,120.29697,22.626291,北向南,50 +高雄市,前金區,前金區中山一路/民生一路、民生二路,高雄市政府警察局,新興分局,120.30154,22.626677,南向北,50 +高雄市,苓雅區,五福三路與英雄路口,高雄市政府警察局,苓雅分局,120.2942,22.620949,東向西,50 +高雄市,苓雅區,中華四路與四維四路口,高雄市政府警察局,苓雅分局,120.301216,22.61589,南向北,50 +高雄市,苓雅區,中山二路432號前,高雄市政府警察局,苓雅分局,120.30265,22.619112,南向北,50 +高雄市,苓雅區,中山二路361號前,高雄市政府警察局,苓雅分局,120.303604,22.616146,北向南,50 +高雄市,苓雅區,五福一路與和平一路口,高雄市政府警察局,苓雅分局,120.3182,22.628725,西向東,50 +高雄市,苓雅區,中正地下道(東向西出口),高雄市政府警察局,苓雅分局,120.32004,22.630129,東向西,50 +高雄市,苓雅區,五福、凱旋路口,高雄市政府警察局,苓雅分局,120.321106,22.62981,西向東,50 +高雄市,苓雅區,建國路與武廟路口,高雄市政府警察局,苓雅分局,120.32181,22.633484,東向西,50 +高雄市,苓雅區,苓雅區中正一路/大順三路,高雄市政府警察局,苓雅分局,120.32267,22.629925,西向東,50 +高雄市,苓雅區,苓雅區大順三路/中正一路口,高雄市政府警察局,苓雅分局,120.3232,22.62999,北往南、南往西,50 +高雄市,苓雅區,苓雅區凱旋二路/四維一路,高雄市政府警察局,,120.32406,22.62376,南向北,50 +高雄市,苓雅區,中正地下道(西向東出口),高雄市政府警察局,苓雅分局,120.32502,22.629728,西向東,50 +高雄市,苓雅區,苓雅區凱旋三路/三多二路,高雄市政府警察局,苓雅分局,120.32536,22.620333,南向北,50 +高雄市,苓雅區,苓雅區大順三路/建國一路口,高雄市政府警察局,,120.32563,22.63287,北往東、南往西,50 +高雄市,苓雅區,苓雅區三多二路與凱旋二路口,高雄市政府警察局,苓雅分局,120.325806,22.620935,東向西,50 +高雄市,苓雅區,苓雅區凱旋三路/武昌路,高雄市政府警察局,,120.3267,22.616886,南、西、北向東,50 +高雄市,苓雅區,苓雅區建國一路/福德二路,高雄市政府警察局,苓雅分局,120.32833,22.633007,東、西向北,50 +高雄市,苓雅區,苓雅區輔仁路/中正一路,高雄市政府警察局,,120.33218,22.627617,南向北,50 +高雄市,苓雅區,苓雅區武營路/三多一路,高雄市政府警察局,苓雅分局,120.33575,22.624493,北向南,50 +高雄市,苓雅區,苓雅區中正一路/高速公路西側,高雄市政府警察局,苓雅分局,120.33586,22.628138,北向南,50 +高雄市,苓雅區,武營、三多路口,高雄市政府警察局,苓雅分局,120.3359,22.623598,南向北,50 +高雄市,苓雅區,中正一路與高速公路,高雄市政府警察局,苓雅分局,120.33634,22.62665,西向東,50 +高雄市,苓雅區,建國一路中山高涵洞東側,高雄市政府警察局,苓雅分局,120.33671,22.630255,西向北,50 +高雄市,苓雅區,建國一、正義路口,高雄市政府警察局,苓雅分局,120.33822,22.629908,西向東,50 +高雄市,苓雅區,中正一路國軍高雄總醫院旁,高雄市政府警察局,苓雅分局,120.33946,22.625673,西向東,50 +高雄市,苓雅區,苓雅區三多一路與建軍路口,高雄市政府警察局,苓雅分局,120.341866,22.624517,西向東,50 +高雄市,前鎮區,前鎮區復興四路/成功二路口,高雄市政府警察局,前鎮分局,120.30116,22.60521,北往西,50 +高雄市,前鎮區,中華五路與復興三路口,高雄市政府警察局,前鎮分局,120.30485,22.606277,南向北,50 +高雄市,前鎮區,中山三路與文橫路,高雄市政府警察局,前鎮分局,120.30548,22.611725,南向北,60 +高雄市,前鎮區,成功二路與興發路口,高雄市政府警察局,前鎮分局,120.30554,22.593822,北向南,50 +高雄市,前鎮區,前鎮區中華五路與正勤路口(西、北側),高雄市政府警察局,前鎮分局,120.30589,22.602861,南向北,50 +高雄市,前鎮區,成功二路與舊凱旋四路口,高雄市政府警察局,前鎮分局,120.306015,22.592865,南向北,50 +高雄市,前鎮區,前鎮區文橫二路/三多三路,高雄市政府警察局,前鎮分局,120.30688,22.61472,南、北向西,50 +高雄市,前鎮區,舊凱旋四路與前鎮街口,高雄市政府警察局,前鎮分局,120.3075,22.592865,西向東,50 +高雄市,前鎮區,前鎮區中華五路與時代大道路口(東、南側),高雄市政府警察局,前鎮分局,120.30864,22.596786,東向西,50 +高雄市,前鎮區,中山三路與正勤路口,高雄市政府警察局,前鎮分局,120.3092,22.604418,北向南,60 +高雄市,前鎮區,新生高架道路0.82K,高雄市政府警察局,前鎮分局,120.30965,22.583641,南向北,60 +高雄市,前鎮區,前鎮區一心二路/復興三路,高雄市政府警察局,前鎮分局,120.31046,22.611319,西向東,50 +高雄市,前鎮區,舊凱旋四路與鎮興街口,高雄市政府警察局,前鎮分局,120.31083,22.593851,西向東,50 +高雄市,前鎮區,凱旋四路與鎮興街口,高雄市政府警察局,前鎮分局,120.31139,22.59389,東向西,50 +高雄市,前鎮區,中山三路與光華三路口,高雄市政府警察局,前鎮分局,120.3118,22.60145,南向北,60 +高雄市,前鎮區,過港隧道北孔(前鎮往旗津方向)汽車道1361M處,高雄港警總隊,,120.31391,22.563072,南向北,60 +高雄市,前鎮區,過港隧道北孔〈前鎮往旗津方向〉機車道1100M處,高雄港警總隊,,120.31456,22.563587,南向北,50 +高雄市,前鎮區,凱旋四路與凱旋四路424巷口,高雄市政府警察局,前鎮分局,120.31474,22.594706,西向東,40 +高雄市,前鎮區,三多二路與桂林街口,高雄市政府警察局,前鎮分局,120.315796,22.61766,西向東,50 +高雄市,前鎮區,前鎮區凱旋四路/中山三路,高雄市政府警察局,前鎮分局,120.31611,22.59639,東、西向南,50 +高雄市,前鎮區,前鎮區漁港路與新生路,高雄市政府警察局,前鎮分局,120.316246,22.576466,南向北,50 +高雄市,前鎮區,中山三路與凱旋四路口,高雄市政府警察局,前鎮分局,120.316284,22.595959,南向北,60 +高雄市,前鎮區,一心、光華路口,高雄市政府警察局,前鎮分局,120.317055,22.608536,東向西,50 +高雄市,前鎮區,中山四路與鎮海路口,高雄市政府警察局,前鎮分局,120.31856,22.592764,北向南,40 +高雄市,前鎮區,一心、和平路口,高雄市政府警察局,前鎮分局,120.32055,22.606934,西向東,50 +高雄市,前鎮區,前鎮區漁港路/草衙一路,高雄市政府警察局,,120.32298,22.582129,東向西,50 +高雄市,前鎮區,前鎮區新生路與金福路口,高雄市政府警察局,前鎮分局,120.32304,22.567684,北向南,50 +高雄市,前鎮區,凱旋四路與籬仔內路口,高雄市政府警察局,前鎮分局,120.32374,22.603518,南向北,50 +高雄市,前鎮區,前鎮區新生路與金福路口,高雄市政府警察局,前鎮分局,120.323746,22.567457,南向北,50 +高雄市,前鎮區,前鎮區班超路瑞祥高中前,高雄市政府警察局,前鎮分局,120.32535,22.60173,北向南,50 +高雄市,前鎮區,高速公路(金福路)高架聯絡道北上(離金福路出口500公尺處),高雄市政府警察局,前鎮分局,120.32586,22.575134,南向北,40 +高雄市,前鎮區,高速公路(金福路)高架聯絡道南下(離金福路出口900公尺處),高雄市政府警察局,前鎮分局,120.326035,22.578098,北向南,40 +高雄市,前鎮區,前鎮區凱旋三路/二聖一路(輕軌沿線),高雄市政府警察局,,120.32664,22.611624,南向北,50 +高雄市,前鎮區,前鎮區凱旋三路/二聖一路,高雄市政府警察局,前鎮分局,120.32667,22.61139,南、北向東,50 +高雄市,前鎮區,中山四路與中平路口,高雄市政府警察局,前鎮分局,120.32882,22.580608,北向南,40 +高雄市,前鎮區,中山四路與中安路口,高雄市政府警察局,前鎮分局,120.32949,22.580269,南向北,50 +高雄市,前鎮區,中山四路與金福路口,高雄市政府警察局,前鎮分局,120.331924,22.576746,北向南,50 +高雄市,前鎮區,保泰、瑞隆路口,高雄市政府警察局,前鎮分局,120.33857,22.605717,南向北,50 +高雄市,旗津區,過港隧道南孔〈旗津往前鎮方向〉汽車道1367M處,高雄港警總隊,,120.31196,22.561485,北向南,60 +高雄市,旗津區,過港隧道南孔〈旗津往前鎮方向〉機車道1100M處,高雄港警總隊,,120.313225,22.562416,北向南,50 +高雄市,小港區,東亞南路、平和7路路口,高雄市政府警察局,小港分局,120.33221,22.561941,南向北,60 +高雄市,小港區,東亞南路、平和2路路口,高雄市政府警察局,小港分局,120.33443,22.55905,北向南,60 +高雄市,小港區,中山四路/平和東路,高雄市政府警察局,小港分局,120.33743,22.570253,北向南,40 +高雄市,小港區,小港區中山四路/平和東路,高雄市政府警察局,小港分局,120.33743,22.570253,北向南,60 +高雄市,小港區,南星路與中林路(南向北),高雄市政府警察局,小港分局,120.338646,22.528667,南向北,40 +高雄市,小港區,中安路223號前,高雄市政府警察局,小港分局,120.34073,22.58326,東向西,50 +高雄市,小港區,中山四路與大業北路口,高雄市政府警察局,高市警局交通大隊,120.34256,22.569508,北向南,60 +高雄市,小港區,中山四路/大業北路以南60公尺處(高雄公園前)),高雄市政府警察局,,120.34452,22.569653,東向西,60 +高雄市,小港區,南星、中林路口(北向南),高雄市政府警察局,小港分局,120.34606,22.521515,北向南,40 +高雄市,小港區,中安路與明聖街230巷口,高雄市政府警察局,小港分局,120.34622,22.583788,西向東,50 +高雄市,小港區,沿海一路與宏平路,高雄市政府警察局,小港分局,120.35012,22.568972,南向北,50 +高雄市,小港區,小港區沿海一路與康莊路口,高雄市政府警察局,小港分局,120.35067,22.568,北向南,40 +高雄市,小港區,沿海一路與漢民路口,高雄市政府警察局,小港分局,120.35207,22.5666,北向南,50 +高雄市,小港區,南星路段(沿海路以北700公尺處),高雄市政府警察局,小港分局,120.35464,22.513891,北向南,40 +高雄市,小港區,沿海一路與中鋼路口(南下),高雄市政府警察局,小港分局,120.356544,22.561512,北向南,50 +高雄市,小港區,小港區飛機路153號濟南里活動中心旁,高雄市政府警察局,小港分局,120.35929,22.573195,西向東,40 +高雄市,小港區,沿海三路與鳳鳴路,高雄市政府警察局,小港分局,120.362404,22.51092,北向南,50 +高雄市,小港區,小港區沿海二路/永光街口,高雄市政府警察局,,120.36604,22.54958,南向北,60 +高雄市,小港區,高鳳路/中安路口,高雄市政府警察局,小港分局,120.36853,22.584667,南向北,50 +高雄市,小港區,小港區沿海二路/世全路口(南向),高雄市政府警察局,,120.36864,22.54589,北向南,60 +高雄市,小港區,小港區沿海二路/世全路口(北向),高雄市政府警察局,,120.36895,22.545479,南向北,60 +高雄市,小港區,營口路/山明路口,高雄市政府警察局,小港分局,120.370636,22.565832,北向南,50 +高雄市,小港區,高松路/營口路口,高雄市政府警察局,小港分局,120.370705,22.572668,西向東,50 +高雄市,小港區,小港區高鳳路/松興路,高雄市政府警察局,小港分局,120.371216,22.575188,北向南,50 +高雄市,小港區,小港區孔宅六街路段(全路段),高雄市政府警察局,小港分局,120.3746,22.57782,東西雙向,40 +高雄市,小港區,高松、松正路口,高雄市政府警察局,小港分局,120.376785,22.57036,東向西,50 +高雄市,小港區,高坪18路與高坪15路,高雄市政府警察局,小港分局,120.39456,22.554989,西向東,50 +高雄市,鳳山區,三商街高速公路口機慢車專用道往南415公尺處,高雄市政府警察局,鳳山分局,120.33633,22.59266,北向南,40 +高雄市,鳳山區,臨海路與南華一路口,高雄市政府警察局,鳳山分局,120.341286,22.597889,南向北,50 +高雄市,鳳山區,南華一路保安二街口,高雄市政府警察局,鳳山分局,120.341866,22.597925,東向西,50 +高雄市,鳳山區,鳳山區南華一路與鳳甲路口,高雄市政府警察局,高市警局交通大隊,120.34401,22.595001,東向西,50 +高雄市,鳳山區,南華一路與和成路,高雄市政府警察局,鳳山分局,120.344025,22.594791,西向東,60 +高雄市,鳳山區,建國路三段與澄清路口,高雄市政府警察局,鳳山分局,120.34483,22.636532,東向西,70 +高雄市,鳳山區,國泰路二段與南京路口,高雄市政府警察局,鳳山分局,120.346664,22.620205,北向南,60 +高雄市,鳳山區,五甲一路/瑞隆東路口,高雄市政府警察局,鳳山分局,120.347,22.607111,北向南,40 +高雄市,鳳山區,保南二路與保義街口,高雄市政府警察局,鳳山分局,120.350044,22.595629,南向北,50 +高雄市,鳳山區,鳳山區五甲一路/凱旋路,高雄市政府警察局,鳳山分局,120.35023,22.611904,南向北,50 +高雄市,鳳山區,建國路與青年路口,高雄市政府警察局,鳳山分局,120.35096,22.63744,東向西,70 +高雄市,鳳山區,鳳山區文衡路/青年路二段,高雄市政府警察局,,120.35101,22.640753,東、西向南,50 +高雄市,鳳山區,鳳山區國泰路二段與五甲一路口,高雄市政府警察局,鳳山分局,120.35308,22.616306,北向南,60 +高雄市,鳳山區,鳳山區五甲一路/中山路,高雄市政府警察局,鳳山分局,120.35877,22.622307,南、北向西,50 +高雄市,鳳山區,鳳頂路與過埤路口,高雄市政府警察局,鳳山分局,120.35902,22.593834,北向南,60 +高雄市,鳳山區,鳳頂路與田中央路口,高雄市政府警察局,鳳山分局,120.359215,22.59445,南向北,60 +高雄市,鳳山區,鳳山區過埤路與鳳頂路口(快車道),高雄市政府警察局,鳳山分局,120.35935,22.590372,東向西,60 +高雄市,鳳山區,鳳頂路(台糖加油站對面),高雄市政府警察局,鳳山分局,120.360016,22.598097,北向南,60 +高雄市,鳳山區,鳳山區維新路/光遠路,高雄市政府警察局,,120.36193,22.625483,南、北向東,50 +高雄市,鳳山區,國泰路一段與鳳頂路口,高雄市政府警察局,鳳山分局,120.36204,22.614567,西向東,50 +高雄市,鳳山區,鳳山區鳳松路/經武路,高雄市政府警察局,鳳山分局,120.3638,22.642204,北向南,60 +高雄市,鳳山區,中山東路與光遠路口,高雄市政府警察局,鳳山分局,120.368355,22.623114,南向北,50 +高雄市,林園區,中門路與南星路口(快車道),高雄市政府警察局,林園分局,120.3628,22.510351,南向北,50 +高雄市,林園區,中門路與南星路口(慢車道),高雄市政府警察局,林園分局,120.36288,22.510414,南向北,40 +高雄市,林園區,沿海路林園南路口,高雄市政府警察局,林園分局,120.3961,22.500326,西向東,60 +高雄市,林園區,林園區鳳林路三段與潭頭路口,高雄市政府警察局,林園分局,120.39701,22.52201,南向北,60 +高雄市,林園區,台25線14.5公里處,高雄市政府警察局,林園分局,120.40353,22.531473,北向南,60 +高雄市,林園區,台29線108.4公里處,高雄市政府警察局,林園分局,120.41476,22.532354,北向南,60 +高雄市,大寮區,內坑路161之21號前,高雄市政府警察局,林園分局,120.37998,22.589094,西向東,60 +高雄市,大寮區,市道188 號(內坑路)與高72線路口,高雄市政府警察局,林園分局,120.38432,22.589376,東向西,60 +高雄市,大寮區,鳳屏一路與民貴街口,高雄市政府警察局,林園分局,120.38517,22.631304,東向西,50 +高雄市,大寮區,鳳林三路/萬丹路,高雄市政府警察局,林園分局,120.39095,22.612309,北向南,50 +高雄市,大寮區,大寮區鳳屏一路/成功路,高雄市政府警察局,林園分局,120.39221,22.63619,東、西向北,60 +高雄市,大寮區,大寮區鳳林三路/進學路,高雄市政府警察局,,120.395325,22.607998,南向北,50 +高雄市,大寮區,大寮區新厝路296-1號前,高雄市政府警察局,林園分局,120.40384,22.561409,東西向,50 +高雄市,大寮區,大寮區市道188號與鳳林二路口(快車道),高雄市政府警察局,林園分局,120.40461,22.586405,西向東,60 +高雄市,大寮區,大寮區市道188號與鳳林二路口(慢車道),高雄市政府警察局,林園分局,120.40463,22.586277,西向東,40 +高雄市,大寮區,大寮區市道188號/鳳林二路口,高雄市政府警察局,,120.40514,22.586727,東向西,60 +高雄市,大寮區,鳳林二路、光華路口,高雄市政府警察局,林園分局,120.40737,22.581043,南向北,60 +高雄市,大寮區,鳳屏二路與江山路口,高雄市政府警察局,林園分局,120.40881,22.640905,西向東,70 +高雄市,大寮區,大寮區新厝路/新三街口,高雄市政府警察局,林園分局,120.40924,22.56131,西向東,50 +高雄市,大寮區,台88線快速道路西向東7.4公里處,高雄市政府警察局,林園分局,120.409294,22.58654,西向東,90 +高雄市,大寮區,鳳林二路與濃公路,高雄市政府警察局,林園分局,120.40993,22.574074,北向南,60 +高雄市,大寮區,光明路三段與翁園路口,高雄市政府警察局,林園分局,120.411224,22.625937,北向南,60 +高雄市,大寮區,鳳林一路與鳳林路四段,高雄市政府警察局,林園分局,120.411415,22.547424,北向南,60 +高雄市,大寮區,鳳屏二路/鳳屏二路180巷口(高屏大橋下橋處),高雄市政府警察局,林園分局,120.41329,22.641577,東西向,70 +高雄市,大寮區,光明路二段與大寮路口,高雄市政府警察局,林園分局,120.419685,22.591167,北向南,60 +高雄市,大寮區,台29線96.5公里處,高雄市政府警察局,林園分局,120.42427,22.625746,南向北,50 +高雄市,大寮區,市道188號與華中路口,高雄市政府警察局,,120.428215,22.59183,西向東,40 +高雄市,大寮區,大寮區市道188號/華中路口,高雄市政府警察局,,120.42867,22.591871,西向東,60 +高雄市,大寮區,台88線快速道路東向西10公里處大發交流道前,高雄市政府警察局,林園分局,120.43338,22.592665,東向西,90 +高雄市,大寮區,河堤路三段與公園街,高雄市政府警察局,林園分局,120.433495,22.569546,北向南,50 +高雄市,大樹區,大樹區高186甲線(三和路)仙峰宮前,高雄市政府警察局,,120.422745,22.727495,西向東,40 +高雄市,大樹區,大樹區興山路興山橋旁,高雄市政府警察局,仁武分局,120.423904,22.694601,西向東,50 +高雄市,大樹區,大樹區台22線14K處,高雄市政府警察局,仁武分局,120.43045,22.775007,東西向,50 +高雄市,大樹區,大坑路台29線86.5K處,高雄市政府警察局,仁武分局,120.439255,22.70776,南北向,70 +高雄市,大社區,大社區旗楠路與保糖街口,高雄市政府警察局,高市警局交通大隊,120.354195,22.752487,西向東,50 +高雄市,大社區,大社區中山路521-9號旁,高雄市政府警察局,仁武分局,120.35747,22.730787,東向西,40 +高雄市,大社區,和平路二段與中華路14巷口,高雄市政府警察局,仁武分局,120.35988,22.725449,東向西,60 +高雄市,大社區,和平路一段710-1號前,高雄市政府警察局,仁武分局,120.360504,22.732006,東向西,60 +高雄市,大社區,大社區學府路94巷口前50公尺處(往大社市區),高雄市政府警察局,仁武分局,120.37544,22.735556,東向西,40 +高雄市,仁武區,高楠公路/八德二路,高雄市政府警察局,仁武分局,120.32338,22.701508,北向南,40 +高雄市,仁武區,高楠公路與八德二路口,高雄市政府警察局,仁武分局,120.32345,22.70101,南向北,60 +高雄市,仁武區,仁武區本館路/球場路,高雄市政府警察局,仁武分局,120.33557,22.655952,北向南,40 +高雄市,仁武區,鳳仁路183線2.45公里中央分隔島,高雄市政府警察局,仁武分局,120.33939,22.710386,北向南,60 +高雄市,仁武區,仁武區鳳仁路與竹門巷口,高雄市政府警察局,仁武分局,120.34035,22.708862,北向南,40 +高雄市,仁武區,澄觀路與八德南路,高雄市政府警察局,仁武分局,120.34047,22.68022,東向西,50 +高雄市,仁武區,仁武區水管路與鳳仁路,高雄市政府警察局,仁武分局,120.34179,22.705885,西向東,40 +高雄市,仁武區,仁雄路與澄仁路口,高雄市政府警察局,仁武分局,120.345924,22.67725,西向東,50 +高雄市,仁武區,澄觀路與鳳仁路口,高雄市政府警察局,仁武分局,120.35326,22.686092,東向西,60 +高雄市,仁武區,鳳仁路/澄觀路,高雄市政府警察局,仁武分局,120.35328,22.685602,南向北,60 +高雄市,仁武區,鳳仁路與成功路口,高雄市政府警察局,仁武分局,120.35851,22.676083,南向北,60 +高雄市,仁武區,鳳仁路5-13號前,高雄市政府警察局,仁武分局,120.359085,22.675001,南北向,60 +高雄市,仁武區,澄觀路與仁林路口,高雄市政府警察局,仁武分局,120.359764,22.701334,西向東,60 +高雄市,仁武區,澄觀路二段/水管路三段,高雄市政府警察局,仁武分局,120.35989,22.70423,北向南,60 +高雄市,仁武區,水管路與澄觀路口,高雄市政府警察局,仁武分局,120.36052,22.703672,東向西,60 +高雄市,仁武區,仁武區水管路三段/義大二路,高雄市政府警察局,仁武分局,120.37995,22.700598,東向西,60 +高雄市,仁武區,義大二路與公館1巷3號前,高雄市政府警察局,仁武分局,120.39001,22.715528,北向南,60 +高雄市,鳥松區,松藝路段(南往北往八德南路方向),高雄市政府警察局,仁武分局,120.34072,22.659094,南向北,50 +高雄市,鳥松區,松藝路段(北往南往圓山路方向),高雄市政府警察局,仁武分局,120.34302,22.669724,北向南,50 +高雄市,鳥松區,神農路54-6號前,高雄市政府警察局,仁武分局,120.36719,22.659475,東西向,60 +高雄市,岡山區,國軒路/鵬程東二路口,高雄市政府警察局,岡山分局,120.29023,22.78207,西向東,50 +高雄市,岡山區,岡山區嘉新西路/岡山路口,高雄市政府警察局,岡山分局,120.2926,22.801878,東向西,50 +高雄市,岡山區,岡山區岡山路/維新路口,高雄市政府警察局,岡山分局,120.29587,22.793493,東、西向南,50 +高雄市,岡山區,大德一路與中山北路,高雄市政府警察局,岡山分局,120.29846,22.796618,西向東,50 +高雄市,岡山區,介壽東路與和平路口,高雄市政府警察局,岡山分局,120.30418,22.785051,東向西,60 +高雄市,岡山區,嘉新東路與聖森路,高雄市政府警察局,岡山分局,120.31085,22.807526,西向東,60 +高雄市,岡山區,岡山區聖森路/岡燕路口,高雄市政府警察局,,120.31292,22.789637,南向北,50 +高雄市,岡山區,介壽東路與岡燕路,高雄市政府警察局,岡山分局,120.31535,22.786663,東向西,60 +高雄市,岡山區,嘉峰路高鐵橋下,高雄市政府警察局,岡山分局,120.315475,22.832905,北向南,50 +高雄市,橋頭區,白樹路175號對面,高雄市政府警察局,岡山分局,120.301926,22.757471,西向東,40 +高雄市,橋頭區,橋頭區隆豐路/公園路,高雄市政府警察局,岡山分局,120.30558,22.75592,北向南,40 +高雄市,橋頭區,成功北路與鐵道北路,高雄市政府警察局,岡山分局,120.30574,22.767155,北向南,60 +高雄市,橋頭區,成功路與新興路,高雄市政府警察局,岡山分局,120.30955,22.759935,北向南,60 +高雄市,橋頭區,高雄市橋頭區成功南路與仕隆路口,高雄市政府警察局,岡山分局,120.311584,22.754934,北向南,60 +高雄市,橋頭區,橋頭區成功南路與經武路口,高雄市政府警察局,岡山分局,120.3169,22.743444,北向南,60 +高雄市,燕巢區,旗楠路段〈鳳旗路44號之10旁〉,高雄市政府警察局,岡山分局,120.35628,22.755226,東向西,50 +高雄市,燕巢區,高雄市燕巢區中興路與南一巷口(燕巢國中前),高雄市政府警察局,岡山分局,120.362366,22.78693,北向南,60 +高雄市,燕巢區,鳳澄路7之32號前,高雄市政府警察局,岡山分局,120.36395,22.758595,北向南,60 +高雄市,燕巢區,台22線深水國小前路口,高雄市政府警察局,岡山分局,120.391426,22.772251,東向西,50 +高雄市,燕巢區,燕巢區深中路(台22線)國立高雄科學大學燕巢校區前,高雄市政府警察局,岡山分局,120.39946,22.77223,西向東,60 +高雄市,田寮區,古亭路(台28線)18號以東67.5公尺處(往阿蓮方向),高雄市政府警察局,湖內分局,120.40055,22.89416,東向西,50 +高雄市,田寮區,鹿埔路19號前,高雄市政府警察局,湖內分局,120.42328,22.887613,西向東,50 +高雄市,阿蓮區,復安路與玉庫路口(台19甲線往阿蓮市區),高雄市政府警察局,湖內分局,120.32285,22.84498,南向北,60 +高雄市,路竹區,路竹區環球路與樹人醫事學校前路口,高雄市政府警察局,湖內分局,120.26041,22.880974,西向東,60 +高雄市,路竹區,中山路與國昌路口,高雄市政府警察局,湖內分局,120.261246,22.854364,北向南,70 +高雄市,路竹區,中山南路、北嶺二路,高雄市政府警察局,湖內分局,120.266075,22.829268,南向北,60 +高雄市,高雄市路竹區,高雄園區國道1號聯絡道3.2K至1.5K往西高科方向,保二總隊,保二一大隊,120.27407,22.83542,東西向,70 +高雄市,路竹區,路竹區復興路327巷口,高雄市政府警察局,高市警局交通大隊,120.27446,22.847017,南向北,50 +高雄市,路竹區,復興路與復興路1133巷口,高雄市政府警察局,湖內分局,120.28646,22.831896,南向北,50 +高雄市,高雄市路竹區,高雄園區國道1號聯絡道1.5K至3.3K往東國道方向,保二總隊,保二一大隊,120.28775,22.84388,東西向,70 +高雄市,路竹區,環球路新生路,高雄市政府警察局,湖內分局,120.29253,22.878794,東向西,60 +高雄市,湖內區,和平路與東方路口,高雄市政府警察局,湖內分局,120.22501,22.876429,南向北,60 +高雄市,湖內區,中山路一段與284巷口,高雄市政府警察局,湖內分局,120.244675,22.886343,南向北,60 +高雄市,茄萣區,茄萣區正順北路近正順東路口,高雄市政府警察局,湖內分局,120.200676,22.882696,西向東,40 +高雄市,茄萣區,正順北路(高1-1線)與崎漏路口,高雄市政府警察局,湖內分局,120.210884,22.876348,東向西,60 +高雄市,永安區,台17線(保安路)201.2K處,高雄市政府警察局,岡山分局,120.24047,22.818577,南北向,70 +高雄市,旗山區,台29線(旗南三路)75.3K處,高雄市政府警察局,旗山分局,120.460945,22.805735,南北向,70 +高雄市,旗山區,旗山區旗南三路8號以北50公尺處,高雄市政府警察局,旗山分局,120.462395,22.836103,北向南,50 +高雄市,旗山區,台28線29.2公里處,高雄市政府警察局,旗山分局,120.4732,22.883623,西向東,50 +高雄市,旗山區,延平1路與旗甲路1段路口,高雄市政府警察局,旗山分局,120.48113,22.898966,北向南,60 +高雄市,旗山區,中華路與華中街口,高雄市政府警察局,旗山分局,120.4855,22.887808,西向東,50 +高雄市,旗山區,旗甲路一段(圓潭橋前),高雄市政府警察局,旗山分局,120.4934,22.91339,北向南,60 +高雄市,旗山區,旗山區台3線(旗屏二路)與高92線口,高雄市政府警察局,,120.50472,22.845268,南北雙向,70 +高雄市,旗山區,旗山區台29線(旗甲路三段)58K+274,高雄市政府警察局,,120.50848,22.943382,南向北,60 +高雄市,美濃區,美濃區中山路二段359巷口,高雄市政府警察局,旗山分局,120.51985,22.896793,南向北,60 +高雄市,美濃區,美興街232號前(月光山隧道),高雄市政府警察局,旗山分局,120.53655,22.912996,南向北,50 +高雄市,美濃區,復興街一段480號前,高雄市政府警察局,旗山分局,120.5492,22.870377,北向南,50 +高雄市,美濃區,美濃區台28線(中興路一段)37K+412,高雄市政府警察局,,120.549644,22.88204,東向西,50 +高雄市,美濃區,中華路(台28線)與獅山街口,高雄市政府警察局,旗山分局,120.57057,22.878002,東向西,60 +高雄市,六龜區,三民路37號前(台28線45.7K),高雄市政府警察局,六龜分局,120.616135,22.881773,東向西,50 +高雄市,六龜區,台28線茂林國家風景區管理處前路口,高雄市政府警察局,六龜分局,120.62428,22.88964,北向南,50 +高雄市,六龜區,旗六公路新威國小前,高雄市政府警察局,六龜分局,120.62668,22.897558,西向東,60 +高雄市,杉林區,杉林區市道181線(杉美路1段)2K+675,高雄市政府警察局,旗山分局,120.52882,22.93752,北向南,50 +高雄市,杉林區,杉林區台29線53K+207,高雄市政府警察局,旗山分局,120.54155,22.96999,南向北,60 +高雄市,內門區,內門區市道182號28.9K至31.8K( 往東-內門市區方向),高雄市政府警察局,旗山分局,120.421616,22.924803,西向東,50 +高雄市,內門區,內門區市道182號28.9K至31.8K( 往西-台南市龍崎區方向),高雄市政府警察局,旗山分局,120.45236,22.925508,東向西,50 +高雄市,內門區,旗文路(台三線401.88K),高雄市政府警察局,旗山分局,120.46642,22.9106,北向南,60 +高雄市,內門區,內門區台3線389.5K至392.5K(往北),高雄市政府警察局,旗山分局,120.46819,23.000528,南向北,60 +高雄市,內門區,內門區台3線389.5K至392.5K(往南),高雄市政府警察局,旗山分局,120.46869,22.975607,北向南,60 +新北市,板橋區,溪城路與金門街369巷,新北市政府警察局,板橋分局,121.42829,24.98137,往樹林,50 +新北市,板橋區,環漢路沙崙抽水站前,新北市政府警察局,板橋分局,121.428825,24.97892,往新莊,50 +新北市,板橋區,新北環河快速道路7公里處,新北市政府警察局,板橋分局,121.428825,25.02376,往三重,70 +新北市,板橋區,堤外便道1K+900,新北市政府警察局,板橋分局,121.4408,24.998,往板橋,50 +新北市,板橋區,環河西路5段「歡仔園防汛陸橋」前,新北市政府警察局,板橋分局,121.4414,25.00533,往土城,50 +新北市,板橋區,環河西路5段00640燈桿,新北市政府警察局,板橋分局,121.44253,25.011337,往板橋或土城,50 +新北市,新北市板橋區,臺65線5K+390,新北市政府警察局,板橋分局,121.446,25.0202,往新莊,80 +新北市,板橋區,臺65線快速公路5.4公里,新北市政府警察局,板橋分局,121.44752,25.018425,往土城,80 +新北市,板橋區,臺65線快速公路7公里,新北市政府警察局,板橋分局,121.451645,25.006397,往新莊,80 +新北市,板橋區,臺64線快速公路20.24公里,新北市政府警察局,海山分局,121.46539,25.02834,往東,60 +新北市,板橋區,縣民大道3段與民生路口,新北市政府警察局,海山分局,121.47163,25.01877,往板橋,60 +新北市,板橋區,文化路2段與長江路口,新北市政府警察局,海山分局,121.476,25.0342,往板橋,50 +新北市,板橋區,民生路1段與三民路2段正隆巷口,新北市政府警察局,海山分局,121.47617,25.01205,往板橋,50 +新北市,板橋區,華江橋下坡處,新北市政府警察局,板橋分局,121.479195,25.035868,往板橋,50 +新北市,板橋區,中山路光復橋頭,新北市政府警察局,海山分局,121.48396,25.0208,往板橋,50 +新北市,三重區,重新堤外道8.9公里處,新北市政府警察局,三重分局,121.46712,25.04094,往新莊,50 +新北市,三重區,中山橋頭,新北市政府警察局,三重分局,121.47961,25.0615,南下,50 +新北市,三重區,新北環河快速道路3.2公里處,新北市政府警察局,三重分局,121.48569,25.04718,往中和,70 +新北市,三重區,新北環河快速道路新北大橋旁,新北市政府警察局,三重分局,121.486145,25.047405,往中和,70 +新北市,三重區,新北環河快速道路3公里處,新北市政府警察局,三重分局,121.49302,25.051329,往蘆洲,70 +新北市,三重區,集賢路42號,新北市政府警察局,三重分局,121.49335,25.087778,往蘆洲,50 +新北市,三重區,環河北路3段168號前,新北市政府警察局,三重分局,121.49428,25.08842,往三重或蘆洲,50 +新北市,三重區,中山高架橋上,新北市政府警察局,三重分局,121.49623,25.05448,往新莊,50 +新北市,三重區,環河北路3段重陽橋下,新北市政府警察局,三重分局,121.49716,25.0851,往三重,50 +新北市,三重區,環河北路2段304號,新北市政府警察局,三重分局,121.49908,25.08245,往蘆洲,50 +新北市,中和區,中正路1203號前,新北市政府警察局,中和分局,121.48011,25.010181,往中山路方向,50 +新北市,中和區,臺64線快速公路23公里,新北市政府警察局,中和分局,121.481735,25.010017,往西,70 +新北市,中和區,中和區環河西路3段,新北市政府警察局,中和分局,121.48879,25.01107,往永和,50 +新北市,新北市中和區,臺64線快速道路東向25.2k主線及錦和路匝道至28.2k,新北市政府警察局,中和分局,121.49,24.9941,往東,70 +新北市,中和區,臺64線快速公路25.3公里,新北市政府警察局,中和分局,121.49166,24.994188,往東,70 +新北市,中和區,中正路與中興街,新北市政府警察局,中和分局,121.50045,24.993511,往秀朗橋方向,50 +新北市,新北市中和區,臺64線快速道路西向26.6k至28.2k,新北市政府警察局,中和分局,121.5228,24.9906,向西,70 +新北市,永和區,新北環河高架保生路匝道處,新北市政府警察局,永和分局,121.51487,25.018326,往中和,50 +新北市,永和區,環河東路2段10號,新北市政府警察局,永和分局,121.52476,25.009336,往中和或永和方向,50 +新北市,新莊區,新莊區壽山路(北118線0K至1.2K),新北市政府警察局,新莊分局,121.3983,25.044,往新莊,40 +新北市,新莊區,青山路1段173號前,新北市政府警察局,新莊分局,121.40076,25.03016,往新莊,50 +新北市,新莊區,壽山路(北118線0K+950),新北市政府警察局,新莊分局,121.4108,25.0345,往新莊,40 +新北市,新莊區,新北大道7段與鳳山街口,新北市政府警察局,新莊分局,121.4128,25.02532,往中正路,60 +新北市,新莊區,新北大道7段與鳳山街口,新北市政府警察局,新莊分局,121.41299,25.02524,往青山路,60 +新北市,新北市新莊區,中正路879號,新北市政府警察局,新莊分局,121.4175,25.0258,雙向,50 +新北市,新北市新莊區,中正路757號前,新北市政府警察局,新莊分局,121.4221,25.0287,往臺北或桃園),50 +新北市,新莊區,環河路與17越堤道路口,新北市政府警察局,新莊分局,121.44116,25.02238,往新莊,50 +新北市,新莊區,臺65線快速公路1.8公里,新北市政府警察局,新莊分局,121.44227,25.051294,往五股,80 +新北市,新莊區,臺65線快速公路1.8公里,新北市政府警察局,新莊分局,121.44227,25.051294,往板橋,80 +新北市,新莊區,中環路2段臺65線高架下,新北市政府警察局,新莊分局,121.44229,25.043856,新泰路401巷29號對面,50 +新北市,新莊區,中環路3段臺65線下橋墩,新北市政府警察局,新莊分局,121.44257,25.05136,往中原路,50 +新北市,新北市新莊區,思源路與長青路口,新北市政府警察局,新莊分局,121.46,25.0425,往五股,50 +新北市,新北市新莊區,思源路370巷口,新北市政府警察局,新莊分局,121.46,25.0517,往五股,40 +新北市,新莊區,重新堤外道9.06公里處,新北市政府警察局,新莊分局,121.46546,25.04016,往三重,50 +新北市,新店區,安康路3段新加坡社區前,新北市政府警察局,新店分局,121.47379,24.94202,往安坑,40 +新北市,新店區,安康路3段與錦秀路口,新北市政府警察局,新店分局,121.47897,24.94604,往新店,40 +新北市,新店區,安和路3段與永安街口,新北市政府警察局,新店分局,121.516556,24.985771,往新店,50 +新北市,新店區,安和路2段169巷口,新北市政府警察局,新店分局,121.51862,24.97459,往新店,50 +新北市,新店區,溪園路375號前,新北市政府警察局,新店分局,121.52319,24.979986,往環河路或中安大橋,60 +新北市,新店區,環河路168號前,新北市政府警察局,新店分局,121.52539,24.97538,往臺北、新店,60 +新北市,新店區,安康路1段與莒光路口,新北市政府警察局,新店分局,121.52834,24.96195,往新店,50 +新北市,新北市新店區,新店區環河路(中央路至白馬寺),新北市政府警察局,新店分局,121.5292,24.9717,往碧潭,60 +新北市,新店區,環河路美河市前,新北市政府警察局,新店分局,121.53375,24.970173,新店,60 +新北市,新店區,環河路小碧潭捷運站旁,新北市政府警察局,新店分局,121.53566,24.96928,往碧潭,60 +新北市,新北市新店區,新店區環河路(中央路至白馬寺),新北市政府警察局,新店分局,121.5369,24.9639,往臺北,60 +新北市,新店區,環河路白馬寺前,新北市政府警察局,新店分局,121.53719,24.96601,往臺北,60 +新北市,新店區,北宜路1段105巷口,新北市政府警察局,新店分局,121.53937,24.9552,往新店,50 +新北市,新店區,北新路3段與順安街口,新北市政府警察局,新店分局,121.54108,24.98511,往新店,50 +新北市,新店區,中興路1段與檳榔路口,新北市政府警察局,新店分局,121.54197,24.96343,往臺北,50 +新北市,新店區,中興路3段與文化路口,新北市政府警察局,新店分局,121.54414,24.98054,往新店,50 +新北市,新店區,中興路3段與寶中路口,新北市政府警察局,新店分局,121.544914,24.97905,往臺北,50 +新北市,新店區,北宜路1段246號前,新北市政府警察局,新店分局,121.54501,24.953,往坪林,50 +新北市,新店區,新烏路1段60號旁,新北市政府警察局,新店分局,121.54603,24.94848,往烏來,40 +新北市,新店區,寶橋路78巷口,新北市政府警察局,新店分局,121.54616,24.975492,往中興路方向,50 +新北市,新店區,中興路2段39號前,新北市政府警察局,新店分局,121.5462,24.9699,往碧潭或景美,50 +新北市,新店區,臺9甲線新烏路2段與屈尺路,新北市政府警察局,新店分局,121.54935,24.92282,往烏來,50 +新北市,新店區,北宜路2段82巷口,新北市政府警察局,新店分局,121.55339,24.95332,往坪林,50 +新北市,新北市新店區,北宜路2段348號對面,新北市政府警察局,新店分局,121.5628,24.9537,往新店,50 +新北市,新北市新店區,臺9線19K至23.1K,新北市政府警察局,新店分局,121.5981,24.953,往宜蘭,40 +新北市,新北市新店區,臺9線19K至23.1K,新北市政府警察局,新店分局,121.6235,24.957,往新店,40 +新北市,樹林區,中山路高架橋頭,新北市政府警察局,樹林分局,121.38438,24.96717,往樹林,50 +新北市,樹林區,八德街與堤外道路,新北市政府警察局,樹林分局,121.39155,24.96859,往鶯歌,50 +新北市,樹林區,中山路3段27巷口,新北市政府警察局,樹林分局,121.40145,24.97537,往樹林,50 +新北市,樹林區,中正路與三福路口,新北市政府警察局,樹林分局,121.4094,25.01724,往樹林,50 +新北市,樹林區,中正路與三俊街口,新北市政府警察局,樹林分局,121.41068,25.01503,往桃園,50 +新北市,樹林區,大安路537巷口,新北市政府警察局,樹林分局,121.412865,24.984545,往新莊,50 +新北市,樹林區,大安路與文化街口,新北市政府警察局,樹林分局,121.41573,24.98965,往新莊,50 +新北市,樹林區,大安路249巷口,新北市政府警察局,樹林分局,121.41921,24.99423,往新莊,50 +新北市,樹林區,環漢路五段與東豐街口,新北市政府警察局,樹林分局,121.41944,24.973124,往板橋,50 +新北市,樹林區,大安路249巷口,新北市政府警察局,樹林分局,121.41945,24.9945,往鶯歌,50 +新北市,樹林區,大安路111巷口,新北市政府警察局,樹林分局,121.4223,24.99799,往新莊,50 +新北市,樹林區,中正路102之2號旁,新北市政府警察局,樹林分局,121.42626,25.00048,往樹林,50 +新北市,樹林區,樹林陸橋樹林端,新北市政府警察局,樹林分局,121.428055,24.998964,板橋往樹林方向,40 +新北市,鶯歌區,鶯桃路與永和街口,新北市政府警察局,三峽分局,121.33123,24.96697,往鶯歌,50 +新北市,鶯歌區,中正三路193巷口,新北市政府警察局,三峽分局,121.33556,24.93945,往大溪,40 +新北市,鶯歌區,西湖街191號前,新北市政府警察局,三峽分局,121.33842,24.9639,往樹林,50 +新北市,鶯歌區,環河路與二甲路口,新北市政府警察局,三峽分局,121.3411,24.9312,往樹林,50 +新北市,鶯歌區,中正二路204463號燈桿旁,新北市政府警察局,三峽分局,121.34403,24.94919,往鶯歌,50 +新北市,鶯歌區,中正一路405號前,新北市政府警察局,三峽分局,121.35978,24.95708,往桃園,50 +新北市,鶯歌區,中正一路與碧龍巷口,新北市政府警察局,三峽分局,121.36482,24.956474,往鶯歌,50 +新北市,鶯歌區,館前路2.4公里,新北市政府警察局,三峽分局,121.3714,24.9581,往樹林,50 +新北市,三峽區,大埔路臺7乙線7.37公里處,新北市政府警察局,三峽分局,121.21386,24.51366,往桃園,40 +新北市,三峽區,大埔路臺7乙線1.97公里處,新北市政府警察局,三峽分局,121.2217,24.53442,往三峽,40 +新北市,三峽區,五寮臺7乙線7.8公里處,新北市政府警察局,三峽分局,121.3593,24.8564,往三峽,40 +新北市,三峽區,中正路2段264號前,新北市政府警察局,三峽分局,121.36589,24.91237,往大溪,50 +新北市,三峽區,復興路與大勇街口,新北市政府警察局,三峽分局,121.36717,24.93909,往鶯歌,50 +新北市,新北市三峽區,中正路1段524號旁,新北市政府警察局,三峽分局,121.3693,24.9201,往大溪,50 +新北市,三峽區,中正路1段與大同路口,新北市政府警察局,三峽分局,121.37177,24.92681,往復興路,50 +新北市,三峽區,添福路107之15號旁,新北市政府警察局,三峽分局,121.37335,24.90288,往插角,40 +新北市,三峽區,台7乙線5.3公里,新北市政府警察局,三峽分局,121.3752,24.8706,往桃園,40 +新北市,新北市三峽區,大義路與學林路口,新北市政府警察局,三峽分局,121.3767,24.9481,雙向,50 +新北市,三峽區,溪東路197號前,新北市政府警察局,三峽分局,121.40395,24.93368,往三峽,50 +新北市,三峽區,溪東路(市道110號30K+500M往三峽),新北市政府警察局,三峽分局,121.4071,24.9323,往三峽,30 +新北市,三峽區,溪東路350號前,新北市政府警察局,三峽分局,121.41125,24.92973,往新店,50 +新北市,三峽區,介壽路2段2號前,新北市政府警察局,三峽分局,121.42269,24.95929,往土城,50 +新北市,三峽區,介壽路3段148號前,新北市政府警察局,三峽分局,121.42269,24.95929,往土城,50 +新北市,三峽區,安坑路13之8號,新北市政府警察局,三峽分局,121.44138,24.92619,往新店,40 +新北市,三峽區,安坑路40號前,新北市政府警察局,三峽分局,121.45453,24.93204,往三峽,40 +新北市,淡水區,臺2線8.1公里與埤島里,新北市政府警察局,淡水分局,121.44647,25.19337,往臺北,70 +新北市,淡水區,臺2線8公里與新市二路4段,新北市政府警察局,淡水分局,121.44685,25.19218,往三芝,70 +新北市,淡水區,臺2線與牛埔子路口,新北市政府警察局,淡水分局,121.45022,25.21866,往臺北,60 +新北市,新北市淡水區,淡金路二段125號,新北市政府警察局,淡水分局,121.4506,25.182,往淡水,60 +新北市,淡水區,臺2線10.56公里處,新北市政府警察局,淡水分局,121.45065,25.21363,往三芝,60 +新北市,淡水區,臺2線與正德國中賢孝校區前,新北市政府警察局,淡水分局,121.45203,25.22415,往臺北,50 +新北市,淡水區,中正東路與竿蓁二街口,新北市政府警察局,淡水分局,121.45243,25.16272,往臺北,50 +新北市,淡水區,中正東路與坪頂路口,新北市政府警察局,淡水分局,121.45485,25.15961,往臺北,50 +新北市,淡水區,中正東路與八勢路口,新北市政府警察局,淡水分局,121.45941,25.15328,往淡水,50 +新北市,淡水區,臺2線與紅樹林捷運站前,新北市政府警察局,淡水分局,121.45947,25.15466,往臺北,50 +新北市,新北市汐止區,汐萬路3段12.8K至14.3K,新北市政府警察局,汐止分局,121.6067,25.1271,往臺北,40 +新北市,新北市汐止區,汐萬路3段11.7K至12.8K,新北市政府警察局,汐止分局,121.6095,25.1245,往臺北,40 +新北市,新北市汐止區,汐萬路3段12.8K至14.3K,新北市政府警察局,汐止分局,121.6095,25.1245,往汐止,40 +新北市,新北市汐止區,汐萬路3段6.2K至11.7K,新北市政府警察局,汐止分局,121.6159,25.1265,往臺北,40 +新北市,新北市汐止區,汐萬路3段11.7K至12.8K,新北市政府警察局,汐止分局,121.6159,25.1265,往汐止,40 +新北市,新北市汐止區,汐萬路3段6.2K至11.7K,新北市政府警察局,汐止分局,121.6352,25.111,往汐止,40 +新北市,汐止區,大同路1段與樟樹二路口,新北市政府警察局,汐止分局,121.64021,25.05999,往汐止,50 +新北市,汐止區,大同路1段與樟樹一路口,新北市政府警察局,汐止分局,121.64259,25.06111,往臺北,50 +新北市,汐止區,臺5線14.4公里處,新北市政府警察局,汐止分局,121.65135,25.06157,往基隆,50 +新北市,汐止區,臺5線15.86公里處,新北市政府警察局,汐止分局,121.66457,25.06671,往汐止,50 +新北市,汐止區,大同路3段205號前,新北市政府警察局,汐止分局,121.67155,25.07699,往基隆,50 +新北市,汐止區,新臺五路與茄苳路口,新北市政府警察局,汐止分局,121.674904,25.065943,往汐止,50 +新北市,汐止區,臺5線17.68公里處,新北市政府警察局,汐止分局,121.68126,25.06842,往基隆或汐止,50 +新北市,汐止區,大同路3段與保新路口,新北市政府警察局,汐止分局,121.68333,25.07278,往基隆,50 +新北市,瑞芳區,楓仔瀨路瑞楓陸橋前臺2丁線5.95k,新北市政府警察局,瑞芳分局,121.77496,25.10369,往基隆,50 +新北市,瑞芳區,臺62甲線4.9公里處,新北市政府警察局,瑞芳分局,121.77542,25.115238,往四腳亭,60 +新北市,瑞芳區,臺62線下明燈路匝道,新北市政府警察局,瑞芳分局,121.79625,25.11272,往瑞芳,40 +新北市,瑞芳區,臺62線快速公路16.83公里處,新北市政府警察局,瑞芳分局,121.80344,25.117428,往基隆,80 +新北市,瑞芳區,臺62線快速公路16.95公里處,新北市政府警察局,瑞芳分局,121.80344,25.117428,往瑞芳,80 +新北市,瑞芳區,中山路與東和街口,新北市政府警察局,瑞芳分局,121.80405,25.10624,往南,50 +新北市,瑞芳區,臺2丁線與明燈路口,新北市政府警察局,瑞芳分局,121.80943,25.10765,往瑞芳,50 +新北市,瑞芳區,臺2線72.4公里,新北市政府警察局,瑞芳分局,121.81608,25.12807,往宜蘭,50 +新北市,瑞芳區,臺2線81公里欽賢國中旁,新北市政府警察局,瑞芳分局,121.81609,25.12807,往宜蘭,50 +新北市,瑞芳區,臺2線78.4公里處與北34路口,新北市政府警察局,瑞芳分局,121.86391,25.122484,往貢寮,60 +新北市,瑞芳區,臺2線81.2公里與南雅路,新北市政府警察局,瑞芳分局,121.88808,25.12077,往基隆,50 +新北市,瑞芳區,臺2線84.6公里鼻頭隧道口,新北市政府警察局,瑞芳分局,121.91718,25.1212,往基隆,50 +新北市,土城區,中央路4段與龍泉路口,新北市政府警察局,土城分局,121.40913,24.94975,往土城,50 +新北市,土城區,擺接堡路與民權街,新北市政府警察局,土城分局,121.41591,24.9646,往板橋,50 +新北市,土城區,擺接堡路與民權街口,新北市政府警察局,土城分局,121.41621,24.96472,往三峽,50 +新北市,土城區,中央路3段與中興路口,新北市政府警察局,土城分局,121.42566,24.96286,往三峽,50 +新北市,土城區,中央路3段與大安路,新北市政府警察局,土城分局,121.43242,24.965454,往土城交流道,50 +新北市,土城區,擺接堡路2.5公里處與自強路口,新北市政府警察局,土城分局,121.43305,24.97264,往板橋,50 +新北市,土城區,臺65線快速公路10.4公里,新北市政府警察局,土城分局,121.4378,24.980923,往土城,60 +新北市,土城區,臺65線快速公路10.4公里,新北市政府警察局,土城分局,121.4378,24.980923,往板橋,60 +新北市,土城區,擺接堡路1號裕德國小前,新北市政府警察局,土城分局,121.43934,24.983744,往土城或板橋,50 +新北市,新北市土城區,金城路1段62號,新北市政府警察局,土城分局,121.4425,24.9709,雙向,50 +新北市,土城區,金城路2段27號前,新北市政府警察局,土城分局,121.44939,24.97739,往土城,50 +新北市,土城區,城林橋頭,新北市政府警察局,土城分局,121.4508,24.97889,往土城,50 +新北市,土城區,中華路1段與裕民路口,新北市政府警察局,土城分局,121.4508,24.97889,往中和,50 +新北市,土城區,中華路2段與水源街口,新北市政府警察局,土城分局,121.4508,24.97889,往土城,50 +新北市,土城區,金城路2段46巷口,新北市政府警察局,土城分局,121.45098,24.97919,往中和,50 +新北市,蘆洲區,環堤大道與永樂街口,新北市政府警察局,蘆洲分局,121.45572,25.08899,雙向,50 +新北市,蘆洲區,三民路與長榮路口,新北市政府警察局,蘆洲分局,121.46128,25.09364,往蘆洲,50 +新北市,蘆洲區,環堤大道與民族路422巷口,新北市政府警察局,蘆洲分局,121.47416,25.09737,往五股,50 +新北市,新北市五股區,新五路2段572號,新北市政府警察局,蘆洲分局,121.4431,25.0859,往成泰路,50 +新北市,五股區,新五路2段347號前,新北市政府警察局,蘆洲分局,121.44501,25.08844,往新莊或五股,50 +新北市,五股區,新五路3段210號,新北市政府警察局,蘆洲分局,121.44712,25.091421,往疏洪北路或新城八路,50 +新北市,五股區,臺64線快速公路10.4公里,新北市政府警察局,蘆洲分局,121.4484,25.09222,往東,80 +新北市,五股區,疏洪一路1K+535,新北市政府警察局,蘆洲分局,121.4526,25.0839,往蘆洲或新莊,50 +新北市,新北市五股區,成泰路4段43號前,新北市政府警察局,蘆洲分局,121.4555,25.1098,雙向,50 +新北市,新北市泰山區,大科路686號前,新北市政府警察局,林口分局,121.3976,25.0597,往泰山,40 +新北市,泰山區,大科路331之6號旁,新北市政府警察局,林口分局,121.40171,25.05661,往新莊,50 +新北市,泰山區,泰林路3段370巷對面,新北市政府警察局,林口分局,121.41264,25.06889,往新莊,50 +新北市,泰山區,公園路60號對面,新北市政府警察局,林口分局,121.42583,25.055712,往明志路,40 +新北市,泰山區,新北大道6段85號,新北市政府警察局,林口分局,121.42754,25.037806,往台麗街,60 +新北市,林口區,臺61線快速公路19.8公里處,新北市政府警察局,林口分局,121.30524,25.122051,往八里,90 +新北市,林口區,文化北路一段與忠孝一路口,新北市政府警察局,林口分局,121.36106,25.073347,往八里,50 +新北市,林口區,臺61線快速公路14公里處,新北市政府警察局,林口分局,121.361244,25.133865,往八里,90 +新北市,新北市林口區,文化三路1段249巷旁,新北市政府警察局,林口分局,121.3634,25.0712,往林口,50 +新北市,林口區,文化北路1段492巷口新北市特殊教育學校前,新北市政府警察局,林口分局,121.3659,25.078018,往八里,50 +新北市,林口區,中山路與中原街口,新北市政府警察局,林口分局,121.365906,25.078018,往林口,50 +新北市,林口區,文化二路與仁愛二路口,新北市政府警察局,林口分局,121.37455,25.076698,往八里,50 +新北市,林口區,文化二路1段571號,新北市政府警察局,林口分局,121.375435,25.077879,往仁愛路2段,50 +新北市,林口區,文化一路1段與麗園一街口,新北市政府警察局,林口分局,121.3755,25.07277,往林口,50 +新北市,林口區,文化北路2段與寶林路口,新北市政府警察局,林口分局,121.375755,25.08959,往八里,50 +新北市,林口區,文化三路2段328號前,新北市政府警察局,林口分局,121.37809,25.08505,往八里,50 +新北市,林口區,中山路562號,新北市政府警察局,林口分局,121.37872,25.083277,往文化三路2段,50 +新北市,林口區,文化1路、竹林一路口,新北市政府警察局,林口分局,121.385574,25.085184,往八里,50 +新北市,林口區,仁愛路1段691號前與竹林路口,新北市政府警察局,林口分局,121.3864,25.07677,往林口,50 +新北市,深坑區,文山路三段16之1號前,新北市政府警察局,新店分局,121.5646,24.98839,往臺北,60 +新北市,深坑區,106乙線0.5公里,新北市政府警察局,新店分局,121.60351,24.99938,往深坑,60 +新北市,新北市深坑區,106乙線文山路2段喜樂橋頭,新北市政府警察局,新店分局,121.6216,25.0001,往石碇,60 +新北市,深坑區,深南路與風格街口,新北市政府警察局,新店分局,121.6256,25.0165,往南港或深坑,40 +新北市,深坑區,文山路2段30巷口,新北市政府警察局,新店分局,121.62653,24.99899,往臺北,60 +新北市,新北市深坑區,文山路1段與旺躭路45巷口,新北市政府警察局,新店分局,121.6275,25.0023,往石碇,60 +新北市,新北市深坑區,文山路1段與北深路1段229巷口,新北市政府警察局,新店分局,121.6314,25.0062,往臺北,60 +新北市,石碇區,北宜路4段6號(21.3公里),新北市政府警察局,新店分局,121.6139,24.961,往坪林,40 +新北市,新北市石碇區,臺9線23.1K至26.2K,新北市政府警察局,新店分局,121.6235,24.957,往宜蘭,40 +新北市,石碇區,北宜路5段67號前,新北市政府警察局,新店分局,121.63567,24.954155,往新店,40 +新北市,石碇區,臺9線26.2公里,新北市政府警察局,新店分局,121.6478,24.95029,往坪林或新店,40 +新北市,新北市石碇區,臺9線23.1K至26.2K,新北市政府警察局,新店分局,121.648,24.95,往新店,40 +新北市,新北市石碇區,臺9線26.2K至32.2K,新北市政府警察局,新店分局,121.648,24.95,往宜蘭,40 +新北市,石碇區,106線靜安路1段356號前,新北市政府警察局,新店分局,121.64866,25.00944,往深坑或平溪,40 +新北市,石碇區,106線靜安路1段236號前,新北市政府警察局,新店分局,121.657745,25.006935,往平溪,40 +新北市,新北市坪林區,臺9線26.2K至32.2K,新北市政府警察局,新店分局,121.6708,24.9434,往新店,40 +新北市,新北市坪林區,臺9線32.2K至33.3K,新北市政府警察局,新店分局,121.6708,24.9434,往宜蘭,40 +新北市,新北市坪林區,臺9線32.2K至33.3K,新北市政府警察局,新店分局,121.6771,24.9383,往新店,40 +新北市,新北市坪林區,臺9線33.3K至37.2K,新北市政府警察局,新店分局,121.6771,24.9383,往宜蘭,40 +新北市,新北市坪林區,臺9線33.3K至37.2K,新北市政府警察局,新店分局,121.7035,24.936,往新店,40 +新北市,新北市坪林區,臺9線37.2K至42.2K,新北市政府警察局,新店分局,121.7035,24.936,往宜蘭,40 +新北市,坪林區,臺9線37.3公里,新北市政府警察局,新店分局,121.70452,24.93552,往宜蘭,40 +新北市,坪林區,臺9線38公里,新北市政府警察局,新店分局,121.71017,24.93531,往坪林,40 +新北市,新北市坪林區,臺9線37.2K至42.2K,新北市政府警察局,新店分局,121.7168,24.9108,往新店,40 +新北市,新北市坪林區,臺9線42.2K至48.4K,新北市政府警察局,新店分局,121.7168,24.9108,往宜蘭,40 +新北市,坪林區,臺9線42.2公里,新北市政府警察局,新店分局,121.71682,24.91096,往宜蘭或坪林,40 +新北市,新北市坪林區,臺9線42.2K至48.4K,新北市政府警察局,新店分局,121.7441,24.8916,往新店,40 +新北市,新北市坪林區,臺9線48.4K至56.3K,新北市政府警察局,新店分局,121.7441,24.8916,往宜蘭,40 +新北市,新北市坪林區,臺9線48.4K至56.3K,新北市政府警察局,新店分局,121.7737,24.8666,往新店,40 +新北市,三芝區,臺2線淡金公路5段屯山國小前,新北市政府警察局,淡水分局,121.45681,25.23803,往淡水,60 +新北市,三芝區,臺2線14.5公里與大片頭前,新北市政府警察局,淡水分局,121.45966,25.24675,往金山,70 +新北市,三芝區,臺2線與海景街口,新北市政府警察局,淡水分局,121.47009,25.25102,往石門,60 +新北市,三芝區,臺2線與海景街口,新北市政府警察局,淡水分局,121.47048,25.25127,往淡水,60 +新北市,三芝區,臺2線18.05公里處,新北市政府警察局,淡水分局,121.48618,25.26219,往金山,70 +新北市,三芝區,臺2線18.8公里處,新北市政府警察局,淡水分局,121.49248,25.26003,往淡水,50 +新北市,三芝區,臺2線19.7公里與埔頭坑路口,新北市政府警察局,淡水分局,121.50133,25.26166,往臺北,50 +新北市,石門區,臺2線22.8公里北觀處,新北市政府警察局,金山分局,121.52016,25.282724,往金山,70 +新北市,石門區,臺2線27.5公里,新北市政府警察局,金山分局,121.56132,25.29087,往金山,50 +新北市,石門區,臺2線27.9公里與石門國中前,新北市政府警察局,金山分局,121.56444,25.29096,往金山,50 +新北市,石門區,臺2線28.5公里處,新北市政府警察局,金山分局,121.56831,25.29364,往淡水,50 +新北市,八里區,臺15線中山路3段383號前,新北市政府警察局,蘆洲分局,121.37247,25.13779,往八里,50 +新北市,八里區,中山路3段與下罟子漁港路口,新北市政府警察局,蘆洲分局,121.38171,25.140436,往八里,50 +新北市,八里區,中山路3段112號前,新北市政府警察局,蘆洲分局,121.39,25.142183,往八里或往林口,50 +新北市,八里區,中華路3段236號長坑國小前,新北市政府警察局,蘆洲分局,121.39082,25.125595,往八里,40 +新北市,八里區,臺64線快速公路2.85公里,新北市政府警察局,蘆洲分局,121.40382,25.12744,往西,80 +新北市,八里區,中華路2段165巷,新北市政府警察局,蘆洲分局,121.407,25.15088,往龍米路3段,50 +新北市,八里區,中山路1段與忠八街口,新北市政府警察局,蘆洲分局,121.419426,25.159758, 往中山路2段,40 +新北市,八里區,省道台64線西向1.6K至5.4K,新北市政府警察局,蘆洲分局,121.4219,25.1116,往西,80 +新北市,八里區,中華路1段與中山路口,新北市政府警察局,蘆洲分局,121.42313,25.15879,往臺北,50 +新北市,八里區,龍米路3段48-51號,新北市政府警察局,蘆洲分局,121.42549,25.15932,往中山路,50 +新北市,八里區,龍米路2段與觀海大道口,新北市政府警察局,蘆洲分局,121.42912,25.15905,往中華路,50 +新北市,八里區,龍米路2段與渡船頭街口,新北市政府警察局,蘆洲分局,121.43447,25.158358,往中山路,50 +新北市,八里區,龍米路2段153之3號前,新北市政府警察局,蘆洲分局,121.4407,25.1531,往八里,50 +新北市,八里區,龍米路2段第391033號燈桿前,新北市政府警察局,蘆洲分局,121.44286,25.15061,往臺北或八里,50 +新北市,八里區,龍米路2段米倉國小前,新北市政府警察局,蘆洲分局,121.44574,25.14726,往八里,50 +新北市,八里區,龍米路1段聖心女中前,新北市政府警察局,蘆洲分局,121.45009,25.13583,往臺北,50 +新北市,八里區,龍米路1段與龍形一街口,新北市政府警察局,蘆洲分局,121.45138,25.13019,往八里,50 +新北市,八里區,龍米路1段與龍形三街口,新北市政府警察局,蘆洲分局,121.45154,25.13205,往臺北,50 +新北市,八里區,龍米路1段90巷口,新北市政府警察局,蘆洲分局,121.45458,25.12329,往八里,50 +新北市,八里區,龍米路一段65巷口,新北市政府警察局,蘆洲分局,121.45556,25.121183,往五股,50 +新北市,八里區,龍米路1段2之1號旁,新北市政府警察局,蘆洲分局,121.45757,25.11525,往八里,50 +新北市,雙溪區,臺2丙線12.7公里,新北市政府警察局,瑞芳分局,121.79376,25.01914,往雙溪,50 +新北市,雙溪區,臺2丙線17公里,新北市政府警察局,瑞芳分局,121.830345,25.02876,往雙溪,60 +新北市,雙溪區,臺2丙線過港隧道與中山路口,新北市政府警察局,瑞芳分局,121.86508,25.032803,往貢寮,40 +新北市,貢寮區,臺2丙線25.95公里,新北市政府警察局,瑞芳分局,121.90777,25.017883,往宜蘭,50 +新北市,貢寮區,臺2線91公里,新北市政府警察局,瑞芳分局,121.91446,25.07952,往宜蘭或瑞芳,60 +新北市,貢寮區,臺2線與仁愛路口,新北市政府警察局,瑞芳分局,121.92373,25.05334,往瑞芳,50 +新北市,貢寮區,臺2線與仁愛路口,新北市政府警察局,瑞芳分局,121.9239,25.05363,往宜蘭,50 +新北市,貢寮區,臺2線96.55公里處,新北市政府警察局,瑞芳分局,121.92655,25.04003,往宜蘭或基隆,60 +新北市,貢寮區,臺2線100.2公里處,新北市政府警察局,瑞芳分局,121.94097,25.01935,往宜蘭,50 +新北市,新北市貢寮區,臺2線112.1公里,新北市政府警察局,瑞芳分局,121.9794,24.9928,往宜蘭,50 +新北市,貢寮區,臺2線104.6公里處,新北市政府警察局,瑞芳分局,121.98017,25.02287,往宜蘭或瑞芳,50 +新北市,金山區,臺2線35.3公里處,新北市政府警察局,金山分局,121.62368,25.27129,往金山,70 +新北市,金山區,臺2甲線0.9公里處,新北市政府警察局,金山分局,121.62376,25.21971,往金山或往臺北,50 +新北市,金山區,臺2線38.9公里處,新北市政府警察局,金山分局,121.63158,25.239101,往金山,60 +新北市,金山區,臺2線與陽金公路口,新北市政府警察局,金山分局,121.63168,25.22149,往萬里,70 +新北市,金山區,臺2線42.5公里處,新北市政府警察局,金山分局,121.63982,25.21736,往萬里,60 +新北市,萬里區,臺2線43.5公里大鵬派出所前,新北市政府警察局,金山分局,121.6465,25.21225,往基隆,50 +新北市,萬里區,臺2線大鵬國小對面,新北市政府警察局,金山分局,121.65275,25.20877,往金山,60 +新北市,萬里區,臺2線47.1公里萬里隧道出口處,新北市政府警察局,金山分局,121.6776,25.20037,往金山,50 +新北市,新北市萬里區,萬里隧道,新北市政府警察局,金山分局,121.6777,25.2004,往萬里,50 +新北市,萬里區,臺2線48.3公里萬里隧道出口處,新北市政府警察局,金山分局,121.68391,25.19181,往基隆,50 +新北市,新北市萬里區,萬里隧道,新北市政府警察局,金山分局,121.6843,25.1922,往金山,50 +新北市,萬里區,臺2線49.5公里處,新北市政府警察局,金山分局,121.68742,25.18376,往金山,60 +臺中市,中區,公園路與中華路二段路口,臺中市政府警察局,第一分局,120.67897,24.147018,東向西,50 +臺中市,中區,建國路與民權路口,臺中市政府警察局,第一分局,120.68188,24.135622,西向東,50 +臺中市,東區,東區建成路521號前,臺中市政府警察局,,120.69571,24.134548,雙向,50 +臺中市,東區,東區旱溪西路二段17巷口,臺中市政府警察局,,120.69949,24.149633,南向北,50 +臺中市,東區,環中東路四段與樂業路口,臺中市政府警察局,第三分局,120.70936,24.135723,北向南,50 +臺中市,南區,南區復興路一段129號前,臺中市政府警察局,,120.6484,24.111053,東向西,60 +臺中市,南區,復興路一段與工學路口,臺中市政府警察局,第三分局,120.658005,24.117344,西向東,50 +臺中市,南區,南區文心南路930號前,臺中市政府警察局,,120.660736,24.110003,北向南,60 +臺中市,南區,南區南平路97號前,臺中市政府警察局,,120.66404,24.12225,雙向,50 +臺中市,南區,國光路與南門路口,臺中市政府警察局,第三分局,120.67933,24.122667,北向南,50 +臺中市,南區,南區忠明南路1265號前,臺中市政府警察局,,120.68229,24.119066,雙向,50 +臺中市,西區,西區忠明南路與忠明南路326巷口,臺中市政府警察局,,120.657326,24.13757,雙向,50 +臺中市,西區,忠明南路口與民生路口,臺中市政府警察局,第一分局,120.65734,24.14457,北向南,50 +臺中市,西區,臺灣大道二段與忠明路口,臺中市政府警察局,第一分局,120.6599,24.156784,東向西,60 +臺中市,西區,西區建國北路二段101號前,臺中市政府警察局,,120.66449,24.128283,雙向,50 +臺中市,西區,五權路與英才路口,臺中市政府警察局,第一分局,120.66702,24.141409,東向西,50 +臺中市,北區,進化北路與學士路口,臺中市政府警察局,第二分局,120.68129,24.16301,東向西,50 +臺中市,北區,三民路三段與育才街口(往公園路方向),臺中市政府警察局,第二分局,120.684265,24.150146,北向南,50 +臺中市,北區,崇德路一段與太原路二段路口,臺中市政府警察局,第二分局,120.6851,24.165606,北向南,50 +臺中市,北區,三民路三段與崇德路一段路口(往五權路方向),臺中市政府警察局,第二分局,120.68655,24.154957,東向西,50 +臺中市,北區,北區東光路270號前,臺中市政府警察局,,120.69855,24.152458,北向南,50 +臺中市,西屯區,西屯區都會園路(往西屯路距都會公園1.35公里),臺中市政府警察局,,120.59475,24.196201,北向南,50 +臺中市,西屯區,西屯區臺灣大道四段2088號前(往市區),臺中市政府警察局,,120.5978,24.1819,西向東,50 +臺中市,西屯區,台灣大道四段與東大路一段路口(往市區),臺中市政府警察局,第六分局,120.6022,24.1827,西向東,50 +臺中市,西屯區,西屯區臺灣大道四段近東大路一段(側門慢車道),臺中市政府警察局,,120.60272,24.182938,西向東,40 +臺中市,西屯區,西屯區東大路一段450號前往西屯路三段方向,臺中市政府警察局,,120.60414,24.18653,南向北,50 +臺中市,西屯區,科園路29號,保二總隊,保二三大隊,120.60799,24.203812,雙向,40 +臺中市,西屯區,西屯區西屯路三段261號前,臺中市政府警察局,,120.6128,24.1901,西向東,50 +臺中市,西屯區,西屯區福科路617號前往福林路方向中央分隔島,臺中市政府警察局,,120.61284,24.186693,西向東,50 +臺中市,西屯區,安和路1號前,臺中市政府警察局,第六分局,120.617775,24.16113,北向南,50 +臺中市,西屯區,臺灣大道四段與中工三路口,臺中市政府警察局,第六分局,120.619835,24.181044,西向東,50 +臺中市,西屯區,西屯區安和路99-38號前,臺中市政府警察局,,120.62116,24.171976,南向北,50 +臺中市,西屯區,福雅路與西林巷口,臺中市政府警察局,第六分局,120.627754,24.201817,北向南,50 +臺中市,西屯區,環中路三段(龍洋巷50-15號前),臺中市政府警察局,第六分局,120.63082,24.167393,南北雙向,60 +臺中市,西屯區,西屯區市政路123號前,臺中市政府警察局,,120.63997,24.158367,西向東,60 +臺中市,西屯區,台灣大道三段與河南路三段路口(往市區),臺中市政府警察局,第六分局,120.640724,24.164879,西向東,60 +臺中市,西屯區,西屯區環中路二段766號,臺中市政府警察局,,120.64267,24.19317,南向北,60 +臺中市,西屯區,西屯區黎明路三段與僑大五路口,臺中市政府警察局,,120.64392,24.191656,東向西,50 +臺中市,西屯區,西屯區中彰快速道路12.7K(往烏日方向),臺中市政府警察局,,120.644775,24.194983,東向西,80 +臺中市,西屯區,西屯區中彰快速道路13.3K(往中清路方向),臺中市政府警察局,,120.650085,24.197182,西向東,80 +臺中市,西屯區,中清路二段與環中路一段路口(往大雅區),臺中市政府警察局,第六分局,120.65583,24.199211,南向北,50 +臺中市,西屯區,河南路二段與長安路二段路口,臺中市政府警察局,第六分局,120.66065,24.172567,北向南,50 +臺中市,南屯區,向上路五段往龍井區方向(距五權西路1.2K處),臺中市政府警察局,第四分局,120.58719,24.161362,東向西,60 +臺中市,南屯區,向上路五段(往市區距離精科路360公尺),臺中市政府警察局,第四分局,120.60441,24.151878,西向東,60 +臺中市,南屯區,南屯區永春南路148號前,臺中市政府警察局,,120.60922,24.138643,西向東,50 +臺中市,南屯區,南屯區五權西路三段225-7號前,臺中市政府警察局,,120.611015,24.154503,雙向,50 +臺中市,南屯區,南屯區中彰快速道路4.8K,臺中市政府警察局,,120.619804,24.129442,雙向,80 +臺中市,南屯區,環中路三段與五權西路二段口,臺中市政府警察局,第四分局,120.6232,24.149775,北向南,40 +臺中市,南屯區,南屯區環中路四段56-8號,臺中市政府警察局,,120.62328,24.147081,雙向,60 +臺中市,南屯區,環中路四段與向上路三段路口,臺中市政府警察局,第四分局,120.623505,24.144829,南向北,40 +臺中市,南屯區,南屯區向上路三段418號前,臺中市政府警察局,,120.62725,24.145042,西向東,50 +臺中市,南屯區,南屯區環中路四段643號前,臺中市政府警察局,,120.62967,24.12745,北向南,60 +臺中市,南屯區,南屯區五權西路二段1001號前,臺中市政府警察局,,120.630356,24.146921,雙向,50 +臺中市,南屯區,永春東路1387號前,臺中市政府警察局,第四分局,120.630775,24.13873,西向東,50 +臺中市,南屯區,南屯區永春東路1392號對面,臺中市政府警察局,,120.630974,24.138615,西向東,50 +臺中市,南屯區,公益路二段與文心路一段路口,臺中市政府警察局,第四分局,120.647316,24.150768,東向西,50 +臺中市,北屯區,松竹路三段與后庄路口,臺中市政府警察局,第五分局,120.67149,24.192783,東向西,50 +臺中市,北屯區,北屯區四平路仁愛公園旁,臺中市政府警察局,,120.674286,24.181917,西向東,50 +臺中市,北屯區,崇德路二段與文心路四段路口,臺中市政府警察局,第五分局,120.68546,24.172531,北向南,50 +臺中市,北屯區,北屯區崇德路三段938號前,臺中市政府警察局,,120.6867,24.203175,雙向,60 +臺中市,北屯區,太原路三段與旱溪東路三段路口,臺中市政府警察局,第五分局,120.706024,24.164804,東向西,60 +臺中市,北屯區,北屯區旱溪東路三段48號前,臺中市政府警察局,,120.71065,24.176659,北向南,50 +臺中市,北屯區,北屯區太原路三段1027-1號前,臺中市政府警察局,,120.71781,24.163551,西向東,60 +臺中市,北屯區,北屯區軍功路二段571號前,臺中市政府警察局,,120.71834,24.188057,北向南,50 +臺中市,北屯區,環中東路三段與太原路三段路口(下閘道及慢車道往太平),臺中市政府警察局,第五分局,120.71938,24.163439,北向南,40 +臺中市,北屯區,北屯區松竹路一段360號前(往環中東路一段方向),臺中市政府警察局,,120.72484,24.180975,東向西,50 +臺中市,北屯區,北屯區廍子路456號前,臺中市政府警察局,,120.73345,24.167746,南向北,50 +臺中市,北屯區,北屯區祥順路二段398號前,臺中市政府警察局,,120.73518,24.176296,北向南,50 +臺中市,北屯區,北屯區廍子路與廍子路700巷口,臺中市政府警察局,,120.73828,24.176615,東向西,50 +臺中市,北屯區,北屯區東山路二段151-3號前,臺中市政府警察局,,120.76548,24.198912,東向西,50 +臺中市,豐原區,豐原區豐原大道八段(愛心紀念公園前),臺中市政府警察局,,120.706635,24.24755,南北雙向,60 +臺中市,豐原區,豐原區國豐路一段501號,臺中市政府警察局,,120.71295,24.277452,西向東,50 +臺中市,豐原區,圓環北路二段與大順街口,臺中市政府警察局,豐原分局,120.72356,24.26045,西向東,50 +臺中市,豐原區,豐原區豐原大道六段516號前,臺中市政府警察局,,120.72574,24.264332,東向西,60 +臺中市,豐原區,豐原區豐原大道四段近379號前,臺中市政府警察局,,120.7364,24.24755,東向西,60 +臺中市,豐原區,豐勢路二段與豐年路口,臺中市政府警察局,豐原分局,120.736855,24.261272,北向南,50 +臺中市,豐原區,豐勢路二段與萬順一街口,臺中市政府警察局,豐原分局,120.75961,24.277002,北向南,50 +臺中市,東勢區,東勢區東蘭路(台3線152.3K),臺中市政府警察局,,120.79997,24.291922,北向南,60 +臺中市,東勢區,東關路六段與新盛街口,臺中市政府警察局,東勢分局,120.834564,24.237774,西向東,60 +臺中市,東勢區,東關路六段199巷口,臺中市政府警察局,東勢分局,120.83711,24.221622,西向東,60 +臺中市,東勢區,東勢區東關路六段近262巷,臺中市政府警察局,,120.83718,24.222034,東向西,60 +臺中市,大甲區,大甲區中山路一段近東安路處,臺中市政府警察局,,120.608826,24.32607,南向北,70 +臺中市,大甲區,經國路與光明路口,臺中市政府警察局,大甲分局,120.61697,24.347183,北向南,60 +臺中市,大甲區,經國路與育英路口,臺中市政府警察局,大甲分局,120.61876,24.35378,南向北,60 +臺中市,大甲區,經國路與和平路口,臺中市政府警察局,大甲分局,120.6228,24.356602,北向南,60 +臺中市,大甲區,中山路二段與幼獅路口,臺中市政府警察局,大甲分局,120.64362,24.408592,南向北,70 +臺中市,大甲區,經國路與通天路口,臺中市政府警察局,大甲分局,120.651505,24.382694,北向南,70 +臺中市,清水區,環港北路190燈桿(高美濕地景觀橋旁),臺中港警總隊,,120.54493,24.301151,南向北,50 +臺中市,清水區,臨港路六段與港埠路五段路口,臺中市政府警察局,清水分局,120.55248,24.294132,北向南,70 +臺中市,清水區,臨港路六段與高美路口,臺中市政府警察局,清水分局,120.56402,24.296701,南向北,70 +臺中市,清水區,中清路九段91巷口,臺中市政府警察局,清水分局,120.56481,24.271301,東向西,60 +臺中市,清水區,臺61線快速道路148.1K至156.4K,臺中市政府警察局,,120.56591,24.320395,北向南,90 +臺中市,清水區,中華路與鰲峰路口,臺中市政府警察局,清水分局,120.566574,24.267813,南向北,70 +臺中市,清水區,中華路與高美路口,臺中市政府警察局,清水分局,120.57553,24.27849,北向南,70 +臺中市,清水區,清水區臨港路七段(台17線近1K處),臺中市政府警察局,,120.58682,24.303308,東向西,70 +臺中市,清水區,清水區中山路553號前,臺中市政府警察局,,120.58764,24.291664,北向南,70 +臺中市,沙鹿區,沙鹿區向上路七段近321號,臺中市政府警察局,,120.559746,24.210121,東向西,60 +臺中市,沙鹿區,臺灣大道七段與七賢路口,臺中市政府警察局,清水分局,120.56767,24.238121,西向東,60 +臺中市,沙鹿區,沙鹿區向上路六段752號前(龍井交流道),臺中市政府警察局,,120.56995,24.201292,東向西,50 +臺中市,沙鹿區,沙鹿區臺灣大道七段466號前,臺中市政府警察局,,120.57241,24.232698,東向西,60 +臺中市,沙鹿區,沙鹿區中清路七段(台10線5.5K),臺中市政府警察局,,120.57488,24.253681,西向東,60 +臺中市,沙鹿區,臺灣大道七段(台12線6.4k)(靜宜大學),臺中市政府警察局,清水分局,120.5771,24.2254,東向西,60 +臺中市,沙鹿區,臺灣大道六段(台12線7.4k)(弘光科技大學),臺中市政府警察局,清水分局,120.580826,24.216763,東向西,60 +臺中市,沙鹿區,沙鹿區中清路七段(台10線6.7K),臺中市政府警察局,,120.58471,24.25025,東向西,60 +臺中市,沙鹿區,沙鹿區中清路六段(台10線9.2K),臺中市政府警察局,,120.60923,24.24623,東向西,70 +臺中市,梧棲區,中二路3k+587處(建新物流專區旁),臺中港警總隊,,120.52082,24.252245,南向北,60 +臺中市,梧棲區,中二路與臺灣大道10段路口,臺中港警總隊,,120.52259,24.255108,東向西,50 +臺中市,梧棲區,臺61線快速道路157.8K至151.6K,臺中市政府警察局,,120.52294,24.218498,南向北,90 +臺中市,梧棲區,中二路與中橫一路路口,臺中港警總隊,,120.52318,24.257414,北向南,60 +臺中市,梧棲區,港埠路二段與大智路二段路口,臺中市政府警察局,清水分局,120.53942,24.258165,北向南,60 +臺中市,梧棲區,梧棲區中華路一段(台1線168.5K),臺中市政府警察局,,120.548325,24.236662,北向南,70 +臺中市,后里區,臺中市西屯區東大路一段與中科路口,保二總隊,保二三大隊,120.61238,24.209778,南往北,60 +臺中市,后里區,三豐路三段(正隆紙廠)前,臺中市政府警察局,大甲分局,120.72255,24.284721,北向南,60 +臺中市,后里區,后科路三段2號(后里園區汙水處理廠),保二總隊,保二三大隊,120.72295,24.321606,雙向,50 +臺中市,后里區,后里區三豐路三段與枋寮路口,臺中市政府警察局,,120.723434,24.29135,北向南,60 +臺中市,后里區,后里區三豐路五段(中社花市前),臺中市政府警察局,,120.7308,24.33512,北向南,60 +臺中市,后里區,后科路二段(盟力公司),保二總隊,保二三大隊,120.7323,24.3199,雙向,50 +臺中市,后里區,臺中市后里區后科路一段(友達公司3號保全崗旁),保二總隊,保二三大隊,120.7324,24.2915,雙向,50 +臺中市,神岡區,神岡區民生路122號前(台10線17.4K),臺中市政府警察局,,120.675,24.240812,東西雙向,60 +臺中市,神岡區,神岡區崇德路3之1號前,臺中市政府警察局,,120.69065,24.22982,南北雙向,60 +臺中市,潭子區,崇德路四段與雅潭路口,臺中市政府警察局,豐原分局,120.68834,24.21576,南向北,60 +臺中市,潭子區,潭子區中山路一段261號前,臺中市政府警察局,,120.70297,24.198017,北向南,60 +臺中市,潭子區,中山路二段與潭子街一段路口,臺中市政府警察局,豐原分局,120.70532,24.210285,北向南,60 +臺中市,潭子區,中山路三段與祥和路口,臺中市政府警察局,豐原分局,120.70861,24.22941,南向北,60 +臺中市,潭子區,潭子區中彰快速道路19.4K(往烏日方向),臺中市政府警察局,,120.70975,24.20075,東向西,80 +臺中市,潭子區,潭子區中彰快速道路19.4K(往太平方向),臺中市政府警察局,,120.70982,24.200447,西向東,80 +臺中市,潭子區,潭子區豐興路二段(中89線4.2K),臺中市政府警察局,,120.72174,24.209267,北向南,50 +臺中市,潭子區,潭子區豐興路二段(中89線3.96K北上),臺中市政府警察局,,120.72229,24.210611,南向北,50 +臺中市,大雅區,中部科學工業園區中科路近科雅東路口,保二總隊,保二第三大隊,120.62186,24.207615,雙向,60 +臺中市,大雅區,大雅區中科路1088號前往永和路方向快慢分隔島,臺中市政府警察局,,120.63207,24.205421,東向西,60 +臺中市,大雅區,大雅區雅潭路三段與雅潭路三段400巷口(橋上),臺中市政府警察局,,120.67085,24.215734,東向西,50 +臺中市,石岡區,明德路與大勇街口,臺中市政府警察局,東勢分局,120.773125,24.27559,北向南,70 +臺中市,石岡區,石岡區明德路68之2號前,臺中市政府警察局,,120.77903,24.27415,北向南,70 +臺中市,石岡區,石岡區豐勢路與廣華街口,臺中市政府警察局,,120.78272,24.275433,北向南,70 +臺中市,石岡區,豐勢路與萬仙街口,臺中市政府警察局,東勢分局,120.79112,24.27301,西向東,70 +臺中市,烏日區,中山路三段與高鐵東路口(往市區方向),臺中市政府警察局,烏日分局,120.36817,24.06411,西向東,70 +臺中市,烏日區,烏日區環中路八段599號前,臺中市政府警察局,,120.38841,24.0466,南北雙向,60 +臺中市,烏日區,烏日區中山路三段917號前,臺中市政府警察局,,120.59575,24.11225,西向東,70 +臺中市,烏日區,中山路三段與學田路口,臺中市政府警察局,烏日分局,120.60754,24.108591,北向南,70 +臺中市,烏日區,烏日區環河路二段(近春源鋼鐵公司),臺中市政府警察局,,120.637,24.09453,東西雙向,60 +臺中市,烏日區,環中路八段與褔泰街口,臺中市政府警察局,烏日分局,120.647896,24.086382,北向南,60 +臺中市,烏日區,環中路六段與光明路口,臺中市政府警察局,烏日分局,120.6498,24.10689,北向南,50 +臺中市,烏日區,環中路七段與勤農巷口,臺中市政府警察局,烏日分局,120.65213,24.10482,南向北,50 +臺中市,大肚區,沙田路三段889巷路口,臺中市政府警察局,烏日分局,120.542145,24.169611,北向南,70 +臺中市,大肚區,自由路與仁德路口,臺中市政府警察局,烏日分局,120.54904,24.146513,南向北,70 +臺中市,龍井區,環港南路81至82號燈桿間,臺中港警總隊,,120.48009,24.208727,東向西,50 +臺中市,龍井區,中南一路6K+222公尺處(中龍鋼鐵旁),臺中港警總隊,,120.497734,24.220963,南向北,50 +臺中市,龍井區,龍井區西濱路二段與臨港東路二段路口,臺中市政府警察局,烏日分局,120.51382,24.198784,北向南,60 +臺中市,龍井區,龍井區向上路八段與193巷口處,臺中市政府警察局,,120.537636,24.219357,東向西,60 +臺中市,龍井區,龍井區中華路二段480號前,臺中市政府警察局,,120.53984,24.208696,南向北,70 +臺中市,龍井區,中華路一段與茄投路口,臺中市政府警察局,烏日分局,120.54306,24.176163,北向南,70 +臺中市,龍井區,龍井區中華路一段(台1線175.5k),臺中市政府警察局,,120.54362,24.178783,南向北,70 +臺中市,龍井區,龍井區向上路6段與中興路口至沙鹿區向上路6段與自立路口,臺中市政府警察局,,120.57346,24.18763,東往西,50 +臺中市,龍井區,中興路東端路口,臺中市政府警察局,烏日分局,120.57871,24.187832,南向北,60 +臺中市,龍井區,龍井區向上路六段(中136線10.2K),臺中市政府警察局,,120.57916,24.176645,東向西,60 +臺中市,龍井區,龍井區臺灣大道六段與水裡社路口處(台12線10.1K),臺中市政府警察局,,120.57993,24.192793,東向西,70 +臺中市,霧峰區,霧峰區中正路569-9號前,臺中市政府警察局,,120.41613,24.02899,南向北,70 +臺中市,霧峰區,中正路與吉峰路口(往大里方向),臺中市政府警察局,霧峰分局,120.41993,24.04543,南向北,50 +臺中市,霧峰區,霧峰區環河路一段702號,臺中市政府警察局,,120.65812,24.087242,東向西,60 +臺中市,霧峰區,霧峰區中投公路11.4K(南下),臺中市政府警察局,,120.68192,24.037436,北向南,70 +臺中市,霧峰區,霧峰區中投公路11.5K(北上),臺中市政府警察局,,120.68279,24.036856,南向北,70 +臺中市,太平區,中彰快速道路東平路匝道口,臺中市政府警察局,太平分局,120.70977,24.1347,南向北,40 +臺中市,太平區,太平區中彰快速道路27.5K(往大里方向),臺中市政府警察局,,120.70988,24.136902,北向南,80 +臺中市,太平區,環中東路四段與十甲路口,臺中市政府警察局,太平分局,120.712036,24.14412,南向北,50 +臺中市,太平區,太平區中彰快速道路25.9K(往潭子方向),臺中市政府警察局,,120.71485,24.149885,南向北,80 +臺中市,太平區,太平區環中東路三段(育才路與樹孝路67巷間),臺中市政府警察局,,120.71678,24.154285,北向南,50 +臺中市,太平區,太平區祥順路一段310號前,臺中市政府警察局,,120.72522,24.15363,南北雙向,50 +臺中市,大里區,大里區環河路一段188號(中來水泥廠前),臺中市政府警察局,,120.40692,24.0522,東向西,60 +臺中市,大里區,大里區國光路二段505號前,臺中市政府警察局,,120.40746,24.0669,北向南,50 +臺中市,大里區,大里區國光路一段72號前,臺中市政府警察局,,120.41064,24.05835,南向北,50 +臺中市,大里區,德芳南路口與環中東路六段路口,臺中市政府警察局,霧峰分局,120.41471,24.06039,西向東,60 +臺中市,大里區,大里區中投公路4.5K(南下),臺中市政府警察局,,120.66426,24.089636,北向南,70 +臺中市,大里區,大里區中投公路4.4K(北上),臺中市政府警察局,,120.66457,24.09063,南向北,70 +臺中市,大里區,文心南路與福德路口,臺中市政府警察局,霧峰分局,120.665726,24.106167,西向東,60 +臺南市,新營區,長榮路與三興街口172線20.05公里,臺南市政府警察局,新營分局,120.300354,23.319435,東向,50 +臺南市,新營區,臺1線290.3公里與東山路口,臺南市政府警察局,新營分局,120.32573,23.308907,北向,50 +臺南市,新營區,長榮路與臺一線路口,臺南市政府警察局,新營分局,120.33309,23.31758,多向,70 +臺南市,新營區,南314線1公里,臺南市政府警察局,新營分局,120.3359,23.309875,雙向,50 +臺南市,鹽水區,飯店里臺19線110.3公里,臺南市政府警察局,新營分局,120.20978,23.263838,雙向,70 +臺南市,鹽水區,三和里田寮往臺19線路口,臺南市政府警察局,新營分局,120.22941,23.276768,雙向,50 +臺南市,鹽水區,歡雅里臺19線105.6公里,臺南市政府警察局,新營分局,120.241684,23.29279,北向,50 +臺南市,白河區,臺1線281.7公里處後壁陸橋北端,臺南市政府警察局,白河分局,120.36489,23.374134,雙向,70 +臺南市,白河區,臺1線279.9公里與南91線路口,臺南市政府警察局,白河分局,120.37534,23.388468,北向,70 +臺南市,柳營區,長榮路四段近2.8公里處,臺南市政府警察局,新營分局,120.2939,23.282194,雙向,60 +臺南市,柳營區,臺1線294.1公里,臺南市政府警察局,新營分局,120.32532,23.27626,雙向,70 +臺南市,東山區,165線18.82公里,臺南市政府警察局,白河分局,120.400185,23.310371,雙向,50 +臺南市,東山區,曾文水庫道路7公里,保七總隊,保七第二大隊,120.51807,23.24088,西向東方向,40 +臺南市,東山區,曾文水庫道路7.5K公里,保七總隊,保七第二大隊,120.52249,23.24212,雙向(東往西、西往東),40 +臺南市,東山區,曾文水庫道路8.1公里,保七總隊,保七第二大隊,120.52639,23.24631,東向西方向,40 +臺南市,麻豆區,176線16.9公里麻豆口路口,臺南市政府警察局,麻豆分局,120.21999,23.176996,西向,60 +臺南市,麻豆區,新生南路與中山路口,臺南市政府警察局,麻豆分局,120.24107,23.184969,雙向,50 +臺南市,麻豆區,臺19甲線與中正、文昌路口,臺南市政府警察局,麻豆分局,120.25361,23.189913,雙向,60 +臺南市,麻豆區,臺19甲17.2公里與新生南路路口,臺南市政府警察局,麻豆分局,120.25403,23.176693,北向,50 +臺南市,六甲區,臺1線297.3公里與174線路口,臺南市政府警察局,麻豆分局,120.31245,23.253683,南向,70 +臺南市,六甲區,臺1線298.8公里與174線路口,臺南市政府警察局,麻豆分局,120.31561,23.24004,北向,70 +臺南市,官田區,臺1線302公里,臺南市政府警察局,麻豆分局,120.30732,23.214054,北向,50 +臺南市,大內區,臺84線37.2公里處走馬瀨隧道口,臺南市政府警察局,善化分局,120.42545,23.142551,雙向,90 +臺南市,學甲區,臺19線117.5公里大安里大灣路口,臺南市政府警察局,學甲分局,120.18567,23.211151,南向,50 +臺南市,西港區,臺19線125.8公里與南45線往後營路口,臺南市政府警察局,佳里分局,120.19251,23.142836,北向,70 +臺南市,七股區,臺17線152.6公里大潭寮路口,臺南市政府警察局,佳里分局,120.124985,23.189188,北向,70 +臺南市,七股區,臺17線162.05公里與南38線路口,臺南市政府警察局,佳里分局,120.131676,23.104435,南向,70 +臺南市,七股區,臺17線153.95公里處,臺南市政府警察局,佳里分局,120.133705,23.175344,雙向,60 +臺南市,七股區,臺17線155.6公里篤加國小前路口,臺南市政府警察局,佳里分局,120.13461,23.159895,南向,70 +臺南市,北門區,臺61線281.9公里,臺南市政府警察局,學甲分局,120.12972,23.294575,南向,90 +臺南市,新化區,臺19甲線33.5公里,臺南市政府警察局,新化分局,120.29865,23.055922,雙向,70 +臺南市,新化區,中正路與中山路口,臺南市政府警察局,新化分局,120.308044,23.035929,多向,50 +臺南市,新化區,中正路與信義路路口周邊路段,臺南市政府警察局,新化分局,120.30828,23.034962,多向,50 +臺南市,新化區,臺19甲線與信義路路口,臺南市政府警察局,新化分局,120.32138,23.038275,雙向,50 +臺南市,新化區,臺20線15.9公里國8道路口,臺南市政府警察局,新化分局,120.33201,23.061539,南向,60 +臺南市,善化區,南科北路與環西路二段,保二總隊,保二第一大隊,120.272125,23.121284,東西向,60 +臺南市,善化區,環西路二段與南科七路口,保二總隊,保二第一大隊,120.27259,23.109247,南北向,50 +臺南市,善化區,南科北路與南科九路口,保二總隊,保二第一大隊,120.273506,23.117811,南北向,60 +臺南市,善化區,南科北路與南科九路口,保二總隊,保二第一大隊,120.273605,23.117603,東西向,60 +臺南市,善化區,南科北路與南科八路口,保二總隊,保二第一大隊,120.27492,23.114704,南向,60 +臺南市,善化區,南科北路與南科七路口,保二總隊,保二第一大隊,120.27672,23.110853,北向南,60 +臺南市,善化區,環東路二段與南科九路口,保二總隊,保二第一大隊,120.27739,23.119776,西向,50 +臺南市,善化區,南科七路與環東路二段路口,保二總隊,保二第一大隊,120.28151,23.112717,西向,50 +臺南市,善化區,南科七路與三抱竹路口,保二總隊,保二第一大隊,120.282555,23.090631,東西向,50 +臺南市,善化區,西拉雅大道與大順六路口,保二總隊,保二第一大隊,120.28986,23.104445,東向西,60 +臺南市,善化區,西拉雅大道與大順六路口,保二總隊,保二第一大隊,120.290016,23.104391,東向西,60 +臺南市,善化區,臺1線310.6公里處,臺南市政府警察局,善化分局,120.33444,23.150946,雙向,70 +臺南市,新市區,南科三路與道爺路口,保二總隊,保二第一大隊,120.26776,23.093756,西向,50 +臺南市,新市區,社內里大洲五號橋T字路口,臺南市政府警察局,善化分局,120.27488,23.077768,雙向,25 +臺南市,新市區,新港社大道(橋上雙向),保二總隊,保二第一大隊,120.278786,23.082232,雙向,60 +臺南市,新市區,西拉雅大道與南科南北路口,保二總隊,保二第一大隊,120.28029,23.102247,東西向,60 +臺南市,新市區,西拉雅大道與南科南路口,保二總隊,保二第一大隊,120.2803,23.102236,東西向,60 +臺南市,新市區,南科南路與南科三路,保二總隊,保二第一大隊,120.28104,23.098495,東西向,60 +臺南市,新市區,臺一線與新港社大道,臺南市政府警察局,善化分局,120.281586,23.062323,多向,70 +臺南市,新市區,南科南路與環西路一段路口,保二總隊,保二一大隊,120.28252,23.090643,北向,60 +臺南市,新市區,南科南路與環西路一段路口,保二總隊,保二第一大隊,120.282524,23.090633,東西向,40 +臺南市,新市區,南科南路與新港社高架橋前,保二總隊,保二第一大隊,120.28282,23.088713,北向,60 +臺南市,新市區,西拉雅大道與環東路二段路口,保二總隊,保二第一大隊,120.284904,23.103241,東西向,60 +臺南市,新市區,西拉雅大道與環東路二段路口,保二總隊,保二第一大隊,120.284904,23.103241,東西向,60 +臺南市,新市區,大順七路與大順二路口,保二總隊,保二第一大隊,120.2877,23.101562,南向,40 +臺南市,新市區,臺19甲線與西拉雅大道,臺南市政府警察局,善化分局,120.2947,23.106228,多向,70 +臺南市,新市區,臺19甲線28公里處,臺南市政府警察局,善化分局,120.29493,23.099846,雙向,70 +臺南市,新市區,臺1線317.7公里,臺南市政府警察局,善化分局,120.310776,23.09386,雙向,70 +臺南市,安定區,臺19線132.7公里中崙段,臺南市政府警察局,善化分局,120.210495,23.084492,北向,50 +臺南市,安定區,178線7.9公里與南134線路口,臺南市政府警察局,善化分局,120.22924,23.094667,東向,50 +臺南市,安定區,嘉榮路512號前,臺南市政府警察局,善化分局,120.22951,23.079973,雙向,50 +臺南市,安定區,嘉榮路512號前,臺南市政府警察局,善化分局,120.22951,23.079973,雙向,50 +臺南市,玉井區,臺84線40.38公里,臺南市政府警察局,玉井分局,120.45011,23.12476,雙向,70 +臺南市,玉井區,臺84線40.8公里,臺南市政府警察局,玉井分局,120.45354,23.122286,西向,70 +臺南市,玉井區,臺20線與台3線中華路口,臺南市政府警察局,玉井分局,120.46526,23.120522,東向,50 +臺南市,楠西區,臺3線369公里,臺南市政府警察局,玉井分局,120.48853,23.155445,北向,70 +臺南市,楠西區,臺南市 楠西區 曾文水庫道路3.2公里至4.9公里,保七總隊,保七第二大隊,120.49526,23.21866,雙向(東向西、西向東),40 +臺南市,楠西區,臺南市 楠西區 曾文水庫道路1.2公里至2.9公里,保七總隊,保七第二大隊,120.4968,23.21025,雙向(東向西、西向東),40 +臺南市,楠西區,臺南市 楠西區 曾文水庫道路5.4公里,保七總隊,保七第二大隊,120.50452,23.23226,雙向(東向西、西向東),40 +臺南市,楠西區,臺南市 楠西區 曾文水庫道路6公里,保七總隊,保七第二大隊,120.51041,23.23555,西向東方向,40 +臺南市,南化區,臺3線388K處,臺南市政府警察局,玉井分局,120.47022,23.013083,雙向,60 +臺南市,南化區,臺3線383.5公里,臺南市政府警察局,玉井分局,120.48517,23.049162,雙向,60 +臺南市,南化區,臺3線378.4公里,臺南市政府警察局,玉井分局,120.486984,23.086584,雙向,60 +臺南市,左鎮區,臺20線22.3公里,臺南市政府警察局,新化分局,120.38012,23.067501,雙向,60 +臺南市,左鎮區,臺20乙線0.7公里處(近睦光橋),臺南市政府警察局,新化分局,120.42086,23.050117,雙向,50 +臺南市,仁德區,快速道路86線西向3.9K處,臺南市政府警察局,歸仁分局,120.21165,22.927332,西向,90 +臺南市,仁德區,機場路1050號前,臺南市政府警察局,歸仁分局,120.21669,22.949238,雙向,50 +臺南市,仁德區,臺1線342.7公里臺86線匝道路口,臺南市政府警察局,歸仁分局,120.22093,22.931923,南向,70 +臺南市,仁德區,二仁路台1線341.85K,臺南市政府警察局,歸仁分局,120.2212,22.939863,雙向,70 +臺南市,仁德區,臺1線344.15公里與二行一路路口,臺南市政府警察局,歸仁分局,120.225494,22.920004,北向,50 +臺南市,仁德區,文德路與中山路口,臺南市政府警察局,歸仁分局,120.24821,22.972763,雙向,50 +臺南市,仁德區,中山路與文德路口,臺南市政府警察局,歸仁分局,120.248245,22.972475,多向,50 +臺南市,歸仁區,臺39線10公里,臺南市政府警察局,歸仁分局,120.27526,22.94757,北向,70 +臺南市,歸仁區,高鐵臺南站U型車道,臺南市政府警察局,歸仁分局,120.28523,22.924389,雙向,50 +臺南市,歸仁區,臺39線2.6公里處,臺南市政府警察局,歸仁分局,120.28728,23.011648,南向,70 +臺南市,歸仁區,182線12.1公里忠孝南北路口,臺南市政府警察局,歸仁分局,120.303055,22.965597,西向,50 +臺南市,關廟區,臺19甲線41公里,臺南市政府警察局,歸仁分局,120.30967,22.988716,雙向,60 +臺南市,關廟區,臺86線17.85公里,臺南市政府警察局,歸仁分局,120.31324,22.97128,雙向,70 +臺南市,龍崎區,市道182線中正路與南屏路口,臺南市政府警察局,歸仁分局,120.35717,22.96794,西向,50 +臺南市,龍崎區,市道182線26至28公里區間測速,臺南市政府警察局,歸仁分局,120.38326,22.950447,雙向,50 +臺南市,龍崎區,182市道28.5公里,臺南市政府警察局,歸仁分局,120.42066,22.929552,北向,50 +臺南市,龍崎區,市道182線28.23K處,臺南市政府警察局,歸仁分局,120.42081,22.932732,雙向,50 +臺南市,龍崎區,市道182線27.68K處,臺南市政府警察局,歸仁分局,120.42198,22.936176,雙向,50 +臺南市,永康區,中華路與中央路口,臺南市政府警察局,永康分局,120.2159,23.023357,多向,50 +臺南市,永康區,中華路與中正南路口,臺南市政府警察局,永康分局,120.218185,23.023575,多向,50 +臺南市,永康區,中華路與大橋三街口,臺南市政府警察局,永康分局,120.2258,23.018847,多向,50 +臺南市,永康區,中華路與中華西街口,臺南市政府警察局,永康分局,120.22666,23.018171,多向,50 +臺南市,臺南市永康區,中華路與中山南路口,臺南市政府警察局,永康分局,120.23084,23.01345,北向,50 +臺南市,永康區,中華路與中華二路口,臺南市政府警察局,永康分局,120.23383,23.008518,南向,50 +臺南市,永康區,中華路與中華一路口(近兵仔市場),臺南市政府警察局,永康分局,120.235275,23.004257,雙向,50 +臺南市,永康區,近復興路與高速二街口,臺南市政府警察局,永康分局,120.24789,22.998629,雙向,50 +臺南市,永康區,復興路與復興路26巷口,臺南市政府警察局,永康分局,120.24956,22.998642,南向,50 +臺南市,永康區,近高速一街二段與永二街245巷26弄路口,臺南市政府警察局,永康分局,120.25057,23.015137,北向,50 +臺南市,永康區,永大路與中山北路路口,臺南市政府警察局,永康分局,120.26064,23.027317,北向,50 +臺南市,東區,林森路-大同路口,臺南市政府警察局,第一分局,120.212296,22.980795,西向,50 +臺南市,東區,榮譽街與榮譽街25巷口(近大同國小前),臺南市政府警察局,第一分局,120.21565,22.973982,雙向,50 +臺南市,東區,小東路與成功大學成功校區校門路口,臺南市政府警察局,第一分局,120.220146,23.000835,東向,60 +臺南市,東區,東門路與林森路口,臺南市政府警察局,第一分局,120.2225,22.985468,雙向,50 +臺南市,東區,中華東路三段與崇明路口,臺南市政府警察局,第一分局,120.22306,22.974382,多向,60 +臺南市,東區,林森路後甲國中前-近東和路口,臺南市政府警察局,第一分局,120.22442,22.99815,南向,50 +臺南市,東區,東寧路與林森路口,臺南市政府警察局,第一分局,120.22447,22.991098,多向,50 +臺南市,東區,中華東路與東門路口,臺南市政府警察局,第一分局,120.229164,22.9808,北向,60 +臺南市,東區,中華東路-凱旋路口,臺南市政府警察局,第一分局,120.23394,22.99264,南向,60 +臺南市,臺南市東區,中華東路與平實路口,臺南市政府警察局,第一分局,120.23408,22.992664,多向,60 +臺南市,東區,中華東路-平實五街路口,臺南市政府警察局,第一分局,120.23424,22.994543,北向,60 +臺南市,東區,中華東路二段41巷與富農街二段路口,臺南市政府警察局,第一分局,120.23558,22.987366,多向,50 +臺南市,東區,崇善路-德東街口,臺南市政府警察局,第一分局,120.23616,22.962046,南向,40 +臺南市,南區,安平港路聯外道路-鯤鯓路127之5號前,臺南市政府警察局,第六分局,120.169586,22.958733,雙向,50 +臺南市,南區,安平港聯外道路台電高分鯤鯓54右38號電桿,臺南市政府警察局,第六分局,120.1741,22.947441,北向,60 +臺南市,南區,濱南路與喜樹路340巷口,臺南市政府警察局,第六分局,120.176,22.937895,南向,50 +臺南市,南區,臺17線濱南路海口宮前,臺南市政府警察局,第六分局,120.17664,22.930405,雙向,70 +臺南市,南區,新平路24號前,臺南市政府警察局,第六分局,120.17872,22.964375,雙向,60 +臺南市,南區,濱南路-鯤鯓路口,臺南市政府警察局,第六分局,120.183876,22.9588,北向,60 +臺南市,南區,中華西路-新和路口,臺南市政府警察局,第六分局,120.18389,22.967249,北向,60 +臺南市,南區,中華西路1段75號,臺南市政府警察局,第六分局,120.18413,22.975246,南向,60 +臺南市,南區,明興路-明興路1312巷,臺南市政府警察局,第六分局,120.18476,22.923483,南向,50 +臺南市,南區,中華南路-南和路口,臺南市政府警察局,第六分局,120.189156,22.961212,東向,50 +臺南市,南區,金華路-永華路口,臺南市政府警察局,第六分局,120.192085,22.98797,北向,50 +臺南市,南區,中華南路-德興路口,臺南市政府警察局,第六分局,120.19253,22.96194,西向,60 +臺南市,南區,永成路2段369號往南70公尺處,臺南市政府警察局,第六分局,120.19549,22.945978,雙向,60 +臺南市,南區,中華南路-近西門路口,臺南市政府警察局,第六分局,120.20016,22.964825,雙向,60 +臺南市,南區,中華南路-國民路口,臺南市政府警察局,第六分局,120.209946,22.9689,南向,50 +臺南市,北區,中華北路與觀海橋路口,臺南市政府警察局,第五分局,120.18487,23.01148,多向,60 +臺南市,北區,中華北路與文賢路口,臺南市政府警察局,第五分局,120.19322,23.018042,多向,60 +臺南市,北區,中華北路二段80巷口,臺南市政府警察局,第五分局,120.19698,23.019335,雙向,60 +臺南市,北區,海安路與公園南路口,臺南市政府警察局,第五分局,120.20004,23.003813,多向,50 +臺南市,北區,海安路-文成路口,臺南市政府警察局,第五分局,120.200386,23.012684,南向,50 +臺南市,北區,和緯路與海安路口,臺南市政府警察局,第五分局,120.20059,23.011633,多向,50 +臺南市,北區,中華北路二段與北安路口,臺南市政府警察局,第五分局,120.20602,23.02185,西向,60 +臺南市,北區,公園路與公園南路口,臺南市政府警察局,第五分局,120.20871,23.00099,多向,50 +臺南市,北區,北區臺南轉運站前公園路周邊路段,臺南市政府警察局,第五分局,120.20929,23.002089,雙向,50 +臺南市,北區,公園路-長榮路口,臺南市政府警察局,第五分局,120.21203,23.013504,南向,40 +臺南市,北區,北門路與小東路口,臺南市政府警察局,第五分局,120.212944,23.001534,南向,50 +臺南市,北區,公園路1092巷與公園路1074巷17弄路口,臺南市政府警察局,第五分局,120.2167,23.018793,多向,50 +臺南市,北區,開元路與長榮路口,臺南市政府警察局,第五分局,120.22074,23.007624,多向,50 +臺南市,北區,東豐路-長榮路口,臺南市政府警察局,第五分局,120.22248,23.002623,西向,50 +臺南市,北區,開元路與林森路口,臺南市政府警察局,第五分局,120.22304,23.008951,雙向,50 +臺南市,北區,東豐路與林森路口,臺南市政府警察局,第五分局,120.224686,23.002415,多向,50 +臺南市,安南區,四草大道與大眾街口,臺南市政府警察局,第三分局,120.13247,23.018547,南向,70 +臺南市,安南區,安明路-安中路口,臺南市政府警察局,第三分局,120.13401,23.06104,南向,70 +臺南市,安南區,安明路4段1100號前,臺南市政府警察局,第三分局,120.13506,23.074215,雙向,70 +臺南市,安南區,安明路近北汕尾路口,臺南市政府警察局,第三分局,120.145706,23.049866,雙向,70 +臺南市,安南區,公學路六段418號前,臺南市政府警察局,第三分局,120.14962,23.078297,雙向,50 +臺南市,安南區,臺江大道三段近安中路320巷口,臺南市政府警察局,第三分局,120.17002,23.06164,雙向,70 +臺南市,安南區,安明路-近大港觀海橋,臺南市政府警察局,第三分局,120.17903,23.017673,雙向,70 +臺南市,安南區,安吉路-安中路口,臺南市政府警察局,第三分局,120.1884,23.04589,北向,60 +臺南市,安南區,安吉路一段近本原街口,臺南市政府警察局,第三分局,120.18961,23.052488,雙向,60 +臺南市,安南區,安吉路3段近安順庄大道,臺南市政府警察局,第三分局,120.193634,23.07735,北向,60 +臺南市,安南區,北安路3段396巷前,臺南市政府警察局,第三分局,120.20804,23.046125,雙向,60 +臺南市,安南區,北安路4段548巷近長和街口,臺南市政府警察局,第三分局,120.21477,23.067614,雙向,60 +臺南市,安南區,臺江大道一段與開安路口,臺南市政府警察局,第三分局,120.22557,23.051445,東向,50 +臺南市,安南區,長和路一段與館前一路口,臺南市政府警察局,第三分局,120.23261,23.058355,北向,50 +臺南市,安平區,近安北路與洲安一街路口,臺南市政府警察局,第四分局,120.145996,22.996902,雙向,50 +臺南市,安平區,安平路與華平路口,臺南市政府警察局,第四分局,120.175964,22.99816,雙向,50 +臺南市,安平區,健康路與文平路口,臺南市政府警察局,第四分局,120.17719,22.983109,東向,50 +臺南市,安平區,中華西路與永華路口,臺南市政府警察局,第四分局,120.18699,22.989067,雙向,60 +臺南市,中西區,中華西路一段與民權路口,臺南市政府警察局,第二分局,120.18681,22.998917,多向,60 +臺南市,臺南市中西區,中華西路與府前路口,臺南市政府警察局,第二分局,120.186844,22.992668,北向,60 +臺南市,中西區,西門路與健康路口,臺南市政府警察局,第二分局,120.19758,22.981415,多向,50 +臺南市,中西區,西門路與民族路口,臺南市政府警察局,第二分局,120.200134,22.997572,南向,50 +臺南市,中西區,南門路與健康路口,臺南市政府警察局,第二分局,120.2037,22.981312,多向,50 +臺南市,中西區,中成路與慈音街路口,臺南市政府警察局,第二分局,120.205086,22.997007,多向,50 +臺南市,臺南市中西區,中山路與西華南街口,臺南市政府警察局,第二分局,120.20977,22.995575,多向,50 +臺南市,中西區,成功路近火車站圓環,臺南市政府警察局,第二分局,120.21107,22.99729,東向,40 +桃園市,,台61線高架41.5K至46.8K,桃園市政府警察局,桃市警局交通大隊,121.026726,25.001097,北上,90 +桃園市,,台61線高架41.6K至46.9K,桃園市政府警察局,桃市警局交通大隊,121.060905,25.035498,南下,90 +桃園市,,台66線西向東3K至6.9K,桃園市政府警察局,桃市警局交通大隊,121.07854,25.01612,東向,80 +桃園市,,台66線東向西14.8K至11.5K,桃園市政府警察局,桃市警局交通大隊,121.1616,24.950443,西向,90 +桃園市,,大溪區台七乙線12.1K至8.2K處,桃園市政府警察局,桃市警局交通大隊,121.33447,24.847773,北上,40 +桃園市,,大溪區台七乙線12.1K至8.2K處,桃園市政府警察局,桃市警局交通大隊,121.35709,24.854143,南下,40 +桃園市,,龜山區萬壽路一段(東萬壽路309巷-萬壽路1275巷),桃園市政府警察局,桃市警局交通大隊,121.36832,25.004057,往龜山,50 +桃園市,,龜山區萬壽路一段(萬壽路1275巷-東萬壽路309巷),桃園市政府警察局,桃市警局交通大隊,121.37559,25.011662,往迴龍,50 +桃園市,,龜山區青山路二段(青山路2段文青路-青山路1段200號),桃園市政府警察局,桃市警局交通大隊,121.38697,25.040182,往青山路1段200號,50 +桃園市,,龜山區青山路二段(青山路1段200號-青山路2段文青路,桃園市政府警察局,桃市警局交通大隊,121.39753,25.0318,往青山路2段文青路,50 +桃園市,桃園市桃園區,桃園區文中路645號前,桃園市政府警察局,桃市警局交通大隊,121.27776,24.99366,往國際路方向,50 +桃園市,桃園市桃園區,桃園區富國路379號對面,桃園市政府警察局,桃市警局交通大隊,121.285835,25.014463,往蘆竹方向,50 +桃園市,桃園市桃園區,桃園區莊敬路二段路燈桿(0716800)旁,桃園市政府警察局,桃市警局交通大隊,121.288216,25.020542,往寶慶路方向,50 +桃園市,桃園市桃園區,桃園區大興西路三段與正光路口,桃園市政府警察局,桃市警局交通大隊,121.2906,25.005362,往永安路方向,50 +桃園市,桃園市桃園區,桃園區大興西路三段與正光路口,桃園市政府警察局,桃市警局交通大隊,121.29077,25.005877,往南桃園交流道方向,50 +桃園市,桃園區,文中路(中興國中前),桃園市政府警察局,桃市警局交通大隊,121.290825,24.996,雙向,40 +桃園市,桃園市桃園區,桃園區溫州街69號對面,桃園市政府警察局,桃市警局交通大隊,121.29746,25.006742,往大興西路方向,30 +桃園市,桃園市桃園區,桃園區春日路561號前,桃園市政府警察局,桃市警局交通大隊,121.31246,25.005,往桃園市區方向,50 +桃園市,桃園市桃園區,桃園區成功路三段235號前,桃園市政府警察局,桃市警局交通大隊,121.32475,25.00729,往桃園市區方向,40 +桃園市,桃園市中壢區,民族路六段360號前,桃園市政府警察局,桃市警局交通大隊,121.15863,24.962679,往新屋方向,50 +桃園市,中壢區,中正路四段353號前,桃園市政府警察局,中壢分局,121.1744,24.990446, 往中壢,50 +桃園市,中壢區,台31線12.3K(往南),桃園市政府警察局,中壢分局,121.193,24.991371, 往南,70 +桃園市,中壢區,台31線12.5K(往北),桃園市政府警察局,中壢分局,121.193,24.991371, 往北,70 +桃園市,桃園市中壢區,中正路二段239巷口,桃園市政府警察局,桃市警局交通大隊,121.19523,24.97736,往中壢方向,50 +桃園市,中壢區,民權路五段65號前,桃園市政府警察局,中壢分局,121.203674,25.014406, 往永園路一段方向,50 +桃園市,桃園市中壢區,領航南路二段與新生路口,桃園市政府警察局,桃市警局交通大隊,121.2054,24.97215,往北,50 +桃園市,桃園市中壢區,高鐵北路與青心路口,桃園市政府警察局,桃市警局交通大隊,121.2054,24.97215,往大園方向,50 +桃園市,中壢區,環西路二段185之2號前,桃園市政府警察局,,121.21087,24.964502,往西,50 +桃園市,桃園市中壢區,中豐北路與大圳路一段口,桃園市政府警察局,桃市警局交通大隊,121.2134,24.984825,往市區方向,50 +桃園市,桃園市中壢區,中豐北路與大圳路一段口,桃園市政府警察局,桃市警局交通大隊,121.214294,24.984001,往高鐵站方向,50 +桃園市,中壢區,新生路三段192號前,桃園市政府警察局,中壢分局,121.222,24.991396, 往大園,50 +桃園市,桃園市中壢區,中壢區新生路二段421號前,桃園市政府警察局,桃市警局交通大隊,121.222176,24.985235,往中壢方向,50 +桃園市,中壢區,中園路421號前,桃園市政府警察局,中壢分局,121.22935,25.002476, 往中壢,50 +桃園市,中壢區,中園路二段346號前,桃園市政府警察局,中壢分局,121.23196,24.996529, 往大園,50 +桃園市,桃園市中壢區,中華路普忠路口,桃園市政府警察局,桃市警局交通大隊,121.24136,24.965984,往中壢方向,50 +桃園市,中壢區,中華路與自強一路口,桃園市政府警察局,桃市警局交通大隊,121.244286,24.96701,往桃園方向,50 +桃園市,中壢區,普忠路770巷路口前,桃園市政府警察局,中壢分局,121.25115,24.952522,往榮民南路,50 +桃園市,桃園市中壢區,普忠路581巷前,桃園市政府警察局,桃市警局交通大隊,121.25116,24.954819,往環中東路方向,50 +桃園市,桃園市中壢區,晉元路180號對面,桃園市政府警察局,桃市警局交通大隊,121.26084,24.950453,往榮民南路方向,50 +桃園市,大溪區,仁和路二段517巷口,桃園市政府警察局,桃市警局交通大隊,121.259544,24.911953,雙向,50 +桃園市,桃園市大溪區,永昌路台66線路口,桃園市政府警察局,桃市警局交通大隊,121.2625,24.89797,往中壢方向,50 +桃園市,桃園市大溪區,石園路327號前,桃園市政府警察局,桃市警局交通大隊,121.26314,24.8736,往員樹林方向,60 +桃園市,大溪區,康莊路五段6號前,桃園市政府警察局,桃市警局交通大隊,121.266235,24.826963, 往龍潭,60 +桃園市,桃園市大溪區,康莊路三段632號對面(台4線34K+200處),桃園市政府警察局,桃市警局交通大隊,121.27307,24.846693,往大溪方向,60 +桃園市,桃園市大溪區,大溪區瑞安路一段(台4線29K+650)崁津橋前),桃園市政府警察局,桃市警局交通大隊,121.27842,24.874975,往石門水庫方向,60 +桃園市,大溪區,埔頂路二段72號前,桃園市政府警察局,桃市警局交通大隊,121.27918,24.908733, 往八德,50 +桃園市,桃園市大溪區,崎頂下坡路段,桃園市政府警察局,桃市警局交通大隊,121.279785,24.894299,往大溪方向,50 +桃園市,桃園市大溪區,員林路一段142巷口,桃園市政府警察局,桃市警局交通大隊,121.28111,24.899384,往龍潭方向,50 +桃園市,桃園市大溪區,介壽路與仁善街路口,桃園市政府警察局,桃市警局交通大隊,121.28657,24.907955,往大溪方向,50 +桃園市,桃園市大溪區,大溪區月眉路1號前約120公尺處,桃園市政府警察局,桃市警局交通大隊,121.28862,24.885729,往桃園方向,50 +桃園市,桃園市大溪區,復興路二段20號前,桃園市政府警察局,桃市警局交通大隊,121.2889,24.880772,往復興方向,40 +桃園市,桃園市大溪區,大鶯路769巷口,桃園市政府警察局,桃市警局交通大隊,121.29937,24.918503,往大溪方向,40 +桃園市,桃園市大溪區,大溪區信義路永福派出所前,桃園市政府警察局,桃市警局交通大隊,121.32408,24.89424,往大溪方向,50 +桃園市,桃園市大溪區,大溪區信義路永福派出所前,桃園市政府警察局,桃市警局交通大隊,121.32408,24.89424,往新北市方向,50 +桃園市,大溪區,台三線31.8k至30.5k,桃園市政府警察局,桃市警局交通大隊,121.32434,24.893774,北向,50 +桃園市,大溪區,台三線30.5k至31.8k,桃園市政府警察局,桃市警局交通大隊,121.3331,24.896088,南向,50 +桃園市,大溪區,台7乙線12.1k至8.2k,桃園市政府警察局,桃市警局交通大隊,121.33443,24.84832,北向,40 +桃園市,桃園市大溪區,台七乙線9.1K處,桃園市政府警察局,桃市警局交通大隊,121.351234,24.849945,往桃園方向,40 +桃園市,桃園市大溪區,台七乙線9.1K處,桃園市政府警察局,桃市警局交通大隊,121.351234,24.849945,往新北市方向,40 +桃園市,大溪區,台七乙線8.8K處,桃園市政府警察局,桃市警局交通大隊,121.35199,24.85182,往大溪,40 +桃園市,大溪區,台7乙線8.2k至12.1k,桃園市政府警察局,桃市警局交通大隊,121.357124,24.854403,南向,40 +桃園市,桃園市楊梅區,台61線南下平面50.8K處,桃園市政府警察局,桃市警局交通大隊,121.03625,25.013884,往南方向,50 +桃園市,楊梅區,中山南路台1線50.5k處,桃園市政府警察局,桃市警局交通大隊,121.11795,24.898788,往北,60 +桃園市,桃園市楊梅區,中山路與大成路,桃園市政府警察局,桃市警局交通大隊,121.14574,24.90688, 往北,50 +桃園市,楊梅區,中山北路二段與裕成路口,桃園市政府警察局,桃市警局交通大隊,121.16648,24.908808,往東,50 +桃園市,桃園市楊梅區,梅獅路與文化街岔路口,桃園市政府警察局,桃市警局交通大隊,121.17775,24.905577,往楊梅方向,40 +桃園市,桃園市蘆竹區,大竹北路386號旁,桃園市政府警察局,桃市警局交通大隊,121.24809,25.034035,往大園方向,50 +桃園市,蘆竹區,南青路607號(台31線3K+150),桃園市政府警察局,桃市警局交通大隊,121.25152,25.047396,往南,60 +桃園市,桃園市蘆竹區,濱海路一段101號前,桃園市政府警察局,桃市警局交通大隊,121.25576,25.11272,往南下方向,70 +桃園市,蘆竹區,文中路一段265巷口前,桃園市政府警察局,桃市警局交通大隊,121.262245,24.989258,往桃園,50 +桃園市,桃園市蘆竹區,富國路130號前,桃園市政府警察局,桃市警局交通大隊,121.266235,25.045538,往蘆竹方向,40 +桃園市,蘆竹區,富國路二段360號前,桃園市政府警察局,桃市警局交通大隊,121.26845,25.039837,雙向,50 +桃園市,蘆竹區,大竹路109號,桃園市政府警察局,桃市警局交通大隊,121.2712,25.014542,往桃園,50 +桃園市,蘆竹區,蘆竹區蘆興南路408號旁,桃園市政府警察局,桃市警局交通大隊,121.28599,25.033958,往南崁方向,50 +桃園市,蘆竹區,中正路8號前,桃園市政府警察局,桃市警局交通大隊,121.29424,25.044203,往北,50 +桃園市,蘆竹區,山林路二段655號前,桃園市政府警察局,桃市警局交通大隊,121.30809,25.081982,往山腳,40 +桃園市,蘆竹區,仁愛路三段高鐵前,桃園市政府警察局,桃市警局交通大隊,121.31008,25.05544,往蘆竹,40 +桃園市,桃園市蘆竹區,八德一路與八德二路口,桃園市政府警察局,桃市警局交通大隊,121.339,25.064642,往蘆竹方向,40 +桃園市,桃園市大園區,台61線29.5K(高架),桃園市政府警察局,桃市警局交通大隊,121.16765,25.079277,往北,90 +桃園市,桃園市大園區,大園區臺61線29.3K,桃園市政府警察局,桃市警局交通大隊,121.16879,25.079788,往南方向,90 +桃園市,桃園市大園區,和平西路一段447號前,桃園市政府警察局,桃市警局交通大隊,121.18615,25.04613,往大園方向,50 +桃園市,桃園市大園區,中正東路與橫湳路口,桃園市政府警察局,桃市警局交通大隊,121.21008,25.059599,往國道二號方向,50 +桃園市,桃園市大園區,高鐵北路二段與領航北路四段路口前,桃園市政府警察局,桃市警局交通大隊,121.22347,25.021976,往高鐵站方向,50 +桃園市,大園區,中正東路一段373號對面,桃園市政府警察局,桃市警局交通大隊,121.22364,25.045202,往桃園,50 +桃園市,大園區,中正東路一段373號前(往大園),桃園市政府警察局,桃市警局交通大隊,121.22364,25.045202, 往大園,50 +桃園市,大園區,中正東路三段與青昇路,桃園市政府警察局,桃市警局交通大隊,121.22769,25.013674,往北,50 +桃園市,桃園市大園區,大牛稠7號(桃5線4.8K),桃園市政府警察局,桃市警局交通大隊,121.2277,25.055984,往大園方向,50 +桃園市,桃園市大園區,國際路二段與中央路路口,桃園市政府警察局,桃市警局交通大隊,121.244095,25.107386,往北,70 +桃園市,大園區,三民路一段(復興空廚前),桃園市政府警察局,,121.24986,25.09486,往北,50 +桃園市,桃園市大園區,三民路2段825號,桃園市政府警察局,桃市警局交通大隊,121.26142,25.070162,往桃園,50 +桃園市,桃園市龜山區,萬壽路二段與忠孝街口前,桃園市政府警察局,桃市警局交通大隊,121.32443,24.992449,往北上方向,50 +桃園市,桃園市龜山區,萬壽路二段1262號前,桃園市政府警察局,桃市警局交通大隊,121.32719,24.993011,往南下方向,50 +桃園市,桃園市龜山區,忠義路一段20.5K處,桃園市政府警察局,桃市警局交通大隊,121.3488,25.018616,往林口方向,60 +桃園市,桃園市龜山區,忠義路一段20.5K處,桃園市政府警察局,桃市警局交通大隊,121.3488,25.018616,往桃園方向,60 +桃園市,龜山區,萬壽路二段472號前,桃園市政府警察局,龜山分局,121.35082,25.001873, 往桃園方向,50 +桃園市,龜山區,忠義路一段1196-15號前,桃園市政府警察局,龜山分局,121.35543,25.035666, 往林口,60 +桃園市,桃園市龜山區,忠義路一段18K+660前,桃園市政府警察局,桃市警局交通大隊,121.35543,25.035666,往桃園方向,60 +桃園市,桃園市龜山區,振興路829巷口旁,桃園市政府警察局,桃市警局交通大隊,121.362755,25.021631,往體育大學方向,50 +桃園市,桃園市龜山區,文化二路與文昌一街口,桃園市政府警察局,桃市警局交通大隊,121.3671,25.056957,往林口方向,50 +桃園市,龜山區,萬壽路一段(東萬壽路309巷-萬壽路一段1275巷),桃園市政府警察局,桃市警局交通大隊,121.368355,25.00421,往迴龍,50 +桃園市,龜山區,復興三路500號對面,桃園市政府警察局,龜山分局,121.369965,25.04303, 往大埔,50 +桃園市,桃園市龜山區,文化一路與復興二路口,桃園市政府警察局,桃市警局交通大隊,121.37406,25.05708,往龜山方向,60 +桃園市,龜山區,振興路1169號前,桃園市政府警察局,龜山分局,121.37497,25.029663, 往龜山方向,50 +桃園市,龜山區,東萬壽路622號前,桃園市政府警察局,龜山分局,121.37507,25.008944, 往北,50 +桃園市,龜山區,萬壽路一段(東萬壽路309巷-萬壽路一段1275巷),桃園市政府警察局,桃市警局交通大隊,121.37562,25.01177,往龜山,50 +桃園市,龜山區,東萬壽路與龍校街121巷6弄口,桃園市政府警察局,龜山分局,121.37637,25.009476, 往南,50 +桃園市,龜山區,華亞三路近文化二路口,桃園市政府警察局,龜山分局,121.37707,25.043844,往長庚,50 +桃園市,龜山區,華亞三路近華亞二路前,桃園市政府警察局,龜山分局,121.37707,25.043844, 往大埔,50 +桃園市,龜山區,龜山區萬壽路一段17K+960,桃園市政府警察局,龜山分局,121.383575,25.012165, 往北,50 +桃園市,龜山區,青山路二段(青山路一段200號-青山路二段文青路),桃園市政府警察局,桃市警局交通大隊,121.38697,25.039822,往迴龍˙,50 +桃園市,桃園市龜山區,樂善村青山路2K,桃園市政府警察局,桃市警局交通大隊,121.391335,25.035828,往新莊方向,50 +桃園市,龜山區,青山路二段(青山路一段200號-青山路二段文青路),桃園市政府警察局,桃市警局交通大隊,121.39822,25.031464,往龜山,50 +桃園市,桃園市八德區,新生路段近龍宮街36巷9弄口,桃園市政府警察局,桃市警局交通大隊,121.25918,24.926731,往平鎮方向,50 +桃園市,桃園市八德區,中華路龍壽街口署立桃園醫院前,桃園市政府警察局,桃市警局交通大隊,121.26988,24.977488,往桃園方向,50 +桃園市,八德區,介壽路二段陸軍218營站前,桃園市政府警察局,桃市警局交通大隊,121.2975,24.940912,往大溪方向,50 +桃園市,桃園市八德區,興豐路1176號前,桃園市政府警察局,桃市警局交通大隊,121.3079,24.938059,往八德方向,50 +桃園市,桃園市八德區,興豐路1176號前,桃園市政府警察局,桃市警局交通大隊,121.3079,24.938059,往鶯歌方向,50 +桃園市,八德區,和強路127號前,桃園市政府警察局,桃市警局交通大隊,121.318436,24.960634, 往桃園,50 +桃園市,八德區,和強路58號前,桃園市政府警察局,桃市警局交通大隊,121.31854,24.961102,往東,50 +桃園市,桃園市龍潭區,桃園市平鎮區梅獅路二段,保二總隊,保二三大隊,121.184975,24.89299,往北,40 +桃園市,龍潭區,福源路256號對面,桃園市政府警察局,龍潭分局,121.18508,24.825977, 往龍潭,40 +桃園市,龍潭區,台三線50.5k至51.7k,桃園市政府警察局,桃市警局交通大隊,121.204475,24.85213,南向,60 +桃園市,桃園市龍潭區,聖亭路236號春源鋼鐵旁,桃園市政府警察局,桃市警局交通大隊,121.204506,24.870478,往龍潭方向,50 +桃園市,桃園市龍潭區,台三線50.8K處,桃園市政府警察局,桃市警局交通大隊,121.20464,24.852085,北上,60 +桃園市,龍潭區,台三線51.7k至50.5k,桃園市政府警察局,桃市警局交通大隊,121.21105,24.844069,北向,60 +桃園市,龍潭區,中正路三林段330號,桃園市政府警察局,桃市警局交通大隊,121.22926,24.849716, 往市區,50 +桃園市,龍潭區,龍源路大平段290號,桃園市政府警察局,桃市警局交通大隊,121.238655,24.826025, 往大溪,60 +桃園市,龍潭區,中正路三坑下坡路段,桃園市政府警察局,桃市警局交通大隊,121.24607,24.837442, 往石門水庫,60 +桃園市,桃園市龍潭區,上坪1-2號前,桃園市政府警察局,桃市警局交通大隊,121.24745,24.825394,往大溪方向,60 +桃園市,桃園市龍潭區,中興路九龍段104號前,桃園市政府警察局,桃市警局交通大隊,121.248314,24.880243,往大溪方向,50 +桃園市,平鎮區,台66線14.8k至11.5k,桃園市政府警察局,桃市警局交通大隊,121.16148,24.950502,西向,90 +桃園市,平鎮區,民族路雙連一段168號前,桃園市政府警察局,平鎮分局,121.18032,24.958342, 往新屋,50 +桃園市,桃園市平鎮區,中興路平鎮段305號前,桃園市政府警察局,桃市警局交通大隊,121.19139,24.903605,往埔心方向,50 +桃園市,桃園市平鎮區,中興路與南豐路口,桃園市政府警察局,桃市警局交通大隊,121.193665,24.898373,往埔心方向,50 +桃園市,平鎮區,延平路三段260巷口前,桃園市政府警察局,平鎮分局,121.20095,24.93786, 往楊梅,50 +桃園市,平鎮區,陸橋南路與平德路口前,桃園市政府警察局,平鎮分局,121.2054,24.929602, 往北,50 +桃園市,平鎮區,中豐路山頂段531號前,桃園市政府警察局,平鎮分局,121.21205,24.893105, 往龍潭,50 +桃園市,平鎮區,平鎮區中豐路一段255號前,桃園市政府警察局,桃市警局交通大隊,121.213036,24.926458,南往北,50 +桃園市,桃園市平鎮區,中豐路一段166號前,桃園市政府警察局,桃市警局交通大隊,121.213455,24.928421,往龍潭方向,50 +桃園市,桃園市平鎮區,平鎮區中豐路與延平路口,桃園市政府警察局,桃市警局交通大隊,121.218254,24.950768,往平鎮方向,50 +桃園市,桃園市平鎮區,中豐路與三興路岔路口,桃園市政府警察局,桃市警局交通大隊,121.21872,24.955051,往中壢方向,50 +桃園市,桃園市平鎮區,金陵路與環南路口,桃園市政府警察局,桃市警局交通大隊,121.22299,24.94076,往平鎮方向,50 +桃園市,平鎮區,福龍路一段550巷,桃園市政府警察局,平鎮分局,121.226,24.896788, 往龍潭,50 +桃園市,桃園市平鎮區,平鎮區金陵路四段409號前約80公尺處,桃園市政府警察局,桃市警局交通大隊,121.23118,24.91479,往環南路方向,50 +桃園市,桃園市平鎮區,快速路一段(台66線快速道路24k+160下方),桃園市政府警察局,桃市警局交通大隊,121.23328,24.903872,往大溪方向,50 +桃園市,桃園市平鎮區,營德路與華隆街路口前約150公尺處,桃園市政府警察局,桃市警局交通大隊,121.23699,24.923742,往龍岡路方向,50 +桃園市,桃園市新屋區,台15線59K處,桃園市政府警察局,桃市警局交通大隊,121.01196,24.955013,往北方向,70 +桃園市,新屋區,台61線41.5k至46.8k,桃園市政府警察局,桃市警局交通大隊,121.0262,25.000044,北向,90 +桃園市,新屋區,台61線南下平面50.8K處,桃園市政府警察局,桃市警局交通大隊,121.03625,25.013884,往南,50 +桃園市,桃園市新屋區,中山西路三段62號前,桃園市政府警察局,桃市警局交通大隊,121.04484,24.987537,往永安漁港方向,50 +桃園市,新屋區,台61線41.6k至46.9k,桃園市政府警察局,桃市警局交通大隊,121.05977,25.034843,南向,90 +桃園市,新屋區,中山東路一段458號前,桃園市政府警察局,桃市警局交通大隊,121.12517,24.972265,往中壢方向,50 +桃園市,桃園市觀音區,濱海路保生段277號前,桃園市政府警察局,桃市警局交通大隊,121.05245,25.016968,南下車道,70 +桃園市,觀音區,台61線41.6K至46.9K(高架),桃園市政府警察局,,121.060905,25.035498, 往南,90 +桃園市,桃園市觀音區,台66線(1.080K)與臺15線岔路口,桃園市政府警察局,桃市警局交通大隊,121.06222,25.025244,往台61方向,80 +桃園市,觀音區,台61線41.5K至46.8K(高架),桃園市政府警察局,桃市警局交通大隊,121.07821,25.04476, 往北,90 +桃園市,觀音區,台66線3k至6.9k,桃園市政府警察局,,121.07962,25.015636,東向,80 +桃園市,桃園市觀音區,濱海路廣興段845號前,桃園市政府警察局,桃市警局交通大隊,121.08704,25.02534,台15線南北雙向,70 +桃園市,桃園市觀音區,成功路與忠孝路口,桃園市政府警察局,桃市警局交通大隊,121.13367,25.05512,往觀音工業區方向,50 +桃園市,桃園市復興區,台七線羅浮82號前,桃園市政府警察局,桃市警局交通大隊,121.36436,24.79405,往大溪方向,40 +國道一號,,國道一號南向306.1公里,國道公路警察局,國道公路警四隊,120.2315,23.16412,往南,110 +國道一號,,國道一號北向309.1公里,國道公路警察局,國道公路警四隊,120.23468,23.137453,往北,110 +國道一號,,國道一號南向301.6公里,國道公路警察局,國道公路警四隊,120.23653,23.20419,往南,110 +國道一號,,國道一號北向301.5公里,國道公路警察局,國道公路警四隊,120.23672,23.20487,往北,110 +國道一號,,國道一號南向321.8公里,國道公路警察局,國道公路警四隊,120.2493,23.026245,往南,110 +國道一號,,國道一號北向323.4公里,國道公路警察局,國道公路警四隊,120.249374,23.011911,往北,110 +國道一號,,國道一號南向315.5公里,國道公路警察局,國道公路警四隊,120.25174,23.082615,往南,110 +國道一號,,國道一號北向334公里,國道公路警察局,國道公路警四隊,120.26014,22.918657,往北,110 +國道一號,,國道一號南向293.1公里,國道公路警察局,國道公路警四隊,120.26733,23.27464,往南,110 +國道一號,,國道一號北向336.7公里,國道公路警察局,國道公路警四隊,120.27043,22.896294,往北,110 +國道一號,,國道一號北向292.5公里,國道公路警察局,國道公路警四隊,120.27128,23.278519,往北,110 +國道一號,,國道一號南向340.2公里,國道公路警察局,國道公路警五隊,120.28468,22.867977,往南,110 +國道一號,,國道一號南向285.3公里,國道公路警察局,國道公路警四隊,120.30684,23.334305,往南,110 +國道一號,,國道一號南向373.5公里,國道公路警察局,國道公路警五隊,120.328354,22.585747,往南,60 +國道一號,,國道一號南向362.5公里,國道公路警察局,國道公路警五隊,120.328735,22.677532,往南,110 +國道一號,,國道一號北向373.4公里,國道公路警察局,國道公路警五隊,120.32915,22.586142,往北,60 +國道一號,,國道一號北向353.3公里,國道公路警察局,國道公路警五隊,120.3321,22.759113,往北,110 +國道一號,,國道一號南向353.4公里,國道公路警察局,國道公路警五隊,120.33219,22.7585,往南,110 +國道一號,,國道一號南向276.2公里,國道公路警察局,國道公路警四隊,120.35525,23.397736,往南,110 +國道一號,,國道一號北向277.3公里,國道公路警察局,國道公路警四隊,120.35529,23.38762,往北,110 +國道一號,,國道一號北向172.8公里,國道公路警察局,國道公路警三隊,120.401024,24.124218,往北,110 +國道一號,,國道一號北向261.7公里,國道公路警察局,國道公路警四隊,120.40404,23.51677,往北,110 +國道一號,,國道一號南向260.5公里,國道公路警察局,國道公路警四隊,120.405815,23.527653,往南,110 +國道一號,,國道一號北向254.1公里,國道公路警察局,國道公路警四隊,120.42849,23.581106,往北,110 +國道一號,,國道一號南向252.2公里,國道公路警察局,國道公路警四隊,120.43435,23.597475,往南,110 +國道一號,,國道一號南向247.2公里,國道公路警察局,國道公路警四隊,120.44377,23.641596,往南,110 +國道一號,,國道一號北向233.4公里,國道公路警察局,國道公路警四隊,120.4677,23.75602,往北,110 +國道一號,,國道一號南向238.6公里,國道公路警察局,國道公路警四隊,120.47608,23.712355,往南,110 +國道一號,,國道一號南向223.4公里,國道公路警察局,國道公路警三隊,120.48427,23.84565,往南,110 +國道一號,,國道一號北向224.9公里,國道公路警察局,國道公路警三隊,120.48481,23.831924,往北,110 +國道一號,,國道一號南向200.1公里,國道公路警察局,國道公路警三隊,120.52377,24.053078,往南,110 +國道一號,,國道一號南向187.5公里,國道公路警察局,國道公路警三隊,120.59749,24.113134,往南,110 +國道一號,,國道一號南向172.4公里,國道公路警察局,國道公路警三隊,120.673164,24.214231,往南,110 +國道一號,,國道一號南向165.3公里,國道公路警察局,國道公路警三隊,120.693085,24.273296,往南,110 +國道一號,,國道一號北向157.4公里,國道公路警察局,國道公路警三隊,120.72009,24.33757,往北,100 +國道一號,,國道一號南向152.9公里,國道公路警察局,國道公路警三隊,120.74645,24.37083,往南,100 +國道一號,,國道一號北向141.7公里,國道公路警察局,國道公路警二隊,120.78804,24.462055,往北,100 +國道一號,,國道一號北向127.5公里,國道公路警察局,國道公路警二隊,120.84625,24.564814,往北,100 +國道一號,,國道一號南向126.5公里,國道公路警察局,國道公路警二隊,120.85275,24.570803,往南,100 +國道一號,,國道一號南向124公里,國道公路警察局,國道公路警二隊,120.86044,24.592031,往南,100 +國道一號,,國道一號北向105.5公里,國道公路警察局,國道公路警二隊,120.94732,24.726902,往北,100 +國道一號,,國道一號南向102.5公里,國道公路警察局,國道公路警二隊,120.96852,24.736074,往南,100 +國道一號,,國道一號北向82.1公里,國道公路警察局,國道公路警二隊,121.04609,24.876558,往北,100 +國道一號,,國道一號南向81.8公里,國道公路警察局,國道公路警二隊,121.048615,24.876383,往南,100 +國道一號,,國道一號北向82.1公里,國道公路警察局,國道公路警二隊,121.055756,24.875992,往北,100 +國道一號,,國道一號南向78.2公里,國道公路警察局,國道公路警二隊,121.08215,24.88472,往南,100 +國道一號,,國道一號五楊高架北向64.3公里,國道公路警察局,國道公路警一隊,121.19353,24.941029,往北,100 +國道一號,,國道一號北向63.7公里,國道公路警察局,國道公路警一隊,121.19477,24.945833,往北,100 +國道一號,,國道一號南向60.1公里,國道公路警察局,國道公路警一隊,121.21667,24.970358,往南,100 +國道一號,,國道一號五楊高架南向44.6公里,國道公路警察局,國道公路警一隊,121.332634,25.060703,往南,100 +國道一號,,國道一號五楊高架北向38.8公里,國道公路警察局,國道公路警一隊,121.38388,25.065002,往北,100 +國道一號,,國道一號北向37公里,國道公路警察局,國道公路警一隊,121.402565,25.055336,往北,100 +國道一號,,國道一號北向34.4公里,國道公路警察局,國道公路警一隊,121.42388,25.066257,往北,50 +國道一號,,國道一號南向34.4公里,國道公路警察局,國道公路警一隊,121.42437,25.067223,往南,50 +國道一號,,國道一號南向30公里,國道公路警察局,國道公路警一隊,121.466354,25.075937,往南,100 +國道一號,,國道一號汐五高架南向29.5公里,國道公路警察局,國道公路警一隊,121.47129,25.075502,往南,100 +國道一號,,國道一號南向279公里,國道公路警察局,國道公路警四隊,121.53301,25.042383,往南,110 +國道一號,,國道一號南向22.7公里,國道公路警察局,國道公路警一隊,121.536865,25.07305,往南,100 +國道一號,,國道一號汐五高架南向16.1公里,國道公路警察局,國道公路警一隊,121.60144,25.064278,往南,100 +國道一號,,國道一號汐五高架北向16公里,國道公路警察局,國道公路警一隊,121.60169,25.063948,往北,100 +國道一號,,國道一號北向14.5公里,國道公路警察局,國道公路警一隊,121.61644,25.065916,往北,100 +國道一號,,國道一號南向13.7公里,國道公路警察局,國道公路警一隊,121.62495,25.066725,往南,100 +國道一號,,國道一號北向7.5公里,國道公路警察局,國道公路警一隊,121.68071,25.085808,往北,100 +國道一號,,國道一號南向2公里,國道公路警察局,國道公路警一隊,121.72474,25.106857,往南,100 +國道一號,,國道一號北向1.9公里,國道公路警察局,國道公路警一隊,121.72534,25.107763,往北,100 +國道二號,,國道二號西向2公里,國道公路警察局,國道公路警一隊,121.21719,25.049833,往西,100 +國道二號,,國道二號東向2.4公里,國道公路警察局,國道公路警一隊,121.21863,25.046331,往東,100 +國道二號,,國道二號西向6.4公里,國道公路警察局,國道公路警一隊,121.2518,25.028276,往西,100 +國道二號,,國道二號東向11.8公里,國道公路警察局,國道公路警六隊,121.282974,24.99567,往東,100 +國道二號,,國道二號東向18.5里,國道公路警察局,國道公路警六隊,121.32486,24.959269,往東,100 +國道三號,,國道三號南向342.1公里,國道公路警察局,國道公路警八隊,120.3275,23.107119,往南,110 +國道三號,,國道三號北向344.7公里,國道公路警察局,國道公路警八隊,120.329216,23.083382,往北,110 +國道三號,,國道三號南向358.6公里,國道公路警察局,國道公路警八隊,120.33847,22.97058,往南,110 +國道三號,,國道三號北向331公里,國道公路警察局,國道公路警八隊,120.35549,23.201338,往北,110 +國道三號,,國道三號南向372.3公里,國道公路警察局,國道公路警五隊,120.36923,22.862396,往南,110 +國道三號,,國道三號北向374.3公里,國道公路警察局,國道公路警五隊,120.38294,22.84931,往北,110 +國道三號,,國道三號北向318.7公里,國道公路警察局,國道公路警八隊,120.407295,23.298801,往北,110 +國道三號,,國道三號南向378.85公里,國道公路警察局,國道公路警五隊,120.41966,22.820845,往南,110 +國道三號,,國道三號南向313.7公里,國道公路警察局,國道公路警八隊,120.43159,23.330832,往南,110 +國道三號,,國道三號南向386公里,國道公路警察局,國道公路警五隊,120.44159,22.769218,往南,110 +國道三號,,國道三號北向389.3公里,國道公路警察局,國道公路警五隊,120.47148,22.758017,往北,110 +國道三號,,國道三號南向282.7公里,國道公路警察局,國道公路警八隊,120.50546,23.570353,往南,110 +國道三號,,國道三號南向423.1公里,國道公路警察局,國道公路警五隊,120.52481,22.508148,往南,110 +國道三號,,國道三號北向423.2公里,國道公路警察局,國道公路警五隊,120.524925,22.507158,往北,110 +國道三號,,國道三號北向186.1公里,國道公路警察局,國道公路警七隊,120.54876,24.17851,往北,110 +國道三號,,國道三號南向184.1公里,國道公路警察局,國道公路警七隊,120.56188,24.190897,往南,110 +國道三號,,國道三號南向178.6公里,國道公路警察局,國道公路警七隊,120.59093,24.229563,往南,110 +國道三號,,國道三號北向177.8公里,國道公路警察局,國道公路警七隊,120.59371,24.236176,往北,110 +國道三號,,國道三號北向265.1公里,國道公路警察局,國道公路警八隊,120.5988,23.692923,往北,110 +國道三號,,國道三號北向171公里,國道公路警察局,國道公路警七隊,120.60209,24.293697,往北,110 +國道三號,,國道三號南向166公里,國道公路警察局,國道公路警七隊,120.62855,24.330593,往南,110 +國道三號,,國道三號南向253.2公里,國道公路警察局,國道公路警八隊,120.628716,23.774883,往南,110 +國道三號,,國道三號北向206.6公里,國道公路警察局,國道公路警七隊,120.63864,24.071049,往北,110 +國道三號,,國道三號北向218公里,國道公路警察局,國道公路警七隊,120.65042,23.999996,往北,110 +國道三號,,國道三號南向162.1公里,國道公路警察局,國道公路警七隊,120.658714,24.350279,往南,110 +國道三號,,國道三號北向162.1公里,國道公路警察局,國道公路警七隊,120.65884,24.350206,往北,110 +國道三號,,國道三號南向150.2公里,國道公路警察局,國道公路警二隊,120.67839,24.453047,往南,110 +國道三號,,國道三號北向247.1公里,國道公路警察局,國道公路警八隊,120.68793,23.777445,往北,110 +國道三號,,國道三號北向235.2公里,國道公路警察局,國道公路警七隊,120.705086,23.869972,往北,110 +國道三號,,國道三號南向142.9公里,國道公路警察局,國道公路警二隊,120.71315,24.507294,往南,110 +國道三號,,國道三號北向131.2公里,國道公路警察局,國道公路警二隊,120.779076,24.591295,往北,110 +國道三號,,國道三號北向122.5公里匝道,國道公路警察局,國道公路警二隊,120.83118,24.648779,往北,40 +國道三號,,國道三號南向117.1公里,國道公路警察局,國道公路警二隊,120.85332,24.691969,往南,110 +國道三號,,國道三號北向116.5公里,國道公路警察局,國道公路警二隊,120.85748,24.695911,往北,110 +國道三號,,國道三號南向112.2公里,國道公路警察局,國道公路警二隊,120.89375,24.714918,往南,110 +國道三號,,國道三號南向107.4公里,國道公路警察局,國道公路警六隊,120.92539,24.746012,往南,110 +國道三號,,國道三號南向81.5公里,國道公路警察局,國道公路警六隊,121.149864,24.807201,往南,110 +國道三號,,國道三號南向64.2公里,國道公路警察局,國道公路警六隊,121.25546,24.881098,往南,110 +國道三號,,國道三號北向57公里,國道公路警察局,國道公路警六隊,121.304276,24.924303,往北,110 +國道三號,,國道三號南向39.3公里,國道公路警察局,國道公路警六隊,121.45628,24.975258,往南,100 +國道三號,,國道三號北向38.3公里,國道公路警察局,國道公路警六隊,121.465515,24.977514,往北,100 +國道三號,,國道三號北向30.1公里,國道公路警察局,國道公路警九隊,121.53064,24.962175,往北,90 +國道三號,,國道三號北向29.1公里,國道公路警察局,國道公路警九隊,121.539185,24.958471,往北,90 +國道三號,,國道三號北向25公里,國道公路警察局,國道公路警九隊,121.57083,24.976095,往北,90 +國道三號,,國道三號南向21.8公里,國道公路警察局,國道公路警九隊,121.59263,24.992199,往南,90 +國道三號,,國道三號北向17.1公里,國道公路警察局,國道公路警九隊,121.610565,25.02955,往北,90 +國道三號,,國道三號北向14.5公里,國道公路警察局,國道公路警九隊,121.62579,25.046879,往北,90 +國道三號,,國道三號北向10.2公里,國道公路警察局,國道公路警九隊,121.647484,25.078312,往北,90 +國道三號,,國道三號南向4.7公里,國道公路警察局,國道公路警九隊,121.68526,25.110235,往南,90 +國道四號,,國道四號西向4.4公里,國道公路警察局,國道公路警三隊,120.62779,24.305094,往西,100 +國道五號,,國道五號北向5.7公里,國道公路警察局,國道公路警九隊,121.65255,24.994558,往北,80 +國道五號,,國道五號南向13.3公里,國道公路警察局,國道公路警九隊,121.70153,24.949272,往南,80 +國道五號,,國道五號南向16.9公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.72434,24.925926,往南,90 +國道五號,,國道五號北向16.9公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.72481,24.92628,往北,90 +國道五號,,國道五號南向18.3公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.73286,24.916126,往南,90 +國道五號,,國道五號北向18.3公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.733315,24.91648,往北,90 +國道五號,,國道五號南向19.7公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.74336,24.907925,往南,90 +國道五號,,國道五號北向19.7公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.74382,24.908276,往北,90 +國道五號,,國道五號南向21.1公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.75373,24.899525,往南,90 +國道五號,,國道五號北向21.1公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.75418,24.89985,往北,90 +國道五號,,國道五號南向22.5公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.761765,24.88923,往南,90 +國道五號,,國道五號北向22.5公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.762215,24.889566,往北,90 +國道五號,,國道五號南向23.9公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.76942,24.87876,往南,90 +國道五號,,國道五號北向23.9公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.769875,24.879107,往北,90 +國道五號,,國道五號南向25.3公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.77889,24.869598,往南,90 +國道五號,,國道五號北向25.3公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.779335,24.869923,往北,90 +國道五號,,國道五號北向34.9公里,國道公路警察局,國道公路警九隊,121.78095,24.791565,往北,90 +國道五號,,國道五號南向26.7公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.788055,24.860128,往南,90 +國道五號,,國道五號北向26.7公里(雪山隧道科技執法),國道公路警察局,國道公路警九隊,121.78834,24.860365,往北,90 +國道五號,,國道五號南向52.7公里,國道公路警察局,國道公路警九隊,121.80556,24.63743,往南,90 +國道六號,,國道六號東向12.5公里,國道公路警察局,國道公路警七隊,120.778725,23.985535,往東,100 +國道六號,,國道六號西向15.6公里,國道公路警察局,國道公路警七隊,120.80137,23.996187,往西,100 +國道六號,,國道六號西向26公里,國道公路警察局,國道公路警七隊,120.89099,23.9811,往西,100 +國道六號,,國道六號東向36.5公里,國道公路警察局,國道公路警七隊,120.98814,23.982555,往東,100 +國道八號,,國道八號東西向0公里,國道公路警察局,國道公路警四隊,120.19544,23.080551,往東西向,80 +國道八號,,國道八號東向4.2公里,國道公路警察局,國道公路警四隊,120.231125,23.082523,往東,100 +國道十號,,國道十號東向14.7公里,國道公路警察局,國道公路警五隊,120.3869,22.760332,往東,100 +國道十號,,國道十號西向16.8公里,國道公路警察局,國道公路警五隊,120.40675,22.770908,往西,100 +國道3甲,,國道三甲西向1.7公里,國道公路警察局,國道公路警九隊,121.56336,25.010769,往西,80 +國道3甲,,國道三甲西向3.4公里,國道公路警察局,國道公路警九隊,121.57856,25.005106,往西,80 +台2已線,,台2己線北向1.1公里,國道公路警察局,國道公路警九隊,121.73204,25.15298,往北,50 diff --git a/dp_ext/selfdrive/tetood/lib/advanced_map_matcher.py b/dp_ext/selfdrive/tetood/lib/advanced_map_matcher.py new file mode 100644 index 000000000..9de5af962 --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/advanced_map_matcher.py @@ -0,0 +1,711 @@ +import math +from typing import List, Dict, Tuple, Optional +from rtree import index +import numpy as np +from functools import lru_cache, cached_property + +PADDING = 0.0001 +LANE_WIDTH = 3.7 # meters +MIN_WAY_DIST = 500 # meters +TO_RADIANS = math.pi / 180.0 + +class Position: + """ + Represents a geographic position with latitude, longitude, bearing, and speed. + """ + def __init__(self, latitude: float, longitude: float, bearing: float, speed: float): + self.latitude = latitude + self.longitude = longitude + self.bearing = bearing + self.speed = speed + +class Coordinates: + """ + Represents a geographic coordinate with latitude and longitude. + """ + def __init__(self, latitude: float, longitude: float): + self.latitude = latitude + self.longitude = longitude + +class Way: + """ + Represents a road or path in the map. + """ + def __init__(self, id: int, nodes: List[Coordinates], name: str, ref: str, oneway: bool, lanes: int, tags: Dict[str, str]): + self.id = id + self.nodes = nodes + self.name = name + self.ref = ref + self.oneway = oneway + self.lanes = max(lanes, 2) + self.tags = tags + + def get_tag(self, key: str, default: str = None) -> str: + """ + Get a tag value by its key. + + Args: + key (str): The tag key to look up. + default (str, optional): The default value to return if the key is not found. + + Returns: + str: The value of the tag, or the default value if not found. + """ + return self.tags.get(key, default) + + @cached_property + def bounding_box(self) -> Tuple[float, float, float, float]: + """ + Calculate and cache the bounding box of the way. + Returns a tuple of (min_lat, min_lon, max_lat, max_lon). + """ + lats = [node.latitude for node in self.nodes] + lons = [node.longitude for node in self.nodes] + return (min(lats), min(lons), max(lats), max(lons)) + +class OnWayResult: + """ + Represents the result of checking if a position is on a way. + """ + def __init__(self, on_way: bool, distance: float, is_forward: bool): + self.on_way = on_way + self.distance = distance + self.is_forward = is_forward + +class CurrentWay: + """ + Represents the current way a position is on, with additional information. + """ + def __init__(self, way: Way, distance: float, on_way: OnWayResult, start_position: Coordinates, end_position: Coordinates): + self.way = way + self.distance = distance + self.on_way = on_way + self.start_position = start_position + self.end_position = end_position + +class NextWayResult: + """ + Represents a potential next way in the route. + """ + def __init__(self, way: Way, is_forward: bool, start_position: Coordinates, end_position: Coordinates): + self.way = way + self.is_forward = is_forward + self.start_position = start_position + self.end_position = end_position + +class AdvancedMapMatcher: + """ + A class that performs advanced map matching using various algorithms and techniques. + """ + def __init__(self, road_data: Dict): + self.ways = self._load_ways(road_data) + self.rtree = index.Index() + self.gps_buffer: List[Position] = [] + self.current_way: Optional[CurrentWay] = None + self._build_rtree() + self.way_vectors = {} + self._precompute_way_vectors() + + # Hidden Markov Model (HMM) variables + self.hmm_states: List[Tuple[int, int]] = [] + self.hmm_transitions: Dict[Tuple[int, int], List[Tuple[int, int]]] = {} + self.current_timestep = 0 + self.current_viterbi_path: Dict[Tuple[int, int], List[Tuple[int, int]]] = {} + self.current_viterbi_prob: Dict[Tuple[int, int], float] = {} + + self.initialize_hmm() + + def _load_ways(self, road_data: Dict) -> List[Way]: + """ + Load ways from the provided road data. + + Args: + road_data (Dict): Dictionary containing road network data. + + Returns: + List[Way]: List of Way objects created from the road data. + """ + ways = [] + nodes_dict = {} # To store node id to coordinates mapping + + # First, create a dictionary of node id to coordinates + for element in road_data['elements']: + if element['type'] == 'node': + nodes_dict[element['id']] = Coordinates(element['lat'], element['lon']) + + # Then, create Way objects + for element in road_data['elements']: + if element['type'] == 'way': + try: + nodes = [nodes_dict[node_id] for node_id in element['nodes'] if node_id in nodes_dict] + if len(nodes) < 2: + print(f"Warning: Way {element['id']} has less than 2 valid nodes. Skipping.") + continue + + tags = element.get('tags', {}) + way = Way( + id=element['id'], + nodes=nodes, + name=tags.get('name', ''), + ref=tags.get('ref', ''), + oneway=tags.get('oneway', 'no').lower() == 'yes', + lanes=int(tags.get('lanes', '2')), + tags=tags # Store all tags + ) + ways.append(way) + except KeyError as e: + print(f"Error processing way {element['id']}: {e}") + except ValueError as e: + print(f"Error processing way {element['id']}: {e}") + + return ways + + def _build_rtree(self): + """ + Build an R-tree spatial index for efficient spatial queries. + """ + for idx, way in enumerate(self.ways): + # Access bounding_box as a property, not a method + self.rtree.insert(idx, way.bounding_box, obj=way) + + def initialize_hmm(self): + """ + Initialize the Hidden Markov Model for map matching. + """ + self.build_hmm() + self.current_timestep = 0 + self.current_viterbi_path = {} + self.current_viterbi_prob = {} + + initial_prob = 1.0 / len(self.hmm_states) + for state in self.hmm_states: + self.current_viterbi_path[state] = [state] + self.current_viterbi_prob[state] = initial_prob + + def build_hmm(self): + """ + Build the Hidden Markov Model states and transitions. + """ + # Create states for each segment of each way + self.hmm_states = [(way.id, i) for way in self.ways for i in range(len(way.nodes) - 1)] + + # Create transitions between consecutive segments of the same way + self.hmm_transitions = { + (way.id, i): [(way.id, i + 1)] for way in self.ways for i in range(len(way.nodes) - 2) + } + + # Add empty transitions for the last segment of each way + for way in self.ways: + self.hmm_transitions[(way.id, len(way.nodes) - 2)] = [] + + @lru_cache(maxsize=1000) + def on_way(self, way: Way, pos: Position) -> OnWayResult: + """ + Determine if a position is on a given way. + + Args: + way (Way): The way to check. + pos (Position): The position to check. + + Returns: + OnWayResult: An object containing whether the position is on the way, + the distance to the way, and if it's in the forward direction. + """ + if self._is_within_bounding_box(way, pos): + distance = self.distance_to_way(pos, way) + lanes = max(way.lanes, 2) + road_width_estimate = float(lanes) * LANE_WIDTH + max_dist = 5 + road_width_estimate + + if distance < max_dist: + is_forward = self.is_forward(way.nodes[0], way.nodes[-1], pos.bearing) + if not is_forward and way.oneway: + return OnWayResult(False, distance, is_forward) + return OnWayResult(True, distance, is_forward) + + return OnWayResult(False, float('inf'), False) + + def _find_nearest_ways(self, pos: Position, k: int = 5) -> List[Way]: + """ + Find the k nearest ways to a given position using the R-tree spatial index. + + Args: + pos (Position): The position to search from. + k (int): The number of nearest ways to return. + + Returns: + List[Way]: A list of the k nearest ways. + """ + nearest = list(self.rtree.nearest((pos.latitude, pos.longitude, pos.latitude, pos.longitude), k)) + return [self.ways[i] for i in nearest] + + def _distance_to_end_of_way(self, pos: Position, way: Way, is_forward: bool) -> float: + """ + Calculate the distance from the current position to the end of the way. + + Args: + pos (Position): The current position. + way (Way): The way to calculate the distance for. + is_forward (bool): Whether we're moving forward on the way. + + Returns: + float: The distance to the end of the way in meters. + """ + end_node = way.nodes[-1] if is_forward else way.nodes[0] + return self.haversine_distance( + Coordinates(pos.latitude, pos.longitude), + end_node + ) + + def next_ways(self, pos: Position, current_way: CurrentWay, is_forward: bool) -> List[NextWayResult]: + """ + Find the next ways from the current position and way. + + Args: + pos (Position): The current position. + current_way (CurrentWay): The current way. + is_forward (bool): Whether to look for ways in the forward direction. + + Returns: + List[NextWayResult]: A list of potential next ways. + """ + next_ways = [] + dist = 0.0 + way = current_way.way + forward = is_forward + start_pos = pos + + while dist < MIN_WAY_DIST: + d = self._distance_to_end_of_way(start_pos, way, forward) + if d <= 0: + break + dist += d + + # Use _find_nearest_ways instead of checking all ways + nearest_ways = self._find_nearest_ways(start_pos, k=5) + nw = self._find_best_next_way(way, nearest_ways, forward) + + if nw is None: + break + + next_ways.append(nw) + way = nw.way + start_pos = Position(nw.start_position.latitude, nw.start_position.longitude, 0, 0) + forward = nw.is_forward + + if not next_ways: + nearest_ways = self._find_nearest_ways(pos, k=5) + nw = self._find_best_next_way(current_way.way, nearest_ways, is_forward) + if nw: + next_ways.append(nw) + + return next_ways + + def _find_best_next_way(self, current_way: Way, candidate_ways: List[Way], is_forward: bool) -> Optional[NextWayResult]: + """ + Find the best next way from a list of candidate ways. + + Args: + current_way (Way): The current way. + candidate_ways (List[Way]): List of candidate ways to choose from. + is_forward (bool): Whether to look for the next way in the forward direction. + + Returns: + Optional[NextWayResult]: The best next way result, or None if no suitable way is found. + """ + match_node = current_way.nodes[-1] if is_forward else current_way.nodes[0] + match_bearing_node = current_way.nodes[-2] if is_forward else current_way.nodes[1] + + # Filter candidate ways to those that connect to the current way + connecting_ways = [way for way in candidate_ways if match_node in (way.nodes[0], way.nodes[-1])] + + if not connecting_ways: + return None + + # First, check for ways with matching names + name_matches = [way for way in connecting_ways if way.name == current_way.name] + if name_matches: + return self._select_best_way(name_matches, match_node, match_bearing_node) + + # Then, check for ways with matching references + ref_matches = [way for way in connecting_ways if way.ref == current_way.ref] + if ref_matches: + return self._select_best_way(ref_matches, match_node, match_bearing_node) + + # Finally, select the way with the least curvature + return self._select_best_way(connecting_ways, match_node, match_bearing_node) + + + def _get_way_start_end(self, way: Way, is_forward: bool) -> Tuple[Coordinates, Coordinates]: + """ + Get the start and end coordinates of a way based on the direction of travel. + + Args: + way (Way): The way to get start and end coordinates for. + is_forward (bool): Whether the way is being traversed in the forward direction. + + Returns: + Tuple[Coordinates, Coordinates]: The start and end coordinates of the way. + """ + if is_forward: + return way.nodes[0], way.nodes[-1] + else: + return way.nodes[-1], way.nodes[0] + + + def _calculate_angle(self, p1: Coordinates, p2: Coordinates, p3: Coordinates) -> float: + """ + Calculate the angle between three points. + + Args: + p1 (Coordinates): First point + p2 (Coordinates): Second point (vertex of the angle) + p3 (Coordinates): Third point + + Returns: + float: Angle in radians + """ + v1 = (p1.latitude - p2.latitude, p1.longitude - p2.longitude) + v2 = (p3.latitude - p2.latitude, p3.longitude - p2.longitude) + + dot_product = v1[0] * v2[0] + v1[1] * v2[1] + mag_v1 = math.sqrt(v1[0]**2 + v1[1]**2) + mag_v2 = math.sqrt(v2[0]**2 + v2[1]**2) + + cos_angle = dot_product / (mag_v1 * mag_v2) + + # Clamp the value to avoid domain errors due to floating point precision + cos_angle = max(-1.0, min(1.0, cos_angle)) + + return math.acos(cos_angle) + + def _select_best_way(self, ways: List[Way], match_node: Coordinates, match_bearing_node: Coordinates) -> NextWayResult: + """ + Select the best way from a list of ways based on curvature and direction. + + Args: + ways (List[Way]): List of candidate ways. + match_node (Coordinates): The node where the ways should connect. + match_bearing_node (Coordinates): The node used to calculate the bearing of the current way. + + Returns: + NextWayResult: The best next way result. + """ + best_way = None + best_curvature = float('inf') + best_is_forward = False + + for way in ways: + is_forward = way.nodes[0] == match_node + if not is_forward and way.oneway: + continue + + bearing_node = way.nodes[1] if is_forward else way.nodes[-2] + curvature = abs(self._calculate_angle(match_bearing_node, match_node, bearing_node)) + + if curvature < best_curvature: + best_way = way + best_curvature = curvature + best_is_forward = is_forward + + if best_way is None: + return None + + start, end = self._get_way_start_end(best_way, best_is_forward) + return NextWayResult(best_way, best_is_forward, start, end) + + def update_gps(self, pos: Position) -> Optional[CurrentWay]: + """ + Update the map matcher with a new GPS position. + + Args: + pos (Position): The new GPS position. + + Returns: + Optional[CurrentWay]: The current way if found, or None if not on any way. + """ + self.gps_buffer.append(pos) + if len(self.gps_buffer) > 25: + self.gps_buffer.pop(0) + + # Check if we're still on the current way + if self.current_way and self.on_way(self.current_way.way, pos).on_way: + # Simple update if still on the same way + return self._update_current_way(pos) + + # If not, find the nearest ways and check them + nearest_ways = self._find_nearest_ways(pos) + for way in nearest_ways: + on_way_result = self.on_way(way, pos) + if on_way_result.on_way: + return self._update_current_way(pos, way, on_way_result) + + # Only use HMM if we can't find a clear match + if self.current_timestep % 5 == 0: + self._viterbi_step(pos) + + self.current_timestep += 1 + + if not self.current_viterbi_prob: + return None + + most_likely_state = max(self.current_viterbi_prob, key=self.current_viterbi_prob.get) + way = next((way for way in self.ways if way.id == most_likely_state[0]), None) + + if way is None: + return None + + on_way_result = self.on_way(way, pos) + start, end = self._get_way_start_end(way, on_way_result.is_forward) + + current_way = CurrentWay(way, on_way_result.distance, on_way_result, start, end) + + # Use next_ways to get upcoming ways + upcoming_ways = self.next_ways(pos, current_way, on_way_result.is_forward) + + # You could store these upcoming ways for future use or return them along with the current way + self.upcoming_ways = upcoming_ways + + return current_way + + def _update_current_way(self, pos: Position, way: Way = None, on_way_result: OnWayResult = None) -> CurrentWay: + """ + Update the current way based on the new position. + + Args: + pos (Position): The new GPS position. + way (Way, optional): The way to update to. If None, uses the current way. + on_way_result (OnWayResult, optional): The result of checking if the position is on the way. + + Returns: + CurrentWay: The updated current way. + """ + if way is None: + way = self.current_way.way + if on_way_result is None: + on_way_result = self.on_way(way, pos) + + start, end = self._get_way_start_end(way, on_way_result.is_forward) + current_way = CurrentWay(way, on_way_result.distance, on_way_result, start, end) + + # Update upcoming ways + self.upcoming_ways = self.next_ways(pos, current_way, on_way_result.is_forward) + + return current_way + + def _viterbi_step(self, pos: Position): + """ + Perform a step of the Viterbi algorithm for Hidden Markov Model-based map matching. + + This method updates the probabilities of being in each state (way segment) given the new position. + + Args: + pos (Position): The new GPS position. + """ + new_viterbi_prob = {} + new_viterbi_path = {} + + for state in self.hmm_states: + way = next((w for w in self.ways if w.id == state[0]), None) + if way is None: + continue + + emission_prob = self._emission_probability(pos, way, state[1]) + max_prob = float('-inf') + max_prev_state = None + + for prev_state in self.hmm_transitions.get(state, []): + if prev_state in self.current_viterbi_prob: + transition_prob = self._transition_probability(prev_state, state) + + # Consider upcoming ways in transition probability + if hasattr(self, 'upcoming_ways'): + upcoming_way_ids = [w.way.id for w in self.upcoming_ways] + if state[0] in upcoming_way_ids: + transition_prob *= 1.2 # Increase probability for upcoming ways + + prob = self.current_viterbi_prob[prev_state] + math.log(transition_prob) + math.log(emission_prob) + if prob > max_prob: + max_prob = prob + max_prev_state = prev_state + + if max_prev_state is not None: + new_viterbi_prob[state] = max_prob + new_viterbi_path[state] = self.current_viterbi_path[max_prev_state] + [state] + + self.current_viterbi_prob = new_viterbi_prob + self.current_viterbi_path = new_viterbi_path + + @lru_cache(maxsize=1000) + def _emission_probability(self, pos: Position, way: Way, segment_index: int) -> float: + """ + Calculate the emission probability for a given position and way segment. + + This probability represents how likely it is that the GPS position would be observed + if the true position was on the given way segment. + + Args: + pos (Position): The current GPS position. + way (Way): The candidate way. + segment_index (int): The index of the segment in the way. + + Returns: + float: The emission probability. + """ + start_node = way.nodes[segment_index] + end_node = way.nodes[segment_index + 1] + distance = self.point_to_line_distance(pos.latitude, pos.longitude, + start_node.latitude, start_node.longitude, + end_node.latitude, end_node.longitude) + return math.exp(-distance / 20.0) # Assuming GPS error std dev of 20 meters + + @lru_cache(maxsize=1000) + def _transition_probability(self, prev_state: Tuple[int, int], curr_state: Tuple[int, int]) -> float: + """ + Calculate the transition probability between two states. + + Args: + prev_state (Tuple[int, int]): The previous state (way_id, segment_index). + curr_state (Tuple[int, int]): The current state (way_id, segment_index). + + Returns: + float: The transition probability. + """ + prev_way = next((way for way in self.ways if way.id == prev_state[0]), None) + curr_way = next((way for way in self.ways if way.id == curr_state[0]), None) + + if prev_way is None or curr_way is None: + return 0.0 # Invalid transition + + if prev_state[0] == curr_state[0]: # Same way + if curr_state[1] == prev_state[1] + 1: # Next segment + return 0.95 + else: + # Handle the case where the way has 3 or fewer nodes + segment_count = len(prev_way.nodes) - 1 + if segment_count <= 2: + return 0.05 if curr_state[1] != prev_state[1] else 0.0 + else: + return 0.05 / (segment_count - 1) # Uniform distribution over other segments + else: # Different way + return 0.05 / (len(self.ways) - 1) # Uniform distribution over other ways + + @staticmethod + def _is_within_bounding_box(way: Way, pos: Position) -> bool: + """ + Check if a position is within the bounding box of a way. + + Args: + way (Way): The way to check. + pos (Position): The position to check. + + Returns: + bool: True if the position is within the bounding box, False otherwise. + """ + bbox = way.bounding_box + return (bbox[0] - PADDING <= pos.latitude <= bbox[2] + PADDING and + bbox[1] - PADDING <= pos.longitude <= bbox[3] + PADDING) + + def _precompute_way_vectors(self): + """ + Precompute vectors for each way to speed up distance calculations. + """ + self.way_vectors = {} + for way in self.ways: + coords = np.array([(node.latitude, node.longitude) for node in way.nodes]) + self.way_vectors[way.id] = coords + + def distance_to_way(self, pos: Position, way: Way) -> float: + """ + Calculate the minimum distance from a position to a way. + + Args: + pos (Position): The position to check. + way (Way): The way to calculate distance to. + + Returns: + float: The minimum distance from the position to the way. + """ + way_vector = self.way_vectors[way.id] + pos_vector = np.array([pos.latitude, pos.longitude]) + distances = np.sum((way_vector[:-1] - pos_vector)**2, axis=1) + return np.min(distances)**0.5 + + @staticmethod + def is_forward(start: Coordinates, end: Coordinates, bearing: float) -> bool: + """ + Determine if the bearing is in the forward direction of the way. + + Args: + start (Coordinates): The start coordinates of the way. + end (Coordinates): The end coordinates of the way. + bearing (float): The bearing to check. + + Returns: + bool: True if the bearing is in the forward direction, False otherwise. + """ + way_bearing = AdvancedMapMatcher.calculate_bearing(start, end) + return abs((way_bearing - bearing + 180) % 360 - 180) < 90 + + @staticmethod + def calculate_bearing(start: Coordinates, end: Coordinates) -> float: + """ + Calculate the bearing between two coordinates. + + Args: + start (Coordinates): The start coordinates. + end (Coordinates): The end coordinates. + + Returns: + float: The bearing in degrees. + """ + y = math.sin(end.longitude - start.longitude) * math.cos(end.latitude) + x = math.cos(start.latitude) * math.sin(end.latitude) - math.sin(start.latitude) * math.cos(end.latitude) * math.cos(end.longitude - start.longitude) + return (math.atan2(y, x) * 180 / math.pi + 360) % 360 + + @staticmethod + def haversine_distance(start: Coordinates, end: Coordinates) -> float: + """ + Calculate the Haversine distance between two coordinates. + + Args: + start (Coordinates): The start coordinates. + end (Coordinates): The end coordinates. + + Returns: + float: The distance in meters. + """ + R = 6371000 # Earth radius in meters + lat1, lon1 = start.latitude * TO_RADIANS, start.longitude * TO_RADIANS + lat2, lon2 = end.latitude * TO_RADIANS, end.longitude * TO_RADIANS + dlat, dlon = lat2 - lat1, lon2 - lon1 + a = math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2 + c = 2 * math.atan2(math.sqrt(a), math.sqrt(1-a)) + return R * c + + @staticmethod + def point_to_line_distance(px: float, py: float, x1: float, y1: float, x2: float, y2: float) -> float: + """ + Calculate the perpendicular distance from a point to a line segment. + + Args: + px (float): X-coordinate of the point. + py (float): Y-coordinate of the point. + x1 (float): X-coordinate of the first point of the line segment. + y1 (float): Y-coordinate of the first point of the line segment. + x2 (float): X-coordinate of the second point of the line segment. + y2 (float): Y-coordinate of the second point of the line segment. + + Returns: + float: The perpendicular distance from the point to the line segment. + """ + dx, dy = x2 - x1, y2 - y1 + if dx == dy == 0: # The segment is actually a point + return math.sqrt((px - x1)**2 + (py - y1)**2) + t = ((px - x1) * dx + (py - y1) * dy) / (dx**2 + dy**2) + if t < 0: + return math.sqrt((px - x1)**2 + (py - y1)**2) + elif t > 1: + return math.sqrt((px - x2)**2 + (py - y2)**2) + else: + return abs((dy*px - dx*py + x2*y1 - y2*x1) / math.sqrt(dx**2 + dy**2)) \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/lib/map_matcher.py b/dp_ext/selfdrive/tetood/lib/map_matcher.py new file mode 100644 index 000000000..98c96260d --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/map_matcher.py @@ -0,0 +1,459 @@ +import math +from typing import List, Dict, Tuple, Optional, Deque +from rtree import index +import logging +from functools import lru_cache +from collections import deque +from dataclasses import dataclass +import numpy as np + +# Set up logging +logging.basicConfig(level=logging.WARNING, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +# Constants +TO_RADIANS = math.pi / 180.0 +EARTH_RADIUS = 6371000 # Earth radius in meters +PADDING = 100 # meters +LANE_WIDTH = 3.7 # meters +MIN_WAY_DIST = 500 # meters +MAX_DISTANCE = 25 # meters, maximum distance to consider a way as matching +SEARCH_RADIUS = 50 # meters + +class Coordinates: + __slots__ = ['lat', 'lon'] + def __init__(self, lat: float, lon: float): + self.lat = lat + self.lon = lon + + def __eq__(self, other): + return isinstance(other, Coordinates) and self.lat == other.lat and self.lon == other.lon + + def __hash__(self): + return hash((self.lat, self.lon)) + +class Position: + __slots__ = ['lat', 'lon', 'bearing', 'speed', 'turn_signal'] + def __init__(self, lat: float, lon: float, bearing: float, speed: float, turn_signal: Optional[str] = None): + self.lat = lat + self.lon = lon + self.bearing = bearing + self.speed = speed # Speed in meters per second + self.turn_signal = turn_signal # 'left', 'right', or None + +@dataclass +class OnWayResult: + on_way: bool + distance: float + is_forward: bool + +@dataclass +class CurrentWay: + way: 'Way' + distance: float + on_way: OnWayResult + start_position: Coordinates + end_position: Coordinates + confidence: float + +@dataclass +class NextWayResult: + way: 'Way' + is_forward: bool + start_position: Coordinates + end_position: Coordinates + +class Way: + def __init__(self, id: int, nodes: List[Coordinates], tags: Dict[str, str]): + self.id = id + self.nodes = nodes + self.tags = tags + self._bbox = self._calculate_bbox() + + def _calculate_bbox(self): + lats = [node.lat for node in self.nodes] + lons = [node.lon for node in self.nodes] + return (min(lats), min(lons), max(lats), max(lons)) + + @property + def name(self): + # some road doesnt have name, use ID instead + return self.tags.get('name', self.id) + + @property + def ref(self): + return self.tags.get('ref', '') + + @property + def oneway(self): + return self.tags.get('oneway', 'no').lower() == 'yes' + + @property + def lanes(self): + return int(self.tags.get('lanes', '2')) + + @property + def highway_type(self): + return self.tags.get('highway', '') + + @property + def is_highway(self): + highway_types = ['motorway', 'trunk', 'primary', 'secondary', 'tertiary'] + return self.highway_type in highway_types + + @property + def bridge(self): + return self.tags.get('bridge', 'no').lower() == 'yes' + + @property + def tunnel(self): + return self.tags.get('tunnel', 'no').lower() == 'yes' + + @property + def layer(self): + return int(self.tags.get('layer', '0')) + +class MapMatcher: + def __init__(self, road_network: Dict): + self.ways = self._load_ways(road_network) + self.rtree = self._build_rtree() + self.current_way = None + self.position_history = deque(maxlen=10) + self.way_history = deque(maxlen=10) + self.last_switch_time = 0 + self.switch_cooldown = 5 # Seconds to wait before allowing another switch + self.current_layer = 0 + self.way_bearings = {} # Cache for way bearings + + def _load_ways(self, road_network: Dict) -> Dict[int, Way]: + ways = {} + nodes = {} + for element in road_network['elements']: + if element['type'] == 'node': + nodes[element['id']] = Coordinates(element['lat'], element['lon']) + elif element['type'] == 'way': + way_nodes = [nodes[node_id] for node_id in element['nodes'] if node_id in nodes] + if len(way_nodes) >= 2: + ways[element['id']] = Way(element['id'], way_nodes, element.get('tags', {})) + logger.info(f"Loaded {len(ways)} ways") + return ways + + def _build_rtree(self): + idx = index.Index() + for way_id, way in self.ways.items(): + bbox = way._bbox + idx.insert(way_id, (bbox[1], bbox[0], bbox[3], bbox[2])) # Swap lat and lon + logger.info("R-tree index built") + return idx + + def _get_nearby_ways(self, pos: Position) -> List[Way]: + lat_change = SEARCH_RADIUS / (EARTH_RADIUS * TO_RADIANS) + lon_change = SEARCH_RADIUS / (EARTH_RADIUS * TO_RADIANS * math.cos(math.radians(pos.lat))) + + search_bbox = (pos.lon - lon_change, pos.lat - lat_change, + pos.lon + lon_change, pos.lat + lat_change) + + nearby_way_ids = list(self.rtree.intersection(search_bbox)) + return [self.ways[way_id] for way_id in nearby_way_ids] + + def _get_candidate_ways(self, nearby_ways: List[Way], pos: Position) -> List[Tuple[Way, OnWayResult]]: + return [(way, self.on_way(way, pos)) for way in nearby_ways if self.on_way(way, pos).on_way] + + def _select_best_match(self, candidates: List[Tuple[Way, OnWayResult]], pos: Position, timestamp: float) -> Optional[Tuple[Way, OnWayResult, float]]: + if not candidates: + return None + + if len(candidates) == 1: + way, on_way_result = candidates[0] + return (way, on_way_result, self._calculate_confidence(way, on_way_result, pos)) + + scored_candidates = [(way, on_way_result, self._score_candidate(way, on_way_result, pos)) + for way, on_way_result in candidates] + + best_match = max(scored_candidates, key=lambda x: x[2]) + best_way, best_on_way_result, best_score = best_match + + if self._is_at_intersection(candidates): + return self._handle_intersection(scored_candidates, pos) + + # Implement snapping logic + if self.current_way and self.current_way.way.id != best_way.id: + time_since_last_switch = timestamp - self.last_switch_time + if time_since_last_switch < self.switch_cooldown: + current_way_candidate = next((c for c in scored_candidates if c[0].id == self.current_way.way.id), None) + if current_way_candidate: + current_way, current_on_way_result, current_score = current_way_candidate + if current_score > best_score * 0.8: # Allow some tolerance + return (current_way, current_on_way_result, self._calculate_confidence(current_way, current_on_way_result, pos)) + else: + self.last_switch_time = timestamp + + return (best_way, best_on_way_result, self._calculate_confidence(best_way, best_on_way_result, pos)) + + def _score_candidate(self, way: Way, on_way_result: OnWayResult, pos: Position) -> float: + score = self._score_distance(on_way_result.distance) + score += self._score_continuity(way) + score += self._score_trajectory(pos) + score += self._score_speed(pos.speed) + score += self._score_historical_matches(way) + score += self._score_turn_signals(way, pos) + score += self._score_elevation(way) + score += self._score_one_way(way, on_way_result) + return score + + def _score_distance(self, distance: float) -> float: + return 100 - distance + + def _score_continuity(self, way: Way) -> float: + return 50 if self.current_way and way.id == self.current_way.way.id else 0 + + def _score_trajectory(self, pos: Position) -> float: + if len(self.position_history) < 2: + return 0 + prev_pos = self.position_history[-1] + expected_bearing = self._calculate_bearing( + Coordinates(prev_pos.lat, prev_pos.lon), + Coordinates(pos.lat, pos.lon) + ) + bearing_diff = abs(expected_bearing - pos.bearing) + return -min(bearing_diff, 360 - bearing_diff) + + def _score_speed(self, speed: float) -> float: + return 20 if speed > 8.33 else (-20 if speed < 1.39 else 0) + + def _score_historical_matches(self, way: Way) -> float: + return 30 if way in self.way_history else 0 + + def _score_turn_signals(self, way: Way, pos: Position) -> float: + if not pos.turn_signal or not way.is_highway: + return 0 + if self.current_way: + parallel_score = self._score_parallel_ways(self.current_way.way, way) + if parallel_score > 0: + return 40 + way_bearing = self._calculate_bearing(way.nodes[0], way.nodes[-1]) + return 20 if (pos.turn_signal == 'left' and way_bearing < pos.bearing) or \ + (pos.turn_signal == 'right' and way_bearing > pos.bearing) else 0 + + def _score_elevation(self, way: Way) -> float: + if not self.current_way: + return 0 + score = 0 + if way.layer != self.current_layer: + score -= 50 + if way.bridge != self.current_way.way.bridge: + score -= 30 + if way.tunnel != self.current_way.way.tunnel: + score -= 30 + return score + + def _score_one_way(self, way: Way, on_way_result: OnWayResult) -> float: + return -100 if way.oneway and not on_way_result.is_forward else 0 + + def _is_at_intersection(self, candidates: List[Tuple[Way, OnWayResult]]) -> bool: + return len(candidates) > 2 + + def _handle_intersection(self, scored_candidates: List[Tuple[Way, OnWayResult, float]], pos: Position) -> Tuple[Way, OnWayResult, float]: + # Implement more sophisticated intersection handling logic here + # For now, we'll just return the highest scored candidate + return max(scored_candidates, key=lambda x: x[2]) + + def _calculate_confidence(self, way: Way, on_way_result: OnWayResult, pos: Position) -> float: + # Implement a confidence calculation based on various factors + # This is a simple example; you might want to develop a more sophisticated model + base_confidence = 1.0 - (on_way_result.distance / MAX_DISTANCE) + trajectory_confidence = 1.0 if len(self.position_history) < 2 else \ + 1.0 - min(abs(self._calculate_bearing(self.position_history[-1], pos) - pos.bearing) / 180.0, 1.0) + return (base_confidence + trajectory_confidence) / 2 + + def update_position(self, pos: Position, timestamp: float) -> Optional[CurrentWay]: + logger.debug(f"Updating position: lat={pos.lat}, lon={pos.lon}, bearing={pos.bearing}, speed={pos.speed}, turn_signal={pos.turn_signal}") + + nearby_ways = self._get_nearby_ways(pos) + candidate_ways = self._get_candidate_ways(nearby_ways, pos) + best_match = self._select_best_match(candidate_ways, pos, timestamp) + + if best_match: + way, on_way_result, confidence = best_match + logger.info(f"Matched to way: {way.id} with confidence {confidence:.2f}") + self.position_history.append(pos) + self.way_history.append(way) + return self._update_current_way(pos, way, on_way_result, confidence) + + logger.warning("No matching way found") + self.current_way = None + return None + + def on_way(self, way: Way, pos: Position) -> OnWayResult: + distance = self._distance_to_way(pos.lat, pos.lon, way.id) + + max_dist = 5 + way.lanes * LANE_WIDTH + + if distance < max_dist: + is_forward = self._is_forward(way.id, pos.bearing) + if not is_forward and way.oneway: + return OnWayResult(False, distance, is_forward) + return OnWayResult(True, distance, is_forward) + + return OnWayResult(False, distance, False) + + @lru_cache(maxsize=1024) + def _distance_to_way(self, pos_lat: float, pos_lon: float, way_id: int) -> float: + way = self.ways[way_id] + return np.min([self._point_to_line_distance(pos_lat, pos_lon, start.lat, start.lon, end.lat, end.lon) + for start, end in zip(way.nodes, way.nodes[1:])]) + + @staticmethod + @lru_cache(maxsize=1024) + def _point_to_line_distance(px, py, x1, y1, x2, y2): + px, py, x1, y1, x2, y2 = map(math.radians, [px, py, x1, y1, x2, y2]) + + line_length = MapMatcher._haversine_distance(y1, x1, y2, x2) + if line_length == 0: + return MapMatcher._haversine_distance(py, px, y1, x1) + + a = MapMatcher._haversine_distance(py, px, y1, x1) + b = MapMatcher._haversine_distance(py, px, y2, x2) + c = line_length + + s = (a + b + c) / 2 + area = math.sqrt(abs(s * (s-a) * (s-b) * (s-c))) + + height = 2 * area / c + + return height + + @staticmethod + @lru_cache(maxsize=1024) + def _haversine_distance(lat1, lon1, lat2, lon2): + dlat = lat2 - lat1 + dlon = lon2 - lon1 + a = np.sin(dlat/2)**2 + np.cos(lat1) * np.cos(lat2) * np.sin(dlon/2)**2 + c = 2 * np.arctan2(np.sqrt(a), np.sqrt(1-a)) + return EARTH_RADIUS * c + + def _is_forward(self, way_id: int, bearing: float) -> bool: + if way_id not in self.way_bearings: + way = self.ways[way_id] + self.way_bearings[way_id] = self._calculate_bearing(way.nodes[0], way.nodes[-1]) + + way_bearing = self.way_bearings[way_id] + bearing_diff = abs(way_bearing - bearing) + is_forward = bearing_diff < 90 or bearing_diff > 270 + logger.debug(f"Way {way_id}: bearing {way_bearing}, vehicle bearing {bearing}, is_forward: {is_forward}") + return is_forward + + @staticmethod + @lru_cache(maxsize=1024) + def _calculate_bearing(start: Coordinates, end: Coordinates) -> float: + y = np.sin(np.radians(end.lon - start.lon)) * np.cos(np.radians(end.lat)) + x = np.cos(np.radians(start.lat)) * np.sin(np.radians(end.lat)) - \ + np.sin(np.radians(start.lat)) * np.cos(np.radians(end.lat)) * np.cos(np.radians(end.lon - start.lon)) + bearing = np.arctan2(y, x) + return (np.degrees(bearing) + 360) % 360 + + def _update_current_way(self, pos: Position, way: Way, on_way: OnWayResult, confidence: float) -> CurrentWay: + start, end = self._get_way_start_end(way, on_way.is_forward) + self.current_layer = way.layer + return CurrentWay(way, on_way.distance, on_way, start, end, confidence) + + @staticmethod + def _get_way_start_end(way: Way, is_forward: bool) -> Tuple[Coordinates, Coordinates]: + return (way.nodes[0], way.nodes[-1]) if is_forward else (way.nodes[-1], way.nodes[0]) + + def next_ways(self, pos: Position, current_way: CurrentWay, is_forward: bool) -> List[NextWayResult]: + next_ways = [] + dist = 0.0 + way = current_way.way + forward = is_forward + start_pos = pos + + while dist < MIN_WAY_DIST: + d = self._distance_to_end_of_way(start_pos, way, forward) + if d <= 0: + break + dist += d + nw = self._next_way(way, forward) + if nw is None: + break + next_ways.append(nw) + way = nw.way + start_pos = Position(nw.start_position.lat, nw.start_position.lon, 0, 0) + forward = nw.is_forward + + if not next_ways: + nw = self._next_way(current_way.way, is_forward) + if nw: + next_ways.append(nw) + + return next_ways + + def _distance_to_end_of_way(self, pos: Position, way: Way, is_forward: bool) -> float: + nodes = way.nodes if is_forward else list(reversed(way.nodes)) + return np.sum([self._haversine_distance(prev.lat, prev.lon, curr.lat, curr.lon) + for prev, curr in zip(nodes, nodes[1:])]) + + def _next_way(self, way: Way, is_forward: bool) -> Optional[NextWayResult]: + match_node = way.nodes[-1] if is_forward else way.nodes[0] + matching_ways = self._matching_ways(way, match_node) + + if not matching_ways: + return None + + for mway in matching_ways: + if mway.name == way.name or mway.ref == way.ref: + next_is_forward = self._next_is_forward(mway, match_node) + if not next_is_forward and mway.oneway: + continue + start, end = self._get_way_start_end(mway, next_is_forward) + return NextWayResult(mway, next_is_forward, start, end) + + min_curv_way = min(matching_ways, key=lambda w: self._get_curvature(way, w, match_node)) + next_is_forward = self._next_is_forward(min_curv_way, match_node) + start, end = self._get_way_start_end(min_curv_way, next_is_forward) + return NextWayResult(min_curv_way, next_is_forward, start, end) + + def _matching_ways(self, current_way: Way, match_node: Coordinates) -> List[Way]: + return [way for way in self.ways.values() + if way.id != current_way.id and + (way.nodes[0] == match_node or way.nodes[-1] == match_node)] + + @staticmethod + def _next_is_forward(next_way: Way, match_node: Coordinates) -> bool: + return next_way.nodes[0] == match_node + + @staticmethod + def _get_curvature(way1: Way, way2: Way, match_node: Coordinates) -> float: + if len(way1.nodes) < 2 or len(way2.nodes) < 2: + return float('inf') + + node1 = way1.nodes[-2] if way1.nodes[-1] == match_node else way1.nodes[-1] + node2 = way2.nodes[1] if way2.nodes[0] == match_node else way2.nodes[-2] + + angle1 = MapMatcher._calculate_bearing(node1, match_node) + angle2 = MapMatcher._calculate_bearing(match_node, node2) + + return abs(angle2 - angle1) + + def _score_parallel_ways(self, current_way: Way, candidate_way: Way) -> float: + if len(current_way.nodes) < 2 or len(candidate_way.nodes) < 2: + return 0 + + current_bearing = self._calculate_bearing(current_way.nodes[0], current_way.nodes[-1]) + candidate_bearing = self._calculate_bearing(candidate_way.nodes[0], candidate_way.nodes[-1]) + + bearing_diff = abs(current_bearing - candidate_bearing) + if bearing_diff > 20 and bearing_diff < 340: # Not parallel + return 0 + + min_distance = np.min([self._point_to_line_distance(node.lat, node.lon, + candidate_way.nodes[0].lat, candidate_way.nodes[0].lon, + candidate_way.nodes[-1].lat, candidate_way.nodes[-1].lon) + for node in current_way.nodes]) + + return 30 if 5 < min_distance < 20 else 0 # Boost score for potential lane change + + @staticmethod + def _bbox_intersects(bbox1, bbox2): + return not (bbox1[2] < bbox2[0] or bbox1[0] > bbox2[2] or + bbox1[3] < bbox2[1] or bbox1[1] > bbox2[3]) \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/lib/overpass_api_helper.py b/dp_ext/selfdrive/tetood/lib/overpass_api_helper.py new file mode 100644 index 000000000..79d9e74b8 --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/overpass_api_helper.py @@ -0,0 +1,39 @@ + +import requests +import numpy as np +from openpilot.dp_ext.selfdrive.tetood.lib.utils import R + +class OverpassAPIHelper: + def __init__(self): + self.url = 'https://overpass-api.de/api/interpreter' + # self.url = 'https://overpass.kumi.systems/api/interpreter' + self.headers = {'Accept-Encoding': 'gzip'} + + def fetch_data(self, lat, lon, radius=3500, high_speed=True): + """Fetch data from Overpass API based on the given GPS coordinates.""" + bbox_angle = np.degrees(radius / R) + # fetch all ways and nodes on this ways in bbox + bbox_str = f'{str(lat - bbox_angle)},{str(lon - bbox_angle)},{str(lat + bbox_angle)},{str(lon + bbox_angle)}' + excl_way_types = 'pedestrian|footway|path|corridor|bridleway|steps|cycleway|construction|bus_guideway|escape|track' + overpass_query = f""" + [out:json][timeout:25][bbox:{bbox_str}]; + ( + way[highway][highway!~"^({excl_way_types})$"]; + ) -> .allways; + ( + way[highway][highway!~"^({excl_way_types}|motorway_link)$"][!name]; + ) -> .no_name_ways; + ( + way[highway][highway!~"^({excl_way_types})$"][service][service~"^(driveway)$"]; + ) -> .service_ways; + (.allways; - .no_name_ways;) -> .way_result_1; + (.way_result_1; - .service_ways;) -> .way_result_final; + (.way_result_final;>;); + out body; + """ + # print(overpass_query) + try: + response = requests.get(self.url, params={'data': overpass_query}, headers=self.headers) + except: + return None + return response.json() diff --git a/dp_ext/selfdrive/tetood/lib/simple_map_matcher.py b/dp_ext/selfdrive/tetood/lib/simple_map_matcher.py new file mode 100644 index 000000000..e1b69f122 --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/simple_map_matcher.py @@ -0,0 +1,167 @@ +import math +import json +from typing import List, Tuple, Dict, Optional +from rtree import index + +class Node: + def __init__(self, id: int, lat: float, lon: float, tags: Dict = None): + self.id = id + self.lat = lat + self.lon = lon + self.tags = tags or {} + +class Way: + def __init__(self, id: int, nodes: List[Node]): + self.id = id + self.nodes = nodes + + +class MapMatcher: + def __init__(self, prefetched_data: Dict): + # self.road_network = road_network + # self.spatial_index = self._build_spatial_index() + nodes, ways = self.parse_overpass_data(prefetched_data) + self.nodes = {node.id: node for node in nodes} + self.ways = ways + self.way_dict = {way.id: way for way in ways} + self.rtree = self._build_rtree() + + def _build_rtree(self): + p = index.Property() + p.dimension = 2 + rtree = index.Index(properties=p) + for i, way in enumerate(self.ways): + for node in way.nodes: + rtree.insert(i, (node.lon, node.lat, node.lon, node.lat), obj=(way.id, node.id)) + return rtree + + def _distance(self, lat1: float, lon1: float, lat2: float, lon2: float) -> float: + R = 6371 # Earth's radius in kilometers + lat1, lon1, lat2, lon2 = map(math.radians, [lat1, lon1, lat2, lon2]) + dlat = lat2 - lat1 + dlon = lon2 - lon1 + a = math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2 + c = 2 * math.asin(math.sqrt(a)) + return R * c + + def _find_closest_way_and_node(self, lat: float, lon: float) -> Tuple[int, int, float]: + nearest = list(self.rtree.nearest((lon, lat, lon, lat), 1, objects=True))[0] + way_id, node_id = nearest.object + node = self.nodes[node_id] + distance = self._distance(lat, lon, node.lat, node.lon) + print(f"{way_id}, {node_id}, {distance}") + return way_id, node_id, distance + + def _get_nearby_ways(self, lat: float, lon: float, radius: float) -> List[int]: + # Convert radius from km to degrees (approximate) + radius_deg = radius / 111.32 # 1 degree is approximately 111.32 km + bbox = (lon - radius_deg, lat - radius_deg, lon + radius_deg, lat + radius_deg) + return list(set(item.object[0] for item in self.rtree.intersection(bbox, objects=True))) + + def match(self, lat: float, lon: float, current_way: Optional[List[float]] = None, max_drift: float = 0.1) -> Tuple[int, int]: + nearby_ways = self._get_nearby_ways(lat, lon, max_drift * 2) + + if current_way is None or current_way not in nearby_ways: + return self._find_closest_way_and_node(lat, lon) + else: + min_distance = float('inf') + best_way = current_way + best_node = None + + for way_id in nearby_ways: + way = self.way_dict[way_id] + for node in way.nodes: + distance = self._distance(lat, lon, node.lat, node.lon) + if distance < min_distance: + min_distance = distance + best_way = way_id + best_node = node.id + + return best_way, best_node, min_distance + + def parse_overpass_data(self, data: str) -> Tuple[List[Node], List[Way]]: + # json_data = json.loads(data) + nodes = [] + ways = [] + node_dict = {} + + for element in data['elements']: + if element['type'] == 'node': + node = Node(element['id'], element['lat'], element['lon'], element.get('tags')) + nodes.append(node) + node_dict[node.id] = node + elif element['type'] == 'way': + way_nodes = [node_dict[node_id] for node_id in element['nodes'] if node_id in node_dict] + way = Way(element['id'], way_nodes) + ways.append(way) + + return nodes, ways +# +# # Example usage +# if __name__ == "__main__": +# overpass_data = ''' +# [ +# { +# "type": "node", +# "id": 775379692, +# "lat": 25.0804406, +# "lon": 121.6071380 +# }, +# { +# "type": "node", +# "id": 775379741, +# "lat": 25.0680739, +# "lon": 121.6170474 +# }, +# { +# "type": "node", +# "id": 775379747, +# "lat": 25.0733561, +# "lon": 121.6058384, +# "tags": { +# "addr:city": "台北市", +# "addr:country": "TW", +# "addr:district": "內湖區", +# "addr:housenumber": "16", +# "addr:postcode": "11486", +# "addr:street": "康寧路三段", +# "highway": "traffic_signals" +# } +# }, +# { +# "type": "node", +# "id": 775379748, +# "lat": 25.0731973, +# "lon": 121.6061928, +# "tags": { +# "highway": "traffic_signals" +# } +# } +# ] +# ''' +# +# nodes, ways = parse_overpass_data(overpass_data) +# +# # For this example, we'll create a dummy way using all the nodes +# dummy_way = Way(1, nodes) +# ways.append(dummy_way) +# +# map_matcher = MapMatcher(nodes, ways) +# +# # Test the map matching +# current_way = None +# current_node = None +# test_positions = [ +# (25.0804406, 121.6071380), +# (25.0733561, 121.6058384), +# (25.0731973, 121.6061928), +# (25.0680739, 121.6170474) +# ] +# +# for lat, lon in test_positions: +# matched_way, matched_node = map_matcher.match(lat, lon, current_way) +# print(f"Current position: {lat}, {lon}") +# print(f"Matched way: {matched_way}, Matched node: {matched_node}") +# current_way = matched_way +# current_node = matched_node +# print("---") \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/lib/speed_camera_loader.py b/dp_ext/selfdrive/tetood/lib/speed_camera_loader.py new file mode 100644 index 000000000..232888274 --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/speed_camera_loader.py @@ -0,0 +1,41 @@ +import csv +import json +from typing import Dict + +class SpeedCameraLoader: + def __init__(self, data_source: str = None, data_type: str = 'osm_json'): + self.data_source = data_source + self.data_type = data_type + + def load_speed_cameras(self, prefetched_data: Dict = None) -> Dict[int, Dict[str, any]]: + if self.data_type == 'csv': + return self._load_from_csv() + elif self.data_type == 'osm_json': + return self._load_from_osm_json(prefetched_data) + else: + raise ValueError(f"Unsupported data type: {self.data_type}") + + def _load_from_csv(self) -> Dict[int, Dict[str, any]]: + speed_cameras = {} + with open(self.data_source, 'r') as csvfile: + reader = csv.DictReader(csvfile) + for row in reader: + camera_id = int(row['id']) + speed_cameras[camera_id] = { + 'lat': float(row['latitude']), + 'lon': float(row['longitude']), + 'tags': json.loads(row.get('tags', '{}')) + } + return speed_cameras + + def _load_from_osm_json(self, prefetched_data: Dict) -> Dict[int, Dict[str, any]]: + speed_cameras = {} + for element in prefetched_data['elements']: + if element['type'] == 'node' and element.get('tags', {}).get('highway') == 'speed_camera': + camera_id = element['id'] + speed_cameras[camera_id] = { + 'lat': float(element['lat']), + 'lon': float(element['lon']), + 'tags': element.get('tags', {}) + } + return speed_cameras \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/lib/taiwan_speed_camera_loader.py b/dp_ext/selfdrive/tetood/lib/taiwan_speed_camera_loader.py new file mode 100644 index 000000000..d3a32a21b --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/taiwan_speed_camera_loader.py @@ -0,0 +1,30 @@ + +from openpilot.dp_ext.selfdrive.tetood.lib.speed_camera_loader import SpeedCameraLoader +from typing import Dict +from openpilot.common.basedir import BASEDIR +import os +import csv + + +class TaiwanSpeedCameraLoader(SpeedCameraLoader): + def __init__(self, data_source: str = None, data_type: str = 'osm_json'): + self.data_source = os.path.join(BASEDIR, "dp_ext", "selfdrive", "tetood", "assets", "taiwan_speed_camera_2024_06_07.csv") + self.data_type = "csv" + self.speed_cameras = {} + + def _load_from_csv(self) -> Dict[int, Dict[str, any]]: + if not self.speed_cameras: + with open(self.data_source, 'r') as csvfile: + reader = csv.DictReader(csvfile) + next(reader) + i = 0 + for row in reader: + camera_id = int(f"101{i}") + place = row['Address'] + self.speed_cameras[camera_id] = { + 'lat': float(row['Latitude']), + 'lon': float(row['Longitude']), + 'tags': {"place": place, "maxspeed": float(row['limit'])}, + } + i += 1 + return self.speed_cameras \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/lib/utils.py b/dp_ext/selfdrive/tetood/lib/utils.py new file mode 100644 index 000000000..1e02b4bf5 --- /dev/null +++ b/dp_ext/selfdrive/tetood/lib/utils.py @@ -0,0 +1,67 @@ +from typing import Tuple +import math + +R = 6371000 # Earth's radius in meters + +def haversine_distance(point1: Tuple[float, float], point2: Tuple[float, float]) -> float: + lat1, lon1 = math.radians(point1[0]), math.radians(point1[1]) + lat2, lon2 = math.radians(point2[0]), math.radians(point2[1]) + dlat, dlon = lat2 - lat1, lon2 - lon1 + a = math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2 + c = 2 * math.atan2(math.sqrt(a), math.sqrt(1-a)) + return R * c + +def calculate_bearing(point1: Tuple[float, float], point2: Tuple[float, float]) -> float: + """Calculate bearing of two points""" + lat1, lon1 = math.radians(point1[0]), math.radians(point1[1]) + lat2, lon2 = math.radians(point2[0]), math.radians(point2[1]) + + dlon = lon2 - lon1 + + y = math.sin(dlon) * math.cos(lat2) + x = math.cos(lat1) * math.sin(lat2) - math.sin(lat1) * math.cos(lat2) * math.cos(dlon) + + initial_bearing = math.atan2(y, x) + + # Convert to degrees + initial_bearing = math.degrees(initial_bearing) + bearing = (initial_bearing + 360) % 360 + + return bearing + + +def angle_diff(bearing1: float, bearing2 :float) -> float: + # Calculate the absolute angle difference + return abs((bearing1 - bearing2 + 180) % 360 - 180) + +def feature_is_ahead(current_bearing: float, bearing_to_feature: float, within_deg: float = 15.): + # Consider features within a 60-degree cone in front of the vehicle + return angle_diff(current_bearing, bearing_to_feature) <= within_deg + + +def calculate_predicted_position(point: Tuple[float, float], bearing: float, distance: float) -> Tuple[float, float]: + # Convert bearing to radians + bearing_rad = math.radians(bearing) + + # Convert lat and lon from degrees to radians + lat_rad = math.radians(point[0]) + lon_rad = math.radians(point[1]) + + # Calculate the new latitude + new_lat_rad = math.asin(math.sin(lat_rad) * math.cos(distance / R) + + math.cos(lat_rad) * math.sin(distance / R) * math.cos(bearing_rad)) + + # Calculate the new longitude + new_lon_rad = lon_rad + math.atan2(math.sin(bearing_rad) * math.sin(distance / R) * math.cos(lat_rad), + math.cos(distance / R) - math.sin(lat_rad) * math.sin(new_lat_rad)) + + # Convert the new latitude and longitude from radians to degrees + new_lat = math.degrees(new_lat_rad) + new_lon = math.degrees(new_lon_rad) + + return new_lat, new_lon + +def point_to_line_distance(px, py, x1, y1, x2, y2): + numerator = abs((y2-y1)*px - (x2-x1)*py + x2*y1 - y2*x1) + denominator = ((y2-y1)**2 + (x2-x1)**2)**0.5 + return numerator / denominator if denominator != 0 else float('inf') \ No newline at end of file diff --git a/dp_ext/selfdrive/tetood/pkgs/Rtree-1.2.0-cp311-cp311-linux_aarch64.whl b/dp_ext/selfdrive/tetood/pkgs/Rtree-1.2.0-cp311-cp311-linux_aarch64.whl new file mode 100644 index 000000000..93cdd5da2 Binary files /dev/null and b/dp_ext/selfdrive/tetood/pkgs/Rtree-1.2.0-cp311-cp311-linux_aarch64.whl differ diff --git a/dp_ext/selfdrive/tetood/tetood b/dp_ext/selfdrive/tetood/tetood new file mode 100755 index 000000000..fd01f9bf3 --- /dev/null +++ b/dp_ext/selfdrive/tetood/tetood @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" + +ARCHNAME=$(uname -m) +if [ -f /TICI ]; then + ARCHNAME="larch64" +fi + +if [[ "$OSTYPE" == "darwin"* ]]; then + ARCHNAME="Darwin" +fi + +LIB_DIR=$DIR/../../../third_party/libspatialindex/$ARCHNAME/lib/ + +export LD_LIBRARY_PATH=$LIB_DIR:$LD_LIBRARY_PATH + +exec "$DIR/tetood.py" "$@" diff --git a/dp_ext/selfdrive/tetood/tetood.py b/dp_ext/selfdrive/tetood/tetood.py new file mode 100755 index 000000000..e6f24db3d --- /dev/null +++ b/dp_ext/selfdrive/tetood/tetood.py @@ -0,0 +1,403 @@ +#!/usr/bin/env python3 +from typing import List, Tuple, Dict +import rtree +import math +import json +import threading +from collections import deque +import time + +import cereal.messaging as messaging +from cereal import log, custom +from openpilot.common.params import Params +from openpilot.common.realtime import Ratekeeper +from openpilot.common.conversions import Conversions as CV +from openpilot.system.hardware import PC + +from openpilot.dp_ext.selfdrive.tetood.lib.map_matcher import MapMatcher, Position +from openpilot.dp_ext.selfdrive.tetood.lib.overpass_api_helper import OverpassAPIHelper +from openpilot.dp_ext.selfdrive.tetood.lib.taiwan_speed_camera_loader import TaiwanSpeedCameraLoader +from openpilot.dp_ext.selfdrive.tetood.lib.utils import calculate_bearing, haversine_distance, feature_is_ahead + +RADIUS = 3500 + +FREQ = 5 # hz + +DEBUG = True + +class TeToo: + def __init__(self): + self.current_position = None + self.current_bearing = None + self.road_network = {} + self.traffic_signals = {} + + self.index = rtree.index.Index() + self.map_matcher = None + self.overpass_helper = None + + self.current_way = None + + self.current_road_name = None + self.current_max_speed = 0 + self.current_tags = {} + + self.params = Params() + + self.fetching_thread = None + self.data_lock = threading.Lock() + + self.v_ego = 0. + self.v_cruise = 0. + self.cruise_enabled = False + + self.gps_history = deque(maxlen=1*FREQ) + self.bearing_history = deque(maxlen=1*FREQ) + + self._osm = True if PC else self.params.get_bool("dp_tetoo") + self._taiwan_speed_camera_enabled = True if PC else self.params.get_bool("dp_tetoo_speed_camera_taiwan") + self._speed_camera_threshold = int(self.params.get_bool("dp_tetoo_speed_camera_threshold")) * 0.01 + + self.osm_speed_cameras = {} + self.tw_speed_cameras = {} + + if self._taiwan_speed_camera_enabled: + self.tw_speed_camera_loader = TaiwanSpeedCameraLoader() + self.tw_speed_cameras = self.tw_speed_camera_loader.load_speed_cameras() + if not self._osm: + self._build_road_network() + + self.prefetched_data = None + self.last_fetch_position = None + if self._osm: + last_data = self.params.get("dp_tetoo_data") + if last_data is not None and last_data != "": + self.prefetched_data = json.loads(last_data) + self.map_matcher = MapMatcher(self.prefetched_data) + self._build_road_network() + + last_pos = self.params.get("dp_tetoo_gps") + if last_pos is not None and last_pos != "": + self.last_fetch_position = json.loads(last_pos) + + def update_position(self): #, lat: float, lon: float): + self._check_and_fetch_data() + + self._map_match() + return self._get_road_info() + + def _check_and_fetch_data(self): + if self._osm and not self.last_fetch_position or haversine_distance(self.current_position, self.last_fetch_position) > RADIUS - self._boundary_offset(): + self._fetch_data() + + def _boundary_offset(self): + """reduce boundary at high speed""" + return 300 if self.v_ego < 16.67 else 600 + + def _fetch_data(self): + def fetch(): + overpass_helper = OverpassAPIHelper() + self.prefetched_data = overpass_helper.fetch_data(self.current_position[0], self.current_position[1], RADIUS, self.v_ego > 23) + if self.prefetched_data is not None: + self._build_road_network() + self.last_fetch_position = self.current_position + self.params.put_nonblocking("dp_tetoo_gps", json.dumps(self.last_fetch_position)) + self.params.put_nonblocking("dp_tetoo_data", json.dumps(self.prefetched_data, ensure_ascii=False)) + + with self.data_lock: + self.map_matcher = MapMatcher(self.prefetched_data) + + if self.fetching_thread is not None and self.fetching_thread.is_alive(): + return + self.fetching_thread = threading.Thread(target=fetch) + self.fetching_thread.start() + + def _build_road_network(self): + new_road_network = {} + new_index = rtree.index.Index() + self.traffic_signals = {} + self.osm_speed_cameras = {} + + if self._osm and self.prefetched_data: + for element in self.prefetched_data['elements']: + if element['type'] == 'way': + way_id = element['id'] + new_road_network[way_id] = { + 'nodes': element['nodes'], + 'tags': element.get('tags', {}) + } + elif element['type'] == 'node': + node_id = element['id'] + lat, lon = element['lat'], element['lon'] + new_index.insert(node_id, (lon, lat, lon, lat)) + new_road_network[node_id] = {'lat': lat, 'lon': lon} + tags = element.get('tags', {}) + if tags.get('highway') == 'traffic_signals': + self.traffic_signals[node_id] = {'lat': lat, 'lon': lon, 'tags': tags} + elif 'highway' in tags and tags['highway'] == 'speed_camera': + self.osm_speed_cameras[node_id] = {'lat': lat, 'lon': lon, 'tags': tags} + elif 'enforcement' in tags and tags['enforcement'] == 'maxspeed': + self.osm_speed_cameras[node_id] = {'lat': lat, 'lon': lon, 'tags': tags} + + # Add traffic signals to the index + for node_id, node_data in self.traffic_signals.items(): + new_index.insert(node_id, (node_data['lon'], node_data['lat'], node_data['lon'], node_data['lat'])) + + # Add OSM speed cameras to the index + for camera_id, camera_data in self.osm_speed_cameras.items(): + new_index.insert(camera_id, (camera_data['lon'], camera_data['lat'], camera_data['lon'], camera_data['lat'])) + + # Add Taiwan speed cameras to the index + if self._taiwan_speed_camera_enabled: + for camera_id, camera_data in self.tw_speed_cameras.items(): + new_index.insert(camera_id, (camera_data['lon'], camera_data['lat'], camera_data['lon'], camera_data['lat'])) + + with self.data_lock: + self.road_network = new_road_network + self.index = new_index + + def _map_match(self): + if len(self.gps_history) < 1*FREQ: + return + + if self.map_matcher is None: + return + + self.current_way = self.map_matcher.update_position(Position( + lat=self.current_position[0], + lon=self.current_position[1], + bearing=self.current_position[2], + speed=self.current_position[3], + turn_signal=self.current_position[4], + ), time.time()) + + def _get_road_info(self): + if self.current_way is None: + return { + 'id': None, + 'name': self.current_road_name, + 'maxspeed': self.current_max_speed, + 'tags': self.current_tags, + 'confidence': 0.0 + } + way_id = self.current_way.way.id + new_road_name = self.current_way.way.name + new_tags = self.current_way.way.tags + new_max_speed = self.current_way.way.tags.get("maxspeed", '0') + + # Only update if the new name is different + if new_road_name and new_road_name != self.current_road_name: + self.current_road_name = new_road_name + self.current_max_speed = new_max_speed + self.current_tags = new_tags + + return { + 'id': way_id, + 'name': self.current_road_name, + 'maxspeed': self.current_max_speed, + 'tags': self.current_tags, + # 'confidence': self.current_way_confidence + } + + def _check_feature_ahead(self, feature_type: str, max_distance: float, max_distance_in_parallel: float) -> Tuple[bool, float, Dict, str]: + if self.current_position is None or self.current_bearing is None: + return False, float('inf'), {}, "" + + current_lat, current_lon, current_bearing, current_speed, current_turn_signal = self.current_position + closest_feature_distance = float('inf') + closest_feature_info = {} + closest_feature_id = "" + + # Define a bounding box for the spatial query + search_distance = max_distance / 111000 # Convert meters to degrees (approximate) + bbox = ( + current_lon - search_distance, + current_lat - search_distance, + current_lon + search_distance, + current_lat + search_distance + ) + + # Query the rtree index for nearby features + nearby_features = list(self.index.intersection(bbox)) + + for feature_id in nearby_features: + # Check if this feature is of the correct type + if feature_type == custom.TeToo.FeatureType.trafficSignal and feature_id not in self.traffic_signals: + continue + if feature_type == custom.TeToo.FeatureType.speedCamera: + if feature_id not in self.osm_speed_cameras and feature_id not in self.tw_speed_cameras: + continue + + if feature_type == custom.TeToo.FeatureType.trafficSignal: + feature_data = self.traffic_signals.get(feature_id) + elif feature_type == custom.TeToo.FeatureType.speedCamera: + feature_data = self.osm_speed_cameras.get(feature_id) or self.tw_speed_cameras.get(feature_id) + + if not feature_data: + continue + + feature_lat, feature_lon = feature_data['lat'], feature_data['lon'] + + feature_point = (feature_lat, feature_lon) + + distance = haversine_distance(self.current_position, feature_point) + + # Skip features beyond the maximum look-ahead distance + if distance > max_distance: + continue + + bearing = calculate_bearing(self.current_position, (feature_lat, feature_lon)) + + # Check if the feature is ahead based on bearing + if feature_is_ahead(self.current_bearing, bearing, 20.) and distance < closest_feature_distance: + closest_feature_distance = distance + closest_feature_info = feature_data + closest_feature_id = feature_id + + return bool(closest_feature_info), closest_feature_distance, closest_feature_info, closest_feature_id + + def check_traffic_signal_ahead(self) -> Tuple[bool, float, Dict, str]: + MAX_TRAFFIC_SIGNAL_DISTANCE = 100 # meters + MAX_DISTANCE_IN_PARALLEL = 15 + return self._check_feature_ahead(custom.TeToo.FeatureType.trafficSignal, MAX_TRAFFIC_SIGNAL_DISTANCE, MAX_DISTANCE_IN_PARALLEL) + + def should_warn_speed_camera(self, distance: float, speed_limit: float, road_speed_limit: float = 0.): + # If we don't know the speed limit or we don't have a threshold set, warn anyway + if speed_limit is None or self._speed_camera_threshold == 0: + return True + + speed_limit = float(speed_limit) + should_warn = False + + threshold = 1 + self._speed_camera_threshold + + # when we have v_cruise set + if not should_warn and self.v_cruise > 0.: + speed_limit = float(speed_limit) + lower_bound = math.floor(self.v_cruise / threshold) + upper_bound = math.ceil(self.v_cruise * threshold) + should_warn = lower_bound <= speed_limit <= upper_bound + + # when the current road has a speed limit + if not should_warn and road_speed_limit > 0.: + road_lower_bound = math.floor(road_speed_limit / threshold) + road_upper_bound = math.ceil(road_speed_limit * threshold) + should_warn = road_lower_bound <= speed_limit <= road_upper_bound + + # use current speed + if not should_warn: + v_ego_kph = self.v_ego * CV.MS_TO_KPH + v_lower_bound = math.floor(v_ego_kph / threshold) + v_upper_bound = math.ceil(v_ego_kph * threshold) + should_warn = v_lower_bound <= speed_limit <= v_upper_bound + + return should_warn + + def check_speed_camera_ahead(self) -> Tuple[bool, float, Dict, str]: + MAX_SPEED_CAMERA_DISTANCE = 1000 # meters + MAX_DISTANCE_IN_PARALLEL = 30 + ahead, distance, info, id = self._check_feature_ahead(custom.TeToo.FeatureType.speedCamera, MAX_SPEED_CAMERA_DISTANCE, MAX_DISTANCE_IN_PARALLEL) + + if ahead: + maxspeed = info.get('tags', {}).get('maxspeed') + if maxspeed: + info['maxspeed'] = maxspeed + + return ahead, distance, info, id + + def _get_feature(self, type, func, display_tags=False): + ahead, distance, info, id = func() + if not ahead: + return {} + feature = { + 'id': str(id), + 'type': type, + 'lat': float(info['lat']), + 'lon': float(info['lon']), + 'distance': float(distance), + } + if display_tags: + feature['tags'] = json.dumps(info['tags'], ensure_ascii=False) + return feature + + def tetoo_thread(self): + sm = messaging.SubMaster(['liveLocationKalman', 'carState', 'controlsState']) + pm = messaging.PubMaster(['teToo']) + te_too_dat_prev = {} + rk = Ratekeeper(FREQ) + lat = 0. + lon = 0. + bearing = 0. + while True: + sm.update() + location = sm['liveLocationKalman'] + localizer_valid = (location.status == log.LiveLocationKalman.Status.valid) and location.positionGeodetic.valid + + # Update GPS and bearing history at 20 Hz + if localizer_valid: + lat = location.positionGeodetic.value[0] + lon = location.positionGeodetic.value[1] + bearing = math.degrees(location.calibratedOrientationNED.value[2]) + + self.v_ego = sm['carState'].vEgo + self.cruise_enabled = sm['carState'].cruiseState.enabled + + # Update vCruise + self.v_cruise = sm['controlsState'].vCruise + + # Update GPS history + if self.v_ego >= 2.6: + self.gps_history.append((lat, lon, bearing, self.v_ego)) + self.bearing_history.append(bearing) + + use_prev = not localizer_valid or (localizer_valid and self.v_ego < 2.6) + + dat = messaging.new_message('teToo', valid=True) + if use_prev: + dat.teToo = te_too_dat_prev + else: + dat.teToo.lat = float(lat) + dat.teToo.lon = float(lon) + dat.teToo.bearing = float(bearing) + road_maxspeed = 0. + + blinker_state = 'left' if sm['carState'].leftBlinker else 'right' if sm['carState'].rightBlinker else None + self.current_position = (lat, lon, bearing, self.v_ego, blinker_state) + self.current_bearing = bearing + + if self._osm: + road_info = self.update_position() #(lat, lon) + dat.teToo.name = str("" if road_info['name'] is None else road_info['name']) + dat.teToo.maxspeed = float(road_info['maxspeed']) + road_maxspeed = dat.teToo.maxspeed + + features = [] + # disable for now + # if self._osm: + # traffic_signal_ahead = self._get_feature(custom.TeToo.FeatureType.trafficSignal, self.check_traffic_signal_ahead) + # if traffic_signal_ahead: + # features.append(traffic_signal_ahead) + + speed_camera_ahead = self._get_feature(custom.TeToo.FeatureType.speedCamera, self.check_speed_camera_ahead, True) + if speed_camera_ahead: + tags = speed_camera_ahead.get('tags', None) + should_show = True + if tags: + maxspeed = json.loads(tags).get('maxspeed', None) + should_show = self.should_warn_speed_camera(speed_camera_ahead['distance'], maxspeed, road_maxspeed) + if should_show: + features.append(speed_camera_ahead) + dat.teToo.nearestFeatures = features + + dat.teToo.updatingData = self._osm and (self.fetching_thread is not None and self.fetching_thread.is_alive()) + pm.send('teToo', dat) + te_too_dat_prev = dat.teToo + + rk.keep_time() + +def main(): + tetoo = TeToo() + tetoo.tetoo_thread() + +if __name__ == "__main__": + main() diff --git a/dp_priv/scripts/build_libspatialindex.sh b/dp_priv/scripts/build_libspatialindex.sh new file mode 100755 index 000000000..c3deea423 --- /dev/null +++ b/dp_priv/scripts/build_libspatialindex.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +set -e + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"/../../third_party/libspatialindex + +ARCHNAME=$(uname -m) +if [ -f /TICI ]; then + ARCHNAME="larch64" +fi + +if [[ "$OSTYPE" == "darwin"* ]]; then + ARCHNAME="Darwin" +fi + +cd $DIR + +if [ ! -d libspatialindex ]; then + git clone --single-branch https://github.com/libspatialindex/libspatialindex +fi + +cd libspatialindex + +# build +rm -fr build +mkdir build +cd build +cmake .. +cmake --build . -j$(nproc) + +rm -fr $DIR/$ARCHNAME +mkdir -p $DIR/$ARCHNAME + +make install DESTDIR=$DIR/$ARCHNAME + +# clean up +rm -fr $DIR/libspatialindex/ +mv $DIR/$ARCHNAME/usr/local/* $DIR/$ARCHNAME +rm -fr $DIR/$ARCHNAME/usr/ +rm -fr $DIR/$ARCHNAME/lib/cmake/ +rm -fr $DIR/$ARCHNAME/lib/pkgconfig/ \ No newline at end of file diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh index 9256f463a..babd295cf 100755 --- a/launch_chffrplus.sh +++ b/launch_chffrplus.sh @@ -76,6 +76,15 @@ function launch { # hardware specific init if [ -f /AGNOS ]; then agnos_init + # dp + if ! (LD_LIBRARY_PATH=$DIR/third_party/libspatialindex/larch64/lib/ python -c "import rtree") &> /dev/null; then + pip install "$DIR/dp_ext/selfdrive/tetood/pkgs/Rtree-1.2.0-cp311-cp311-linux_aarch64.whl" + fi + else + # dp + if ! (LD_LIBRARY_PATH=$DIR/third_party/libspatialindex/x86_64/lib/ python -c "import rtree") &> /dev/null; then + pip install "$DIR/dp_ext/selfdrive/tetood/pkgs/Rtree-1.2.0-cp312-cp312-linux_x86_64.whl" + fi fi # write tmux scrollback to a file diff --git a/msgq_repo/msgq/test_runner b/msgq_repo/msgq/test_runner new file mode 100755 index 000000000..d9b66956e Binary files /dev/null and b/msgq_repo/msgq/test_runner differ diff --git a/msgq_repo/msgq/visionipc/test_runner b/msgq_repo/msgq/visionipc/test_runner new file mode 100755 index 000000000..225a7ada8 Binary files /dev/null and b/msgq_repo/msgq/visionipc/test_runner differ diff --git a/opendbc/can/libdbc.so b/opendbc/can/libdbc.so index 4738f09b3..8447ed813 100755 Binary files a/opendbc/can/libdbc.so and b/opendbc/can/libdbc.so differ diff --git a/panda/board/jungle/obj/bootstub.panda_jungle.bin b/panda/board/jungle/obj/bootstub.panda_jungle.bin index 5d69b4e24..d46be873f 100755 Binary files a/panda/board/jungle/obj/bootstub.panda_jungle.bin and b/panda/board/jungle/obj/bootstub.panda_jungle.bin differ diff --git a/panda/board/jungle/obj/bootstub.panda_jungle.elf b/panda/board/jungle/obj/bootstub.panda_jungle.elf index 34b20a629..e274ba8ff 100755 Binary files a/panda/board/jungle/obj/bootstub.panda_jungle.elf and b/panda/board/jungle/obj/bootstub.panda_jungle.elf differ diff --git a/panda/board/jungle/obj/bootstub.panda_jungle_h7.bin b/panda/board/jungle/obj/bootstub.panda_jungle_h7.bin index 16f0a4cd9..209def661 100755 Binary files a/panda/board/jungle/obj/bootstub.panda_jungle_h7.bin and b/panda/board/jungle/obj/bootstub.panda_jungle_h7.bin differ diff --git a/panda/board/jungle/obj/bootstub.panda_jungle_h7.elf b/panda/board/jungle/obj/bootstub.panda_jungle_h7.elf index 8a03a4baf..c8dabde6a 100755 Binary files a/panda/board/jungle/obj/bootstub.panda_jungle_h7.elf and b/panda/board/jungle/obj/bootstub.panda_jungle_h7.elf differ diff --git a/panda/board/jungle/obj/panda_jungle.bin b/panda/board/jungle/obj/panda_jungle.bin index 0f4a94772..1716673d2 100755 Binary files a/panda/board/jungle/obj/panda_jungle.bin and b/panda/board/jungle/obj/panda_jungle.bin differ diff --git a/panda/board/jungle/obj/panda_jungle.bin.signed b/panda/board/jungle/obj/panda_jungle.bin.signed index 861b9e9a9..75ea6cb6c 100644 Binary files a/panda/board/jungle/obj/panda_jungle.bin.signed and b/panda/board/jungle/obj/panda_jungle.bin.signed differ diff --git a/panda/board/jungle/obj/panda_jungle.elf b/panda/board/jungle/obj/panda_jungle.elf index a5be04ff3..a8cbf61dd 100755 Binary files a/panda/board/jungle/obj/panda_jungle.elf and b/panda/board/jungle/obj/panda_jungle.elf differ diff --git a/panda/board/jungle/obj/panda_jungle_h7.bin b/panda/board/jungle/obj/panda_jungle_h7.bin index 401b637d8..93a8979c8 100755 Binary files a/panda/board/jungle/obj/panda_jungle_h7.bin and b/panda/board/jungle/obj/panda_jungle_h7.bin differ diff --git a/panda/board/jungle/obj/panda_jungle_h7.bin.signed b/panda/board/jungle/obj/panda_jungle_h7.bin.signed index aef817ebf..63867e2c7 100644 Binary files a/panda/board/jungle/obj/panda_jungle_h7.bin.signed and b/panda/board/jungle/obj/panda_jungle_h7.bin.signed differ diff --git a/panda/board/jungle/obj/panda_jungle_h7.elf b/panda/board/jungle/obj/panda_jungle_h7.elf index e408a4010..6b276ed81 100755 Binary files a/panda/board/jungle/obj/panda_jungle_h7.elf and b/panda/board/jungle/obj/panda_jungle_h7.elf differ diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index 3fab303dd..da4eb97db 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/bootstub.panda.elf b/panda/board/obj/bootstub.panda.elf index ed75b25c5..7cac7d033 100755 Binary files a/panda/board/obj/bootstub.panda.elf and b/panda/board/obj/bootstub.panda.elf differ diff --git a/panda/board/obj/bootstub.panda_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index b67b4385d..15d3c840f 100755 Binary files a/panda/board/obj/bootstub.panda_h7.bin and b/panda/board/obj/bootstub.panda_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_h7.elf b/panda/board/obj/bootstub.panda_h7.elf index 74efdf660..61e2a928d 100755 Binary files a/panda/board/obj/bootstub.panda_h7.elf and b/panda/board/obj/bootstub.panda_h7.elf differ diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index 9a22c7cc3..8985641fa 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1 +1 @@ -const uint8_t gitversion[] = "DEV-3c873995-DEBUG"; +const uint8_t gitversion[] = "DEV-3a83aa9c-DEBUG"; diff --git a/panda/board/obj/panda.bin b/panda/board/obj/panda.bin index 30b154130..209ea8a41 100755 Binary files a/panda/board/obj/panda.bin and b/panda/board/obj/panda.bin differ diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index 82ab1cac9..52bc10c87 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/obj/panda.elf b/panda/board/obj/panda.elf index 640fec629..b935b5b54 100755 Binary files a/panda/board/obj/panda.elf and b/panda/board/obj/panda.elf differ diff --git a/panda/board/obj/panda_h7.bin b/panda/board/obj/panda_h7.bin index 14855008a..c79865056 100755 Binary files a/panda/board/obj/panda_h7.bin and b/panda/board/obj/panda_h7.bin differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index 51c523eae..658b5a36a 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/board/obj/panda_h7.elf b/panda/board/obj/panda_h7.elf index 199567d57..eba543397 100755 Binary files a/panda/board/obj/panda_h7.elf and b/panda/board/obj/panda_h7.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index 3a2cd4fca..8a5762f2a 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-3c873995-DEBUG \ No newline at end of file +DEV-3a83aa9c-DEBUG \ No newline at end of file diff --git a/panda/tests/libpanda/libpanda.so b/panda/tests/libpanda/libpanda.so new file mode 100755 index 000000000..6ba689fb5 Binary files /dev/null and b/panda/tests/libpanda/libpanda.so differ diff --git a/pyproject.toml b/pyproject.toml index fc2356645..0f5d9aa1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,9 +66,8 @@ dependencies = [ [project.optional-dependencies] docs = [ "Jinja2", - "sphinx", - "sphinx-rtd-theme", - "sphinx-sitemap" + "mkdocs", + "mkdocs-terminal", ] testing = [ @@ -137,7 +136,7 @@ packages = [ "." ] [tool.pytest.ini_options] minversion = "6.0" -addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup" +addopts = "--ignore=openpilot/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup" cpp_files = "test_*" cpp_harness = "selfdrive/test/cpp_harness.py" python_files = "test_*.py" diff --git a/selfdrive/car/chrysler/fingerprints.py b/selfdrive/car/chrysler/fingerprints.py index 1bc6a3243..5528bfd5d 100644 --- a/selfdrive/car/chrysler/fingerprints.py +++ b/selfdrive/car/chrysler/fingerprints.py @@ -4,35 +4,6 @@ from openpilot.selfdrive.car.chrysler.values import CAR Ecu = car.CarParams.Ecu FW_VERSIONS = { - CAR.CHRYSLER_PACIFICA_2017_HYBRID: { - (Ecu.combinationMeter, 0x742, None): [ - b'68239262AH', - b'68239262AI', - b'68239262AJ', - b'68239263AH', - b'68239263AJ', - ], - (Ecu.srs, 0x744, None): [ - b'68238840AH', - ], - (Ecu.fwdRadar, 0x753, None): [ - b'68226356AI', - ], - (Ecu.eps, 0x75a, None): [ - b'68288309AC', - b'68288309AD', - ], - (Ecu.engine, 0x7e0, None): [ - b'68277480AV ', - b'68277480AX ', - b'68277480AZ ', - ], - (Ecu.hybrid, 0x7e2, None): [ - b'05190175BF', - b'05190175BH', - b'05190226AK', - ], - }, CAR.CHRYSLER_PACIFICA_2018: { (Ecu.combinationMeter, 0x742, None): [ b'68227902AF', @@ -181,26 +152,39 @@ FW_VERSIONS = { }, CAR.CHRYSLER_PACIFICA_2018_HYBRID: { (Ecu.combinationMeter, 0x742, None): [ + b'68239262AH', + b'68239262AI', + b'68239262AJ', + b'68239263AH', + b'68239263AJ', b'68358439AE', b'68358439AG', ], (Ecu.srs, 0x744, None): [ + b'68238840AH', b'68358990AC', b'68405939AA', ], (Ecu.fwdRadar, 0x753, None): [ b'04672758AA', + b'68226356AI', ], (Ecu.eps, 0x75a, None): [ + b'68288309AC', b'68288309AD', b'68525339AA', ], (Ecu.engine, 0x7e0, None): [ + b'68277480AV ', + b'68277480AX ', + b'68277480AZ ', b'68366580AI ', b'68366580AK ', b'68366580AM ', ], (Ecu.hybrid, 0x7e2, None): [ + b'05190175BF', + b'05190175BH', b'05190226AI', b'05190226AK', b'05190226AM', @@ -245,6 +229,7 @@ FW_VERSIONS = { b'68416680AE ', b'68416680AF ', b'68416680AG ', + b'68444228AC ', b'68444228AD ', b'68444228AE ', b'68444228AF ', diff --git a/selfdrive/car/chrysler/interface.py b/selfdrive/car/chrysler/interface.py index 217a1a756..eb1f6703c 100755 --- a/selfdrive/car/chrysler/interface.py +++ b/selfdrive/car/chrysler/interface.py @@ -35,8 +35,8 @@ class CarInterface(CarInterfaceBase): ret.flags |= ChryslerFlags.HIGHER_MIN_STEERING_SPEED.value # Chrysler - if candidate in (CAR.CHRYSLER_PACIFICA_2017_HYBRID, CAR.CHRYSLER_PACIFICA_2018, CAR.CHRYSLER_PACIFICA_2018_HYBRID, \ - CAR.CHRYSLER_PACIFICA_2019_HYBRID, CAR.CHRYSLER_PACIFICA_2020, CAR.DODGE_DURANGO): + if candidate in (CAR.CHRYSLER_PACIFICA_2018, CAR.CHRYSLER_PACIFICA_2018_HYBRID, CAR.CHRYSLER_PACIFICA_2019_HYBRID, + CAR.CHRYSLER_PACIFICA_2020, CAR.DODGE_DURANGO): ret.lateralTuning.init('pid') ret.lateralTuning.pid.kpBP, ret.lateralTuning.pid.kiBP = [[9., 20.], [9., 20.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.15, 0.30], [0.03, 0.05]] diff --git a/selfdrive/car/chrysler/values.py b/selfdrive/car/chrysler/values.py index 3315a0a98..c44c647fd 100644 --- a/selfdrive/car/chrysler/values.py +++ b/selfdrive/car/chrysler/values.py @@ -32,34 +32,30 @@ class ChryslerCarSpecs(CarSpecs): class CAR(Platforms): # Chrysler - CHRYSLER_PACIFICA_2017_HYBRID = ChryslerPlatformConfig( - [ChryslerCarDocs("Chrysler Pacifica Hybrid 2017")], - ChryslerCarSpecs(mass=2242., wheelbase=3.089, steerRatio=16.2), - ) CHRYSLER_PACIFICA_2018_HYBRID = ChryslerPlatformConfig( - [ChryslerCarDocs("Chrysler Pacifica Hybrid 2018")], - CHRYSLER_PACIFICA_2017_HYBRID.specs, + [ChryslerCarDocs("Chrysler Pacifica Hybrid 2017-18")], + ChryslerCarSpecs(mass=2242., wheelbase=3.089, steerRatio=16.2), ) CHRYSLER_PACIFICA_2019_HYBRID = ChryslerPlatformConfig( [ChryslerCarDocs("Chrysler Pacifica Hybrid 2019-24")], - CHRYSLER_PACIFICA_2017_HYBRID.specs, + CHRYSLER_PACIFICA_2018_HYBRID.specs, ) CHRYSLER_PACIFICA_2018 = ChryslerPlatformConfig( [ChryslerCarDocs("Chrysler Pacifica 2017-18")], - CHRYSLER_PACIFICA_2017_HYBRID.specs, + CHRYSLER_PACIFICA_2018_HYBRID.specs, ) CHRYSLER_PACIFICA_2020 = ChryslerPlatformConfig( [ ChryslerCarDocs("Chrysler Pacifica 2019-20"), ChryslerCarDocs("Chrysler Pacifica 2021-23", package="All"), ], - CHRYSLER_PACIFICA_2017_HYBRID.specs, + CHRYSLER_PACIFICA_2018_HYBRID.specs, ) # Dodge DODGE_DURANGO = ChryslerPlatformConfig( [ChryslerCarDocs("Dodge Durango 2020-21")], - CHRYSLER_PACIFICA_2017_HYBRID.specs, + CHRYSLER_PACIFICA_2018_HYBRID.specs, ) # Jeep diff --git a/selfdrive/car/fingerprints.py b/selfdrive/car/fingerprints.py index 1128a31c2..dc93c3824 100644 --- a/selfdrive/car/fingerprints.py +++ b/selfdrive/car/fingerprints.py @@ -130,7 +130,8 @@ MIGRATION = { # Removal of platform_str, see https://github.com/commaai/openpilot/pull/31868/ "COMMA BODY": BODY.COMMA_BODY, - "CHRYSLER PACIFICA HYBRID 2017": CHRYSLER.CHRYSLER_PACIFICA_2017_HYBRID, + "CHRYSLER PACIFICA HYBRID 2017": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID, + "CHRYSLER_PACIFICA_2017_HYBRID": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID, "CHRYSLER PACIFICA HYBRID 2018": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID, "CHRYSLER PACIFICA HYBRID 2019": CHRYSLER.CHRYSLER_PACIFICA_2019_HYBRID, "CHRYSLER PACIFICA 2018": CHRYSLER.CHRYSLER_PACIFICA_2018, diff --git a/selfdrive/car/ford/carstate.py b/selfdrive/car/ford/carstate.py index 78f48ec5c..d7130681d 100644 --- a/selfdrive/car/ford/carstate.py +++ b/selfdrive/car/ford/carstate.py @@ -15,7 +15,7 @@ class CarState(CarStateBase): super().__init__(CP) can_define = CANDefine(DBC[CP.carFingerprint]["pt"]) if CP.transmissionType == TransmissionType.automatic: - self.shifter_values = can_define.dv["Gear_Shift_by_Wire_FD1"]["TrnRng_D_RqGsm"] + self.shifter_values = can_define.dv["PowertrainData_10"]["TrnRng_D_Rq"] self.vehicle_sensors_valid = False @@ -69,7 +69,7 @@ class CarState(CarStateBase): # gear if self.CP.transmissionType == TransmissionType.automatic: - gear = self.shifter_values.get(cp.vl["Gear_Shift_by_Wire_FD1"]["TrnRng_D_RqGsm"]) + gear = self.shifter_values.get(cp.vl["PowertrainData_10"]["TrnRng_D_Rq"]) ret.gearShifter = self.parse_gear_shifter(gear) elif self.CP.transmissionType == TransmissionType.manual: ret.clutchPressed = cp.vl["Engine_Clutch_Data"]["CluPdlPos_Pc_Meas"] > 0 @@ -139,7 +139,7 @@ class CarState(CarStateBase): if CP.transmissionType == TransmissionType.automatic: messages += [ - ("Gear_Shift_by_Wire_FD1", 10), + ("PowertrainData_10", 10), ] elif CP.transmissionType == TransmissionType.manual: messages += [ diff --git a/selfdrive/car/honda/fingerprints.py b/selfdrive/car/honda/fingerprints.py index 0904d5e12..191fd8e44 100644 --- a/selfdrive/car/honda/fingerprints.py +++ b/selfdrive/car/honda/fingerprints.py @@ -529,6 +529,7 @@ FW_VERSIONS = { b'28102-5MX-A900\x00\x00', b'28102-5MX-A910\x00\x00', b'28102-5MX-C001\x00\x00', + b'28102-5MX-C610\x00\x00', b'28102-5MX-C910\x00\x00', b'28102-5MX-D001\x00\x00', b'28102-5MX-D710\x00\x00', diff --git a/selfdrive/car/hyundai/fingerprints.py b/selfdrive/car/hyundai/fingerprints.py index 8dbdbee0e..4ad7e0e0a 100644 --- a/selfdrive/car/hyundai/fingerprints.py +++ b/selfdrive/car/hyundai/fingerprints.py @@ -585,6 +585,7 @@ FW_VERSIONS = { b'\xf1\x00DL3 MDPS C 1.00 1.02 56310-L7220 4DLHC102', ], (Ecu.fwdCamera, 0x7c4, None): [ + b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.01 99210-L2000 191022', b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.02 99210-L2000 200309', b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.04 99210-L2000 210527', ], @@ -595,6 +596,7 @@ FW_VERSIONS = { b'\xf1\x00OS IEB \x02 210 \x02\x14 58520-K4000', b'\xf1\x00OS IEB \x02 212 \x11\x13 58520-K4000', b'\xf1\x00OS IEB \x03 210 \x02\x14 58520-K4000', + b'\xf1\x00OS IEB \x03 211 \x04\x02 58520-K4000', b'\xf1\x00OS IEB \x03 212 \x11\x13 58520-K4000', b'\xf1\x00OS IEB \r 105\x18\t\x18 58520-K4000', ], diff --git a/selfdrive/car/tests/routes.py b/selfdrive/car/tests/routes.py index dd3a8f633..711637537 100755 --- a/selfdrive/car/tests/routes.py +++ b/selfdrive/car/tests/routes.py @@ -39,7 +39,7 @@ routes = [ CarTestRoute("0c94aa1e1296d7c6|2021-05-05--19-48-37", CHRYSLER.JEEP_GRAND_CHEROKEE), CarTestRoute("91dfedae61d7bd75|2021-05-22--20-07-52", CHRYSLER.JEEP_GRAND_CHEROKEE_2019), - CarTestRoute("420a8e183f1aed48|2020-03-05--07-15-29", CHRYSLER.CHRYSLER_PACIFICA_2017_HYBRID), + CarTestRoute("420a8e183f1aed48|2020-03-05--07-15-29", CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID), # 2017 CarTestRoute("43a685a66291579b|2021-05-27--19-47-29", CHRYSLER.CHRYSLER_PACIFICA_2018), CarTestRoute("378472f830ee7395|2021-05-28--07-38-43", CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID), CarTestRoute("8190c7275a24557b|2020-01-29--08-33-58", CHRYSLER.CHRYSLER_PACIFICA_2019_HYBRID), diff --git a/selfdrive/car/tests/test_car_interfaces.py b/selfdrive/car/tests/test_car_interfaces.py index 742bafc76..bb97ac8a9 100644 --- a/selfdrive/car/tests/test_car_interfaces.py +++ b/selfdrive/car/tests/test_car_interfaces.py @@ -62,6 +62,7 @@ class TestCarInterfaces: car_params = CarInterface.get_params(car_name, args['fingerprints'], args['car_fw'], experimental_long=args['experimental_long'], docs=False) + car_params = car_params.as_reader() car_interface = CarInterface(car_params, CarController, CarState) assert car_params assert car_interface diff --git a/selfdrive/car/torque_data/params.toml b/selfdrive/car/torque_data/params.toml index 34cfd0e06..4bb8d45c5 100644 --- a/selfdrive/car/torque_data/params.toml +++ b/selfdrive/car/torque_data/params.toml @@ -7,7 +7,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "CHEVROLET_VOLT" = [1.5961527626411784, 1.8422651988094612, 0.1572393918005158] "CHRYSLER_PACIFICA_2018" = [2.07140, 1.3366521181047952, 0.13776367250652022] "CHRYSLER_PACIFICA_2020" = [1.86206, 1.509076559398423, 0.14328246159386085] -"CHRYSLER_PACIFICA_2017_HYBRID" = [1.79422, 1.06831764583744, 0.116237] "CHRYSLER_PACIFICA_2018_HYBRID" = [2.08887, 1.2943025830995154, 0.114818] "CHRYSLER_PACIFICA_2019_HYBRID" = [1.90120, 1.1958788168371808, 0.131520] "GENESIS_G70" = [3.8520195946707947, 2.354697063349854, 0.06830285485626221] diff --git a/selfdrive/car/toyota/fingerprints.py b/selfdrive/car/toyota/fingerprints.py index 5e746d131..67203da7d 100644 --- a/selfdrive/car/toyota/fingerprints.py +++ b/selfdrive/car/toyota/fingerprints.py @@ -441,6 +441,7 @@ FW_VERSIONS = { b'\x01896630ZU8000\x00\x00\x00\x00', b'\x01896630ZU9000\x00\x00\x00\x00', b'\x01896630ZX4000\x00\x00\x00\x00', + b'\x01896630ZX7100\x00\x00\x00\x00', b'\x018966312L8000\x00\x00\x00\x00', b'\x018966312M0000\x00\x00\x00\x00', b'\x018966312M9000\x00\x00\x00\x00', @@ -516,6 +517,7 @@ FW_VERSIONS = { b'\x018965B1254000\x00\x00\x00\x00', b'\x018965B1255000\x00\x00\x00\x00', b'\x018965B1256000\x00\x00\x00\x00', + b'\x018965B1270000\x00\x00\x00\x00', b'8965B12361\x00\x00\x00\x00\x00\x00', b'8965B12451\x00\x00\x00\x00\x00\x00', b'8965B16011\x00\x00\x00\x00\x00\x00', diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index ea5c98b1c..a2d8b9cb0 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -72,9 +72,7 @@ class Controls: if CI is None: cloudlog.info("controlsd is waiting for CarParams") - with car.CarParams.from_bytes(self.params.get("CarParams", block=True)) as msg: - # TODO: this shouldn't need to be a builder - self.CP = msg.as_builder() + self.CP = messaging.log_from_bytes(self.params.get("CarParams", block=True), car.CarParams) cloudlog.info("controlsd got CarParams") # Uses car interface helper functions, altering state won't be considered by card for actuation diff --git a/selfdrive/controls/lib/latcontrol_torque.py b/selfdrive/controls/lib/latcontrol_torque.py index 34b0d4712..decff2ec0 100644 --- a/selfdrive/controls/lib/latcontrol_torque.py +++ b/selfdrive/controls/lib/latcontrol_torque.py @@ -25,7 +25,7 @@ LOW_SPEED_Y = [15, 13, 10, 5] class LatControlTorque(LatControl): def __init__(self, CP, CI): super().__init__(CP, CI) - self.torque_params = CP.lateralTuning.torque + self.torque_params = CP.lateralTuning.torque.as_builder() self.pid = PIDController(self.torque_params.kp, self.torque_params.ki, k_f=self.torque_params.kf, pos_limit=self.steer_max, neg_limit=-self.steer_max) self.torque_from_lateral_accel = CI.torque_from_lateral_accel() diff --git a/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json b/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json new file mode 100644 index 000000000..4690040e2 --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json @@ -0,0 +1,538 @@ +{ + "acados_include_path": "/data/openpilot/third_party/acados/include", + "acados_lib_path": "/data/openpilot/third_party/acados/lib", + "code_export_directory": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code", + "constraints": { + "C": [], + "C_e": [], + "D": [], + "constr_type": "BGH", + "constr_type_e": "BGH", + "idxbu": [], + "idxbx": [ + 2, + 3 + ], + "idxbx_0": [ + 0, + 1, + 2, + 3 + ], + "idxbx_e": [], + "idxbxe_0": [ + 0, + 1, + 2, + 3 + ], + "idxsbu": [], + "idxsbx": [], + "idxsbx_e": [], + "idxsg": [], + "idxsg_e": [], + "idxsh": [], + "idxsh_e": [], + "idxsphi": [], + "idxsphi_e": [], + "lbu": [], + "lbx": [ + -1.5707963267948966, + -0.8726646259971648 + ], + "lbx_0": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "lbx_e": [], + "lg": [], + "lg_e": [], + "lh": [], + "lh_e": [], + "lphi": [], + "lphi_e": [], + "lsbu": [], + "lsbx": [], + "lsbx_e": [], + "lsg": [], + "lsg_e": [], + "lsh": [], + "lsh_e": [], + "lsphi": [], + "lsphi_e": [], + "ubu": [], + "ubx": [ + 1.5707963267948966, + 0.8726646259971648 + ], + "ubx_0": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "ubx_e": [], + "ug": [], + "ug_e": [], + "uh": [], + "uh_e": [], + "uphi": [], + "uphi_e": [], + "usbu": [], + "usbx": [], + "usbx_e": [], + "usg": [], + "usg_e": [], + "ush": [], + "ush_e": [], + "usphi": [], + "usphi_e": [] + }, + "cost": { + "Vu": [], + "Vu_0": [], + "Vx": [], + "Vx_0": [], + "Vx_e": [], + "Vz": [], + "Vz_0": [], + "W": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "W_0": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "W_e": [ + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ] + ], + "Zl": [], + "Zl_e": [], + "Zu": [], + "Zu_e": [], + "cost_ext_fun_type": "casadi", + "cost_ext_fun_type_0": "casadi", + "cost_ext_fun_type_e": "casadi", + "cost_type": "NONLINEAR_LS", + "cost_type_0": "NONLINEAR_LS", + "cost_type_e": "NONLINEAR_LS", + "yref": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "yref_0": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "yref_e": [ + 0.0, + 0.0, + 0.0 + ], + "zl": [], + "zl_e": [], + "zu": [], + "zu_e": [] + }, + "cython_include_dirs": [ + "/usr/local/pyenv/versions/3.11.4/lib/python3.11/site-packages/numpy/core/include", + "/usr/local/pyenv/versions/3.11.4/include/python3.11" + ], + "dims": { + "N": 32, + "nbu": 0, + "nbx": 2, + "nbx_0": 4, + "nbx_e": 0, + "nbxe_0": 4, + "ng": 0, + "ng_e": 0, + "nh": 0, + "nh_e": 0, + "np": 2, + "nphi": 0, + "nphi_e": 0, + "nr": 0, + "nr_e": 0, + "ns": 0, + "ns_e": 0, + "nsbu": 0, + "nsbx": 0, + "nsbx_e": 0, + "nsg": 0, + "nsg_e": 0, + "nsh": 0, + "nsh_e": 0, + "nsphi": 0, + "nsphi_e": 0, + "nu": 1, + "nx": 4, + "ny": 5, + "ny_0": 5, + "ny_e": 3, + "nz": 0 + }, + "json_file": "/data/openpilot/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json", + "model": { + "con_h_expr": null, + "con_h_expr_e": null, + "con_phi_expr": null, + "con_phi_expr_e": null, + "con_r_expr": null, + "con_r_expr_e": null, + "con_r_in_phi": null, + "con_r_in_phi_e": null, + "cost_conl_custom_outer_hess": null, + "cost_conl_custom_outer_hess_0": null, + "cost_conl_custom_outer_hess_e": null, + "cost_expr_ext_cost": null, + "cost_expr_ext_cost_0": null, + "cost_expr_ext_cost_custom_hess": null, + "cost_expr_ext_cost_custom_hess_0": null, + "cost_expr_ext_cost_custom_hess_e": null, + "cost_expr_ext_cost_e": null, + "cost_psi_expr": null, + "cost_psi_expr_0": null, + "cost_psi_expr_e": null, + "cost_r_in_psi_expr": null, + "cost_r_in_psi_expr_0": null, + "cost_r_in_psi_expr_e": null, + "cost_y_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpgegeaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaachkjjjjjjjjjjjjlpd", + "cost_y_expr_0": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpgegeaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaachkjjjjjjjjjjjjlpd", + "cost_y_expr_e": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegdaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgkaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpg", + "disc_dyn_expr": null, + "dyn_disc_fun": null, + "dyn_disc_fun_jac": null, + "dyn_disc_fun_jac_hess": null, + "dyn_ext_fun_type": "casadi", + "dyn_generic_source": null, + "f_expl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegoaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdhegnaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegbaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegnaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachfaaaaaaaaaaaaaaaegoaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaachiaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg", + "f_impl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegcaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegoaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdhegnaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaajhpffghgpgpfegpgehegbaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachcaaaaaaaaaaaaaaaegnaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaachgaaaaaaaaaaaaaaaegoaaaaaaaaaaaaaaachdaaaaaaaaaaaaaaachjaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaalaaaaaaaahdhjgpffghgpgpfegpgehchjaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaaabaaaaaaahdhjgpfchbgehfgpffghgpgpfegpgehegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg", + "gnsf": { + "nontrivial_f_LO": 1, + "purely_linear": 0 + }, + "name": "lat", + "p": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeggaaaaaaaaaaaaaaacaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaapaaaaaaachpgehbgehjgpgogpfchbgegjgfhdh", + "u": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaaahdhjgpfbgdgdgfgmgpffghgpg", + "x": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegpcaaaaaaaaaaaaaafaaaaaaajhpffghgpgegpcaaaaaaaaaaaaaahaaaaaaaahdhjgpffghgpgegpcaaaaaaaaaaaaaamaaaaaaaahdhjgpfchbgehfgpffghgpg", + "xdot": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaajhpffghgpgpfegpgehegpcaaaaaaaaaaaaaalaaaaaaaahdhjgpffghgpgpfegpgehegpcaaaaaaaaaaaaaaabaaaaaaahdhjgpfchbgehfgpffghgpgpfegpgeh", + "z": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "parameter_values": [ + 0.0, + 0.0 + ], + "problem_class": "OCP", + "shared_lib_ext": ".so", + "solver_options": { + "Tsim": 0.009765625, + "alpha_min": 0.05, + "alpha_reduction": 0.7, + "collocation_type": "GAUSS_LEGENDRE", + "custom_templates": [], + "custom_update_copy": true, + "custom_update_filename": "", + "custom_update_header_filename": "", + "eps_sufficient_descent": 0.0001, + "exact_hess_constr": 1, + "exact_hess_cost": 1, + "exact_hess_dyn": 1, + "ext_cost_num_hess": 0, + "ext_fun_compile_flags": "-O2", + "full_step_dual": 0, + "globalization": "FIXED_STEP", + "globalization_use_SOC": 0, + "hessian_approx": "GAUSS_NEWTON", + "hpipm_mode": "BALANCE", + "initialize_t_slacks": 0, + "integrator_type": "ERK", + "levenberg_marquardt": 0.0, + "line_search_use_sufficient_descent": 0, + "model_external_shared_lib_dir": null, + "model_external_shared_lib_name": null, + "nlp_solver_ext_qp_res": 0, + "nlp_solver_max_iter": 100, + "nlp_solver_step_length": 1.0, + "nlp_solver_tol_comp": 1e-06, + "nlp_solver_tol_eq": 1e-06, + "nlp_solver_tol_ineq": 1e-06, + "nlp_solver_tol_stat": 1e-06, + "nlp_solver_type": "SQP_RTI", + "print_level": 0, + "qp_solver": "PARTIAL_CONDENSING_HPIPM", + "qp_solver_cond_N": 1, + "qp_solver_cond_ric_alg": 1, + "qp_solver_iter_max": 1, + "qp_solver_ric_alg": 1, + "qp_solver_tol_comp": null, + "qp_solver_tol_eq": null, + "qp_solver_tol_ineq": null, + "qp_solver_tol_stat": null, + "qp_solver_warm_start": 0, + "regularize_method": null, + "shooting_nodes": [ + 0.0, + 0.009765625, + 0.0390625, + 0.087890625, + 0.15625, + 0.244140625, + 0.3515625, + 0.478515625, + 0.625, + 0.791015625, + 0.9765625, + 1.181640625, + 1.40625, + 1.650390625, + 1.9140625, + 2.197265625, + 2.5, + 2.822265625, + 3.1640625, + 3.525390625, + 3.90625, + 4.306640625, + 4.7265625, + 5.166015625, + 5.625, + 6.103515625, + 6.6015625, + 7.119140625, + 7.65625, + 8.212890625, + 8.7890625, + 9.384765625, + 10.0 + ], + "sim_method_jac_reuse": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "sim_method_newton_iter": 3, + "sim_method_newton_tol": 0.0, + "sim_method_num_stages": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "sim_method_num_steps": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "tf": 10.0, + "time_steps": [ + 0.009765625, + 0.029296875, + 0.048828125, + 0.068359375, + 0.087890625, + 0.107421875, + 0.126953125, + 0.146484375, + 0.166015625, + 0.185546875, + 0.205078125, + 0.224609375, + 0.244140625, + 0.263671875, + 0.283203125, + 0.302734375, + 0.322265625, + 0.341796875, + 0.361328125, + 0.380859375, + 0.400390625, + 0.419921875, + 0.439453125, + 0.458984375, + 0.478515625, + 0.498046875, + 0.517578125, + 0.537109375, + 0.556640625, + 0.576171875, + 0.595703125, + 0.615234375 + ] + } +} \ No newline at end of file diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json b/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json new file mode 100644 index 000000000..4d7f82ba2 --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json @@ -0,0 +1,524 @@ +{ + "acados_include_path": "/data/openpilot/third_party/acados/include", + "acados_lib_path": "/data/openpilot/third_party/acados/lib", + "code_export_directory": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code", + "constraints": { + "C": [], + "C_e": [], + "D": [], + "constr_type": "BGH", + "constr_type_e": "BGH", + "idxbu": [], + "idxbx": [], + "idxbx_0": [ + 0, + 1, + 2 + ], + "idxbx_e": [], + "idxbxe_0": [ + 0, + 1, + 2 + ], + "idxsbu": [], + "idxsbx": [], + "idxsbx_e": [], + "idxsg": [], + "idxsg_e": [], + "idxsh": [ + 0, + 1, + 2, + 3 + ], + "idxsh_e": [], + "idxsphi": [], + "idxsphi_e": [], + "lbu": [], + "lbx": [], + "lbx_0": [ + 0.0, + 0.0, + 0.0 + ], + "lbx_e": [], + "lg": [], + "lg_e": [], + "lh": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "lh_e": [], + "lphi": [], + "lphi_e": [], + "lsbu": [], + "lsbx": [], + "lsbx_e": [], + "lsg": [], + "lsg_e": [], + "lsh": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "lsh_e": [], + "lsphi": [], + "lsphi_e": [], + "ubu": [], + "ubx": [], + "ubx_0": [ + 0.0, + 0.0, + 0.0 + ], + "ubx_e": [], + "ug": [], + "ug_e": [], + "uh": [ + 10000.0, + 10000.0, + 10000.0, + 10000.0 + ], + "uh_e": [], + "uphi": [], + "uphi_e": [], + "usbu": [], + "usbx": [], + "usbx_e": [], + "usg": [], + "usg_e": [], + "ush": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "ush_e": [], + "usphi": [], + "usphi_e": [] + }, + "cost": { + "Vu": [], + "Vu_0": [], + "Vx": [], + "Vx_0": [], + "Vx_e": [], + "Vz": [], + "Vz_0": [], + "W": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "W_0": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "W_e": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "Zl": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "Zl_e": [], + "Zu": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "Zu_e": [], + "cost_ext_fun_type": "casadi", + "cost_ext_fun_type_0": "casadi", + "cost_ext_fun_type_e": "casadi", + "cost_type": "NONLINEAR_LS", + "cost_type_0": "NONLINEAR_LS", + "cost_type_e": "NONLINEAR_LS", + "yref": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "yref_0": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "yref_e": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "zl": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "zl_e": [], + "zu": [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + "zu_e": [] + }, + "cython_include_dirs": [ + "/usr/local/pyenv/versions/3.11.4/lib/python3.11/site-packages/numpy/core/include", + "/usr/local/pyenv/versions/3.11.4/include/python3.11" + ], + "dims": { + "N": 12, + "nbu": 0, + "nbx": 0, + "nbx_0": 3, + "nbx_e": 0, + "nbxe_0": 3, + "ng": 0, + "ng_e": 0, + "nh": 4, + "nh_e": 0, + "np": 6, + "nphi": 0, + "nphi_e": 0, + "nr": 0, + "nr_e": 0, + "ns": 4, + "ns_e": 0, + "nsbu": 0, + "nsbx": 0, + "nsbx_e": 0, + "nsg": 0, + "nsg_e": 0, + "nsh": 4, + "nsh_e": 0, + "nsphi": 0, + "nsphi_e": 0, + "nu": 1, + "nx": 3, + "ny": 6, + "ny_0": 6, + "ny_e": 5, + "nz": 0 + }, + "json_file": "/data/openpilot/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json", + "model": { + "con_h_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegiaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpfngjgogegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpfngbgihchcaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaacbaaaaaamgfgbgegpfegbgoghgfgchpfggbgdgehpgchegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhchbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaachbaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaa", + "con_h_expr_e": null, + "con_phi_expr": null, + "con_phi_expr_e": null, + "con_r_expr": null, + "con_r_expr_e": null, + "con_r_in_phi": null, + "con_r_in_phi_e": null, + "cost_conl_custom_outer_hess": null, + "cost_conl_custom_outer_hess_0": null, + "cost_conl_custom_outer_hess_e": null, + "cost_expr_ext_cost": null, + "cost_expr_ext_cost_0": null, + "cost_expr_ext_cost_custom_hess": null, + "cost_expr_ext_cost_custom_hess_0": null, + "cost_expr_ext_cost_custom_hess_e": null, + "cost_expr_ext_cost_e": null, + "cost_psi_expr": null, + "cost_psi_expr_0": null, + "cost_psi_expr_e": null, + "cost_r_in_psi_expr": null, + "cost_r_in_psi_expr_0": null, + "cost_r_in_psi_expr_e": null, + "cost_y_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg", + "cost_y_expr_0": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg", + "cost_y_expr_e": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegjaaaaaaaaaaaaaaafaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegbaaaaaaaaaaaaaaaegbaaaaaaaaaaaaaaaegeaaaaaaaaaaaaaaaeglaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegmcaaaaaaaaaaaaaajgfaaaaaaaegdaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhcheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajggaaaaaaaegbaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegmcaaaaaaaaaaaaaajgkaaaaaaachcaaaaaaaaaaaaaaacheaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaachbbaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbg", + "disc_dyn_expr": null, + "dyn_disc_fun": null, + "dyn_disc_fun_jac": null, + "dyn_disc_fun_jac_hess": null, + "dyn_ext_fun_type": "casadi", + "dyn_generic_source": null, + "f_expl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg", + "f_impl_expr": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaghpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpgegcaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaabgpffghgpgpfegpgehegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg", + "gnsf": { + "nontrivial_f_LO": 1, + "purely_linear": 0 + }, + "name": "long", + "p": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegkaaaaaaaaaaaaaaagaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaafaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaabgpfngjgogegpcaaaaaaaaaaaaaafaaaaaaabgpfngbgihegpcaaaaaaaaaaaaaakaaaaaaaihpfpgcgdhehbgdgmgfgegpcaaaaaaaaaaaaaagaaaaaaaahchfgghpfbgegpcaaaaaaaaaaaaaanaaaaaaamgfgbgegpfehpfggpgmgmgpghhegpcaaaaaaaaaaaaaacbaaaaaamgfgbgegpfegbgoghgfgchpfggbgdgehpgch", + "u": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegfaaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaakgpffghgpg", + "x": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaafaaaaaaaihpffghgpgegpcaaaaaaaaaaaaaafaaaaaaaghpffghgpgegpcaaaaaaaaaaaaaafaaaaaaabgpffghgpg", + "xdot": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaeghaaaaaaaaaaaaaaadaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaacaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaegpcaaaaaaaaaaaaaajaaaaaaaihpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaaghpffghgpgpfegpgehegpcaaaaaaaaaaaaaajaaaaaaabgpffghgpgpfegpgeh", + "z": "jhpnnagiieahaaaadaaaaaaaaaaaaaaaaaegdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "parameter_values": [ + -1.2, + 1.2, + 0.0, + 0.0, + 1.45, + 0.75 + ], + "problem_class": "OCP", + "shared_lib_ext": ".so", + "solver_options": { + "Tsim": 0.06944444444444445, + "alpha_min": 0.05, + "alpha_reduction": 0.7, + "collocation_type": "GAUSS_LEGENDRE", + "custom_templates": [], + "custom_update_copy": true, + "custom_update_filename": "", + "custom_update_header_filename": "", + "eps_sufficient_descent": 0.0001, + "exact_hess_constr": 1, + "exact_hess_cost": 1, + "exact_hess_dyn": 1, + "ext_cost_num_hess": 0, + "ext_fun_compile_flags": "-O2", + "full_step_dual": 0, + "globalization": "FIXED_STEP", + "globalization_use_SOC": 0, + "hessian_approx": "GAUSS_NEWTON", + "hpipm_mode": "BALANCE", + "initialize_t_slacks": 0, + "integrator_type": "ERK", + "levenberg_marquardt": 0.0, + "line_search_use_sufficient_descent": 0, + "model_external_shared_lib_dir": null, + "model_external_shared_lib_name": null, + "nlp_solver_ext_qp_res": 0, + "nlp_solver_max_iter": 100, + "nlp_solver_step_length": 1.0, + "nlp_solver_tol_comp": 1e-06, + "nlp_solver_tol_eq": 1e-06, + "nlp_solver_tol_ineq": 1e-06, + "nlp_solver_tol_stat": 1e-06, + "nlp_solver_type": "SQP_RTI", + "print_level": 0, + "qp_solver": "PARTIAL_CONDENSING_HPIPM", + "qp_solver_cond_N": 1, + "qp_solver_cond_ric_alg": 1, + "qp_solver_iter_max": 10, + "qp_solver_ric_alg": 1, + "qp_solver_tol_comp": 0.001, + "qp_solver_tol_eq": 0.001, + "qp_solver_tol_ineq": 0.001, + "qp_solver_tol_stat": 0.001, + "qp_solver_warm_start": 0, + "regularize_method": null, + "shooting_nodes": [ + 0.0, + 0.06944444444444445, + 0.2777777777777778, + 0.625, + 1.1111111111111112, + 1.7361111111111114, + 2.5, + 3.4027777777777786, + 4.444444444444445, + 5.625, + 6.9444444444444455, + 8.402777777777777, + 10.0 + ], + "sim_method_jac_reuse": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "sim_method_newton_iter": 3, + "sim_method_newton_tol": 0.0, + "sim_method_num_stages": [ + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4 + ], + "sim_method_num_steps": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "tf": 10.0, + "time_steps": [ + 0.06944444444444445, + 0.20833333333333334, + 0.3472222222222222, + 0.48611111111111116, + 0.6250000000000002, + 0.7638888888888886, + 0.9027777777777786, + 1.041666666666666, + 1.1805555555555554, + 1.3194444444444455, + 1.4583333333333313, + 1.5972222222222232 + ] + } +} \ No newline at end of file diff --git a/selfdrive/controls/lib/tests/test_latcontrol.py b/selfdrive/controls/lib/tests/test_latcontrol.py index 81411edec..e12da6ed9 100644 --- a/selfdrive/controls/lib/tests/test_latcontrol.py +++ b/selfdrive/controls/lib/tests/test_latcontrol.py @@ -21,7 +21,7 @@ class TestLatControl: CI = CarInterface(CP, CarController, CarState) VM = VehicleModel(CP) - controller = controller(CP, CI) + controller = controller(CP.as_reader(), CI) CS = car.CarState.new_message() CS.vEgo = 30 diff --git a/selfdrive/controls/plannerd.py b/selfdrive/controls/plannerd.py index b8d1e746f..b8f2f4e96 100755 --- a/selfdrive/controls/plannerd.py +++ b/selfdrive/controls/plannerd.py @@ -12,8 +12,7 @@ def plannerd_thread(): cloudlog.info("plannerd is waiting for CarParams") params = Params() - with car.CarParams.from_bytes(params.get("CarParams", block=True)) as msg: - CP = msg + CP = messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams) cloudlog.info("plannerd got CarParams: %s", CP.carName) longitudinal_planner = LongitudinalPlanner(CP) diff --git a/selfdrive/controls/radard.py b/selfdrive/controls/radard.py index ac3ec97dc..c3fb60c61 100755 --- a/selfdrive/controls/radard.py +++ b/selfdrive/controls/radard.py @@ -288,8 +288,7 @@ def main(): # wait for stats about the car to come in from controls cloudlog.info("radard is waiting for CarParams") - with car.CarParams.from_bytes(Params().get("CarParams", block=True)) as msg: - CP = msg + CP = messaging.log_from_bytes(Params().get("CarParams", block=True), car.CarParams) cloudlog.info("radard got CarParams") # import the radar from the fingerprint diff --git a/selfdrive/locationd/helpers.py b/selfdrive/locationd/helpers.py index 786bdbbfe..8f7211aeb 100644 --- a/selfdrive/locationd/helpers.py +++ b/selfdrive/locationd/helpers.py @@ -38,7 +38,7 @@ class PointBuckets: def is_calculable(self) -> bool: return all(len(v) > 0 for v in self.buckets.values()) - def add_point(self, x: float, y: float, bucket_val: float) -> None: + def add_point(self, x: float, y: float) -> None: raise NotImplementedError def get_points(self, num_points: int = None) -> Any: diff --git a/selfdrive/locationd/locationd b/selfdrive/locationd/locationd index c54d9c606..95ea0d4a7 100755 Binary files a/selfdrive/locationd/locationd and b/selfdrive/locationd/locationd differ diff --git a/selfdrive/locationd/models/generated/car.cpp b/selfdrive/locationd/models/generated/car.cpp index 01fad24b4..8196b40a9 100644 --- a/selfdrive/locationd/models/generated/car.cpp +++ b/selfdrive/locationd/models/generated/car.cpp @@ -45,326 +45,326 @@ const static double MAHA_THRESH_31 = 3.8414588206941227; * * * This file is part of 'ekf' * ******************************************************************************/ -void err_fun(double *nom_x, double *delta_x, double *out_4405245383551283102) { - out_4405245383551283102[0] = delta_x[0] + nom_x[0]; - out_4405245383551283102[1] = delta_x[1] + nom_x[1]; - out_4405245383551283102[2] = delta_x[2] + nom_x[2]; - out_4405245383551283102[3] = delta_x[3] + nom_x[3]; - out_4405245383551283102[4] = delta_x[4] + nom_x[4]; - out_4405245383551283102[5] = delta_x[5] + nom_x[5]; - out_4405245383551283102[6] = delta_x[6] + nom_x[6]; - out_4405245383551283102[7] = delta_x[7] + nom_x[7]; - out_4405245383551283102[8] = delta_x[8] + nom_x[8]; +void err_fun(double *nom_x, double *delta_x, double *out_7683831691601887608) { + out_7683831691601887608[0] = delta_x[0] + nom_x[0]; + out_7683831691601887608[1] = delta_x[1] + nom_x[1]; + out_7683831691601887608[2] = delta_x[2] + nom_x[2]; + out_7683831691601887608[3] = delta_x[3] + nom_x[3]; + out_7683831691601887608[4] = delta_x[4] + nom_x[4]; + out_7683831691601887608[5] = delta_x[5] + nom_x[5]; + out_7683831691601887608[6] = delta_x[6] + nom_x[6]; + out_7683831691601887608[7] = delta_x[7] + nom_x[7]; + out_7683831691601887608[8] = delta_x[8] + nom_x[8]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_6814225357492049644) { - out_6814225357492049644[0] = -nom_x[0] + true_x[0]; - out_6814225357492049644[1] = -nom_x[1] + true_x[1]; - out_6814225357492049644[2] = -nom_x[2] + true_x[2]; - out_6814225357492049644[3] = -nom_x[3] + true_x[3]; - out_6814225357492049644[4] = -nom_x[4] + true_x[4]; - out_6814225357492049644[5] = -nom_x[5] + true_x[5]; - out_6814225357492049644[6] = -nom_x[6] + true_x[6]; - out_6814225357492049644[7] = -nom_x[7] + true_x[7]; - out_6814225357492049644[8] = -nom_x[8] + true_x[8]; +void inv_err_fun(double *nom_x, double *true_x, double *out_2772021370076241199) { + out_2772021370076241199[0] = -nom_x[0] + true_x[0]; + out_2772021370076241199[1] = -nom_x[1] + true_x[1]; + out_2772021370076241199[2] = -nom_x[2] + true_x[2]; + out_2772021370076241199[3] = -nom_x[3] + true_x[3]; + out_2772021370076241199[4] = -nom_x[4] + true_x[4]; + out_2772021370076241199[5] = -nom_x[5] + true_x[5]; + out_2772021370076241199[6] = -nom_x[6] + true_x[6]; + out_2772021370076241199[7] = -nom_x[7] + true_x[7]; + out_2772021370076241199[8] = -nom_x[8] + true_x[8]; } -void H_mod_fun(double *state, double *out_8873206987470723373) { - out_8873206987470723373[0] = 1.0; - out_8873206987470723373[1] = 0; - out_8873206987470723373[2] = 0; - out_8873206987470723373[3] = 0; - out_8873206987470723373[4] = 0; - out_8873206987470723373[5] = 0; - out_8873206987470723373[6] = 0; - out_8873206987470723373[7] = 0; - out_8873206987470723373[8] = 0; - out_8873206987470723373[9] = 0; - out_8873206987470723373[10] = 1.0; - out_8873206987470723373[11] = 0; - out_8873206987470723373[12] = 0; - out_8873206987470723373[13] = 0; - out_8873206987470723373[14] = 0; - out_8873206987470723373[15] = 0; - out_8873206987470723373[16] = 0; - out_8873206987470723373[17] = 0; - out_8873206987470723373[18] = 0; - out_8873206987470723373[19] = 0; - out_8873206987470723373[20] = 1.0; - out_8873206987470723373[21] = 0; - out_8873206987470723373[22] = 0; - out_8873206987470723373[23] = 0; - out_8873206987470723373[24] = 0; - out_8873206987470723373[25] = 0; - out_8873206987470723373[26] = 0; - out_8873206987470723373[27] = 0; - out_8873206987470723373[28] = 0; - out_8873206987470723373[29] = 0; - out_8873206987470723373[30] = 1.0; - out_8873206987470723373[31] = 0; - out_8873206987470723373[32] = 0; - out_8873206987470723373[33] = 0; - out_8873206987470723373[34] = 0; - out_8873206987470723373[35] = 0; - out_8873206987470723373[36] = 0; - out_8873206987470723373[37] = 0; - out_8873206987470723373[38] = 0; - out_8873206987470723373[39] = 0; - out_8873206987470723373[40] = 1.0; - out_8873206987470723373[41] = 0; - out_8873206987470723373[42] = 0; - out_8873206987470723373[43] = 0; - out_8873206987470723373[44] = 0; - out_8873206987470723373[45] = 0; - out_8873206987470723373[46] = 0; - out_8873206987470723373[47] = 0; - out_8873206987470723373[48] = 0; - out_8873206987470723373[49] = 0; - out_8873206987470723373[50] = 1.0; - out_8873206987470723373[51] = 0; - out_8873206987470723373[52] = 0; - out_8873206987470723373[53] = 0; - out_8873206987470723373[54] = 0; - out_8873206987470723373[55] = 0; - out_8873206987470723373[56] = 0; - out_8873206987470723373[57] = 0; - out_8873206987470723373[58] = 0; - out_8873206987470723373[59] = 0; - out_8873206987470723373[60] = 1.0; - out_8873206987470723373[61] = 0; - out_8873206987470723373[62] = 0; - out_8873206987470723373[63] = 0; - out_8873206987470723373[64] = 0; - out_8873206987470723373[65] = 0; - out_8873206987470723373[66] = 0; - out_8873206987470723373[67] = 0; - out_8873206987470723373[68] = 0; - out_8873206987470723373[69] = 0; - out_8873206987470723373[70] = 1.0; - out_8873206987470723373[71] = 0; - out_8873206987470723373[72] = 0; - out_8873206987470723373[73] = 0; - out_8873206987470723373[74] = 0; - out_8873206987470723373[75] = 0; - out_8873206987470723373[76] = 0; - out_8873206987470723373[77] = 0; - out_8873206987470723373[78] = 0; - out_8873206987470723373[79] = 0; - out_8873206987470723373[80] = 1.0; +void H_mod_fun(double *state, double *out_2876076255899625510) { + out_2876076255899625510[0] = 1.0; + out_2876076255899625510[1] = 0; + out_2876076255899625510[2] = 0; + out_2876076255899625510[3] = 0; + out_2876076255899625510[4] = 0; + out_2876076255899625510[5] = 0; + out_2876076255899625510[6] = 0; + out_2876076255899625510[7] = 0; + out_2876076255899625510[8] = 0; + out_2876076255899625510[9] = 0; + out_2876076255899625510[10] = 1.0; + out_2876076255899625510[11] = 0; + out_2876076255899625510[12] = 0; + out_2876076255899625510[13] = 0; + out_2876076255899625510[14] = 0; + out_2876076255899625510[15] = 0; + out_2876076255899625510[16] = 0; + out_2876076255899625510[17] = 0; + out_2876076255899625510[18] = 0; + out_2876076255899625510[19] = 0; + out_2876076255899625510[20] = 1.0; + out_2876076255899625510[21] = 0; + out_2876076255899625510[22] = 0; + out_2876076255899625510[23] = 0; + out_2876076255899625510[24] = 0; + out_2876076255899625510[25] = 0; + out_2876076255899625510[26] = 0; + out_2876076255899625510[27] = 0; + out_2876076255899625510[28] = 0; + out_2876076255899625510[29] = 0; + out_2876076255899625510[30] = 1.0; + out_2876076255899625510[31] = 0; + out_2876076255899625510[32] = 0; + out_2876076255899625510[33] = 0; + out_2876076255899625510[34] = 0; + out_2876076255899625510[35] = 0; + out_2876076255899625510[36] = 0; + out_2876076255899625510[37] = 0; + out_2876076255899625510[38] = 0; + out_2876076255899625510[39] = 0; + out_2876076255899625510[40] = 1.0; + out_2876076255899625510[41] = 0; + out_2876076255899625510[42] = 0; + out_2876076255899625510[43] = 0; + out_2876076255899625510[44] = 0; + out_2876076255899625510[45] = 0; + out_2876076255899625510[46] = 0; + out_2876076255899625510[47] = 0; + out_2876076255899625510[48] = 0; + out_2876076255899625510[49] = 0; + out_2876076255899625510[50] = 1.0; + out_2876076255899625510[51] = 0; + out_2876076255899625510[52] = 0; + out_2876076255899625510[53] = 0; + out_2876076255899625510[54] = 0; + out_2876076255899625510[55] = 0; + out_2876076255899625510[56] = 0; + out_2876076255899625510[57] = 0; + out_2876076255899625510[58] = 0; + out_2876076255899625510[59] = 0; + out_2876076255899625510[60] = 1.0; + out_2876076255899625510[61] = 0; + out_2876076255899625510[62] = 0; + out_2876076255899625510[63] = 0; + out_2876076255899625510[64] = 0; + out_2876076255899625510[65] = 0; + out_2876076255899625510[66] = 0; + out_2876076255899625510[67] = 0; + out_2876076255899625510[68] = 0; + out_2876076255899625510[69] = 0; + out_2876076255899625510[70] = 1.0; + out_2876076255899625510[71] = 0; + out_2876076255899625510[72] = 0; + out_2876076255899625510[73] = 0; + out_2876076255899625510[74] = 0; + out_2876076255899625510[75] = 0; + out_2876076255899625510[76] = 0; + out_2876076255899625510[77] = 0; + out_2876076255899625510[78] = 0; + out_2876076255899625510[79] = 0; + out_2876076255899625510[80] = 1.0; } -void f_fun(double *state, double dt, double *out_3688990143768374912) { - out_3688990143768374912[0] = state[0]; - out_3688990143768374912[1] = state[1]; - out_3688990143768374912[2] = state[2]; - out_3688990143768374912[3] = state[3]; - out_3688990143768374912[4] = state[4]; - out_3688990143768374912[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8000000000000007*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5]; - out_3688990143768374912[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6]; - out_3688990143768374912[7] = state[7]; - out_3688990143768374912[8] = state[8]; +void f_fun(double *state, double dt, double *out_711338878401685436) { + out_711338878401685436[0] = state[0]; + out_711338878401685436[1] = state[1]; + out_711338878401685436[2] = state[2]; + out_711338878401685436[3] = state[3]; + out_711338878401685436[4] = state[4]; + out_711338878401685436[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8000000000000007*state[8] + stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*state[1]) + (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*state[4])) + state[5]; + out_711338878401685436[6] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*state[4])) + state[6]; + out_711338878401685436[7] = state[7]; + out_711338878401685436[8] = state[8]; } -void F_fun(double *state, double dt, double *out_6095431430690537089) { - out_6095431430690537089[0] = 1; - out_6095431430690537089[1] = 0; - out_6095431430690537089[2] = 0; - out_6095431430690537089[3] = 0; - out_6095431430690537089[4] = 0; - out_6095431430690537089[5] = 0; - out_6095431430690537089[6] = 0; - out_6095431430690537089[7] = 0; - out_6095431430690537089[8] = 0; - out_6095431430690537089[9] = 0; - out_6095431430690537089[10] = 1; - out_6095431430690537089[11] = 0; - out_6095431430690537089[12] = 0; - out_6095431430690537089[13] = 0; - out_6095431430690537089[14] = 0; - out_6095431430690537089[15] = 0; - out_6095431430690537089[16] = 0; - out_6095431430690537089[17] = 0; - out_6095431430690537089[18] = 0; - out_6095431430690537089[19] = 0; - out_6095431430690537089[20] = 1; - out_6095431430690537089[21] = 0; - out_6095431430690537089[22] = 0; - out_6095431430690537089[23] = 0; - out_6095431430690537089[24] = 0; - out_6095431430690537089[25] = 0; - out_6095431430690537089[26] = 0; - out_6095431430690537089[27] = 0; - out_6095431430690537089[28] = 0; - out_6095431430690537089[29] = 0; - out_6095431430690537089[30] = 1; - out_6095431430690537089[31] = 0; - out_6095431430690537089[32] = 0; - out_6095431430690537089[33] = 0; - out_6095431430690537089[34] = 0; - out_6095431430690537089[35] = 0; - out_6095431430690537089[36] = 0; - out_6095431430690537089[37] = 0; - out_6095431430690537089[38] = 0; - out_6095431430690537089[39] = 0; - out_6095431430690537089[40] = 1; - out_6095431430690537089[41] = 0; - out_6095431430690537089[42] = 0; - out_6095431430690537089[43] = 0; - out_6095431430690537089[44] = 0; - out_6095431430690537089[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4])); - out_6095431430690537089[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); - out_6095431430690537089[47] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_6095431430690537089[48] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_6095431430690537089[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2))); - out_6095431430690537089[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; - out_6095431430690537089[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); - out_6095431430690537089[52] = dt*stiffness_front*state[0]/(mass*state[1]); - out_6095431430690537089[53] = -9.8000000000000007*dt; - out_6095431430690537089[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4])); - out_6095431430690537089[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); - out_6095431430690537089[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_6095431430690537089[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_6095431430690537089[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2))); - out_6095431430690537089[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); - out_6095431430690537089[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1; - out_6095431430690537089[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_6095431430690537089[62] = 0; - out_6095431430690537089[63] = 0; - out_6095431430690537089[64] = 0; - out_6095431430690537089[65] = 0; - out_6095431430690537089[66] = 0; - out_6095431430690537089[67] = 0; - out_6095431430690537089[68] = 0; - out_6095431430690537089[69] = 0; - out_6095431430690537089[70] = 1; - out_6095431430690537089[71] = 0; - out_6095431430690537089[72] = 0; - out_6095431430690537089[73] = 0; - out_6095431430690537089[74] = 0; - out_6095431430690537089[75] = 0; - out_6095431430690537089[76] = 0; - out_6095431430690537089[77] = 0; - out_6095431430690537089[78] = 0; - out_6095431430690537089[79] = 0; - out_6095431430690537089[80] = 1; +void F_fun(double *state, double dt, double *out_782397592704791785) { + out_782397592704791785[0] = 1; + out_782397592704791785[1] = 0; + out_782397592704791785[2] = 0; + out_782397592704791785[3] = 0; + out_782397592704791785[4] = 0; + out_782397592704791785[5] = 0; + out_782397592704791785[6] = 0; + out_782397592704791785[7] = 0; + out_782397592704791785[8] = 0; + out_782397592704791785[9] = 0; + out_782397592704791785[10] = 1; + out_782397592704791785[11] = 0; + out_782397592704791785[12] = 0; + out_782397592704791785[13] = 0; + out_782397592704791785[14] = 0; + out_782397592704791785[15] = 0; + out_782397592704791785[16] = 0; + out_782397592704791785[17] = 0; + out_782397592704791785[18] = 0; + out_782397592704791785[19] = 0; + out_782397592704791785[20] = 1; + out_782397592704791785[21] = 0; + out_782397592704791785[22] = 0; + out_782397592704791785[23] = 0; + out_782397592704791785[24] = 0; + out_782397592704791785[25] = 0; + out_782397592704791785[26] = 0; + out_782397592704791785[27] = 0; + out_782397592704791785[28] = 0; + out_782397592704791785[29] = 0; + out_782397592704791785[30] = 1; + out_782397592704791785[31] = 0; + out_782397592704791785[32] = 0; + out_782397592704791785[33] = 0; + out_782397592704791785[34] = 0; + out_782397592704791785[35] = 0; + out_782397592704791785[36] = 0; + out_782397592704791785[37] = 0; + out_782397592704791785[38] = 0; + out_782397592704791785[39] = 0; + out_782397592704791785[40] = 1; + out_782397592704791785[41] = 0; + out_782397592704791785[42] = 0; + out_782397592704791785[43] = 0; + out_782397592704791785[44] = 0; + out_782397592704791785[45] = dt*(stiffness_front*(-state[2] - state[3] + state[7])/(mass*state[1]) + (-stiffness_front - stiffness_rear)*state[5]/(mass*state[4]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[6]/(mass*state[4])); + out_782397592704791785[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); + out_782397592704791785[47] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_782397592704791785[48] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_782397592704791785[49] = dt*((-1 - (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*pow(state[4], 2)))*state[6] - (-stiffness_front*state[0] - stiffness_rear*state[0])*state[5]/(mass*pow(state[4], 2))); + out_782397592704791785[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; + out_782397592704791785[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); + out_782397592704791785[52] = dt*stiffness_front*state[0]/(mass*state[1]); + out_782397592704791785[53] = -9.8000000000000007*dt; + out_782397592704791785[54] = dt*(center_to_front*stiffness_front*(-state[2] - state[3] + state[7])/(rotational_inertia*state[1]) + (-center_to_front*stiffness_front + center_to_rear*stiffness_rear)*state[5]/(rotational_inertia*state[4]) + (-pow(center_to_front, 2)*stiffness_front - pow(center_to_rear, 2)*stiffness_rear)*state[6]/(rotational_inertia*state[4])); + out_782397592704791785[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); + out_782397592704791785[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_782397592704791785[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_782397592704791785[58] = dt*(-(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])*state[5]/(rotational_inertia*pow(state[4], 2)) - (-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])*state[6]/(rotational_inertia*pow(state[4], 2))); + out_782397592704791785[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); + out_782397592704791785[60] = dt*(-pow(center_to_front, 2)*stiffness_front*state[0] - pow(center_to_rear, 2)*stiffness_rear*state[0])/(rotational_inertia*state[4]) + 1; + out_782397592704791785[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_782397592704791785[62] = 0; + out_782397592704791785[63] = 0; + out_782397592704791785[64] = 0; + out_782397592704791785[65] = 0; + out_782397592704791785[66] = 0; + out_782397592704791785[67] = 0; + out_782397592704791785[68] = 0; + out_782397592704791785[69] = 0; + out_782397592704791785[70] = 1; + out_782397592704791785[71] = 0; + out_782397592704791785[72] = 0; + out_782397592704791785[73] = 0; + out_782397592704791785[74] = 0; + out_782397592704791785[75] = 0; + out_782397592704791785[76] = 0; + out_782397592704791785[77] = 0; + out_782397592704791785[78] = 0; + out_782397592704791785[79] = 0; + out_782397592704791785[80] = 1; } -void h_25(double *state, double *unused, double *out_2085281169667296275) { - out_2085281169667296275[0] = state[6]; +void h_25(double *state, double *unused, double *out_2211854499255104178) { + out_2211854499255104178[0] = state[6]; } -void H_25(double *state, double *unused, double *out_1623550404401847017) { - out_1623550404401847017[0] = 0; - out_1623550404401847017[1] = 0; - out_1623550404401847017[2] = 0; - out_1623550404401847017[3] = 0; - out_1623550404401847017[4] = 0; - out_1623550404401847017[5] = 0; - out_1623550404401847017[6] = 1; - out_1623550404401847017[7] = 0; - out_1623550404401847017[8] = 0; +void H_25(double *state, double *unused, double *out_2676605904450648455) { + out_2676605904450648455[0] = 0; + out_2676605904450648455[1] = 0; + out_2676605904450648455[2] = 0; + out_2676605904450648455[3] = 0; + out_2676605904450648455[4] = 0; + out_2676605904450648455[5] = 0; + out_2676605904450648455[6] = 1; + out_2676605904450648455[7] = 0; + out_2676605904450648455[8] = 0; } -void h_24(double *state, double *unused, double *out_953773106991605179) { - out_953773106991605179[0] = state[4]; - out_953773106991605179[1] = state[5]; +void h_24(double *state, double *unused, double *out_3020119525027846586) { + out_3020119525027846586[0] = state[4]; + out_3020119525027846586[1] = state[5]; } -void H_24(double *state, double *unused, double *out_4462623414451625302) { - out_4462623414451625302[0] = 0; - out_4462623414451625302[1] = 0; - out_4462623414451625302[2] = 0; - out_4462623414451625302[3] = 0; - out_4462623414451625302[4] = 1; - out_4462623414451625302[5] = 0; - out_4462623414451625302[6] = 0; - out_4462623414451625302[7] = 0; - out_4462623414451625302[8] = 0; - out_4462623414451625302[9] = 0; - out_4462623414451625302[10] = 0; - out_4462623414451625302[11] = 0; - out_4462623414451625302[12] = 0; - out_4462623414451625302[13] = 0; - out_4462623414451625302[14] = 1; - out_4462623414451625302[15] = 0; - out_4462623414451625302[16] = 0; - out_4462623414451625302[17] = 0; +void H_24(double *state, double *unused, double *out_3521602513234343854) { + out_3521602513234343854[0] = 0; + out_3521602513234343854[1] = 0; + out_3521602513234343854[2] = 0; + out_3521602513234343854[3] = 0; + out_3521602513234343854[4] = 1; + out_3521602513234343854[5] = 0; + out_3521602513234343854[6] = 0; + out_3521602513234343854[7] = 0; + out_3521602513234343854[8] = 0; + out_3521602513234343854[9] = 0; + out_3521602513234343854[10] = 0; + out_3521602513234343854[11] = 0; + out_3521602513234343854[12] = 0; + out_3521602513234343854[13] = 0; + out_3521602513234343854[14] = 1; + out_3521602513234343854[15] = 0; + out_3521602513234343854[16] = 0; + out_3521602513234343854[17] = 0; } -void h_30(double *state, double *unused, double *out_4081832870303838028) { - out_4081832870303838028[0] = state[4]; +void h_30(double *state, double *unused, double *out_1936660436970598289) { + out_1936660436970598289[0] = state[4]; } -void H_30(double *state, double *unused, double *out_5293139937089769738) { - out_5293139937089769738[0] = 0; - out_5293139937089769738[1] = 0; - out_5293139937089769738[2] = 0; - out_5293139937089769738[3] = 0; - out_5293139937089769738[4] = 1; - out_5293139937089769738[5] = 0; - out_5293139937089769738[6] = 0; - out_5293139937089769738[7] = 0; - out_5293139937089769738[8] = 0; +void H_30(double *state, double *unused, double *out_5194938862957897082) { + out_5194938862957897082[0] = 0; + out_5194938862957897082[1] = 0; + out_5194938862957897082[2] = 0; + out_5194938862957897082[3] = 0; + out_5194938862957897082[4] = 1; + out_5194938862957897082[5] = 0; + out_5194938862957897082[6] = 0; + out_5194938862957897082[7] = 0; + out_5194938862957897082[8] = 0; } -void h_26(double *state, double *unused, double *out_4050923066687483124) { - out_4050923066687483124[0] = state[7]; +void h_26(double *state, double *unused, double *out_667744883838099362) { + out_667744883838099362[0] = state[7]; } -void H_26(double *state, double *unused, double *out_966696340291535113) { - out_966696340291535113[0] = 0; - out_966696340291535113[1] = 0; - out_966696340291535113[2] = 0; - out_966696340291535113[3] = 0; - out_966696340291535113[4] = 0; - out_966696340291535113[5] = 0; - out_966696340291535113[6] = 0; - out_966696340291535113[7] = 1; - out_966696340291535113[8] = 0; +void H_26(double *state, double *unused, double *out_1064897414423407769) { + out_1064897414423407769[0] = 0; + out_1064897414423407769[1] = 0; + out_1064897414423407769[2] = 0; + out_1064897414423407769[3] = 0; + out_1064897414423407769[4] = 0; + out_1064897414423407769[5] = 0; + out_1064897414423407769[6] = 0; + out_1064897414423407769[7] = 1; + out_1064897414423407769[8] = 0; } -void h_27(double *state, double *unused, double *out_7086954437328141920) { - out_7086954437328141920[0] = state[3]; +void h_27(double *state, double *unused, double *out_7553721735141134741) { + out_7553721735141134741[0] = state[3]; } -void H_27(double *state, double *unused, double *out_3927652663345511998) { - out_3927652663345511998[0] = 0; - out_3927652663345511998[1] = 0; - out_3927652663345511998[2] = 0; - out_3927652663345511998[3] = 1; - out_3927652663345511998[4] = 0; - out_3927652663345511998[5] = 0; - out_3927652663345511998[6] = 0; - out_3927652663345511998[7] = 0; - out_3927652663345511998[8] = 0; +void H_27(double *state, double *unused, double *out_7418532934141840299) { + out_7418532934141840299[0] = 0; + out_7418532934141840299[1] = 0; + out_7418532934141840299[2] = 0; + out_7418532934141840299[3] = 1; + out_7418532934141840299[4] = 0; + out_7418532934141840299[5] = 0; + out_7418532934141840299[6] = 0; + out_7418532934141840299[7] = 0; + out_7418532934141840299[8] = 0; } -void h_29(double *state, double *unused, double *out_6929767768977012775) { - out_6929767768977012775[0] = state[1]; +void h_29(double *state, double *unused, double *out_9074940202310252514) { + out_9074940202310252514[0] = state[1]; } -void H_29(double *state, double *unused, double *out_1242658007230694903) { - out_1242658007230694903[0] = 0; - out_1242658007230694903[1] = 1; - out_1242658007230694903[2] = 0; - out_1242658007230694903[3] = 0; - out_1242658007230694903[4] = 0; - out_1242658007230694903[5] = 0; - out_1242658007230694903[6] = 0; - out_1242658007230694903[7] = 0; - out_1242658007230694903[8] = 0; +void H_29(double *state, double *unused, double *out_5705170207272289266) { + out_5705170207272289266[0] = 0; + out_5705170207272289266[1] = 1; + out_5705170207272289266[2] = 0; + out_5705170207272289266[3] = 0; + out_5705170207272289266[4] = 0; + out_5705170207272289266[5] = 0; + out_5705170207272289266[6] = 0; + out_5705170207272289266[7] = 0; + out_5705170207272289266[8] = 0; } -void h_28(double *state, double *unused, double *out_6358116368720564051) { - out_6358116368720564051[0] = state[0]; +void h_28(double *state, double *unused, double *out_2552048467480289096) { + out_2552048467480289096[0] = state[0]; } -void H_28(double *state, double *unused, double *out_720972264334631348) { - out_720972264334631348[0] = 1; - out_720972264334631348[1] = 0; - out_720972264334631348[2] = 0; - out_720972264334631348[3] = 0; - out_720972264334631348[4] = 0; - out_720972264334631348[5] = 0; - out_720972264334631348[6] = 0; - out_720972264334631348[7] = 0; - out_720972264334631348[8] = 0; +void H_28(double *state, double *unused, double *out_622771190202758692) { + out_622771190202758692[0] = 1; + out_622771190202758692[1] = 0; + out_622771190202758692[2] = 0; + out_622771190202758692[3] = 0; + out_622771190202758692[4] = 0; + out_622771190202758692[5] = 0; + out_622771190202758692[6] = 0; + out_622771190202758692[7] = 0; + out_622771190202758692[8] = 0; } -void h_31(double *state, double *unused, double *out_1552168358586726075) { - out_1552168358586726075[0] = state[8]; +void h_31(double *state, double *unused, double *out_5159580489610589139) { + out_5159580489610589139[0] = state[8]; } -void H_31(double *state, double *unused, double *out_1592904442524886589) { - out_1592904442524886589[0] = 0; - out_1592904442524886589[1] = 0; - out_1592904442524886589[2] = 0; - out_1592904442524886589[3] = 0; - out_1592904442524886589[4] = 0; - out_1592904442524886589[5] = 0; - out_1592904442524886589[6] = 0; - out_1592904442524886589[7] = 0; - out_1592904442524886589[8] = 1; +void H_31(double *state, double *unused, double *out_2707251866327608883) { + out_2707251866327608883[0] = 0; + out_2707251866327608883[1] = 0; + out_2707251866327608883[2] = 0; + out_2707251866327608883[3] = 0; + out_2707251866327608883[4] = 0; + out_2707251866327608883[5] = 0; + out_2707251866327608883[6] = 0; + out_2707251866327608883[7] = 0; + out_2707251866327608883[8] = 1; } #include #include @@ -518,68 +518,68 @@ void car_update_28(double *in_x, double *in_P, double *in_z, double *in_R, doubl void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<1, 3, 0>(in_x, in_P, h_31, H_31, NULL, in_z, in_R, in_ea, MAHA_THRESH_31); } -void car_err_fun(double *nom_x, double *delta_x, double *out_4405245383551283102) { - err_fun(nom_x, delta_x, out_4405245383551283102); +void car_err_fun(double *nom_x, double *delta_x, double *out_7683831691601887608) { + err_fun(nom_x, delta_x, out_7683831691601887608); } -void car_inv_err_fun(double *nom_x, double *true_x, double *out_6814225357492049644) { - inv_err_fun(nom_x, true_x, out_6814225357492049644); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_2772021370076241199) { + inv_err_fun(nom_x, true_x, out_2772021370076241199); } -void car_H_mod_fun(double *state, double *out_8873206987470723373) { - H_mod_fun(state, out_8873206987470723373); +void car_H_mod_fun(double *state, double *out_2876076255899625510) { + H_mod_fun(state, out_2876076255899625510); } -void car_f_fun(double *state, double dt, double *out_3688990143768374912) { - f_fun(state, dt, out_3688990143768374912); +void car_f_fun(double *state, double dt, double *out_711338878401685436) { + f_fun(state, dt, out_711338878401685436); } -void car_F_fun(double *state, double dt, double *out_6095431430690537089) { - F_fun(state, dt, out_6095431430690537089); +void car_F_fun(double *state, double dt, double *out_782397592704791785) { + F_fun(state, dt, out_782397592704791785); } -void car_h_25(double *state, double *unused, double *out_2085281169667296275) { - h_25(state, unused, out_2085281169667296275); +void car_h_25(double *state, double *unused, double *out_2211854499255104178) { + h_25(state, unused, out_2211854499255104178); } -void car_H_25(double *state, double *unused, double *out_1623550404401847017) { - H_25(state, unused, out_1623550404401847017); +void car_H_25(double *state, double *unused, double *out_2676605904450648455) { + H_25(state, unused, out_2676605904450648455); } -void car_h_24(double *state, double *unused, double *out_953773106991605179) { - h_24(state, unused, out_953773106991605179); +void car_h_24(double *state, double *unused, double *out_3020119525027846586) { + h_24(state, unused, out_3020119525027846586); } -void car_H_24(double *state, double *unused, double *out_4462623414451625302) { - H_24(state, unused, out_4462623414451625302); +void car_H_24(double *state, double *unused, double *out_3521602513234343854) { + H_24(state, unused, out_3521602513234343854); } -void car_h_30(double *state, double *unused, double *out_4081832870303838028) { - h_30(state, unused, out_4081832870303838028); +void car_h_30(double *state, double *unused, double *out_1936660436970598289) { + h_30(state, unused, out_1936660436970598289); } -void car_H_30(double *state, double *unused, double *out_5293139937089769738) { - H_30(state, unused, out_5293139937089769738); +void car_H_30(double *state, double *unused, double *out_5194938862957897082) { + H_30(state, unused, out_5194938862957897082); } -void car_h_26(double *state, double *unused, double *out_4050923066687483124) { - h_26(state, unused, out_4050923066687483124); +void car_h_26(double *state, double *unused, double *out_667744883838099362) { + h_26(state, unused, out_667744883838099362); } -void car_H_26(double *state, double *unused, double *out_966696340291535113) { - H_26(state, unused, out_966696340291535113); +void car_H_26(double *state, double *unused, double *out_1064897414423407769) { + H_26(state, unused, out_1064897414423407769); } -void car_h_27(double *state, double *unused, double *out_7086954437328141920) { - h_27(state, unused, out_7086954437328141920); +void car_h_27(double *state, double *unused, double *out_7553721735141134741) { + h_27(state, unused, out_7553721735141134741); } -void car_H_27(double *state, double *unused, double *out_3927652663345511998) { - H_27(state, unused, out_3927652663345511998); +void car_H_27(double *state, double *unused, double *out_7418532934141840299) { + H_27(state, unused, out_7418532934141840299); } -void car_h_29(double *state, double *unused, double *out_6929767768977012775) { - h_29(state, unused, out_6929767768977012775); +void car_h_29(double *state, double *unused, double *out_9074940202310252514) { + h_29(state, unused, out_9074940202310252514); } -void car_H_29(double *state, double *unused, double *out_1242658007230694903) { - H_29(state, unused, out_1242658007230694903); +void car_H_29(double *state, double *unused, double *out_5705170207272289266) { + H_29(state, unused, out_5705170207272289266); } -void car_h_28(double *state, double *unused, double *out_6358116368720564051) { - h_28(state, unused, out_6358116368720564051); +void car_h_28(double *state, double *unused, double *out_2552048467480289096) { + h_28(state, unused, out_2552048467480289096); } -void car_H_28(double *state, double *unused, double *out_720972264334631348) { - H_28(state, unused, out_720972264334631348); +void car_H_28(double *state, double *unused, double *out_622771190202758692) { + H_28(state, unused, out_622771190202758692); } -void car_h_31(double *state, double *unused, double *out_1552168358586726075) { - h_31(state, unused, out_1552168358586726075); +void car_h_31(double *state, double *unused, double *out_5159580489610589139) { + h_31(state, unused, out_5159580489610589139); } -void car_H_31(double *state, double *unused, double *out_1592904442524886589) { - H_31(state, unused, out_1592904442524886589); +void car_H_31(double *state, double *unused, double *out_2707251866327608883) { + H_31(state, unused, out_2707251866327608883); } void car_predict(double *in_x, double *in_P, double *in_Q, double dt) { predict(in_x, in_P, in_Q, dt); diff --git a/selfdrive/locationd/models/generated/car.h b/selfdrive/locationd/models/generated/car.h index edc441aff..c8e884665 100644 --- a/selfdrive/locationd/models/generated/car.h +++ b/selfdrive/locationd/models/generated/car.h @@ -9,27 +9,27 @@ void car_update_27(double *in_x, double *in_P, double *in_z, double *in_R, doubl void car_update_29(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void car_update_28(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void car_update_31(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); -void car_err_fun(double *nom_x, double *delta_x, double *out_4405245383551283102); -void car_inv_err_fun(double *nom_x, double *true_x, double *out_6814225357492049644); -void car_H_mod_fun(double *state, double *out_8873206987470723373); -void car_f_fun(double *state, double dt, double *out_3688990143768374912); -void car_F_fun(double *state, double dt, double *out_6095431430690537089); -void car_h_25(double *state, double *unused, double *out_2085281169667296275); -void car_H_25(double *state, double *unused, double *out_1623550404401847017); -void car_h_24(double *state, double *unused, double *out_953773106991605179); -void car_H_24(double *state, double *unused, double *out_4462623414451625302); -void car_h_30(double *state, double *unused, double *out_4081832870303838028); -void car_H_30(double *state, double *unused, double *out_5293139937089769738); -void car_h_26(double *state, double *unused, double *out_4050923066687483124); -void car_H_26(double *state, double *unused, double *out_966696340291535113); -void car_h_27(double *state, double *unused, double *out_7086954437328141920); -void car_H_27(double *state, double *unused, double *out_3927652663345511998); -void car_h_29(double *state, double *unused, double *out_6929767768977012775); -void car_H_29(double *state, double *unused, double *out_1242658007230694903); -void car_h_28(double *state, double *unused, double *out_6358116368720564051); -void car_H_28(double *state, double *unused, double *out_720972264334631348); -void car_h_31(double *state, double *unused, double *out_1552168358586726075); -void car_H_31(double *state, double *unused, double *out_1592904442524886589); +void car_err_fun(double *nom_x, double *delta_x, double *out_7683831691601887608); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_2772021370076241199); +void car_H_mod_fun(double *state, double *out_2876076255899625510); +void car_f_fun(double *state, double dt, double *out_711338878401685436); +void car_F_fun(double *state, double dt, double *out_782397592704791785); +void car_h_25(double *state, double *unused, double *out_2211854499255104178); +void car_H_25(double *state, double *unused, double *out_2676605904450648455); +void car_h_24(double *state, double *unused, double *out_3020119525027846586); +void car_H_24(double *state, double *unused, double *out_3521602513234343854); +void car_h_30(double *state, double *unused, double *out_1936660436970598289); +void car_H_30(double *state, double *unused, double *out_5194938862957897082); +void car_h_26(double *state, double *unused, double *out_667744883838099362); +void car_H_26(double *state, double *unused, double *out_1064897414423407769); +void car_h_27(double *state, double *unused, double *out_7553721735141134741); +void car_H_27(double *state, double *unused, double *out_7418532934141840299); +void car_h_29(double *state, double *unused, double *out_9074940202310252514); +void car_H_29(double *state, double *unused, double *out_5705170207272289266); +void car_h_28(double *state, double *unused, double *out_2552048467480289096); +void car_H_28(double *state, double *unused, double *out_622771190202758692); +void car_h_31(double *state, double *unused, double *out_5159580489610589139); +void car_H_31(double *state, double *unused, double *out_2707251866327608883); void car_predict(double *in_x, double *in_P, double *in_Q, double dt); void car_set_mass(double x); void car_set_rotational_inertia(double x); diff --git a/selfdrive/locationd/models/generated/libcar.so b/selfdrive/locationd/models/generated/libcar.so index c8072b3b5..43a6a1870 100755 Binary files a/selfdrive/locationd/models/generated/libcar.so and b/selfdrive/locationd/models/generated/libcar.so differ diff --git a/selfdrive/locationd/models/generated/liblive.so b/selfdrive/locationd/models/generated/liblive.so index f9728dc59..769bc1a2f 100755 Binary files a/selfdrive/locationd/models/generated/liblive.so and b/selfdrive/locationd/models/generated/liblive.so differ diff --git a/selfdrive/locationd/models/generated/live.cpp b/selfdrive/locationd/models/generated/live.cpp index 0151326cf..9dabb7f78 100644 --- a/selfdrive/locationd/models/generated/live.cpp +++ b/selfdrive/locationd/models/generated/live.cpp @@ -22,1683 +22,1683 @@ const static double MAHA_THRESH_33 = 7.814727903251177; * * * This file is part of 'ekf' * ******************************************************************************/ -void H(double *in_vec, double *out_8605358087906380768) { - out_8605358087906380768[0] = 0; - out_8605358087906380768[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5]; - out_8605358087906380768[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; - out_8605358087906380768[3] = cos(in_vec[1])*cos(in_vec[2]); - out_8605358087906380768[4] = sin(in_vec[2])*cos(in_vec[1]); - out_8605358087906380768[5] = -sin(in_vec[1]); - out_8605358087906380768[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5]; - out_8605358087906380768[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; - out_8605358087906380768[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4]; - out_8605358087906380768[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); - out_8605358087906380768[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); - out_8605358087906380768[11] = sin(in_vec[0])*cos(in_vec[1]); - out_8605358087906380768[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5]; - out_8605358087906380768[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; - out_8605358087906380768[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3]; - out_8605358087906380768[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); - out_8605358087906380768[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); - out_8605358087906380768[17] = cos(in_vec[0])*cos(in_vec[1]); +void H(double *in_vec, double *out_3996265270042170641) { + out_3996265270042170641[0] = 0; + out_3996265270042170641[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5]; + out_3996265270042170641[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; + out_3996265270042170641[3] = cos(in_vec[1])*cos(in_vec[2]); + out_3996265270042170641[4] = sin(in_vec[2])*cos(in_vec[1]); + out_3996265270042170641[5] = -sin(in_vec[1]); + out_3996265270042170641[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5]; + out_3996265270042170641[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; + out_3996265270042170641[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4]; + out_3996265270042170641[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); + out_3996265270042170641[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); + out_3996265270042170641[11] = sin(in_vec[0])*cos(in_vec[1]); + out_3996265270042170641[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5]; + out_3996265270042170641[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; + out_3996265270042170641[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3]; + out_3996265270042170641[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); + out_3996265270042170641[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); + out_3996265270042170641[17] = cos(in_vec[0])*cos(in_vec[1]); } -void err_fun(double *nom_x, double *delta_x, double *out_7536170868467214378) { - out_7536170868467214378[0] = delta_x[0] + nom_x[0]; - out_7536170868467214378[1] = delta_x[1] + nom_x[1]; - out_7536170868467214378[2] = delta_x[2] + nom_x[2]; - out_7536170868467214378[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3]; - out_7536170868467214378[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4]; - out_7536170868467214378[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5]; - out_7536170868467214378[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6]; - out_7536170868467214378[7] = delta_x[6] + nom_x[7]; - out_7536170868467214378[8] = delta_x[7] + nom_x[8]; - out_7536170868467214378[9] = delta_x[8] + nom_x[9]; - out_7536170868467214378[10] = delta_x[9] + nom_x[10]; - out_7536170868467214378[11] = delta_x[10] + nom_x[11]; - out_7536170868467214378[12] = delta_x[11] + nom_x[12]; - out_7536170868467214378[13] = delta_x[12] + nom_x[13]; - out_7536170868467214378[14] = delta_x[13] + nom_x[14]; - out_7536170868467214378[15] = delta_x[14] + nom_x[15]; - out_7536170868467214378[16] = delta_x[15] + nom_x[16]; - out_7536170868467214378[17] = delta_x[16] + nom_x[17]; - out_7536170868467214378[18] = delta_x[17] + nom_x[18]; - out_7536170868467214378[19] = delta_x[18] + nom_x[19]; - out_7536170868467214378[20] = delta_x[19] + nom_x[20]; - out_7536170868467214378[21] = delta_x[20] + nom_x[21]; +void err_fun(double *nom_x, double *delta_x, double *out_3461674683723829337) { + out_3461674683723829337[0] = delta_x[0] + nom_x[0]; + out_3461674683723829337[1] = delta_x[1] + nom_x[1]; + out_3461674683723829337[2] = delta_x[2] + nom_x[2]; + out_3461674683723829337[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3]; + out_3461674683723829337[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4]; + out_3461674683723829337[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5]; + out_3461674683723829337[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6]; + out_3461674683723829337[7] = delta_x[6] + nom_x[7]; + out_3461674683723829337[8] = delta_x[7] + nom_x[8]; + out_3461674683723829337[9] = delta_x[8] + nom_x[9]; + out_3461674683723829337[10] = delta_x[9] + nom_x[10]; + out_3461674683723829337[11] = delta_x[10] + nom_x[11]; + out_3461674683723829337[12] = delta_x[11] + nom_x[12]; + out_3461674683723829337[13] = delta_x[12] + nom_x[13]; + out_3461674683723829337[14] = delta_x[13] + nom_x[14]; + out_3461674683723829337[15] = delta_x[14] + nom_x[15]; + out_3461674683723829337[16] = delta_x[15] + nom_x[16]; + out_3461674683723829337[17] = delta_x[16] + nom_x[17]; + out_3461674683723829337[18] = delta_x[17] + nom_x[18]; + out_3461674683723829337[19] = delta_x[18] + nom_x[19]; + out_3461674683723829337[20] = delta_x[19] + nom_x[20]; + out_3461674683723829337[21] = delta_x[20] + nom_x[21]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_2595613781234485125) { - out_2595613781234485125[0] = -nom_x[0] + true_x[0]; - out_2595613781234485125[1] = -nom_x[1] + true_x[1]; - out_2595613781234485125[2] = -nom_x[2] + true_x[2]; - out_2595613781234485125[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5]; - out_2595613781234485125[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4]; - out_2595613781234485125[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3]; - out_2595613781234485125[6] = -nom_x[7] + true_x[7]; - out_2595613781234485125[7] = -nom_x[8] + true_x[8]; - out_2595613781234485125[8] = -nom_x[9] + true_x[9]; - out_2595613781234485125[9] = -nom_x[10] + true_x[10]; - out_2595613781234485125[10] = -nom_x[11] + true_x[11]; - out_2595613781234485125[11] = -nom_x[12] + true_x[12]; - out_2595613781234485125[12] = -nom_x[13] + true_x[13]; - out_2595613781234485125[13] = -nom_x[14] + true_x[14]; - out_2595613781234485125[14] = -nom_x[15] + true_x[15]; - out_2595613781234485125[15] = -nom_x[16] + true_x[16]; - out_2595613781234485125[16] = -nom_x[17] + true_x[17]; - out_2595613781234485125[17] = -nom_x[18] + true_x[18]; - out_2595613781234485125[18] = -nom_x[19] + true_x[19]; - out_2595613781234485125[19] = -nom_x[20] + true_x[20]; - out_2595613781234485125[20] = -nom_x[21] + true_x[21]; +void inv_err_fun(double *nom_x, double *true_x, double *out_7385553611252329077) { + out_7385553611252329077[0] = -nom_x[0] + true_x[0]; + out_7385553611252329077[1] = -nom_x[1] + true_x[1]; + out_7385553611252329077[2] = -nom_x[2] + true_x[2]; + out_7385553611252329077[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5]; + out_7385553611252329077[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4]; + out_7385553611252329077[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3]; + out_7385553611252329077[6] = -nom_x[7] + true_x[7]; + out_7385553611252329077[7] = -nom_x[8] + true_x[8]; + out_7385553611252329077[8] = -nom_x[9] + true_x[9]; + out_7385553611252329077[9] = -nom_x[10] + true_x[10]; + out_7385553611252329077[10] = -nom_x[11] + true_x[11]; + out_7385553611252329077[11] = -nom_x[12] + true_x[12]; + out_7385553611252329077[12] = -nom_x[13] + true_x[13]; + out_7385553611252329077[13] = -nom_x[14] + true_x[14]; + out_7385553611252329077[14] = -nom_x[15] + true_x[15]; + out_7385553611252329077[15] = -nom_x[16] + true_x[16]; + out_7385553611252329077[16] = -nom_x[17] + true_x[17]; + out_7385553611252329077[17] = -nom_x[18] + true_x[18]; + out_7385553611252329077[18] = -nom_x[19] + true_x[19]; + out_7385553611252329077[19] = -nom_x[20] + true_x[20]; + out_7385553611252329077[20] = -nom_x[21] + true_x[21]; } -void H_mod_fun(double *state, double *out_8460251824602801486) { - out_8460251824602801486[0] = 1.0; - out_8460251824602801486[1] = 0; - out_8460251824602801486[2] = 0; - out_8460251824602801486[3] = 0; - out_8460251824602801486[4] = 0; - out_8460251824602801486[5] = 0; - out_8460251824602801486[6] = 0; - out_8460251824602801486[7] = 0; - out_8460251824602801486[8] = 0; - out_8460251824602801486[9] = 0; - out_8460251824602801486[10] = 0; - out_8460251824602801486[11] = 0; - out_8460251824602801486[12] = 0; - out_8460251824602801486[13] = 0; - out_8460251824602801486[14] = 0; - out_8460251824602801486[15] = 0; - out_8460251824602801486[16] = 0; - out_8460251824602801486[17] = 0; - out_8460251824602801486[18] = 0; - out_8460251824602801486[19] = 0; - out_8460251824602801486[20] = 0; - out_8460251824602801486[21] = 0; - out_8460251824602801486[22] = 1.0; - out_8460251824602801486[23] = 0; - out_8460251824602801486[24] = 0; - out_8460251824602801486[25] = 0; - out_8460251824602801486[26] = 0; - out_8460251824602801486[27] = 0; - out_8460251824602801486[28] = 0; - out_8460251824602801486[29] = 0; - out_8460251824602801486[30] = 0; - out_8460251824602801486[31] = 0; - out_8460251824602801486[32] = 0; - out_8460251824602801486[33] = 0; - out_8460251824602801486[34] = 0; - out_8460251824602801486[35] = 0; - out_8460251824602801486[36] = 0; - out_8460251824602801486[37] = 0; - out_8460251824602801486[38] = 0; - out_8460251824602801486[39] = 0; - out_8460251824602801486[40] = 0; - out_8460251824602801486[41] = 0; - out_8460251824602801486[42] = 0; - out_8460251824602801486[43] = 0; - out_8460251824602801486[44] = 1.0; - out_8460251824602801486[45] = 0; - out_8460251824602801486[46] = 0; - out_8460251824602801486[47] = 0; - out_8460251824602801486[48] = 0; - out_8460251824602801486[49] = 0; - out_8460251824602801486[50] = 0; - out_8460251824602801486[51] = 0; - out_8460251824602801486[52] = 0; - out_8460251824602801486[53] = 0; - out_8460251824602801486[54] = 0; - out_8460251824602801486[55] = 0; - out_8460251824602801486[56] = 0; - out_8460251824602801486[57] = 0; - out_8460251824602801486[58] = 0; - out_8460251824602801486[59] = 0; - out_8460251824602801486[60] = 0; - out_8460251824602801486[61] = 0; - out_8460251824602801486[62] = 0; - out_8460251824602801486[63] = 0; - out_8460251824602801486[64] = 0; - out_8460251824602801486[65] = 0; - out_8460251824602801486[66] = -0.5*state[4]; - out_8460251824602801486[67] = -0.5*state[5]; - out_8460251824602801486[68] = -0.5*state[6]; - out_8460251824602801486[69] = 0; - out_8460251824602801486[70] = 0; - out_8460251824602801486[71] = 0; - out_8460251824602801486[72] = 0; - out_8460251824602801486[73] = 0; - out_8460251824602801486[74] = 0; - out_8460251824602801486[75] = 0; - out_8460251824602801486[76] = 0; - out_8460251824602801486[77] = 0; - out_8460251824602801486[78] = 0; - out_8460251824602801486[79] = 0; - out_8460251824602801486[80] = 0; - out_8460251824602801486[81] = 0; - out_8460251824602801486[82] = 0; - out_8460251824602801486[83] = 0; - out_8460251824602801486[84] = 0; - out_8460251824602801486[85] = 0; - out_8460251824602801486[86] = 0; - out_8460251824602801486[87] = 0.5*state[3]; - out_8460251824602801486[88] = 0.5*state[6]; - out_8460251824602801486[89] = -0.5*state[5]; - out_8460251824602801486[90] = 0; - out_8460251824602801486[91] = 0; - out_8460251824602801486[92] = 0; - out_8460251824602801486[93] = 0; - out_8460251824602801486[94] = 0; - out_8460251824602801486[95] = 0; - out_8460251824602801486[96] = 0; - out_8460251824602801486[97] = 0; - out_8460251824602801486[98] = 0; - out_8460251824602801486[99] = 0; - out_8460251824602801486[100] = 0; - out_8460251824602801486[101] = 0; - out_8460251824602801486[102] = 0; - out_8460251824602801486[103] = 0; - out_8460251824602801486[104] = 0; - out_8460251824602801486[105] = 0; - out_8460251824602801486[106] = 0; - out_8460251824602801486[107] = 0; - out_8460251824602801486[108] = -0.5*state[6]; - out_8460251824602801486[109] = 0.5*state[3]; - out_8460251824602801486[110] = 0.5*state[4]; - out_8460251824602801486[111] = 0; - out_8460251824602801486[112] = 0; - out_8460251824602801486[113] = 0; - out_8460251824602801486[114] = 0; - out_8460251824602801486[115] = 0; - out_8460251824602801486[116] = 0; - out_8460251824602801486[117] = 0; - out_8460251824602801486[118] = 0; - out_8460251824602801486[119] = 0; - out_8460251824602801486[120] = 0; - out_8460251824602801486[121] = 0; - out_8460251824602801486[122] = 0; - out_8460251824602801486[123] = 0; - out_8460251824602801486[124] = 0; - out_8460251824602801486[125] = 0; - out_8460251824602801486[126] = 0; - out_8460251824602801486[127] = 0; - out_8460251824602801486[128] = 0; - out_8460251824602801486[129] = 0.5*state[5]; - out_8460251824602801486[130] = -0.5*state[4]; - out_8460251824602801486[131] = 0.5*state[3]; - out_8460251824602801486[132] = 0; - out_8460251824602801486[133] = 0; - out_8460251824602801486[134] = 0; - out_8460251824602801486[135] = 0; - out_8460251824602801486[136] = 0; - out_8460251824602801486[137] = 0; - out_8460251824602801486[138] = 0; - out_8460251824602801486[139] = 0; - out_8460251824602801486[140] = 0; - out_8460251824602801486[141] = 0; - out_8460251824602801486[142] = 0; - out_8460251824602801486[143] = 0; - out_8460251824602801486[144] = 0; - out_8460251824602801486[145] = 0; - out_8460251824602801486[146] = 0; - out_8460251824602801486[147] = 0; - out_8460251824602801486[148] = 0; - out_8460251824602801486[149] = 0; - out_8460251824602801486[150] = 0; - out_8460251824602801486[151] = 0; - out_8460251824602801486[152] = 0; - out_8460251824602801486[153] = 1.0; - out_8460251824602801486[154] = 0; - out_8460251824602801486[155] = 0; - out_8460251824602801486[156] = 0; - out_8460251824602801486[157] = 0; - out_8460251824602801486[158] = 0; - out_8460251824602801486[159] = 0; - out_8460251824602801486[160] = 0; - out_8460251824602801486[161] = 0; - out_8460251824602801486[162] = 0; - out_8460251824602801486[163] = 0; - out_8460251824602801486[164] = 0; - out_8460251824602801486[165] = 0; - out_8460251824602801486[166] = 0; - out_8460251824602801486[167] = 0; - out_8460251824602801486[168] = 0; - out_8460251824602801486[169] = 0; - out_8460251824602801486[170] = 0; - out_8460251824602801486[171] = 0; - out_8460251824602801486[172] = 0; - out_8460251824602801486[173] = 0; - out_8460251824602801486[174] = 0; - out_8460251824602801486[175] = 1.0; - out_8460251824602801486[176] = 0; - out_8460251824602801486[177] = 0; - out_8460251824602801486[178] = 0; - out_8460251824602801486[179] = 0; - out_8460251824602801486[180] = 0; - out_8460251824602801486[181] = 0; - out_8460251824602801486[182] = 0; - out_8460251824602801486[183] = 0; - out_8460251824602801486[184] = 0; - out_8460251824602801486[185] = 0; - out_8460251824602801486[186] = 0; - out_8460251824602801486[187] = 0; - out_8460251824602801486[188] = 0; - out_8460251824602801486[189] = 0; - out_8460251824602801486[190] = 0; - out_8460251824602801486[191] = 0; - out_8460251824602801486[192] = 0; - out_8460251824602801486[193] = 0; - out_8460251824602801486[194] = 0; - out_8460251824602801486[195] = 0; - out_8460251824602801486[196] = 0; - out_8460251824602801486[197] = 1.0; - out_8460251824602801486[198] = 0; - out_8460251824602801486[199] = 0; - out_8460251824602801486[200] = 0; - out_8460251824602801486[201] = 0; - out_8460251824602801486[202] = 0; - out_8460251824602801486[203] = 0; - out_8460251824602801486[204] = 0; - out_8460251824602801486[205] = 0; - out_8460251824602801486[206] = 0; - out_8460251824602801486[207] = 0; - out_8460251824602801486[208] = 0; - out_8460251824602801486[209] = 0; - out_8460251824602801486[210] = 0; - out_8460251824602801486[211] = 0; - out_8460251824602801486[212] = 0; - out_8460251824602801486[213] = 0; - out_8460251824602801486[214] = 0; - out_8460251824602801486[215] = 0; - out_8460251824602801486[216] = 0; - out_8460251824602801486[217] = 0; - out_8460251824602801486[218] = 0; - out_8460251824602801486[219] = 1.0; - out_8460251824602801486[220] = 0; - out_8460251824602801486[221] = 0; - out_8460251824602801486[222] = 0; - out_8460251824602801486[223] = 0; - out_8460251824602801486[224] = 0; - out_8460251824602801486[225] = 0; - out_8460251824602801486[226] = 0; - out_8460251824602801486[227] = 0; - out_8460251824602801486[228] = 0; - out_8460251824602801486[229] = 0; - out_8460251824602801486[230] = 0; - out_8460251824602801486[231] = 0; - out_8460251824602801486[232] = 0; - out_8460251824602801486[233] = 0; - out_8460251824602801486[234] = 0; - out_8460251824602801486[235] = 0; - out_8460251824602801486[236] = 0; - out_8460251824602801486[237] = 0; - out_8460251824602801486[238] = 0; - out_8460251824602801486[239] = 0; - out_8460251824602801486[240] = 0; - out_8460251824602801486[241] = 1.0; - out_8460251824602801486[242] = 0; - out_8460251824602801486[243] = 0; - out_8460251824602801486[244] = 0; - out_8460251824602801486[245] = 0; - out_8460251824602801486[246] = 0; - out_8460251824602801486[247] = 0; - out_8460251824602801486[248] = 0; - out_8460251824602801486[249] = 0; - out_8460251824602801486[250] = 0; - out_8460251824602801486[251] = 0; - out_8460251824602801486[252] = 0; - out_8460251824602801486[253] = 0; - out_8460251824602801486[254] = 0; - out_8460251824602801486[255] = 0; - out_8460251824602801486[256] = 0; - out_8460251824602801486[257] = 0; - out_8460251824602801486[258] = 0; - out_8460251824602801486[259] = 0; - out_8460251824602801486[260] = 0; - out_8460251824602801486[261] = 0; - out_8460251824602801486[262] = 0; - out_8460251824602801486[263] = 1.0; - out_8460251824602801486[264] = 0; - out_8460251824602801486[265] = 0; - out_8460251824602801486[266] = 0; - out_8460251824602801486[267] = 0; - out_8460251824602801486[268] = 0; - out_8460251824602801486[269] = 0; - out_8460251824602801486[270] = 0; - out_8460251824602801486[271] = 0; - out_8460251824602801486[272] = 0; - out_8460251824602801486[273] = 0; - out_8460251824602801486[274] = 0; - out_8460251824602801486[275] = 0; - out_8460251824602801486[276] = 0; - out_8460251824602801486[277] = 0; - out_8460251824602801486[278] = 0; - out_8460251824602801486[279] = 0; - out_8460251824602801486[280] = 0; - out_8460251824602801486[281] = 0; - out_8460251824602801486[282] = 0; - out_8460251824602801486[283] = 0; - out_8460251824602801486[284] = 0; - out_8460251824602801486[285] = 1.0; - out_8460251824602801486[286] = 0; - out_8460251824602801486[287] = 0; - out_8460251824602801486[288] = 0; - out_8460251824602801486[289] = 0; - out_8460251824602801486[290] = 0; - out_8460251824602801486[291] = 0; - out_8460251824602801486[292] = 0; - out_8460251824602801486[293] = 0; - out_8460251824602801486[294] = 0; - out_8460251824602801486[295] = 0; - out_8460251824602801486[296] = 0; - out_8460251824602801486[297] = 0; - out_8460251824602801486[298] = 0; - out_8460251824602801486[299] = 0; - out_8460251824602801486[300] = 0; - out_8460251824602801486[301] = 0; - out_8460251824602801486[302] = 0; - out_8460251824602801486[303] = 0; - out_8460251824602801486[304] = 0; - out_8460251824602801486[305] = 0; - out_8460251824602801486[306] = 0; - out_8460251824602801486[307] = 1.0; - out_8460251824602801486[308] = 0; - out_8460251824602801486[309] = 0; - out_8460251824602801486[310] = 0; - out_8460251824602801486[311] = 0; - out_8460251824602801486[312] = 0; - out_8460251824602801486[313] = 0; - out_8460251824602801486[314] = 0; - out_8460251824602801486[315] = 0; - out_8460251824602801486[316] = 0; - out_8460251824602801486[317] = 0; - out_8460251824602801486[318] = 0; - out_8460251824602801486[319] = 0; - out_8460251824602801486[320] = 0; - out_8460251824602801486[321] = 0; - out_8460251824602801486[322] = 0; - out_8460251824602801486[323] = 0; - out_8460251824602801486[324] = 0; - out_8460251824602801486[325] = 0; - out_8460251824602801486[326] = 0; - out_8460251824602801486[327] = 0; - out_8460251824602801486[328] = 0; - out_8460251824602801486[329] = 1.0; - out_8460251824602801486[330] = 0; - out_8460251824602801486[331] = 0; - out_8460251824602801486[332] = 0; - out_8460251824602801486[333] = 0; - out_8460251824602801486[334] = 0; - out_8460251824602801486[335] = 0; - out_8460251824602801486[336] = 0; - out_8460251824602801486[337] = 0; - out_8460251824602801486[338] = 0; - out_8460251824602801486[339] = 0; - out_8460251824602801486[340] = 0; - out_8460251824602801486[341] = 0; - out_8460251824602801486[342] = 0; - out_8460251824602801486[343] = 0; - out_8460251824602801486[344] = 0; - out_8460251824602801486[345] = 0; - out_8460251824602801486[346] = 0; - out_8460251824602801486[347] = 0; - out_8460251824602801486[348] = 0; - out_8460251824602801486[349] = 0; - out_8460251824602801486[350] = 0; - out_8460251824602801486[351] = 1.0; - out_8460251824602801486[352] = 0; - out_8460251824602801486[353] = 0; - out_8460251824602801486[354] = 0; - out_8460251824602801486[355] = 0; - out_8460251824602801486[356] = 0; - out_8460251824602801486[357] = 0; - out_8460251824602801486[358] = 0; - out_8460251824602801486[359] = 0; - out_8460251824602801486[360] = 0; - out_8460251824602801486[361] = 0; - out_8460251824602801486[362] = 0; - out_8460251824602801486[363] = 0; - out_8460251824602801486[364] = 0; - out_8460251824602801486[365] = 0; - out_8460251824602801486[366] = 0; - out_8460251824602801486[367] = 0; - out_8460251824602801486[368] = 0; - out_8460251824602801486[369] = 0; - out_8460251824602801486[370] = 0; - out_8460251824602801486[371] = 0; - out_8460251824602801486[372] = 0; - out_8460251824602801486[373] = 1.0; - out_8460251824602801486[374] = 0; - out_8460251824602801486[375] = 0; - out_8460251824602801486[376] = 0; - out_8460251824602801486[377] = 0; - out_8460251824602801486[378] = 0; - out_8460251824602801486[379] = 0; - out_8460251824602801486[380] = 0; - out_8460251824602801486[381] = 0; - out_8460251824602801486[382] = 0; - out_8460251824602801486[383] = 0; - out_8460251824602801486[384] = 0; - out_8460251824602801486[385] = 0; - out_8460251824602801486[386] = 0; - out_8460251824602801486[387] = 0; - out_8460251824602801486[388] = 0; - out_8460251824602801486[389] = 0; - out_8460251824602801486[390] = 0; - out_8460251824602801486[391] = 0; - out_8460251824602801486[392] = 0; - out_8460251824602801486[393] = 0; - out_8460251824602801486[394] = 0; - out_8460251824602801486[395] = 1.0; - out_8460251824602801486[396] = 0; - out_8460251824602801486[397] = 0; - out_8460251824602801486[398] = 0; - out_8460251824602801486[399] = 0; - out_8460251824602801486[400] = 0; - out_8460251824602801486[401] = 0; - out_8460251824602801486[402] = 0; - out_8460251824602801486[403] = 0; - out_8460251824602801486[404] = 0; - out_8460251824602801486[405] = 0; - out_8460251824602801486[406] = 0; - out_8460251824602801486[407] = 0; - out_8460251824602801486[408] = 0; - out_8460251824602801486[409] = 0; - out_8460251824602801486[410] = 0; - out_8460251824602801486[411] = 0; - out_8460251824602801486[412] = 0; - out_8460251824602801486[413] = 0; - out_8460251824602801486[414] = 0; - out_8460251824602801486[415] = 0; - out_8460251824602801486[416] = 0; - out_8460251824602801486[417] = 1.0; - out_8460251824602801486[418] = 0; - out_8460251824602801486[419] = 0; - out_8460251824602801486[420] = 0; - out_8460251824602801486[421] = 0; - out_8460251824602801486[422] = 0; - out_8460251824602801486[423] = 0; - out_8460251824602801486[424] = 0; - out_8460251824602801486[425] = 0; - out_8460251824602801486[426] = 0; - out_8460251824602801486[427] = 0; - out_8460251824602801486[428] = 0; - out_8460251824602801486[429] = 0; - out_8460251824602801486[430] = 0; - out_8460251824602801486[431] = 0; - out_8460251824602801486[432] = 0; - out_8460251824602801486[433] = 0; - out_8460251824602801486[434] = 0; - out_8460251824602801486[435] = 0; - out_8460251824602801486[436] = 0; - out_8460251824602801486[437] = 0; - out_8460251824602801486[438] = 0; - out_8460251824602801486[439] = 1.0; - out_8460251824602801486[440] = 0; - out_8460251824602801486[441] = 0; - out_8460251824602801486[442] = 0; - out_8460251824602801486[443] = 0; - out_8460251824602801486[444] = 0; - out_8460251824602801486[445] = 0; - out_8460251824602801486[446] = 0; - out_8460251824602801486[447] = 0; - out_8460251824602801486[448] = 0; - out_8460251824602801486[449] = 0; - out_8460251824602801486[450] = 0; - out_8460251824602801486[451] = 0; - out_8460251824602801486[452] = 0; - out_8460251824602801486[453] = 0; - out_8460251824602801486[454] = 0; - out_8460251824602801486[455] = 0; - out_8460251824602801486[456] = 0; - out_8460251824602801486[457] = 0; - out_8460251824602801486[458] = 0; - out_8460251824602801486[459] = 0; - out_8460251824602801486[460] = 0; - out_8460251824602801486[461] = 1.0; +void H_mod_fun(double *state, double *out_8192941733470122092) { + out_8192941733470122092[0] = 1.0; + out_8192941733470122092[1] = 0; + out_8192941733470122092[2] = 0; + out_8192941733470122092[3] = 0; + out_8192941733470122092[4] = 0; + out_8192941733470122092[5] = 0; + out_8192941733470122092[6] = 0; + out_8192941733470122092[7] = 0; + out_8192941733470122092[8] = 0; + out_8192941733470122092[9] = 0; + out_8192941733470122092[10] = 0; + out_8192941733470122092[11] = 0; + out_8192941733470122092[12] = 0; + out_8192941733470122092[13] = 0; + out_8192941733470122092[14] = 0; + out_8192941733470122092[15] = 0; + out_8192941733470122092[16] = 0; + out_8192941733470122092[17] = 0; + out_8192941733470122092[18] = 0; + out_8192941733470122092[19] = 0; + out_8192941733470122092[20] = 0; + out_8192941733470122092[21] = 0; + out_8192941733470122092[22] = 1.0; + out_8192941733470122092[23] = 0; + out_8192941733470122092[24] = 0; + out_8192941733470122092[25] = 0; + out_8192941733470122092[26] = 0; + out_8192941733470122092[27] = 0; + out_8192941733470122092[28] = 0; + out_8192941733470122092[29] = 0; + out_8192941733470122092[30] = 0; + out_8192941733470122092[31] = 0; + out_8192941733470122092[32] = 0; + out_8192941733470122092[33] = 0; + out_8192941733470122092[34] = 0; + out_8192941733470122092[35] = 0; + out_8192941733470122092[36] = 0; + out_8192941733470122092[37] = 0; + out_8192941733470122092[38] = 0; + out_8192941733470122092[39] = 0; + out_8192941733470122092[40] = 0; + out_8192941733470122092[41] = 0; + out_8192941733470122092[42] = 0; + out_8192941733470122092[43] = 0; + out_8192941733470122092[44] = 1.0; + out_8192941733470122092[45] = 0; + out_8192941733470122092[46] = 0; + out_8192941733470122092[47] = 0; + out_8192941733470122092[48] = 0; + out_8192941733470122092[49] = 0; + out_8192941733470122092[50] = 0; + out_8192941733470122092[51] = 0; + out_8192941733470122092[52] = 0; + out_8192941733470122092[53] = 0; + out_8192941733470122092[54] = 0; + out_8192941733470122092[55] = 0; + out_8192941733470122092[56] = 0; + out_8192941733470122092[57] = 0; + out_8192941733470122092[58] = 0; + out_8192941733470122092[59] = 0; + out_8192941733470122092[60] = 0; + out_8192941733470122092[61] = 0; + out_8192941733470122092[62] = 0; + out_8192941733470122092[63] = 0; + out_8192941733470122092[64] = 0; + out_8192941733470122092[65] = 0; + out_8192941733470122092[66] = -0.5*state[4]; + out_8192941733470122092[67] = -0.5*state[5]; + out_8192941733470122092[68] = -0.5*state[6]; + out_8192941733470122092[69] = 0; + out_8192941733470122092[70] = 0; + out_8192941733470122092[71] = 0; + out_8192941733470122092[72] = 0; + out_8192941733470122092[73] = 0; + out_8192941733470122092[74] = 0; + out_8192941733470122092[75] = 0; + out_8192941733470122092[76] = 0; + out_8192941733470122092[77] = 0; + out_8192941733470122092[78] = 0; + out_8192941733470122092[79] = 0; + out_8192941733470122092[80] = 0; + out_8192941733470122092[81] = 0; + out_8192941733470122092[82] = 0; + out_8192941733470122092[83] = 0; + out_8192941733470122092[84] = 0; + out_8192941733470122092[85] = 0; + out_8192941733470122092[86] = 0; + out_8192941733470122092[87] = 0.5*state[3]; + out_8192941733470122092[88] = 0.5*state[6]; + out_8192941733470122092[89] = -0.5*state[5]; + out_8192941733470122092[90] = 0; + out_8192941733470122092[91] = 0; + out_8192941733470122092[92] = 0; + out_8192941733470122092[93] = 0; + out_8192941733470122092[94] = 0; + out_8192941733470122092[95] = 0; + out_8192941733470122092[96] = 0; + out_8192941733470122092[97] = 0; + out_8192941733470122092[98] = 0; + out_8192941733470122092[99] = 0; + out_8192941733470122092[100] = 0; + out_8192941733470122092[101] = 0; + out_8192941733470122092[102] = 0; + out_8192941733470122092[103] = 0; + out_8192941733470122092[104] = 0; + out_8192941733470122092[105] = 0; + out_8192941733470122092[106] = 0; + out_8192941733470122092[107] = 0; + out_8192941733470122092[108] = -0.5*state[6]; + out_8192941733470122092[109] = 0.5*state[3]; + out_8192941733470122092[110] = 0.5*state[4]; + out_8192941733470122092[111] = 0; + out_8192941733470122092[112] = 0; + out_8192941733470122092[113] = 0; + out_8192941733470122092[114] = 0; + out_8192941733470122092[115] = 0; + out_8192941733470122092[116] = 0; + out_8192941733470122092[117] = 0; + out_8192941733470122092[118] = 0; + out_8192941733470122092[119] = 0; + out_8192941733470122092[120] = 0; + out_8192941733470122092[121] = 0; + out_8192941733470122092[122] = 0; + out_8192941733470122092[123] = 0; + out_8192941733470122092[124] = 0; + out_8192941733470122092[125] = 0; + out_8192941733470122092[126] = 0; + out_8192941733470122092[127] = 0; + out_8192941733470122092[128] = 0; + out_8192941733470122092[129] = 0.5*state[5]; + out_8192941733470122092[130] = -0.5*state[4]; + out_8192941733470122092[131] = 0.5*state[3]; + out_8192941733470122092[132] = 0; + out_8192941733470122092[133] = 0; + out_8192941733470122092[134] = 0; + out_8192941733470122092[135] = 0; + out_8192941733470122092[136] = 0; + out_8192941733470122092[137] = 0; + out_8192941733470122092[138] = 0; + out_8192941733470122092[139] = 0; + out_8192941733470122092[140] = 0; + out_8192941733470122092[141] = 0; + out_8192941733470122092[142] = 0; + out_8192941733470122092[143] = 0; + out_8192941733470122092[144] = 0; + out_8192941733470122092[145] = 0; + out_8192941733470122092[146] = 0; + out_8192941733470122092[147] = 0; + out_8192941733470122092[148] = 0; + out_8192941733470122092[149] = 0; + out_8192941733470122092[150] = 0; + out_8192941733470122092[151] = 0; + out_8192941733470122092[152] = 0; + out_8192941733470122092[153] = 1.0; + out_8192941733470122092[154] = 0; + out_8192941733470122092[155] = 0; + out_8192941733470122092[156] = 0; + out_8192941733470122092[157] = 0; + out_8192941733470122092[158] = 0; + out_8192941733470122092[159] = 0; + out_8192941733470122092[160] = 0; + out_8192941733470122092[161] = 0; + out_8192941733470122092[162] = 0; + out_8192941733470122092[163] = 0; + out_8192941733470122092[164] = 0; + out_8192941733470122092[165] = 0; + out_8192941733470122092[166] = 0; + out_8192941733470122092[167] = 0; + out_8192941733470122092[168] = 0; + out_8192941733470122092[169] = 0; + out_8192941733470122092[170] = 0; + out_8192941733470122092[171] = 0; + out_8192941733470122092[172] = 0; + out_8192941733470122092[173] = 0; + out_8192941733470122092[174] = 0; + out_8192941733470122092[175] = 1.0; + out_8192941733470122092[176] = 0; + out_8192941733470122092[177] = 0; + out_8192941733470122092[178] = 0; + out_8192941733470122092[179] = 0; + out_8192941733470122092[180] = 0; + out_8192941733470122092[181] = 0; + out_8192941733470122092[182] = 0; + out_8192941733470122092[183] = 0; + out_8192941733470122092[184] = 0; + out_8192941733470122092[185] = 0; + out_8192941733470122092[186] = 0; + out_8192941733470122092[187] = 0; + out_8192941733470122092[188] = 0; + out_8192941733470122092[189] = 0; + out_8192941733470122092[190] = 0; + out_8192941733470122092[191] = 0; + out_8192941733470122092[192] = 0; + out_8192941733470122092[193] = 0; + out_8192941733470122092[194] = 0; + out_8192941733470122092[195] = 0; + out_8192941733470122092[196] = 0; + out_8192941733470122092[197] = 1.0; + out_8192941733470122092[198] = 0; + out_8192941733470122092[199] = 0; + out_8192941733470122092[200] = 0; + out_8192941733470122092[201] = 0; + out_8192941733470122092[202] = 0; + out_8192941733470122092[203] = 0; + out_8192941733470122092[204] = 0; + out_8192941733470122092[205] = 0; + out_8192941733470122092[206] = 0; + out_8192941733470122092[207] = 0; + out_8192941733470122092[208] = 0; + out_8192941733470122092[209] = 0; + out_8192941733470122092[210] = 0; + out_8192941733470122092[211] = 0; + out_8192941733470122092[212] = 0; + out_8192941733470122092[213] = 0; + out_8192941733470122092[214] = 0; + out_8192941733470122092[215] = 0; + out_8192941733470122092[216] = 0; + out_8192941733470122092[217] = 0; + out_8192941733470122092[218] = 0; + out_8192941733470122092[219] = 1.0; + out_8192941733470122092[220] = 0; + out_8192941733470122092[221] = 0; + out_8192941733470122092[222] = 0; + out_8192941733470122092[223] = 0; + out_8192941733470122092[224] = 0; + out_8192941733470122092[225] = 0; + out_8192941733470122092[226] = 0; + out_8192941733470122092[227] = 0; + out_8192941733470122092[228] = 0; + out_8192941733470122092[229] = 0; + out_8192941733470122092[230] = 0; + out_8192941733470122092[231] = 0; + out_8192941733470122092[232] = 0; + out_8192941733470122092[233] = 0; + out_8192941733470122092[234] = 0; + out_8192941733470122092[235] = 0; + out_8192941733470122092[236] = 0; + out_8192941733470122092[237] = 0; + out_8192941733470122092[238] = 0; + out_8192941733470122092[239] = 0; + out_8192941733470122092[240] = 0; + out_8192941733470122092[241] = 1.0; + out_8192941733470122092[242] = 0; + out_8192941733470122092[243] = 0; + out_8192941733470122092[244] = 0; + out_8192941733470122092[245] = 0; + out_8192941733470122092[246] = 0; + out_8192941733470122092[247] = 0; + out_8192941733470122092[248] = 0; + out_8192941733470122092[249] = 0; + out_8192941733470122092[250] = 0; + out_8192941733470122092[251] = 0; + out_8192941733470122092[252] = 0; + out_8192941733470122092[253] = 0; + out_8192941733470122092[254] = 0; + out_8192941733470122092[255] = 0; + out_8192941733470122092[256] = 0; + out_8192941733470122092[257] = 0; + out_8192941733470122092[258] = 0; + out_8192941733470122092[259] = 0; + out_8192941733470122092[260] = 0; + out_8192941733470122092[261] = 0; + out_8192941733470122092[262] = 0; + out_8192941733470122092[263] = 1.0; + out_8192941733470122092[264] = 0; + out_8192941733470122092[265] = 0; + out_8192941733470122092[266] = 0; + out_8192941733470122092[267] = 0; + out_8192941733470122092[268] = 0; + out_8192941733470122092[269] = 0; + out_8192941733470122092[270] = 0; + out_8192941733470122092[271] = 0; + out_8192941733470122092[272] = 0; + out_8192941733470122092[273] = 0; + out_8192941733470122092[274] = 0; + out_8192941733470122092[275] = 0; + out_8192941733470122092[276] = 0; + out_8192941733470122092[277] = 0; + out_8192941733470122092[278] = 0; + out_8192941733470122092[279] = 0; + out_8192941733470122092[280] = 0; + out_8192941733470122092[281] = 0; + out_8192941733470122092[282] = 0; + out_8192941733470122092[283] = 0; + out_8192941733470122092[284] = 0; + out_8192941733470122092[285] = 1.0; + out_8192941733470122092[286] = 0; + out_8192941733470122092[287] = 0; + out_8192941733470122092[288] = 0; + out_8192941733470122092[289] = 0; + out_8192941733470122092[290] = 0; + out_8192941733470122092[291] = 0; + out_8192941733470122092[292] = 0; + out_8192941733470122092[293] = 0; + out_8192941733470122092[294] = 0; + out_8192941733470122092[295] = 0; + out_8192941733470122092[296] = 0; + out_8192941733470122092[297] = 0; + out_8192941733470122092[298] = 0; + out_8192941733470122092[299] = 0; + out_8192941733470122092[300] = 0; + out_8192941733470122092[301] = 0; + out_8192941733470122092[302] = 0; + out_8192941733470122092[303] = 0; + out_8192941733470122092[304] = 0; + out_8192941733470122092[305] = 0; + out_8192941733470122092[306] = 0; + out_8192941733470122092[307] = 1.0; + out_8192941733470122092[308] = 0; + out_8192941733470122092[309] = 0; + out_8192941733470122092[310] = 0; + out_8192941733470122092[311] = 0; + out_8192941733470122092[312] = 0; + out_8192941733470122092[313] = 0; + out_8192941733470122092[314] = 0; + out_8192941733470122092[315] = 0; + out_8192941733470122092[316] = 0; + out_8192941733470122092[317] = 0; + out_8192941733470122092[318] = 0; + out_8192941733470122092[319] = 0; + out_8192941733470122092[320] = 0; + out_8192941733470122092[321] = 0; + out_8192941733470122092[322] = 0; + out_8192941733470122092[323] = 0; + out_8192941733470122092[324] = 0; + out_8192941733470122092[325] = 0; + out_8192941733470122092[326] = 0; + out_8192941733470122092[327] = 0; + out_8192941733470122092[328] = 0; + out_8192941733470122092[329] = 1.0; + out_8192941733470122092[330] = 0; + out_8192941733470122092[331] = 0; + out_8192941733470122092[332] = 0; + out_8192941733470122092[333] = 0; + out_8192941733470122092[334] = 0; + out_8192941733470122092[335] = 0; + out_8192941733470122092[336] = 0; + out_8192941733470122092[337] = 0; + out_8192941733470122092[338] = 0; + out_8192941733470122092[339] = 0; + out_8192941733470122092[340] = 0; + out_8192941733470122092[341] = 0; + out_8192941733470122092[342] = 0; + out_8192941733470122092[343] = 0; + out_8192941733470122092[344] = 0; + out_8192941733470122092[345] = 0; + out_8192941733470122092[346] = 0; + out_8192941733470122092[347] = 0; + out_8192941733470122092[348] = 0; + out_8192941733470122092[349] = 0; + out_8192941733470122092[350] = 0; + out_8192941733470122092[351] = 1.0; + out_8192941733470122092[352] = 0; + out_8192941733470122092[353] = 0; + out_8192941733470122092[354] = 0; + out_8192941733470122092[355] = 0; + out_8192941733470122092[356] = 0; + out_8192941733470122092[357] = 0; + out_8192941733470122092[358] = 0; + out_8192941733470122092[359] = 0; + out_8192941733470122092[360] = 0; + out_8192941733470122092[361] = 0; + out_8192941733470122092[362] = 0; + out_8192941733470122092[363] = 0; + out_8192941733470122092[364] = 0; + out_8192941733470122092[365] = 0; + out_8192941733470122092[366] = 0; + out_8192941733470122092[367] = 0; + out_8192941733470122092[368] = 0; + out_8192941733470122092[369] = 0; + out_8192941733470122092[370] = 0; + out_8192941733470122092[371] = 0; + out_8192941733470122092[372] = 0; + out_8192941733470122092[373] = 1.0; + out_8192941733470122092[374] = 0; + out_8192941733470122092[375] = 0; + out_8192941733470122092[376] = 0; + out_8192941733470122092[377] = 0; + out_8192941733470122092[378] = 0; + out_8192941733470122092[379] = 0; + out_8192941733470122092[380] = 0; + out_8192941733470122092[381] = 0; + out_8192941733470122092[382] = 0; + out_8192941733470122092[383] = 0; + out_8192941733470122092[384] = 0; + out_8192941733470122092[385] = 0; + out_8192941733470122092[386] = 0; + out_8192941733470122092[387] = 0; + out_8192941733470122092[388] = 0; + out_8192941733470122092[389] = 0; + out_8192941733470122092[390] = 0; + out_8192941733470122092[391] = 0; + out_8192941733470122092[392] = 0; + out_8192941733470122092[393] = 0; + out_8192941733470122092[394] = 0; + out_8192941733470122092[395] = 1.0; + out_8192941733470122092[396] = 0; + out_8192941733470122092[397] = 0; + out_8192941733470122092[398] = 0; + out_8192941733470122092[399] = 0; + out_8192941733470122092[400] = 0; + out_8192941733470122092[401] = 0; + out_8192941733470122092[402] = 0; + out_8192941733470122092[403] = 0; + out_8192941733470122092[404] = 0; + out_8192941733470122092[405] = 0; + out_8192941733470122092[406] = 0; + out_8192941733470122092[407] = 0; + out_8192941733470122092[408] = 0; + out_8192941733470122092[409] = 0; + out_8192941733470122092[410] = 0; + out_8192941733470122092[411] = 0; + out_8192941733470122092[412] = 0; + out_8192941733470122092[413] = 0; + out_8192941733470122092[414] = 0; + out_8192941733470122092[415] = 0; + out_8192941733470122092[416] = 0; + out_8192941733470122092[417] = 1.0; + out_8192941733470122092[418] = 0; + out_8192941733470122092[419] = 0; + out_8192941733470122092[420] = 0; + out_8192941733470122092[421] = 0; + out_8192941733470122092[422] = 0; + out_8192941733470122092[423] = 0; + out_8192941733470122092[424] = 0; + out_8192941733470122092[425] = 0; + out_8192941733470122092[426] = 0; + out_8192941733470122092[427] = 0; + out_8192941733470122092[428] = 0; + out_8192941733470122092[429] = 0; + out_8192941733470122092[430] = 0; + out_8192941733470122092[431] = 0; + out_8192941733470122092[432] = 0; + out_8192941733470122092[433] = 0; + out_8192941733470122092[434] = 0; + out_8192941733470122092[435] = 0; + out_8192941733470122092[436] = 0; + out_8192941733470122092[437] = 0; + out_8192941733470122092[438] = 0; + out_8192941733470122092[439] = 1.0; + out_8192941733470122092[440] = 0; + out_8192941733470122092[441] = 0; + out_8192941733470122092[442] = 0; + out_8192941733470122092[443] = 0; + out_8192941733470122092[444] = 0; + out_8192941733470122092[445] = 0; + out_8192941733470122092[446] = 0; + out_8192941733470122092[447] = 0; + out_8192941733470122092[448] = 0; + out_8192941733470122092[449] = 0; + out_8192941733470122092[450] = 0; + out_8192941733470122092[451] = 0; + out_8192941733470122092[452] = 0; + out_8192941733470122092[453] = 0; + out_8192941733470122092[454] = 0; + out_8192941733470122092[455] = 0; + out_8192941733470122092[456] = 0; + out_8192941733470122092[457] = 0; + out_8192941733470122092[458] = 0; + out_8192941733470122092[459] = 0; + out_8192941733470122092[460] = 0; + out_8192941733470122092[461] = 1.0; } -void f_fun(double *state, double dt, double *out_6356829281411656445) { - out_6356829281411656445[0] = dt*state[7] + state[0]; - out_6356829281411656445[1] = dt*state[8] + state[1]; - out_6356829281411656445[2] = dt*state[9] + state[2]; - out_6356829281411656445[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; - out_6356829281411656445[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; - out_6356829281411656445[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; - out_6356829281411656445[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; - out_6356829281411656445[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7]; - out_6356829281411656445[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8]; - out_6356829281411656445[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9]; - out_6356829281411656445[10] = state[10]; - out_6356829281411656445[11] = state[11]; - out_6356829281411656445[12] = state[12]; - out_6356829281411656445[13] = state[13]; - out_6356829281411656445[14] = state[14]; - out_6356829281411656445[15] = state[15]; - out_6356829281411656445[16] = state[16]; - out_6356829281411656445[17] = state[17]; - out_6356829281411656445[18] = state[18]; - out_6356829281411656445[19] = state[19]; - out_6356829281411656445[20] = state[20]; - out_6356829281411656445[21] = state[21]; +void f_fun(double *state, double dt, double *out_3557410023905793232) { + out_3557410023905793232[0] = dt*state[7] + state[0]; + out_3557410023905793232[1] = dt*state[8] + state[1]; + out_3557410023905793232[2] = dt*state[9] + state[2]; + out_3557410023905793232[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; + out_3557410023905793232[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; + out_3557410023905793232[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; + out_3557410023905793232[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; + out_3557410023905793232[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7]; + out_3557410023905793232[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8]; + out_3557410023905793232[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9]; + out_3557410023905793232[10] = state[10]; + out_3557410023905793232[11] = state[11]; + out_3557410023905793232[12] = state[12]; + out_3557410023905793232[13] = state[13]; + out_3557410023905793232[14] = state[14]; + out_3557410023905793232[15] = state[15]; + out_3557410023905793232[16] = state[16]; + out_3557410023905793232[17] = state[17]; + out_3557410023905793232[18] = state[18]; + out_3557410023905793232[19] = state[19]; + out_3557410023905793232[20] = state[20]; + out_3557410023905793232[21] = state[21]; } -void F_fun(double *state, double dt, double *out_8639720302372924628) { - out_8639720302372924628[0] = 1; - out_8639720302372924628[1] = 0; - out_8639720302372924628[2] = 0; - out_8639720302372924628[3] = 0; - out_8639720302372924628[4] = 0; - out_8639720302372924628[5] = 0; - out_8639720302372924628[6] = dt; - out_8639720302372924628[7] = 0; - out_8639720302372924628[8] = 0; - out_8639720302372924628[9] = 0; - out_8639720302372924628[10] = 0; - out_8639720302372924628[11] = 0; - out_8639720302372924628[12] = 0; - out_8639720302372924628[13] = 0; - out_8639720302372924628[14] = 0; - out_8639720302372924628[15] = 0; - out_8639720302372924628[16] = 0; - out_8639720302372924628[17] = 0; - out_8639720302372924628[18] = 0; - out_8639720302372924628[19] = 0; - out_8639720302372924628[20] = 0; - out_8639720302372924628[21] = 0; - out_8639720302372924628[22] = 1; - out_8639720302372924628[23] = 0; - out_8639720302372924628[24] = 0; - out_8639720302372924628[25] = 0; - out_8639720302372924628[26] = 0; - out_8639720302372924628[27] = 0; - out_8639720302372924628[28] = dt; - out_8639720302372924628[29] = 0; - out_8639720302372924628[30] = 0; - out_8639720302372924628[31] = 0; - out_8639720302372924628[32] = 0; - out_8639720302372924628[33] = 0; - out_8639720302372924628[34] = 0; - out_8639720302372924628[35] = 0; - out_8639720302372924628[36] = 0; - out_8639720302372924628[37] = 0; - out_8639720302372924628[38] = 0; - out_8639720302372924628[39] = 0; - out_8639720302372924628[40] = 0; - out_8639720302372924628[41] = 0; - out_8639720302372924628[42] = 0; - out_8639720302372924628[43] = 0; - out_8639720302372924628[44] = 1; - out_8639720302372924628[45] = 0; - out_8639720302372924628[46] = 0; - out_8639720302372924628[47] = 0; - out_8639720302372924628[48] = 0; - out_8639720302372924628[49] = 0; - out_8639720302372924628[50] = dt; - out_8639720302372924628[51] = 0; - out_8639720302372924628[52] = 0; - out_8639720302372924628[53] = 0; - out_8639720302372924628[54] = 0; - out_8639720302372924628[55] = 0; - out_8639720302372924628[56] = 0; - out_8639720302372924628[57] = 0; - out_8639720302372924628[58] = 0; - out_8639720302372924628[59] = 0; - out_8639720302372924628[60] = 0; - out_8639720302372924628[61] = 0; - out_8639720302372924628[62] = 0; - out_8639720302372924628[63] = 0; - out_8639720302372924628[64] = 0; - out_8639720302372924628[65] = 0; - out_8639720302372924628[66] = 1; - out_8639720302372924628[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); - out_8639720302372924628[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]); - out_8639720302372924628[69] = 0; - out_8639720302372924628[70] = 0; - out_8639720302372924628[71] = 0; - out_8639720302372924628[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_8639720302372924628[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_8639720302372924628[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_8639720302372924628[75] = 0; - out_8639720302372924628[76] = 0; - out_8639720302372924628[77] = 0; - out_8639720302372924628[78] = 0; - out_8639720302372924628[79] = 0; - out_8639720302372924628[80] = 0; - out_8639720302372924628[81] = 0; - out_8639720302372924628[82] = 0; - out_8639720302372924628[83] = 0; - out_8639720302372924628[84] = 0; - out_8639720302372924628[85] = 0; - out_8639720302372924628[86] = 0; - out_8639720302372924628[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); - out_8639720302372924628[88] = 1; - out_8639720302372924628[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]); - out_8639720302372924628[90] = 0; - out_8639720302372924628[91] = 0; - out_8639720302372924628[92] = 0; - out_8639720302372924628[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_8639720302372924628[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_8639720302372924628[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_8639720302372924628[96] = 0; - out_8639720302372924628[97] = 0; - out_8639720302372924628[98] = 0; - out_8639720302372924628[99] = 0; - out_8639720302372924628[100] = 0; - out_8639720302372924628[101] = 0; - out_8639720302372924628[102] = 0; - out_8639720302372924628[103] = 0; - out_8639720302372924628[104] = 0; - out_8639720302372924628[105] = 0; - out_8639720302372924628[106] = 0; - out_8639720302372924628[107] = 0; - out_8639720302372924628[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]); - out_8639720302372924628[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]); - out_8639720302372924628[110] = 1; - out_8639720302372924628[111] = 0; - out_8639720302372924628[112] = 0; - out_8639720302372924628[113] = 0; - out_8639720302372924628[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_8639720302372924628[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_8639720302372924628[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_8639720302372924628[117] = 0; - out_8639720302372924628[118] = 0; - out_8639720302372924628[119] = 0; - out_8639720302372924628[120] = 0; - out_8639720302372924628[121] = 0; - out_8639720302372924628[122] = 0; - out_8639720302372924628[123] = 0; - out_8639720302372924628[124] = 0; - out_8639720302372924628[125] = 0; - out_8639720302372924628[126] = 0; - out_8639720302372924628[127] = 0; - out_8639720302372924628[128] = 0; - out_8639720302372924628[129] = 0; - out_8639720302372924628[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); - out_8639720302372924628[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]); - out_8639720302372924628[132] = 1; - out_8639720302372924628[133] = 0; - out_8639720302372924628[134] = 0; - out_8639720302372924628[135] = 0; - out_8639720302372924628[136] = 0; - out_8639720302372924628[137] = 0; - out_8639720302372924628[138] = 0; - out_8639720302372924628[139] = 0; - out_8639720302372924628[140] = 0; - out_8639720302372924628[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_8639720302372924628[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_8639720302372924628[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_8639720302372924628[144] = 0; - out_8639720302372924628[145] = 0; - out_8639720302372924628[146] = 0; - out_8639720302372924628[147] = 0; - out_8639720302372924628[148] = 0; - out_8639720302372924628[149] = 0; - out_8639720302372924628[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); - out_8639720302372924628[151] = 0; - out_8639720302372924628[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]); - out_8639720302372924628[153] = 0; - out_8639720302372924628[154] = 1; - out_8639720302372924628[155] = 0; - out_8639720302372924628[156] = 0; - out_8639720302372924628[157] = 0; - out_8639720302372924628[158] = 0; - out_8639720302372924628[159] = 0; - out_8639720302372924628[160] = 0; - out_8639720302372924628[161] = 0; - out_8639720302372924628[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_8639720302372924628[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_8639720302372924628[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_8639720302372924628[165] = 0; - out_8639720302372924628[166] = 0; - out_8639720302372924628[167] = 0; - out_8639720302372924628[168] = 0; - out_8639720302372924628[169] = 0; - out_8639720302372924628[170] = 0; - out_8639720302372924628[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]); - out_8639720302372924628[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]); - out_8639720302372924628[173] = 0; - out_8639720302372924628[174] = 0; - out_8639720302372924628[175] = 0; - out_8639720302372924628[176] = 1; - out_8639720302372924628[177] = 0; - out_8639720302372924628[178] = 0; - out_8639720302372924628[179] = 0; - out_8639720302372924628[180] = 0; - out_8639720302372924628[181] = 0; - out_8639720302372924628[182] = 0; - out_8639720302372924628[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_8639720302372924628[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_8639720302372924628[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_8639720302372924628[186] = 0; - out_8639720302372924628[187] = 0; - out_8639720302372924628[188] = 0; - out_8639720302372924628[189] = 0; - out_8639720302372924628[190] = 0; - out_8639720302372924628[191] = 0; - out_8639720302372924628[192] = 0; - out_8639720302372924628[193] = 0; - out_8639720302372924628[194] = 0; - out_8639720302372924628[195] = 0; - out_8639720302372924628[196] = 0; - out_8639720302372924628[197] = 0; - out_8639720302372924628[198] = 1; - out_8639720302372924628[199] = 0; - out_8639720302372924628[200] = 0; - out_8639720302372924628[201] = 0; - out_8639720302372924628[202] = 0; - out_8639720302372924628[203] = 0; - out_8639720302372924628[204] = 0; - out_8639720302372924628[205] = 0; - out_8639720302372924628[206] = 0; - out_8639720302372924628[207] = 0; - out_8639720302372924628[208] = 0; - out_8639720302372924628[209] = 0; - out_8639720302372924628[210] = 0; - out_8639720302372924628[211] = 0; - out_8639720302372924628[212] = 0; - out_8639720302372924628[213] = 0; - out_8639720302372924628[214] = 0; - out_8639720302372924628[215] = 0; - out_8639720302372924628[216] = 0; - out_8639720302372924628[217] = 0; - out_8639720302372924628[218] = 0; - out_8639720302372924628[219] = 0; - out_8639720302372924628[220] = 1; - out_8639720302372924628[221] = 0; - out_8639720302372924628[222] = 0; - out_8639720302372924628[223] = 0; - out_8639720302372924628[224] = 0; - out_8639720302372924628[225] = 0; - out_8639720302372924628[226] = 0; - out_8639720302372924628[227] = 0; - out_8639720302372924628[228] = 0; - out_8639720302372924628[229] = 0; - out_8639720302372924628[230] = 0; - out_8639720302372924628[231] = 0; - out_8639720302372924628[232] = 0; - out_8639720302372924628[233] = 0; - out_8639720302372924628[234] = 0; - out_8639720302372924628[235] = 0; - out_8639720302372924628[236] = 0; - out_8639720302372924628[237] = 0; - out_8639720302372924628[238] = 0; - out_8639720302372924628[239] = 0; - out_8639720302372924628[240] = 0; - out_8639720302372924628[241] = 0; - out_8639720302372924628[242] = 1; - out_8639720302372924628[243] = 0; - out_8639720302372924628[244] = 0; - out_8639720302372924628[245] = 0; - out_8639720302372924628[246] = 0; - out_8639720302372924628[247] = 0; - out_8639720302372924628[248] = 0; - out_8639720302372924628[249] = 0; - out_8639720302372924628[250] = 0; - out_8639720302372924628[251] = 0; - out_8639720302372924628[252] = 0; - out_8639720302372924628[253] = 0; - out_8639720302372924628[254] = 0; - out_8639720302372924628[255] = 0; - out_8639720302372924628[256] = 0; - out_8639720302372924628[257] = 0; - out_8639720302372924628[258] = 0; - out_8639720302372924628[259] = 0; - out_8639720302372924628[260] = 0; - out_8639720302372924628[261] = 0; - out_8639720302372924628[262] = 0; - out_8639720302372924628[263] = 0; - out_8639720302372924628[264] = 1; - out_8639720302372924628[265] = 0; - out_8639720302372924628[266] = 0; - out_8639720302372924628[267] = 0; - out_8639720302372924628[268] = 0; - out_8639720302372924628[269] = 0; - out_8639720302372924628[270] = 0; - out_8639720302372924628[271] = 0; - out_8639720302372924628[272] = 0; - out_8639720302372924628[273] = 0; - out_8639720302372924628[274] = 0; - out_8639720302372924628[275] = 0; - out_8639720302372924628[276] = 0; - out_8639720302372924628[277] = 0; - out_8639720302372924628[278] = 0; - out_8639720302372924628[279] = 0; - out_8639720302372924628[280] = 0; - out_8639720302372924628[281] = 0; - out_8639720302372924628[282] = 0; - out_8639720302372924628[283] = 0; - out_8639720302372924628[284] = 0; - out_8639720302372924628[285] = 0; - out_8639720302372924628[286] = 1; - out_8639720302372924628[287] = 0; - out_8639720302372924628[288] = 0; - out_8639720302372924628[289] = 0; - out_8639720302372924628[290] = 0; - out_8639720302372924628[291] = 0; - out_8639720302372924628[292] = 0; - out_8639720302372924628[293] = 0; - out_8639720302372924628[294] = 0; - out_8639720302372924628[295] = 0; - out_8639720302372924628[296] = 0; - out_8639720302372924628[297] = 0; - out_8639720302372924628[298] = 0; - out_8639720302372924628[299] = 0; - out_8639720302372924628[300] = 0; - out_8639720302372924628[301] = 0; - out_8639720302372924628[302] = 0; - out_8639720302372924628[303] = 0; - out_8639720302372924628[304] = 0; - out_8639720302372924628[305] = 0; - out_8639720302372924628[306] = 0; - out_8639720302372924628[307] = 0; - out_8639720302372924628[308] = 1; - out_8639720302372924628[309] = 0; - out_8639720302372924628[310] = 0; - out_8639720302372924628[311] = 0; - out_8639720302372924628[312] = 0; - out_8639720302372924628[313] = 0; - out_8639720302372924628[314] = 0; - out_8639720302372924628[315] = 0; - out_8639720302372924628[316] = 0; - out_8639720302372924628[317] = 0; - out_8639720302372924628[318] = 0; - out_8639720302372924628[319] = 0; - out_8639720302372924628[320] = 0; - out_8639720302372924628[321] = 0; - out_8639720302372924628[322] = 0; - out_8639720302372924628[323] = 0; - out_8639720302372924628[324] = 0; - out_8639720302372924628[325] = 0; - out_8639720302372924628[326] = 0; - out_8639720302372924628[327] = 0; - out_8639720302372924628[328] = 0; - out_8639720302372924628[329] = 0; - out_8639720302372924628[330] = 1; - out_8639720302372924628[331] = 0; - out_8639720302372924628[332] = 0; - out_8639720302372924628[333] = 0; - out_8639720302372924628[334] = 0; - out_8639720302372924628[335] = 0; - out_8639720302372924628[336] = 0; - out_8639720302372924628[337] = 0; - out_8639720302372924628[338] = 0; - out_8639720302372924628[339] = 0; - out_8639720302372924628[340] = 0; - out_8639720302372924628[341] = 0; - out_8639720302372924628[342] = 0; - out_8639720302372924628[343] = 0; - out_8639720302372924628[344] = 0; - out_8639720302372924628[345] = 0; - out_8639720302372924628[346] = 0; - out_8639720302372924628[347] = 0; - out_8639720302372924628[348] = 0; - out_8639720302372924628[349] = 0; - out_8639720302372924628[350] = 0; - out_8639720302372924628[351] = 0; - out_8639720302372924628[352] = 1; - out_8639720302372924628[353] = 0; - out_8639720302372924628[354] = 0; - out_8639720302372924628[355] = 0; - out_8639720302372924628[356] = 0; - out_8639720302372924628[357] = 0; - out_8639720302372924628[358] = 0; - out_8639720302372924628[359] = 0; - out_8639720302372924628[360] = 0; - out_8639720302372924628[361] = 0; - out_8639720302372924628[362] = 0; - out_8639720302372924628[363] = 0; - out_8639720302372924628[364] = 0; - out_8639720302372924628[365] = 0; - out_8639720302372924628[366] = 0; - out_8639720302372924628[367] = 0; - out_8639720302372924628[368] = 0; - out_8639720302372924628[369] = 0; - out_8639720302372924628[370] = 0; - out_8639720302372924628[371] = 0; - out_8639720302372924628[372] = 0; - out_8639720302372924628[373] = 0; - out_8639720302372924628[374] = 1; - out_8639720302372924628[375] = 0; - out_8639720302372924628[376] = 0; - out_8639720302372924628[377] = 0; - out_8639720302372924628[378] = 0; - out_8639720302372924628[379] = 0; - out_8639720302372924628[380] = 0; - out_8639720302372924628[381] = 0; - out_8639720302372924628[382] = 0; - out_8639720302372924628[383] = 0; - out_8639720302372924628[384] = 0; - out_8639720302372924628[385] = 0; - out_8639720302372924628[386] = 0; - out_8639720302372924628[387] = 0; - out_8639720302372924628[388] = 0; - out_8639720302372924628[389] = 0; - out_8639720302372924628[390] = 0; - out_8639720302372924628[391] = 0; - out_8639720302372924628[392] = 0; - out_8639720302372924628[393] = 0; - out_8639720302372924628[394] = 0; - out_8639720302372924628[395] = 0; - out_8639720302372924628[396] = 1; - out_8639720302372924628[397] = 0; - out_8639720302372924628[398] = 0; - out_8639720302372924628[399] = 0; - out_8639720302372924628[400] = 0; - out_8639720302372924628[401] = 0; - out_8639720302372924628[402] = 0; - out_8639720302372924628[403] = 0; - out_8639720302372924628[404] = 0; - out_8639720302372924628[405] = 0; - out_8639720302372924628[406] = 0; - out_8639720302372924628[407] = 0; - out_8639720302372924628[408] = 0; - out_8639720302372924628[409] = 0; - out_8639720302372924628[410] = 0; - out_8639720302372924628[411] = 0; - out_8639720302372924628[412] = 0; - out_8639720302372924628[413] = 0; - out_8639720302372924628[414] = 0; - out_8639720302372924628[415] = 0; - out_8639720302372924628[416] = 0; - out_8639720302372924628[417] = 0; - out_8639720302372924628[418] = 1; - out_8639720302372924628[419] = 0; - out_8639720302372924628[420] = 0; - out_8639720302372924628[421] = 0; - out_8639720302372924628[422] = 0; - out_8639720302372924628[423] = 0; - out_8639720302372924628[424] = 0; - out_8639720302372924628[425] = 0; - out_8639720302372924628[426] = 0; - out_8639720302372924628[427] = 0; - out_8639720302372924628[428] = 0; - out_8639720302372924628[429] = 0; - out_8639720302372924628[430] = 0; - out_8639720302372924628[431] = 0; - out_8639720302372924628[432] = 0; - out_8639720302372924628[433] = 0; - out_8639720302372924628[434] = 0; - out_8639720302372924628[435] = 0; - out_8639720302372924628[436] = 0; - out_8639720302372924628[437] = 0; - out_8639720302372924628[438] = 0; - out_8639720302372924628[439] = 0; - out_8639720302372924628[440] = 1; +void F_fun(double *state, double dt, double *out_8557837785947457076) { + out_8557837785947457076[0] = 1; + out_8557837785947457076[1] = 0; + out_8557837785947457076[2] = 0; + out_8557837785947457076[3] = 0; + out_8557837785947457076[4] = 0; + out_8557837785947457076[5] = 0; + out_8557837785947457076[6] = dt; + out_8557837785947457076[7] = 0; + out_8557837785947457076[8] = 0; + out_8557837785947457076[9] = 0; + out_8557837785947457076[10] = 0; + out_8557837785947457076[11] = 0; + out_8557837785947457076[12] = 0; + out_8557837785947457076[13] = 0; + out_8557837785947457076[14] = 0; + out_8557837785947457076[15] = 0; + out_8557837785947457076[16] = 0; + out_8557837785947457076[17] = 0; + out_8557837785947457076[18] = 0; + out_8557837785947457076[19] = 0; + out_8557837785947457076[20] = 0; + out_8557837785947457076[21] = 0; + out_8557837785947457076[22] = 1; + out_8557837785947457076[23] = 0; + out_8557837785947457076[24] = 0; + out_8557837785947457076[25] = 0; + out_8557837785947457076[26] = 0; + out_8557837785947457076[27] = 0; + out_8557837785947457076[28] = dt; + out_8557837785947457076[29] = 0; + out_8557837785947457076[30] = 0; + out_8557837785947457076[31] = 0; + out_8557837785947457076[32] = 0; + out_8557837785947457076[33] = 0; + out_8557837785947457076[34] = 0; + out_8557837785947457076[35] = 0; + out_8557837785947457076[36] = 0; + out_8557837785947457076[37] = 0; + out_8557837785947457076[38] = 0; + out_8557837785947457076[39] = 0; + out_8557837785947457076[40] = 0; + out_8557837785947457076[41] = 0; + out_8557837785947457076[42] = 0; + out_8557837785947457076[43] = 0; + out_8557837785947457076[44] = 1; + out_8557837785947457076[45] = 0; + out_8557837785947457076[46] = 0; + out_8557837785947457076[47] = 0; + out_8557837785947457076[48] = 0; + out_8557837785947457076[49] = 0; + out_8557837785947457076[50] = dt; + out_8557837785947457076[51] = 0; + out_8557837785947457076[52] = 0; + out_8557837785947457076[53] = 0; + out_8557837785947457076[54] = 0; + out_8557837785947457076[55] = 0; + out_8557837785947457076[56] = 0; + out_8557837785947457076[57] = 0; + out_8557837785947457076[58] = 0; + out_8557837785947457076[59] = 0; + out_8557837785947457076[60] = 0; + out_8557837785947457076[61] = 0; + out_8557837785947457076[62] = 0; + out_8557837785947457076[63] = 0; + out_8557837785947457076[64] = 0; + out_8557837785947457076[65] = 0; + out_8557837785947457076[66] = 1; + out_8557837785947457076[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); + out_8557837785947457076[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]); + out_8557837785947457076[69] = 0; + out_8557837785947457076[70] = 0; + out_8557837785947457076[71] = 0; + out_8557837785947457076[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_8557837785947457076[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_8557837785947457076[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_8557837785947457076[75] = 0; + out_8557837785947457076[76] = 0; + out_8557837785947457076[77] = 0; + out_8557837785947457076[78] = 0; + out_8557837785947457076[79] = 0; + out_8557837785947457076[80] = 0; + out_8557837785947457076[81] = 0; + out_8557837785947457076[82] = 0; + out_8557837785947457076[83] = 0; + out_8557837785947457076[84] = 0; + out_8557837785947457076[85] = 0; + out_8557837785947457076[86] = 0; + out_8557837785947457076[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); + out_8557837785947457076[88] = 1; + out_8557837785947457076[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]); + out_8557837785947457076[90] = 0; + out_8557837785947457076[91] = 0; + out_8557837785947457076[92] = 0; + out_8557837785947457076[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_8557837785947457076[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_8557837785947457076[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_8557837785947457076[96] = 0; + out_8557837785947457076[97] = 0; + out_8557837785947457076[98] = 0; + out_8557837785947457076[99] = 0; + out_8557837785947457076[100] = 0; + out_8557837785947457076[101] = 0; + out_8557837785947457076[102] = 0; + out_8557837785947457076[103] = 0; + out_8557837785947457076[104] = 0; + out_8557837785947457076[105] = 0; + out_8557837785947457076[106] = 0; + out_8557837785947457076[107] = 0; + out_8557837785947457076[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]); + out_8557837785947457076[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]); + out_8557837785947457076[110] = 1; + out_8557837785947457076[111] = 0; + out_8557837785947457076[112] = 0; + out_8557837785947457076[113] = 0; + out_8557837785947457076[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_8557837785947457076[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_8557837785947457076[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_8557837785947457076[117] = 0; + out_8557837785947457076[118] = 0; + out_8557837785947457076[119] = 0; + out_8557837785947457076[120] = 0; + out_8557837785947457076[121] = 0; + out_8557837785947457076[122] = 0; + out_8557837785947457076[123] = 0; + out_8557837785947457076[124] = 0; + out_8557837785947457076[125] = 0; + out_8557837785947457076[126] = 0; + out_8557837785947457076[127] = 0; + out_8557837785947457076[128] = 0; + out_8557837785947457076[129] = 0; + out_8557837785947457076[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); + out_8557837785947457076[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]); + out_8557837785947457076[132] = 1; + out_8557837785947457076[133] = 0; + out_8557837785947457076[134] = 0; + out_8557837785947457076[135] = 0; + out_8557837785947457076[136] = 0; + out_8557837785947457076[137] = 0; + out_8557837785947457076[138] = 0; + out_8557837785947457076[139] = 0; + out_8557837785947457076[140] = 0; + out_8557837785947457076[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_8557837785947457076[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_8557837785947457076[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_8557837785947457076[144] = 0; + out_8557837785947457076[145] = 0; + out_8557837785947457076[146] = 0; + out_8557837785947457076[147] = 0; + out_8557837785947457076[148] = 0; + out_8557837785947457076[149] = 0; + out_8557837785947457076[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); + out_8557837785947457076[151] = 0; + out_8557837785947457076[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]); + out_8557837785947457076[153] = 0; + out_8557837785947457076[154] = 1; + out_8557837785947457076[155] = 0; + out_8557837785947457076[156] = 0; + out_8557837785947457076[157] = 0; + out_8557837785947457076[158] = 0; + out_8557837785947457076[159] = 0; + out_8557837785947457076[160] = 0; + out_8557837785947457076[161] = 0; + out_8557837785947457076[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_8557837785947457076[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_8557837785947457076[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_8557837785947457076[165] = 0; + out_8557837785947457076[166] = 0; + out_8557837785947457076[167] = 0; + out_8557837785947457076[168] = 0; + out_8557837785947457076[169] = 0; + out_8557837785947457076[170] = 0; + out_8557837785947457076[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]); + out_8557837785947457076[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]); + out_8557837785947457076[173] = 0; + out_8557837785947457076[174] = 0; + out_8557837785947457076[175] = 0; + out_8557837785947457076[176] = 1; + out_8557837785947457076[177] = 0; + out_8557837785947457076[178] = 0; + out_8557837785947457076[179] = 0; + out_8557837785947457076[180] = 0; + out_8557837785947457076[181] = 0; + out_8557837785947457076[182] = 0; + out_8557837785947457076[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_8557837785947457076[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_8557837785947457076[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_8557837785947457076[186] = 0; + out_8557837785947457076[187] = 0; + out_8557837785947457076[188] = 0; + out_8557837785947457076[189] = 0; + out_8557837785947457076[190] = 0; + out_8557837785947457076[191] = 0; + out_8557837785947457076[192] = 0; + out_8557837785947457076[193] = 0; + out_8557837785947457076[194] = 0; + out_8557837785947457076[195] = 0; + out_8557837785947457076[196] = 0; + out_8557837785947457076[197] = 0; + out_8557837785947457076[198] = 1; + out_8557837785947457076[199] = 0; + out_8557837785947457076[200] = 0; + out_8557837785947457076[201] = 0; + out_8557837785947457076[202] = 0; + out_8557837785947457076[203] = 0; + out_8557837785947457076[204] = 0; + out_8557837785947457076[205] = 0; + out_8557837785947457076[206] = 0; + out_8557837785947457076[207] = 0; + out_8557837785947457076[208] = 0; + out_8557837785947457076[209] = 0; + out_8557837785947457076[210] = 0; + out_8557837785947457076[211] = 0; + out_8557837785947457076[212] = 0; + out_8557837785947457076[213] = 0; + out_8557837785947457076[214] = 0; + out_8557837785947457076[215] = 0; + out_8557837785947457076[216] = 0; + out_8557837785947457076[217] = 0; + out_8557837785947457076[218] = 0; + out_8557837785947457076[219] = 0; + out_8557837785947457076[220] = 1; + out_8557837785947457076[221] = 0; + out_8557837785947457076[222] = 0; + out_8557837785947457076[223] = 0; + out_8557837785947457076[224] = 0; + out_8557837785947457076[225] = 0; + out_8557837785947457076[226] = 0; + out_8557837785947457076[227] = 0; + out_8557837785947457076[228] = 0; + out_8557837785947457076[229] = 0; + out_8557837785947457076[230] = 0; + out_8557837785947457076[231] = 0; + out_8557837785947457076[232] = 0; + out_8557837785947457076[233] = 0; + out_8557837785947457076[234] = 0; + out_8557837785947457076[235] = 0; + out_8557837785947457076[236] = 0; + out_8557837785947457076[237] = 0; + out_8557837785947457076[238] = 0; + out_8557837785947457076[239] = 0; + out_8557837785947457076[240] = 0; + out_8557837785947457076[241] = 0; + out_8557837785947457076[242] = 1; + out_8557837785947457076[243] = 0; + out_8557837785947457076[244] = 0; + out_8557837785947457076[245] = 0; + out_8557837785947457076[246] = 0; + out_8557837785947457076[247] = 0; + out_8557837785947457076[248] = 0; + out_8557837785947457076[249] = 0; + out_8557837785947457076[250] = 0; + out_8557837785947457076[251] = 0; + out_8557837785947457076[252] = 0; + out_8557837785947457076[253] = 0; + out_8557837785947457076[254] = 0; + out_8557837785947457076[255] = 0; + out_8557837785947457076[256] = 0; + out_8557837785947457076[257] = 0; + out_8557837785947457076[258] = 0; + out_8557837785947457076[259] = 0; + out_8557837785947457076[260] = 0; + out_8557837785947457076[261] = 0; + out_8557837785947457076[262] = 0; + out_8557837785947457076[263] = 0; + out_8557837785947457076[264] = 1; + out_8557837785947457076[265] = 0; + out_8557837785947457076[266] = 0; + out_8557837785947457076[267] = 0; + out_8557837785947457076[268] = 0; + out_8557837785947457076[269] = 0; + out_8557837785947457076[270] = 0; + out_8557837785947457076[271] = 0; + out_8557837785947457076[272] = 0; + out_8557837785947457076[273] = 0; + out_8557837785947457076[274] = 0; + out_8557837785947457076[275] = 0; + out_8557837785947457076[276] = 0; + out_8557837785947457076[277] = 0; + out_8557837785947457076[278] = 0; + out_8557837785947457076[279] = 0; + out_8557837785947457076[280] = 0; + out_8557837785947457076[281] = 0; + out_8557837785947457076[282] = 0; + out_8557837785947457076[283] = 0; + out_8557837785947457076[284] = 0; + out_8557837785947457076[285] = 0; + out_8557837785947457076[286] = 1; + out_8557837785947457076[287] = 0; + out_8557837785947457076[288] = 0; + out_8557837785947457076[289] = 0; + out_8557837785947457076[290] = 0; + out_8557837785947457076[291] = 0; + out_8557837785947457076[292] = 0; + out_8557837785947457076[293] = 0; + out_8557837785947457076[294] = 0; + out_8557837785947457076[295] = 0; + out_8557837785947457076[296] = 0; + out_8557837785947457076[297] = 0; + out_8557837785947457076[298] = 0; + out_8557837785947457076[299] = 0; + out_8557837785947457076[300] = 0; + out_8557837785947457076[301] = 0; + out_8557837785947457076[302] = 0; + out_8557837785947457076[303] = 0; + out_8557837785947457076[304] = 0; + out_8557837785947457076[305] = 0; + out_8557837785947457076[306] = 0; + out_8557837785947457076[307] = 0; + out_8557837785947457076[308] = 1; + out_8557837785947457076[309] = 0; + out_8557837785947457076[310] = 0; + out_8557837785947457076[311] = 0; + out_8557837785947457076[312] = 0; + out_8557837785947457076[313] = 0; + out_8557837785947457076[314] = 0; + out_8557837785947457076[315] = 0; + out_8557837785947457076[316] = 0; + out_8557837785947457076[317] = 0; + out_8557837785947457076[318] = 0; + out_8557837785947457076[319] = 0; + out_8557837785947457076[320] = 0; + out_8557837785947457076[321] = 0; + out_8557837785947457076[322] = 0; + out_8557837785947457076[323] = 0; + out_8557837785947457076[324] = 0; + out_8557837785947457076[325] = 0; + out_8557837785947457076[326] = 0; + out_8557837785947457076[327] = 0; + out_8557837785947457076[328] = 0; + out_8557837785947457076[329] = 0; + out_8557837785947457076[330] = 1; + out_8557837785947457076[331] = 0; + out_8557837785947457076[332] = 0; + out_8557837785947457076[333] = 0; + out_8557837785947457076[334] = 0; + out_8557837785947457076[335] = 0; + out_8557837785947457076[336] = 0; + out_8557837785947457076[337] = 0; + out_8557837785947457076[338] = 0; + out_8557837785947457076[339] = 0; + out_8557837785947457076[340] = 0; + out_8557837785947457076[341] = 0; + out_8557837785947457076[342] = 0; + out_8557837785947457076[343] = 0; + out_8557837785947457076[344] = 0; + out_8557837785947457076[345] = 0; + out_8557837785947457076[346] = 0; + out_8557837785947457076[347] = 0; + out_8557837785947457076[348] = 0; + out_8557837785947457076[349] = 0; + out_8557837785947457076[350] = 0; + out_8557837785947457076[351] = 0; + out_8557837785947457076[352] = 1; + out_8557837785947457076[353] = 0; + out_8557837785947457076[354] = 0; + out_8557837785947457076[355] = 0; + out_8557837785947457076[356] = 0; + out_8557837785947457076[357] = 0; + out_8557837785947457076[358] = 0; + out_8557837785947457076[359] = 0; + out_8557837785947457076[360] = 0; + out_8557837785947457076[361] = 0; + out_8557837785947457076[362] = 0; + out_8557837785947457076[363] = 0; + out_8557837785947457076[364] = 0; + out_8557837785947457076[365] = 0; + out_8557837785947457076[366] = 0; + out_8557837785947457076[367] = 0; + out_8557837785947457076[368] = 0; + out_8557837785947457076[369] = 0; + out_8557837785947457076[370] = 0; + out_8557837785947457076[371] = 0; + out_8557837785947457076[372] = 0; + out_8557837785947457076[373] = 0; + out_8557837785947457076[374] = 1; + out_8557837785947457076[375] = 0; + out_8557837785947457076[376] = 0; + out_8557837785947457076[377] = 0; + out_8557837785947457076[378] = 0; + out_8557837785947457076[379] = 0; + out_8557837785947457076[380] = 0; + out_8557837785947457076[381] = 0; + out_8557837785947457076[382] = 0; + out_8557837785947457076[383] = 0; + out_8557837785947457076[384] = 0; + out_8557837785947457076[385] = 0; + out_8557837785947457076[386] = 0; + out_8557837785947457076[387] = 0; + out_8557837785947457076[388] = 0; + out_8557837785947457076[389] = 0; + out_8557837785947457076[390] = 0; + out_8557837785947457076[391] = 0; + out_8557837785947457076[392] = 0; + out_8557837785947457076[393] = 0; + out_8557837785947457076[394] = 0; + out_8557837785947457076[395] = 0; + out_8557837785947457076[396] = 1; + out_8557837785947457076[397] = 0; + out_8557837785947457076[398] = 0; + out_8557837785947457076[399] = 0; + out_8557837785947457076[400] = 0; + out_8557837785947457076[401] = 0; + out_8557837785947457076[402] = 0; + out_8557837785947457076[403] = 0; + out_8557837785947457076[404] = 0; + out_8557837785947457076[405] = 0; + out_8557837785947457076[406] = 0; + out_8557837785947457076[407] = 0; + out_8557837785947457076[408] = 0; + out_8557837785947457076[409] = 0; + out_8557837785947457076[410] = 0; + out_8557837785947457076[411] = 0; + out_8557837785947457076[412] = 0; + out_8557837785947457076[413] = 0; + out_8557837785947457076[414] = 0; + out_8557837785947457076[415] = 0; + out_8557837785947457076[416] = 0; + out_8557837785947457076[417] = 0; + out_8557837785947457076[418] = 1; + out_8557837785947457076[419] = 0; + out_8557837785947457076[420] = 0; + out_8557837785947457076[421] = 0; + out_8557837785947457076[422] = 0; + out_8557837785947457076[423] = 0; + out_8557837785947457076[424] = 0; + out_8557837785947457076[425] = 0; + out_8557837785947457076[426] = 0; + out_8557837785947457076[427] = 0; + out_8557837785947457076[428] = 0; + out_8557837785947457076[429] = 0; + out_8557837785947457076[430] = 0; + out_8557837785947457076[431] = 0; + out_8557837785947457076[432] = 0; + out_8557837785947457076[433] = 0; + out_8557837785947457076[434] = 0; + out_8557837785947457076[435] = 0; + out_8557837785947457076[436] = 0; + out_8557837785947457076[437] = 0; + out_8557837785947457076[438] = 0; + out_8557837785947457076[439] = 0; + out_8557837785947457076[440] = 1; } -void h_4(double *state, double *unused, double *out_5024870629752735468) { - out_5024870629752735468[0] = state[10] + state[13]; - out_5024870629752735468[1] = state[11] + state[14]; - out_5024870629752735468[2] = state[12] + state[15]; +void h_4(double *state, double *unused, double *out_1179371322125232753) { + out_1179371322125232753[0] = state[10] + state[13]; + out_1179371322125232753[1] = state[11] + state[14]; + out_1179371322125232753[2] = state[12] + state[15]; } -void H_4(double *state, double *unused, double *out_1752310950812596014) { - out_1752310950812596014[0] = 0; - out_1752310950812596014[1] = 0; - out_1752310950812596014[2] = 0; - out_1752310950812596014[3] = 0; - out_1752310950812596014[4] = 0; - out_1752310950812596014[5] = 0; - out_1752310950812596014[6] = 0; - out_1752310950812596014[7] = 0; - out_1752310950812596014[8] = 0; - out_1752310950812596014[9] = 0; - out_1752310950812596014[10] = 1; - out_1752310950812596014[11] = 0; - out_1752310950812596014[12] = 0; - out_1752310950812596014[13] = 1; - out_1752310950812596014[14] = 0; - out_1752310950812596014[15] = 0; - out_1752310950812596014[16] = 0; - out_1752310950812596014[17] = 0; - out_1752310950812596014[18] = 0; - out_1752310950812596014[19] = 0; - out_1752310950812596014[20] = 0; - out_1752310950812596014[21] = 0; - out_1752310950812596014[22] = 0; - out_1752310950812596014[23] = 0; - out_1752310950812596014[24] = 0; - out_1752310950812596014[25] = 0; - out_1752310950812596014[26] = 0; - out_1752310950812596014[27] = 0; - out_1752310950812596014[28] = 0; - out_1752310950812596014[29] = 0; - out_1752310950812596014[30] = 0; - out_1752310950812596014[31] = 0; - out_1752310950812596014[32] = 0; - out_1752310950812596014[33] = 1; - out_1752310950812596014[34] = 0; - out_1752310950812596014[35] = 0; - out_1752310950812596014[36] = 1; - out_1752310950812596014[37] = 0; - out_1752310950812596014[38] = 0; - out_1752310950812596014[39] = 0; - out_1752310950812596014[40] = 0; - out_1752310950812596014[41] = 0; - out_1752310950812596014[42] = 0; - out_1752310950812596014[43] = 0; - out_1752310950812596014[44] = 0; - out_1752310950812596014[45] = 0; - out_1752310950812596014[46] = 0; - out_1752310950812596014[47] = 0; - out_1752310950812596014[48] = 0; - out_1752310950812596014[49] = 0; - out_1752310950812596014[50] = 0; - out_1752310950812596014[51] = 0; - out_1752310950812596014[52] = 0; - out_1752310950812596014[53] = 0; - out_1752310950812596014[54] = 0; - out_1752310950812596014[55] = 0; - out_1752310950812596014[56] = 1; - out_1752310950812596014[57] = 0; - out_1752310950812596014[58] = 0; - out_1752310950812596014[59] = 1; - out_1752310950812596014[60] = 0; - out_1752310950812596014[61] = 0; - out_1752310950812596014[62] = 0; - out_1752310950812596014[63] = 0; - out_1752310950812596014[64] = 0; - out_1752310950812596014[65] = 0; +void H_4(double *state, double *unused, double *out_7315580968579262055) { + out_7315580968579262055[0] = 0; + out_7315580968579262055[1] = 0; + out_7315580968579262055[2] = 0; + out_7315580968579262055[3] = 0; + out_7315580968579262055[4] = 0; + out_7315580968579262055[5] = 0; + out_7315580968579262055[6] = 0; + out_7315580968579262055[7] = 0; + out_7315580968579262055[8] = 0; + out_7315580968579262055[9] = 0; + out_7315580968579262055[10] = 1; + out_7315580968579262055[11] = 0; + out_7315580968579262055[12] = 0; + out_7315580968579262055[13] = 1; + out_7315580968579262055[14] = 0; + out_7315580968579262055[15] = 0; + out_7315580968579262055[16] = 0; + out_7315580968579262055[17] = 0; + out_7315580968579262055[18] = 0; + out_7315580968579262055[19] = 0; + out_7315580968579262055[20] = 0; + out_7315580968579262055[21] = 0; + out_7315580968579262055[22] = 0; + out_7315580968579262055[23] = 0; + out_7315580968579262055[24] = 0; + out_7315580968579262055[25] = 0; + out_7315580968579262055[26] = 0; + out_7315580968579262055[27] = 0; + out_7315580968579262055[28] = 0; + out_7315580968579262055[29] = 0; + out_7315580968579262055[30] = 0; + out_7315580968579262055[31] = 0; + out_7315580968579262055[32] = 0; + out_7315580968579262055[33] = 1; + out_7315580968579262055[34] = 0; + out_7315580968579262055[35] = 0; + out_7315580968579262055[36] = 1; + out_7315580968579262055[37] = 0; + out_7315580968579262055[38] = 0; + out_7315580968579262055[39] = 0; + out_7315580968579262055[40] = 0; + out_7315580968579262055[41] = 0; + out_7315580968579262055[42] = 0; + out_7315580968579262055[43] = 0; + out_7315580968579262055[44] = 0; + out_7315580968579262055[45] = 0; + out_7315580968579262055[46] = 0; + out_7315580968579262055[47] = 0; + out_7315580968579262055[48] = 0; + out_7315580968579262055[49] = 0; + out_7315580968579262055[50] = 0; + out_7315580968579262055[51] = 0; + out_7315580968579262055[52] = 0; + out_7315580968579262055[53] = 0; + out_7315580968579262055[54] = 0; + out_7315580968579262055[55] = 0; + out_7315580968579262055[56] = 1; + out_7315580968579262055[57] = 0; + out_7315580968579262055[58] = 0; + out_7315580968579262055[59] = 1; + out_7315580968579262055[60] = 0; + out_7315580968579262055[61] = 0; + out_7315580968579262055[62] = 0; + out_7315580968579262055[63] = 0; + out_7315580968579262055[64] = 0; + out_7315580968579262055[65] = 0; } -void h_9(double *state, double *unused, double *out_2675503251996688187) { - out_2675503251996688187[0] = state[10]; - out_2675503251996688187[1] = state[11]; - out_2675503251996688187[2] = state[12]; +void h_9(double *state, double *unused, double *out_7267185231670305086) { + out_7267185231670305086[0] = state[10]; + out_7267185231670305086[1] = state[11]; + out_7267185231670305086[2] = state[12]; } -void H_9(double *state, double *unused, double *out_1511121304183005369) { - out_1511121304183005369[0] = 0; - out_1511121304183005369[1] = 0; - out_1511121304183005369[2] = 0; - out_1511121304183005369[3] = 0; - out_1511121304183005369[4] = 0; - out_1511121304183005369[5] = 0; - out_1511121304183005369[6] = 0; - out_1511121304183005369[7] = 0; - out_1511121304183005369[8] = 0; - out_1511121304183005369[9] = 0; - out_1511121304183005369[10] = 1; - out_1511121304183005369[11] = 0; - out_1511121304183005369[12] = 0; - out_1511121304183005369[13] = 0; - out_1511121304183005369[14] = 0; - out_1511121304183005369[15] = 0; - out_1511121304183005369[16] = 0; - out_1511121304183005369[17] = 0; - out_1511121304183005369[18] = 0; - out_1511121304183005369[19] = 0; - out_1511121304183005369[20] = 0; - out_1511121304183005369[21] = 0; - out_1511121304183005369[22] = 0; - out_1511121304183005369[23] = 0; - out_1511121304183005369[24] = 0; - out_1511121304183005369[25] = 0; - out_1511121304183005369[26] = 0; - out_1511121304183005369[27] = 0; - out_1511121304183005369[28] = 0; - out_1511121304183005369[29] = 0; - out_1511121304183005369[30] = 0; - out_1511121304183005369[31] = 0; - out_1511121304183005369[32] = 0; - out_1511121304183005369[33] = 1; - out_1511121304183005369[34] = 0; - out_1511121304183005369[35] = 0; - out_1511121304183005369[36] = 0; - out_1511121304183005369[37] = 0; - out_1511121304183005369[38] = 0; - out_1511121304183005369[39] = 0; - out_1511121304183005369[40] = 0; - out_1511121304183005369[41] = 0; - out_1511121304183005369[42] = 0; - out_1511121304183005369[43] = 0; - out_1511121304183005369[44] = 0; - out_1511121304183005369[45] = 0; - out_1511121304183005369[46] = 0; - out_1511121304183005369[47] = 0; - out_1511121304183005369[48] = 0; - out_1511121304183005369[49] = 0; - out_1511121304183005369[50] = 0; - out_1511121304183005369[51] = 0; - out_1511121304183005369[52] = 0; - out_1511121304183005369[53] = 0; - out_1511121304183005369[54] = 0; - out_1511121304183005369[55] = 0; - out_1511121304183005369[56] = 1; - out_1511121304183005369[57] = 0; - out_1511121304183005369[58] = 0; - out_1511121304183005369[59] = 0; - out_1511121304183005369[60] = 0; - out_1511121304183005369[61] = 0; - out_1511121304183005369[62] = 0; - out_1511121304183005369[63] = 0; - out_1511121304183005369[64] = 0; - out_1511121304183005369[65] = 0; +void H_9(double *state, double *unused, double *out_7556770615208852700) { + out_7556770615208852700[0] = 0; + out_7556770615208852700[1] = 0; + out_7556770615208852700[2] = 0; + out_7556770615208852700[3] = 0; + out_7556770615208852700[4] = 0; + out_7556770615208852700[5] = 0; + out_7556770615208852700[6] = 0; + out_7556770615208852700[7] = 0; + out_7556770615208852700[8] = 0; + out_7556770615208852700[9] = 0; + out_7556770615208852700[10] = 1; + out_7556770615208852700[11] = 0; + out_7556770615208852700[12] = 0; + out_7556770615208852700[13] = 0; + out_7556770615208852700[14] = 0; + out_7556770615208852700[15] = 0; + out_7556770615208852700[16] = 0; + out_7556770615208852700[17] = 0; + out_7556770615208852700[18] = 0; + out_7556770615208852700[19] = 0; + out_7556770615208852700[20] = 0; + out_7556770615208852700[21] = 0; + out_7556770615208852700[22] = 0; + out_7556770615208852700[23] = 0; + out_7556770615208852700[24] = 0; + out_7556770615208852700[25] = 0; + out_7556770615208852700[26] = 0; + out_7556770615208852700[27] = 0; + out_7556770615208852700[28] = 0; + out_7556770615208852700[29] = 0; + out_7556770615208852700[30] = 0; + out_7556770615208852700[31] = 0; + out_7556770615208852700[32] = 0; + out_7556770615208852700[33] = 1; + out_7556770615208852700[34] = 0; + out_7556770615208852700[35] = 0; + out_7556770615208852700[36] = 0; + out_7556770615208852700[37] = 0; + out_7556770615208852700[38] = 0; + out_7556770615208852700[39] = 0; + out_7556770615208852700[40] = 0; + out_7556770615208852700[41] = 0; + out_7556770615208852700[42] = 0; + out_7556770615208852700[43] = 0; + out_7556770615208852700[44] = 0; + out_7556770615208852700[45] = 0; + out_7556770615208852700[46] = 0; + out_7556770615208852700[47] = 0; + out_7556770615208852700[48] = 0; + out_7556770615208852700[49] = 0; + out_7556770615208852700[50] = 0; + out_7556770615208852700[51] = 0; + out_7556770615208852700[52] = 0; + out_7556770615208852700[53] = 0; + out_7556770615208852700[54] = 0; + out_7556770615208852700[55] = 0; + out_7556770615208852700[56] = 1; + out_7556770615208852700[57] = 0; + out_7556770615208852700[58] = 0; + out_7556770615208852700[59] = 0; + out_7556770615208852700[60] = 0; + out_7556770615208852700[61] = 0; + out_7556770615208852700[62] = 0; + out_7556770615208852700[63] = 0; + out_7556770615208852700[64] = 0; + out_7556770615208852700[65] = 0; } -void h_10(double *state, double *unused, double *out_7370746392053236487) { - out_7370746392053236487[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19]; - out_7370746392053236487[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20]; - out_7370746392053236487[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21]; +void h_10(double *state, double *unused, double *out_5095924145481726408) { + out_5095924145481726408[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19]; + out_5095924145481726408[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20]; + out_5095924145481726408[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21]; } -void H_10(double *state, double *unused, double *out_7385579306469280005) { - out_7385579306469280005[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_7385579306469280005[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; - out_7385579306469280005[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2]; - out_7385579306469280005[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_7385579306469280005[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_7385579306469280005[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_7385579306469280005[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_7385579306469280005[7] = 0; - out_7385579306469280005[8] = 0; - out_7385579306469280005[9] = 0; - out_7385579306469280005[10] = 0; - out_7385579306469280005[11] = 0; - out_7385579306469280005[12] = 0; - out_7385579306469280005[13] = 0; - out_7385579306469280005[14] = 0; - out_7385579306469280005[15] = 0; - out_7385579306469280005[16] = 1; - out_7385579306469280005[17] = 0; - out_7385579306469280005[18] = 0; - out_7385579306469280005[19] = 1; - out_7385579306469280005[20] = 0; - out_7385579306469280005[21] = 0; - out_7385579306469280005[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; - out_7385579306469280005[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_7385579306469280005[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2]; - out_7385579306469280005[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_7385579306469280005[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_7385579306469280005[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_7385579306469280005[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_7385579306469280005[29] = 0; - out_7385579306469280005[30] = 0; - out_7385579306469280005[31] = 0; - out_7385579306469280005[32] = 0; - out_7385579306469280005[33] = 0; - out_7385579306469280005[34] = 0; - out_7385579306469280005[35] = 0; - out_7385579306469280005[36] = 0; - out_7385579306469280005[37] = 0; - out_7385579306469280005[38] = 0; - out_7385579306469280005[39] = 1; - out_7385579306469280005[40] = 0; - out_7385579306469280005[41] = 0; - out_7385579306469280005[42] = 1; - out_7385579306469280005[43] = 0; - out_7385579306469280005[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2]; - out_7385579306469280005[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2]; - out_7385579306469280005[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_7385579306469280005[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_7385579306469280005[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_7385579306469280005[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_7385579306469280005[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_7385579306469280005[51] = 0; - out_7385579306469280005[52] = 0; - out_7385579306469280005[53] = 0; - out_7385579306469280005[54] = 0; - out_7385579306469280005[55] = 0; - out_7385579306469280005[56] = 0; - out_7385579306469280005[57] = 0; - out_7385579306469280005[58] = 0; - out_7385579306469280005[59] = 0; - out_7385579306469280005[60] = 0; - out_7385579306469280005[61] = 0; - out_7385579306469280005[62] = 1; - out_7385579306469280005[63] = 0; - out_7385579306469280005[64] = 0; - out_7385579306469280005[65] = 1; +void H_10(double *state, double *unused, double *out_5645866099687886483) { + out_5645866099687886483[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_5645866099687886483[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; + out_5645866099687886483[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2]; + out_5645866099687886483[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_5645866099687886483[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_5645866099687886483[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_5645866099687886483[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_5645866099687886483[7] = 0; + out_5645866099687886483[8] = 0; + out_5645866099687886483[9] = 0; + out_5645866099687886483[10] = 0; + out_5645866099687886483[11] = 0; + out_5645866099687886483[12] = 0; + out_5645866099687886483[13] = 0; + out_5645866099687886483[14] = 0; + out_5645866099687886483[15] = 0; + out_5645866099687886483[16] = 1; + out_5645866099687886483[17] = 0; + out_5645866099687886483[18] = 0; + out_5645866099687886483[19] = 1; + out_5645866099687886483[20] = 0; + out_5645866099687886483[21] = 0; + out_5645866099687886483[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; + out_5645866099687886483[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_5645866099687886483[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2]; + out_5645866099687886483[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_5645866099687886483[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_5645866099687886483[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_5645866099687886483[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_5645866099687886483[29] = 0; + out_5645866099687886483[30] = 0; + out_5645866099687886483[31] = 0; + out_5645866099687886483[32] = 0; + out_5645866099687886483[33] = 0; + out_5645866099687886483[34] = 0; + out_5645866099687886483[35] = 0; + out_5645866099687886483[36] = 0; + out_5645866099687886483[37] = 0; + out_5645866099687886483[38] = 0; + out_5645866099687886483[39] = 1; + out_5645866099687886483[40] = 0; + out_5645866099687886483[41] = 0; + out_5645866099687886483[42] = 1; + out_5645866099687886483[43] = 0; + out_5645866099687886483[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2]; + out_5645866099687886483[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2]; + out_5645866099687886483[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_5645866099687886483[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_5645866099687886483[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_5645866099687886483[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_5645866099687886483[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_5645866099687886483[51] = 0; + out_5645866099687886483[52] = 0; + out_5645866099687886483[53] = 0; + out_5645866099687886483[54] = 0; + out_5645866099687886483[55] = 0; + out_5645866099687886483[56] = 0; + out_5645866099687886483[57] = 0; + out_5645866099687886483[58] = 0; + out_5645866099687886483[59] = 0; + out_5645866099687886483[60] = 0; + out_5645866099687886483[61] = 0; + out_5645866099687886483[62] = 1; + out_5645866099687886483[63] = 0; + out_5645866099687886483[64] = 0; + out_5645866099687886483[65] = 1; } -void h_12(double *state, double *unused, double *out_3987271481309322321) { - out_3987271481309322321[0] = state[0]; - out_3987271481309322321[1] = state[1]; - out_3987271481309322321[2] = state[2]; +void h_12(double *state, double *unused, double *out_2512392799571043135) { + out_2512392799571043135[0] = state[0]; + out_2512392799571043135[1] = state[1]; + out_2512392799571043135[2] = state[2]; } -void H_12(double *state, double *unused, double *out_1131211925765002347) { - out_1131211925765002347[0] = 1; - out_1131211925765002347[1] = 0; - out_1131211925765002347[2] = 0; - out_1131211925765002347[3] = 0; - out_1131211925765002347[4] = 0; - out_1131211925765002347[5] = 0; - out_1131211925765002347[6] = 0; - out_1131211925765002347[7] = 0; - out_1131211925765002347[8] = 0; - out_1131211925765002347[9] = 0; - out_1131211925765002347[10] = 0; - out_1131211925765002347[11] = 0; - out_1131211925765002347[12] = 0; - out_1131211925765002347[13] = 0; - out_1131211925765002347[14] = 0; - out_1131211925765002347[15] = 0; - out_1131211925765002347[16] = 0; - out_1131211925765002347[17] = 0; - out_1131211925765002347[18] = 0; - out_1131211925765002347[19] = 0; - out_1131211925765002347[20] = 0; - out_1131211925765002347[21] = 0; - out_1131211925765002347[22] = 0; - out_1131211925765002347[23] = 1; - out_1131211925765002347[24] = 0; - out_1131211925765002347[25] = 0; - out_1131211925765002347[26] = 0; - out_1131211925765002347[27] = 0; - out_1131211925765002347[28] = 0; - out_1131211925765002347[29] = 0; - out_1131211925765002347[30] = 0; - out_1131211925765002347[31] = 0; - out_1131211925765002347[32] = 0; - out_1131211925765002347[33] = 0; - out_1131211925765002347[34] = 0; - out_1131211925765002347[35] = 0; - out_1131211925765002347[36] = 0; - out_1131211925765002347[37] = 0; - out_1131211925765002347[38] = 0; - out_1131211925765002347[39] = 0; - out_1131211925765002347[40] = 0; - out_1131211925765002347[41] = 0; - out_1131211925765002347[42] = 0; - out_1131211925765002347[43] = 0; - out_1131211925765002347[44] = 0; - out_1131211925765002347[45] = 0; - out_1131211925765002347[46] = 1; - out_1131211925765002347[47] = 0; - out_1131211925765002347[48] = 0; - out_1131211925765002347[49] = 0; - out_1131211925765002347[50] = 0; - out_1131211925765002347[51] = 0; - out_1131211925765002347[52] = 0; - out_1131211925765002347[53] = 0; - out_1131211925765002347[54] = 0; - out_1131211925765002347[55] = 0; - out_1131211925765002347[56] = 0; - out_1131211925765002347[57] = 0; - out_1131211925765002347[58] = 0; - out_1131211925765002347[59] = 0; - out_1131211925765002347[60] = 0; - out_1131211925765002347[61] = 0; - out_1131211925765002347[62] = 0; - out_1131211925765002347[63] = 0; - out_1131211925765002347[64] = 0; - out_1131211925765002347[65] = 0; +void H_12(double *state, double *unused, double *out_6111706697098327766) { + out_6111706697098327766[0] = 1; + out_6111706697098327766[1] = 0; + out_6111706697098327766[2] = 0; + out_6111706697098327766[3] = 0; + out_6111706697098327766[4] = 0; + out_6111706697098327766[5] = 0; + out_6111706697098327766[6] = 0; + out_6111706697098327766[7] = 0; + out_6111706697098327766[8] = 0; + out_6111706697098327766[9] = 0; + out_6111706697098327766[10] = 0; + out_6111706697098327766[11] = 0; + out_6111706697098327766[12] = 0; + out_6111706697098327766[13] = 0; + out_6111706697098327766[14] = 0; + out_6111706697098327766[15] = 0; + out_6111706697098327766[16] = 0; + out_6111706697098327766[17] = 0; + out_6111706697098327766[18] = 0; + out_6111706697098327766[19] = 0; + out_6111706697098327766[20] = 0; + out_6111706697098327766[21] = 0; + out_6111706697098327766[22] = 0; + out_6111706697098327766[23] = 1; + out_6111706697098327766[24] = 0; + out_6111706697098327766[25] = 0; + out_6111706697098327766[26] = 0; + out_6111706697098327766[27] = 0; + out_6111706697098327766[28] = 0; + out_6111706697098327766[29] = 0; + out_6111706697098327766[30] = 0; + out_6111706697098327766[31] = 0; + out_6111706697098327766[32] = 0; + out_6111706697098327766[33] = 0; + out_6111706697098327766[34] = 0; + out_6111706697098327766[35] = 0; + out_6111706697098327766[36] = 0; + out_6111706697098327766[37] = 0; + out_6111706697098327766[38] = 0; + out_6111706697098327766[39] = 0; + out_6111706697098327766[40] = 0; + out_6111706697098327766[41] = 0; + out_6111706697098327766[42] = 0; + out_6111706697098327766[43] = 0; + out_6111706697098327766[44] = 0; + out_6111706697098327766[45] = 0; + out_6111706697098327766[46] = 1; + out_6111706697098327766[47] = 0; + out_6111706697098327766[48] = 0; + out_6111706697098327766[49] = 0; + out_6111706697098327766[50] = 0; + out_6111706697098327766[51] = 0; + out_6111706697098327766[52] = 0; + out_6111706697098327766[53] = 0; + out_6111706697098327766[54] = 0; + out_6111706697098327766[55] = 0; + out_6111706697098327766[56] = 0; + out_6111706697098327766[57] = 0; + out_6111706697098327766[58] = 0; + out_6111706697098327766[59] = 0; + out_6111706697098327766[60] = 0; + out_6111706697098327766[61] = 0; + out_6111706697098327766[62] = 0; + out_6111706697098327766[63] = 0; + out_6111706697098327766[64] = 0; + out_6111706697098327766[65] = 0; } -void h_35(double *state, double *unused, double *out_387267383515705374) { - out_387267383515705374[0] = state[7]; - out_387267383515705374[1] = state[8]; - out_387267383515705374[2] = state[9]; +void h_35(double *state, double *unused, double *out_7549588061413473025) { + out_7549588061413473025[0] = state[7]; + out_7549588061413473025[1] = state[8]; + out_7549588061413473025[2] = state[9]; } -void H_35(double *state, double *unused, double *out_1614351106560011362) { - out_1614351106560011362[0] = 0; - out_1614351106560011362[1] = 0; - out_1614351106560011362[2] = 0; - out_1614351106560011362[3] = 0; - out_1614351106560011362[4] = 0; - out_1614351106560011362[5] = 0; - out_1614351106560011362[6] = 0; - out_1614351106560011362[7] = 1; - out_1614351106560011362[8] = 0; - out_1614351106560011362[9] = 0; - out_1614351106560011362[10] = 0; - out_1614351106560011362[11] = 0; - out_1614351106560011362[12] = 0; - out_1614351106560011362[13] = 0; - out_1614351106560011362[14] = 0; - out_1614351106560011362[15] = 0; - out_1614351106560011362[16] = 0; - out_1614351106560011362[17] = 0; - out_1614351106560011362[18] = 0; - out_1614351106560011362[19] = 0; - out_1614351106560011362[20] = 0; - out_1614351106560011362[21] = 0; - out_1614351106560011362[22] = 0; - out_1614351106560011362[23] = 0; - out_1614351106560011362[24] = 0; - out_1614351106560011362[25] = 0; - out_1614351106560011362[26] = 0; - out_1614351106560011362[27] = 0; - out_1614351106560011362[28] = 0; - out_1614351106560011362[29] = 0; - out_1614351106560011362[30] = 1; - out_1614351106560011362[31] = 0; - out_1614351106560011362[32] = 0; - out_1614351106560011362[33] = 0; - out_1614351106560011362[34] = 0; - out_1614351106560011362[35] = 0; - out_1614351106560011362[36] = 0; - out_1614351106560011362[37] = 0; - out_1614351106560011362[38] = 0; - out_1614351106560011362[39] = 0; - out_1614351106560011362[40] = 0; - out_1614351106560011362[41] = 0; - out_1614351106560011362[42] = 0; - out_1614351106560011362[43] = 0; - out_1614351106560011362[44] = 0; - out_1614351106560011362[45] = 0; - out_1614351106560011362[46] = 0; - out_1614351106560011362[47] = 0; - out_1614351106560011362[48] = 0; - out_1614351106560011362[49] = 0; - out_1614351106560011362[50] = 0; - out_1614351106560011362[51] = 0; - out_1614351106560011362[52] = 0; - out_1614351106560011362[53] = 1; - out_1614351106560011362[54] = 0; - out_1614351106560011362[55] = 0; - out_1614351106560011362[56] = 0; - out_1614351106560011362[57] = 0; - out_1614351106560011362[58] = 0; - out_1614351106560011362[59] = 0; - out_1614351106560011362[60] = 0; - out_1614351106560011362[61] = 0; - out_1614351106560011362[62] = 0; - out_1614351106560011362[63] = 0; - out_1614351106560011362[64] = 0; - out_1614351106560011362[65] = 0; +void H_35(double *state, double *unused, double *out_3366143664773314057) { + out_3366143664773314057[0] = 0; + out_3366143664773314057[1] = 0; + out_3366143664773314057[2] = 0; + out_3366143664773314057[3] = 0; + out_3366143664773314057[4] = 0; + out_3366143664773314057[5] = 0; + out_3366143664773314057[6] = 0; + out_3366143664773314057[7] = 1; + out_3366143664773314057[8] = 0; + out_3366143664773314057[9] = 0; + out_3366143664773314057[10] = 0; + out_3366143664773314057[11] = 0; + out_3366143664773314057[12] = 0; + out_3366143664773314057[13] = 0; + out_3366143664773314057[14] = 0; + out_3366143664773314057[15] = 0; + out_3366143664773314057[16] = 0; + out_3366143664773314057[17] = 0; + out_3366143664773314057[18] = 0; + out_3366143664773314057[19] = 0; + out_3366143664773314057[20] = 0; + out_3366143664773314057[21] = 0; + out_3366143664773314057[22] = 0; + out_3366143664773314057[23] = 0; + out_3366143664773314057[24] = 0; + out_3366143664773314057[25] = 0; + out_3366143664773314057[26] = 0; + out_3366143664773314057[27] = 0; + out_3366143664773314057[28] = 0; + out_3366143664773314057[29] = 0; + out_3366143664773314057[30] = 1; + out_3366143664773314057[31] = 0; + out_3366143664773314057[32] = 0; + out_3366143664773314057[33] = 0; + out_3366143664773314057[34] = 0; + out_3366143664773314057[35] = 0; + out_3366143664773314057[36] = 0; + out_3366143664773314057[37] = 0; + out_3366143664773314057[38] = 0; + out_3366143664773314057[39] = 0; + out_3366143664773314057[40] = 0; + out_3366143664773314057[41] = 0; + out_3366143664773314057[42] = 0; + out_3366143664773314057[43] = 0; + out_3366143664773314057[44] = 0; + out_3366143664773314057[45] = 0; + out_3366143664773314057[46] = 0; + out_3366143664773314057[47] = 0; + out_3366143664773314057[48] = 0; + out_3366143664773314057[49] = 0; + out_3366143664773314057[50] = 0; + out_3366143664773314057[51] = 0; + out_3366143664773314057[52] = 0; + out_3366143664773314057[53] = 1; + out_3366143664773314057[54] = 0; + out_3366143664773314057[55] = 0; + out_3366143664773314057[56] = 0; + out_3366143664773314057[57] = 0; + out_3366143664773314057[58] = 0; + out_3366143664773314057[59] = 0; + out_3366143664773314057[60] = 0; + out_3366143664773314057[61] = 0; + out_3366143664773314057[62] = 0; + out_3366143664773314057[63] = 0; + out_3366143664773314057[64] = 0; + out_3366143664773314057[65] = 0; } -void h_32(double *state, double *unused, double *out_8661748451588242164) { - out_8661748451588242164[0] = state[3]; - out_8661748451588242164[1] = state[4]; - out_8661748451588242164[2] = state[5]; - out_8661748451588242164[3] = state[6]; +void h_32(double *state, double *unused, double *out_1075397825167574537) { + out_1075397825167574537[0] = state[3]; + out_1075397825167574537[1] = state[4]; + out_1075397825167574537[2] = state[5]; + out_1075397825167574537[3] = state[6]; } -void H_32(double *state, double *unused, double *out_7415655478767623920) { - out_7415655478767623920[0] = 0; - out_7415655478767623920[1] = 0; - out_7415655478767623920[2] = 0; - out_7415655478767623920[3] = 1; - out_7415655478767623920[4] = 0; - out_7415655478767623920[5] = 0; - out_7415655478767623920[6] = 0; - out_7415655478767623920[7] = 0; - out_7415655478767623920[8] = 0; - out_7415655478767623920[9] = 0; - out_7415655478767623920[10] = 0; - out_7415655478767623920[11] = 0; - out_7415655478767623920[12] = 0; - out_7415655478767623920[13] = 0; - out_7415655478767623920[14] = 0; - out_7415655478767623920[15] = 0; - out_7415655478767623920[16] = 0; - out_7415655478767623920[17] = 0; - out_7415655478767623920[18] = 0; - out_7415655478767623920[19] = 0; - out_7415655478767623920[20] = 0; - out_7415655478767623920[21] = 0; - out_7415655478767623920[22] = 0; - out_7415655478767623920[23] = 0; - out_7415655478767623920[24] = 0; - out_7415655478767623920[25] = 0; - out_7415655478767623920[26] = 1; - out_7415655478767623920[27] = 0; - out_7415655478767623920[28] = 0; - out_7415655478767623920[29] = 0; - out_7415655478767623920[30] = 0; - out_7415655478767623920[31] = 0; - out_7415655478767623920[32] = 0; - out_7415655478767623920[33] = 0; - out_7415655478767623920[34] = 0; - out_7415655478767623920[35] = 0; - out_7415655478767623920[36] = 0; - out_7415655478767623920[37] = 0; - out_7415655478767623920[38] = 0; - out_7415655478767623920[39] = 0; - out_7415655478767623920[40] = 0; - out_7415655478767623920[41] = 0; - out_7415655478767623920[42] = 0; - out_7415655478767623920[43] = 0; - out_7415655478767623920[44] = 0; - out_7415655478767623920[45] = 0; - out_7415655478767623920[46] = 0; - out_7415655478767623920[47] = 0; - out_7415655478767623920[48] = 0; - out_7415655478767623920[49] = 1; - out_7415655478767623920[50] = 0; - out_7415655478767623920[51] = 0; - out_7415655478767623920[52] = 0; - out_7415655478767623920[53] = 0; - out_7415655478767623920[54] = 0; - out_7415655478767623920[55] = 0; - out_7415655478767623920[56] = 0; - out_7415655478767623920[57] = 0; - out_7415655478767623920[58] = 0; - out_7415655478767623920[59] = 0; - out_7415655478767623920[60] = 0; - out_7415655478767623920[61] = 0; - out_7415655478767623920[62] = 0; - out_7415655478767623920[63] = 0; - out_7415655478767623920[64] = 0; - out_7415655478767623920[65] = 0; - out_7415655478767623920[66] = 0; - out_7415655478767623920[67] = 0; - out_7415655478767623920[68] = 0; - out_7415655478767623920[69] = 0; - out_7415655478767623920[70] = 0; - out_7415655478767623920[71] = 0; - out_7415655478767623920[72] = 1; - out_7415655478767623920[73] = 0; - out_7415655478767623920[74] = 0; - out_7415655478767623920[75] = 0; - out_7415655478767623920[76] = 0; - out_7415655478767623920[77] = 0; - out_7415655478767623920[78] = 0; - out_7415655478767623920[79] = 0; - out_7415655478767623920[80] = 0; - out_7415655478767623920[81] = 0; - out_7415655478767623920[82] = 0; - out_7415655478767623920[83] = 0; - out_7415655478767623920[84] = 0; - out_7415655478767623920[85] = 0; - out_7415655478767623920[86] = 0; - out_7415655478767623920[87] = 0; +void H_32(double *state, double *unused, double *out_5548874522593978030) { + out_5548874522593978030[0] = 0; + out_5548874522593978030[1] = 0; + out_5548874522593978030[2] = 0; + out_5548874522593978030[3] = 1; + out_5548874522593978030[4] = 0; + out_5548874522593978030[5] = 0; + out_5548874522593978030[6] = 0; + out_5548874522593978030[7] = 0; + out_5548874522593978030[8] = 0; + out_5548874522593978030[9] = 0; + out_5548874522593978030[10] = 0; + out_5548874522593978030[11] = 0; + out_5548874522593978030[12] = 0; + out_5548874522593978030[13] = 0; + out_5548874522593978030[14] = 0; + out_5548874522593978030[15] = 0; + out_5548874522593978030[16] = 0; + out_5548874522593978030[17] = 0; + out_5548874522593978030[18] = 0; + out_5548874522593978030[19] = 0; + out_5548874522593978030[20] = 0; + out_5548874522593978030[21] = 0; + out_5548874522593978030[22] = 0; + out_5548874522593978030[23] = 0; + out_5548874522593978030[24] = 0; + out_5548874522593978030[25] = 0; + out_5548874522593978030[26] = 1; + out_5548874522593978030[27] = 0; + out_5548874522593978030[28] = 0; + out_5548874522593978030[29] = 0; + out_5548874522593978030[30] = 0; + out_5548874522593978030[31] = 0; + out_5548874522593978030[32] = 0; + out_5548874522593978030[33] = 0; + out_5548874522593978030[34] = 0; + out_5548874522593978030[35] = 0; + out_5548874522593978030[36] = 0; + out_5548874522593978030[37] = 0; + out_5548874522593978030[38] = 0; + out_5548874522593978030[39] = 0; + out_5548874522593978030[40] = 0; + out_5548874522593978030[41] = 0; + out_5548874522593978030[42] = 0; + out_5548874522593978030[43] = 0; + out_5548874522593978030[44] = 0; + out_5548874522593978030[45] = 0; + out_5548874522593978030[46] = 0; + out_5548874522593978030[47] = 0; + out_5548874522593978030[48] = 0; + out_5548874522593978030[49] = 1; + out_5548874522593978030[50] = 0; + out_5548874522593978030[51] = 0; + out_5548874522593978030[52] = 0; + out_5548874522593978030[53] = 0; + out_5548874522593978030[54] = 0; + out_5548874522593978030[55] = 0; + out_5548874522593978030[56] = 0; + out_5548874522593978030[57] = 0; + out_5548874522593978030[58] = 0; + out_5548874522593978030[59] = 0; + out_5548874522593978030[60] = 0; + out_5548874522593978030[61] = 0; + out_5548874522593978030[62] = 0; + out_5548874522593978030[63] = 0; + out_5548874522593978030[64] = 0; + out_5548874522593978030[65] = 0; + out_5548874522593978030[66] = 0; + out_5548874522593978030[67] = 0; + out_5548874522593978030[68] = 0; + out_5548874522593978030[69] = 0; + out_5548874522593978030[70] = 0; + out_5548874522593978030[71] = 0; + out_5548874522593978030[72] = 1; + out_5548874522593978030[73] = 0; + out_5548874522593978030[74] = 0; + out_5548874522593978030[75] = 0; + out_5548874522593978030[76] = 0; + out_5548874522593978030[77] = 0; + out_5548874522593978030[78] = 0; + out_5548874522593978030[79] = 0; + out_5548874522593978030[80] = 0; + out_5548874522593978030[81] = 0; + out_5548874522593978030[82] = 0; + out_5548874522593978030[83] = 0; + out_5548874522593978030[84] = 0; + out_5548874522593978030[85] = 0; + out_5548874522593978030[86] = 0; + out_5548874522593978030[87] = 0; } -void h_13(double *state, double *unused, double *out_4888723774468744577) { - out_4888723774468744577[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7]; - out_4888723774468744577[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8]; - out_4888723774468744577[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9]; +void h_13(double *state, double *unused, double *out_5119914902696682383) { + out_5119914902696682383[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7]; + out_5119914902696682383[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8]; + out_5119914902696682383[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9]; } -void H_13(double *state, double *unused, double *out_1203933476290211087) { - out_1203933476290211087[0] = 0; - out_1203933476290211087[1] = 0; - out_1203933476290211087[2] = 0; - out_1203933476290211087[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_1203933476290211087[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_1203933476290211087[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; - out_1203933476290211087[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_1203933476290211087[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); - out_1203933476290211087[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; - out_1203933476290211087[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; - out_1203933476290211087[10] = 0; - out_1203933476290211087[11] = 0; - out_1203933476290211087[12] = 0; - out_1203933476290211087[13] = 0; - out_1203933476290211087[14] = 0; - out_1203933476290211087[15] = 0; - out_1203933476290211087[16] = 0; - out_1203933476290211087[17] = 0; - out_1203933476290211087[18] = 0; - out_1203933476290211087[19] = 0; - out_1203933476290211087[20] = 0; - out_1203933476290211087[21] = 0; - out_1203933476290211087[22] = 0; - out_1203933476290211087[23] = 0; - out_1203933476290211087[24] = 0; - out_1203933476290211087[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_1203933476290211087[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_1203933476290211087[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_1203933476290211087[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; - out_1203933476290211087[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; - out_1203933476290211087[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); - out_1203933476290211087[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; - out_1203933476290211087[32] = 0; - out_1203933476290211087[33] = 0; - out_1203933476290211087[34] = 0; - out_1203933476290211087[35] = 0; - out_1203933476290211087[36] = 0; - out_1203933476290211087[37] = 0; - out_1203933476290211087[38] = 0; - out_1203933476290211087[39] = 0; - out_1203933476290211087[40] = 0; - out_1203933476290211087[41] = 0; - out_1203933476290211087[42] = 0; - out_1203933476290211087[43] = 0; - out_1203933476290211087[44] = 0; - out_1203933476290211087[45] = 0; - out_1203933476290211087[46] = 0; - out_1203933476290211087[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_1203933476290211087[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; - out_1203933476290211087[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_1203933476290211087[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_1203933476290211087[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; - out_1203933476290211087[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; - out_1203933476290211087[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); - out_1203933476290211087[54] = 0; - out_1203933476290211087[55] = 0; - out_1203933476290211087[56] = 0; - out_1203933476290211087[57] = 0; - out_1203933476290211087[58] = 0; - out_1203933476290211087[59] = 0; - out_1203933476290211087[60] = 0; - out_1203933476290211087[61] = 0; - out_1203933476290211087[62] = 0; - out_1203933476290211087[63] = 0; - out_1203933476290211087[64] = 0; - out_1203933476290211087[65] = 0; +void H_13(double *state, double *unused, double *out_8634591391102879904) { + out_8634591391102879904[0] = 0; + out_8634591391102879904[1] = 0; + out_8634591391102879904[2] = 0; + out_8634591391102879904[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_8634591391102879904[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8634591391102879904[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; + out_8634591391102879904[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_8634591391102879904[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); + out_8634591391102879904[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; + out_8634591391102879904[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; + out_8634591391102879904[10] = 0; + out_8634591391102879904[11] = 0; + out_8634591391102879904[12] = 0; + out_8634591391102879904[13] = 0; + out_8634591391102879904[14] = 0; + out_8634591391102879904[15] = 0; + out_8634591391102879904[16] = 0; + out_8634591391102879904[17] = 0; + out_8634591391102879904[18] = 0; + out_8634591391102879904[19] = 0; + out_8634591391102879904[20] = 0; + out_8634591391102879904[21] = 0; + out_8634591391102879904[22] = 0; + out_8634591391102879904[23] = 0; + out_8634591391102879904[24] = 0; + out_8634591391102879904[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_8634591391102879904[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_8634591391102879904[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8634591391102879904[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; + out_8634591391102879904[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; + out_8634591391102879904[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); + out_8634591391102879904[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; + out_8634591391102879904[32] = 0; + out_8634591391102879904[33] = 0; + out_8634591391102879904[34] = 0; + out_8634591391102879904[35] = 0; + out_8634591391102879904[36] = 0; + out_8634591391102879904[37] = 0; + out_8634591391102879904[38] = 0; + out_8634591391102879904[39] = 0; + out_8634591391102879904[40] = 0; + out_8634591391102879904[41] = 0; + out_8634591391102879904[42] = 0; + out_8634591391102879904[43] = 0; + out_8634591391102879904[44] = 0; + out_8634591391102879904[45] = 0; + out_8634591391102879904[46] = 0; + out_8634591391102879904[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_8634591391102879904[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; + out_8634591391102879904[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_8634591391102879904[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8634591391102879904[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; + out_8634591391102879904[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; + out_8634591391102879904[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); + out_8634591391102879904[54] = 0; + out_8634591391102879904[55] = 0; + out_8634591391102879904[56] = 0; + out_8634591391102879904[57] = 0; + out_8634591391102879904[58] = 0; + out_8634591391102879904[59] = 0; + out_8634591391102879904[60] = 0; + out_8634591391102879904[61] = 0; + out_8634591391102879904[62] = 0; + out_8634591391102879904[63] = 0; + out_8634591391102879904[64] = 0; + out_8634591391102879904[65] = 0; } -void h_14(double *state, double *unused, double *out_2675503251996688187) { - out_2675503251996688187[0] = state[10]; - out_2675503251996688187[1] = state[11]; - out_2675503251996688187[2] = state[12]; +void h_14(double *state, double *unused, double *out_7267185231670305086) { + out_7267185231670305086[0] = state[10]; + out_7267185231670305086[1] = state[11]; + out_7267185231670305086[2] = state[12]; } -void H_14(double *state, double *unused, double *out_1511121304183005369) { - out_1511121304183005369[0] = 0; - out_1511121304183005369[1] = 0; - out_1511121304183005369[2] = 0; - out_1511121304183005369[3] = 0; - out_1511121304183005369[4] = 0; - out_1511121304183005369[5] = 0; - out_1511121304183005369[6] = 0; - out_1511121304183005369[7] = 0; - out_1511121304183005369[8] = 0; - out_1511121304183005369[9] = 0; - out_1511121304183005369[10] = 1; - out_1511121304183005369[11] = 0; - out_1511121304183005369[12] = 0; - out_1511121304183005369[13] = 0; - out_1511121304183005369[14] = 0; - out_1511121304183005369[15] = 0; - out_1511121304183005369[16] = 0; - out_1511121304183005369[17] = 0; - out_1511121304183005369[18] = 0; - out_1511121304183005369[19] = 0; - out_1511121304183005369[20] = 0; - out_1511121304183005369[21] = 0; - out_1511121304183005369[22] = 0; - out_1511121304183005369[23] = 0; - out_1511121304183005369[24] = 0; - out_1511121304183005369[25] = 0; - out_1511121304183005369[26] = 0; - out_1511121304183005369[27] = 0; - out_1511121304183005369[28] = 0; - out_1511121304183005369[29] = 0; - out_1511121304183005369[30] = 0; - out_1511121304183005369[31] = 0; - out_1511121304183005369[32] = 0; - out_1511121304183005369[33] = 1; - out_1511121304183005369[34] = 0; - out_1511121304183005369[35] = 0; - out_1511121304183005369[36] = 0; - out_1511121304183005369[37] = 0; - out_1511121304183005369[38] = 0; - out_1511121304183005369[39] = 0; - out_1511121304183005369[40] = 0; - out_1511121304183005369[41] = 0; - out_1511121304183005369[42] = 0; - out_1511121304183005369[43] = 0; - out_1511121304183005369[44] = 0; - out_1511121304183005369[45] = 0; - out_1511121304183005369[46] = 0; - out_1511121304183005369[47] = 0; - out_1511121304183005369[48] = 0; - out_1511121304183005369[49] = 0; - out_1511121304183005369[50] = 0; - out_1511121304183005369[51] = 0; - out_1511121304183005369[52] = 0; - out_1511121304183005369[53] = 0; - out_1511121304183005369[54] = 0; - out_1511121304183005369[55] = 0; - out_1511121304183005369[56] = 1; - out_1511121304183005369[57] = 0; - out_1511121304183005369[58] = 0; - out_1511121304183005369[59] = 0; - out_1511121304183005369[60] = 0; - out_1511121304183005369[61] = 0; - out_1511121304183005369[62] = 0; - out_1511121304183005369[63] = 0; - out_1511121304183005369[64] = 0; - out_1511121304183005369[65] = 0; +void H_14(double *state, double *unused, double *out_7556770615208852700) { + out_7556770615208852700[0] = 0; + out_7556770615208852700[1] = 0; + out_7556770615208852700[2] = 0; + out_7556770615208852700[3] = 0; + out_7556770615208852700[4] = 0; + out_7556770615208852700[5] = 0; + out_7556770615208852700[6] = 0; + out_7556770615208852700[7] = 0; + out_7556770615208852700[8] = 0; + out_7556770615208852700[9] = 0; + out_7556770615208852700[10] = 1; + out_7556770615208852700[11] = 0; + out_7556770615208852700[12] = 0; + out_7556770615208852700[13] = 0; + out_7556770615208852700[14] = 0; + out_7556770615208852700[15] = 0; + out_7556770615208852700[16] = 0; + out_7556770615208852700[17] = 0; + out_7556770615208852700[18] = 0; + out_7556770615208852700[19] = 0; + out_7556770615208852700[20] = 0; + out_7556770615208852700[21] = 0; + out_7556770615208852700[22] = 0; + out_7556770615208852700[23] = 0; + out_7556770615208852700[24] = 0; + out_7556770615208852700[25] = 0; + out_7556770615208852700[26] = 0; + out_7556770615208852700[27] = 0; + out_7556770615208852700[28] = 0; + out_7556770615208852700[29] = 0; + out_7556770615208852700[30] = 0; + out_7556770615208852700[31] = 0; + out_7556770615208852700[32] = 0; + out_7556770615208852700[33] = 1; + out_7556770615208852700[34] = 0; + out_7556770615208852700[35] = 0; + out_7556770615208852700[36] = 0; + out_7556770615208852700[37] = 0; + out_7556770615208852700[38] = 0; + out_7556770615208852700[39] = 0; + out_7556770615208852700[40] = 0; + out_7556770615208852700[41] = 0; + out_7556770615208852700[42] = 0; + out_7556770615208852700[43] = 0; + out_7556770615208852700[44] = 0; + out_7556770615208852700[45] = 0; + out_7556770615208852700[46] = 0; + out_7556770615208852700[47] = 0; + out_7556770615208852700[48] = 0; + out_7556770615208852700[49] = 0; + out_7556770615208852700[50] = 0; + out_7556770615208852700[51] = 0; + out_7556770615208852700[52] = 0; + out_7556770615208852700[53] = 0; + out_7556770615208852700[54] = 0; + out_7556770615208852700[55] = 0; + out_7556770615208852700[56] = 1; + out_7556770615208852700[57] = 0; + out_7556770615208852700[58] = 0; + out_7556770615208852700[59] = 0; + out_7556770615208852700[60] = 0; + out_7556770615208852700[61] = 0; + out_7556770615208852700[62] = 0; + out_7556770615208852700[63] = 0; + out_7556770615208852700[64] = 0; + out_7556770615208852700[65] = 0; } -void h_33(double *state, double *unused, double *out_8061952833475180318) { - out_8061952833475180318[0] = state[16]; - out_8061952833475180318[1] = state[17]; - out_8061952833475180318[2] = state[18]; +void h_33(double *state, double *unused, double *out_834113502876921908) { + out_834113502876921908[0] = state[16]; + out_834113502876921908[1] = state[17]; + out_834113502876921908[2] = state[18]; } -void H_33(double *state, double *unused, double *out_4764908111198868966) { - out_4764908111198868966[0] = 0; - out_4764908111198868966[1] = 0; - out_4764908111198868966[2] = 0; - out_4764908111198868966[3] = 0; - out_4764908111198868966[4] = 0; - out_4764908111198868966[5] = 0; - out_4764908111198868966[6] = 0; - out_4764908111198868966[7] = 0; - out_4764908111198868966[8] = 0; - out_4764908111198868966[9] = 0; - out_4764908111198868966[10] = 0; - out_4764908111198868966[11] = 0; - out_4764908111198868966[12] = 0; - out_4764908111198868966[13] = 0; - out_4764908111198868966[14] = 0; - out_4764908111198868966[15] = 0; - out_4764908111198868966[16] = 1; - out_4764908111198868966[17] = 0; - out_4764908111198868966[18] = 0; - out_4764908111198868966[19] = 0; - out_4764908111198868966[20] = 0; - out_4764908111198868966[21] = 0; - out_4764908111198868966[22] = 0; - out_4764908111198868966[23] = 0; - out_4764908111198868966[24] = 0; - out_4764908111198868966[25] = 0; - out_4764908111198868966[26] = 0; - out_4764908111198868966[27] = 0; - out_4764908111198868966[28] = 0; - out_4764908111198868966[29] = 0; - out_4764908111198868966[30] = 0; - out_4764908111198868966[31] = 0; - out_4764908111198868966[32] = 0; - out_4764908111198868966[33] = 0; - out_4764908111198868966[34] = 0; - out_4764908111198868966[35] = 0; - out_4764908111198868966[36] = 0; - out_4764908111198868966[37] = 0; - out_4764908111198868966[38] = 0; - out_4764908111198868966[39] = 1; - out_4764908111198868966[40] = 0; - out_4764908111198868966[41] = 0; - out_4764908111198868966[42] = 0; - out_4764908111198868966[43] = 0; - out_4764908111198868966[44] = 0; - out_4764908111198868966[45] = 0; - out_4764908111198868966[46] = 0; - out_4764908111198868966[47] = 0; - out_4764908111198868966[48] = 0; - out_4764908111198868966[49] = 0; - out_4764908111198868966[50] = 0; - out_4764908111198868966[51] = 0; - out_4764908111198868966[52] = 0; - out_4764908111198868966[53] = 0; - out_4764908111198868966[54] = 0; - out_4764908111198868966[55] = 0; - out_4764908111198868966[56] = 0; - out_4764908111198868966[57] = 0; - out_4764908111198868966[58] = 0; - out_4764908111198868966[59] = 0; - out_4764908111198868966[60] = 0; - out_4764908111198868966[61] = 0; - out_4764908111198868966[62] = 1; - out_4764908111198868966[63] = 0; - out_4764908111198868966[64] = 0; - out_4764908111198868966[65] = 0; +void H_33(double *state, double *unused, double *out_215586660134456453) { + out_215586660134456453[0] = 0; + out_215586660134456453[1] = 0; + out_215586660134456453[2] = 0; + out_215586660134456453[3] = 0; + out_215586660134456453[4] = 0; + out_215586660134456453[5] = 0; + out_215586660134456453[6] = 0; + out_215586660134456453[7] = 0; + out_215586660134456453[8] = 0; + out_215586660134456453[9] = 0; + out_215586660134456453[10] = 0; + out_215586660134456453[11] = 0; + out_215586660134456453[12] = 0; + out_215586660134456453[13] = 0; + out_215586660134456453[14] = 0; + out_215586660134456453[15] = 0; + out_215586660134456453[16] = 1; + out_215586660134456453[17] = 0; + out_215586660134456453[18] = 0; + out_215586660134456453[19] = 0; + out_215586660134456453[20] = 0; + out_215586660134456453[21] = 0; + out_215586660134456453[22] = 0; + out_215586660134456453[23] = 0; + out_215586660134456453[24] = 0; + out_215586660134456453[25] = 0; + out_215586660134456453[26] = 0; + out_215586660134456453[27] = 0; + out_215586660134456453[28] = 0; + out_215586660134456453[29] = 0; + out_215586660134456453[30] = 0; + out_215586660134456453[31] = 0; + out_215586660134456453[32] = 0; + out_215586660134456453[33] = 0; + out_215586660134456453[34] = 0; + out_215586660134456453[35] = 0; + out_215586660134456453[36] = 0; + out_215586660134456453[37] = 0; + out_215586660134456453[38] = 0; + out_215586660134456453[39] = 1; + out_215586660134456453[40] = 0; + out_215586660134456453[41] = 0; + out_215586660134456453[42] = 0; + out_215586660134456453[43] = 0; + out_215586660134456453[44] = 0; + out_215586660134456453[45] = 0; + out_215586660134456453[46] = 0; + out_215586660134456453[47] = 0; + out_215586660134456453[48] = 0; + out_215586660134456453[49] = 0; + out_215586660134456453[50] = 0; + out_215586660134456453[51] = 0; + out_215586660134456453[52] = 0; + out_215586660134456453[53] = 0; + out_215586660134456453[54] = 0; + out_215586660134456453[55] = 0; + out_215586660134456453[56] = 0; + out_215586660134456453[57] = 0; + out_215586660134456453[58] = 0; + out_215586660134456453[59] = 0; + out_215586660134456453[60] = 0; + out_215586660134456453[61] = 0; + out_215586660134456453[62] = 1; + out_215586660134456453[63] = 0; + out_215586660134456453[64] = 0; + out_215586660134456453[65] = 0; } #include #include @@ -1855,77 +1855,77 @@ void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, doub void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_33, H_33, NULL, in_z, in_R, in_ea, MAHA_THRESH_33); } -void live_H(double *in_vec, double *out_8605358087906380768) { - H(in_vec, out_8605358087906380768); +void live_H(double *in_vec, double *out_3996265270042170641) { + H(in_vec, out_3996265270042170641); } -void live_err_fun(double *nom_x, double *delta_x, double *out_7536170868467214378) { - err_fun(nom_x, delta_x, out_7536170868467214378); +void live_err_fun(double *nom_x, double *delta_x, double *out_3461674683723829337) { + err_fun(nom_x, delta_x, out_3461674683723829337); } -void live_inv_err_fun(double *nom_x, double *true_x, double *out_2595613781234485125) { - inv_err_fun(nom_x, true_x, out_2595613781234485125); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_7385553611252329077) { + inv_err_fun(nom_x, true_x, out_7385553611252329077); } -void live_H_mod_fun(double *state, double *out_8460251824602801486) { - H_mod_fun(state, out_8460251824602801486); +void live_H_mod_fun(double *state, double *out_8192941733470122092) { + H_mod_fun(state, out_8192941733470122092); } -void live_f_fun(double *state, double dt, double *out_6356829281411656445) { - f_fun(state, dt, out_6356829281411656445); +void live_f_fun(double *state, double dt, double *out_3557410023905793232) { + f_fun(state, dt, out_3557410023905793232); } -void live_F_fun(double *state, double dt, double *out_8639720302372924628) { - F_fun(state, dt, out_8639720302372924628); +void live_F_fun(double *state, double dt, double *out_8557837785947457076) { + F_fun(state, dt, out_8557837785947457076); } -void live_h_4(double *state, double *unused, double *out_5024870629752735468) { - h_4(state, unused, out_5024870629752735468); +void live_h_4(double *state, double *unused, double *out_1179371322125232753) { + h_4(state, unused, out_1179371322125232753); } -void live_H_4(double *state, double *unused, double *out_1752310950812596014) { - H_4(state, unused, out_1752310950812596014); +void live_H_4(double *state, double *unused, double *out_7315580968579262055) { + H_4(state, unused, out_7315580968579262055); } -void live_h_9(double *state, double *unused, double *out_2675503251996688187) { - h_9(state, unused, out_2675503251996688187); +void live_h_9(double *state, double *unused, double *out_7267185231670305086) { + h_9(state, unused, out_7267185231670305086); } -void live_H_9(double *state, double *unused, double *out_1511121304183005369) { - H_9(state, unused, out_1511121304183005369); +void live_H_9(double *state, double *unused, double *out_7556770615208852700) { + H_9(state, unused, out_7556770615208852700); } -void live_h_10(double *state, double *unused, double *out_7370746392053236487) { - h_10(state, unused, out_7370746392053236487); +void live_h_10(double *state, double *unused, double *out_5095924145481726408) { + h_10(state, unused, out_5095924145481726408); } -void live_H_10(double *state, double *unused, double *out_7385579306469280005) { - H_10(state, unused, out_7385579306469280005); +void live_H_10(double *state, double *unused, double *out_5645866099687886483) { + H_10(state, unused, out_5645866099687886483); } -void live_h_12(double *state, double *unused, double *out_3987271481309322321) { - h_12(state, unused, out_3987271481309322321); +void live_h_12(double *state, double *unused, double *out_2512392799571043135) { + h_12(state, unused, out_2512392799571043135); } -void live_H_12(double *state, double *unused, double *out_1131211925765002347) { - H_12(state, unused, out_1131211925765002347); +void live_H_12(double *state, double *unused, double *out_6111706697098327766) { + H_12(state, unused, out_6111706697098327766); } -void live_h_35(double *state, double *unused, double *out_387267383515705374) { - h_35(state, unused, out_387267383515705374); +void live_h_35(double *state, double *unused, double *out_7549588061413473025) { + h_35(state, unused, out_7549588061413473025); } -void live_H_35(double *state, double *unused, double *out_1614351106560011362) { - H_35(state, unused, out_1614351106560011362); +void live_H_35(double *state, double *unused, double *out_3366143664773314057) { + H_35(state, unused, out_3366143664773314057); } -void live_h_32(double *state, double *unused, double *out_8661748451588242164) { - h_32(state, unused, out_8661748451588242164); +void live_h_32(double *state, double *unused, double *out_1075397825167574537) { + h_32(state, unused, out_1075397825167574537); } -void live_H_32(double *state, double *unused, double *out_7415655478767623920) { - H_32(state, unused, out_7415655478767623920); +void live_H_32(double *state, double *unused, double *out_5548874522593978030) { + H_32(state, unused, out_5548874522593978030); } -void live_h_13(double *state, double *unused, double *out_4888723774468744577) { - h_13(state, unused, out_4888723774468744577); +void live_h_13(double *state, double *unused, double *out_5119914902696682383) { + h_13(state, unused, out_5119914902696682383); } -void live_H_13(double *state, double *unused, double *out_1203933476290211087) { - H_13(state, unused, out_1203933476290211087); +void live_H_13(double *state, double *unused, double *out_8634591391102879904) { + H_13(state, unused, out_8634591391102879904); } -void live_h_14(double *state, double *unused, double *out_2675503251996688187) { - h_14(state, unused, out_2675503251996688187); +void live_h_14(double *state, double *unused, double *out_7267185231670305086) { + h_14(state, unused, out_7267185231670305086); } -void live_H_14(double *state, double *unused, double *out_1511121304183005369) { - H_14(state, unused, out_1511121304183005369); +void live_H_14(double *state, double *unused, double *out_7556770615208852700) { + H_14(state, unused, out_7556770615208852700); } -void live_h_33(double *state, double *unused, double *out_8061952833475180318) { - h_33(state, unused, out_8061952833475180318); +void live_h_33(double *state, double *unused, double *out_834113502876921908) { + h_33(state, unused, out_834113502876921908); } -void live_H_33(double *state, double *unused, double *out_4764908111198868966) { - H_33(state, unused, out_4764908111198868966); +void live_H_33(double *state, double *unused, double *out_215586660134456453) { + H_33(state, unused, out_215586660134456453); } void live_predict(double *in_x, double *in_P, double *in_Q, double dt) { predict(in_x, in_P, in_Q, dt); diff --git a/selfdrive/locationd/models/generated/live.h b/selfdrive/locationd/models/generated/live.h index 2be75ee95..25df43bac 100644 --- a/selfdrive/locationd/models/generated/live.h +++ b/selfdrive/locationd/models/generated/live.h @@ -10,29 +10,29 @@ void live_update_32(double *in_x, double *in_P, double *in_z, double *in_R, doub void live_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); -void live_H(double *in_vec, double *out_8605358087906380768); -void live_err_fun(double *nom_x, double *delta_x, double *out_7536170868467214378); -void live_inv_err_fun(double *nom_x, double *true_x, double *out_2595613781234485125); -void live_H_mod_fun(double *state, double *out_8460251824602801486); -void live_f_fun(double *state, double dt, double *out_6356829281411656445); -void live_F_fun(double *state, double dt, double *out_8639720302372924628); -void live_h_4(double *state, double *unused, double *out_5024870629752735468); -void live_H_4(double *state, double *unused, double *out_1752310950812596014); -void live_h_9(double *state, double *unused, double *out_2675503251996688187); -void live_H_9(double *state, double *unused, double *out_1511121304183005369); -void live_h_10(double *state, double *unused, double *out_7370746392053236487); -void live_H_10(double *state, double *unused, double *out_7385579306469280005); -void live_h_12(double *state, double *unused, double *out_3987271481309322321); -void live_H_12(double *state, double *unused, double *out_1131211925765002347); -void live_h_35(double *state, double *unused, double *out_387267383515705374); -void live_H_35(double *state, double *unused, double *out_1614351106560011362); -void live_h_32(double *state, double *unused, double *out_8661748451588242164); -void live_H_32(double *state, double *unused, double *out_7415655478767623920); -void live_h_13(double *state, double *unused, double *out_4888723774468744577); -void live_H_13(double *state, double *unused, double *out_1203933476290211087); -void live_h_14(double *state, double *unused, double *out_2675503251996688187); -void live_H_14(double *state, double *unused, double *out_1511121304183005369); -void live_h_33(double *state, double *unused, double *out_8061952833475180318); -void live_H_33(double *state, double *unused, double *out_4764908111198868966); +void live_H(double *in_vec, double *out_3996265270042170641); +void live_err_fun(double *nom_x, double *delta_x, double *out_3461674683723829337); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_7385553611252329077); +void live_H_mod_fun(double *state, double *out_8192941733470122092); +void live_f_fun(double *state, double dt, double *out_3557410023905793232); +void live_F_fun(double *state, double dt, double *out_8557837785947457076); +void live_h_4(double *state, double *unused, double *out_1179371322125232753); +void live_H_4(double *state, double *unused, double *out_7315580968579262055); +void live_h_9(double *state, double *unused, double *out_7267185231670305086); +void live_H_9(double *state, double *unused, double *out_7556770615208852700); +void live_h_10(double *state, double *unused, double *out_5095924145481726408); +void live_H_10(double *state, double *unused, double *out_5645866099687886483); +void live_h_12(double *state, double *unused, double *out_2512392799571043135); +void live_H_12(double *state, double *unused, double *out_6111706697098327766); +void live_h_35(double *state, double *unused, double *out_7549588061413473025); +void live_H_35(double *state, double *unused, double *out_3366143664773314057); +void live_h_32(double *state, double *unused, double *out_1075397825167574537); +void live_H_32(double *state, double *unused, double *out_5548874522593978030); +void live_h_13(double *state, double *unused, double *out_5119914902696682383); +void live_H_13(double *state, double *unused, double *out_8634591391102879904); +void live_h_14(double *state, double *unused, double *out_7267185231670305086); +void live_H_14(double *state, double *unused, double *out_7556770615208852700); +void live_h_33(double *state, double *unused, double *out_834113502876921908); +void live_H_33(double *state, double *unused, double *out_215586660134456453); void live_predict(double *in_x, double *in_P, double *in_Q, double dt); } \ No newline at end of file diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index d124eb5f0..650ee0601 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -5,8 +5,7 @@ import json import numpy as np import cereal.messaging as messaging -from cereal import car -from cereal import log +from cereal import car, log from openpilot.common.params import Params from openpilot.common.realtime import config_realtime_process, DT_MDL from openpilot.common.numpy_fast import clip @@ -129,8 +128,7 @@ def main(): params_reader = Params() # wait for stats about the car to come in from controls cloudlog.info("paramsd is waiting for CarParams") - with car.CarParams.from_bytes(params_reader.get("CarParams", block=True)) as msg: - CP = msg + CP = messaging.log_from_bytes(params_reader.get("CarParams", block=True), car.CarParams) cloudlog.info("paramsd got CarParams") min_sr, max_sr = 0.5 * CP.steerRatio, 2.0 * CP.steerRatio diff --git a/selfdrive/locationd/torqued.py b/selfdrive/locationd/torqued.py index 06f904473..ba649b318 100755 --- a/selfdrive/locationd/torqued.py +++ b/selfdrive/locationd/torqued.py @@ -36,8 +36,8 @@ ALLOWED_CARS = ['toyota', 'hyundai'] def slope2rot(slope): - sin = np.sqrt(slope**2 / (slope**2 + 1)) - cos = np.sqrt(1 / (slope**2 + 1)) + sin = np.sqrt(slope ** 2 / (slope ** 2 + 1)) + cos = np.sqrt(1 / (slope ** 2 + 1)) return np.array([[cos, -sin], [sin, cos]]) @@ -50,9 +50,10 @@ class TorqueBuckets(PointBuckets): class TorqueEstimator(ParameterEstimator): - def __init__(self, CP, decimated=False): + def __init__(self, CP, decimated=False, track_all_points=False): self.hist_len = int(HISTORY / DT_MDL) - self.lag = CP.steerActuatorDelay + .2 # from controlsd + self.lag = CP.steerActuatorDelay + .2 # from controlsd + self.track_all_points = track_all_points # for offline analysis, without max lateral accel or max steer torque filters if decimated: self.min_bucket_points = MIN_BUCKET_POINTS / 10 self.min_points_total = MIN_POINTS_TOTAL_QLOG @@ -119,7 +120,8 @@ class TorqueEstimator(ParameterEstimator): for param in initial_params: self.filtered_params[param] = FirstOrderFilter(initial_params[param], self.decay, DT_MDL) - def get_restore_key(self, CP, version): + @staticmethod + def get_restore_key(CP, version): a, b = None, None if CP.lateralTuning.which() == 'torque': a = CP.lateralTuning.torque.friction @@ -135,6 +137,7 @@ class TorqueEstimator(ParameterEstimator): min_points_total=self.min_points_total, points_per_bucket=POINTS_PER_BUCKET, rowsize=3) + self.all_torque_points = [] def estimate_params(self): points = self.filtered_points.get_points(self.fit_points) @@ -159,25 +162,32 @@ class TorqueEstimator(ParameterEstimator): def handle_log(self, t, which, msg): if which == "carControl": self.raw_points["carControl_t"].append(t + self.lag) - self.raw_points["active"].append(msg.latActive) + self.raw_points["lat_active"].append(msg.latActive) elif which == "carOutput": self.raw_points["carOutput_t"].append(t + self.lag) self.raw_points["steer_torque"].append(-msg.actuatorsOutput.steer) elif which == "carState": self.raw_points["carState_t"].append(t + self.lag) + # TODO: check if high aEgo affects resulting lateral accel self.raw_points["vego"].append(msg.vEgo) self.raw_points["steer_override"].append(msg.steeringPressed) + + # calculate lateral accel from past steering torque elif which == "liveLocationKalman": if len(self.raw_points['steer_torque']) == self.hist_len: yaw_rate = msg.angularVelocityCalibrated.value[2] roll = msg.orientationNED.value[0] - active = np.interp(np.arange(t - MIN_ENGAGE_BUFFER, t, DT_MDL), self.raw_points['carControl_t'], self.raw_points['active']).astype(bool) + lat_active = np.interp(np.arange(t - MIN_ENGAGE_BUFFER, t, DT_MDL), self.raw_points['carControl_t'], self.raw_points['lat_active']).astype(bool) steer_override = np.interp(np.arange(t - MIN_ENGAGE_BUFFER, t, DT_MDL), self.raw_points['carState_t'], self.raw_points['steer_override']).astype(bool) vego = np.interp(t, self.raw_points['carState_t'], self.raw_points['vego']) - steer = np.interp(t, self.raw_points['carOutput_t'], self.raw_points['steer_torque']) - lateral_acc = (vego * yaw_rate) - (np.sin(roll) * ACCELERATION_DUE_TO_GRAVITY) - if all(active) and (not any(steer_override)) and (vego > MIN_VEL) and (abs(steer) > STEER_MIN_THRESHOLD) and (abs(lateral_acc) <= LAT_ACC_THRESHOLD): - self.filtered_points.add_point(float(steer), float(lateral_acc)) + steer = np.interp(t, self.raw_points['carOutput_t'], self.raw_points['steer_torque']).item() + lateral_acc = (vego * yaw_rate) - (np.sin(roll) * ACCELERATION_DUE_TO_GRAVITY).item() + if all(lat_active) and not any(steer_override) and (vego > MIN_VEL) and (abs(steer) > STEER_MIN_THRESHOLD): + if abs(lateral_acc) <= LAT_ACC_THRESHOLD: + self.filtered_points.add_point(steer, lateral_acc) + + if self.track_all_points: + self.all_torque_points.append([steer, lateral_acc]) def get_msg(self, valid=True, with_points=False): msg = messaging.new_message('liveTorqueParameters') @@ -223,8 +233,7 @@ def main(demo=False): sm = messaging.SubMaster(['carControl', 'carOutput', 'carState', 'liveLocationKalman'], poll='liveLocationKalman') params = Params() - with car.CarParams.from_bytes(params.get("CarParams", block=True)) as CP: - estimator = TorqueEstimator(CP) + estimator = TorqueEstimator(messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams)) while True: sm.update() @@ -243,8 +252,10 @@ def main(demo=False): msg = estimator.get_msg(valid=sm.all_checks(), with_points=True) params.put_nonblocking("LiveTorqueParameters", msg.to_bytes()) + if __name__ == "__main__": import argparse + parser = argparse.ArgumentParser(description='Process the --demo argument.') parser.add_argument('--demo', action='store_true', help='A boolean for demo mode.') args = parser.parse_args() diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index 1d7611325..96b4f69ee 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -172,8 +172,8 @@ def main(demo=False): if demo: CP = get_demo_car_params() else: - with car.CarParams.from_bytes(params.get("CarParams", block=True)) as msg: - CP = msg + CP = messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams) + cloudlog.info("modeld got CarParams: %s", CP.carName) # TODO this needs more thought, use .2s extra for now to estimate other delays diff --git a/selfdrive/modeld/models/supercombo.thneed b/selfdrive/modeld/models/supercombo.thneed index 30b777e5c..4395df63e 100644 Binary files a/selfdrive/modeld/models/supercombo.thneed and b/selfdrive/modeld/models/supercombo.thneed differ diff --git a/selfdrive/pandad/pandad b/selfdrive/pandad/pandad index 1bdbf413e..097fda004 100755 Binary files a/selfdrive/pandad/pandad and b/selfdrive/pandad/pandad differ diff --git a/selfdrive/pandad/pandad_api_impl.so b/selfdrive/pandad/pandad_api_impl.so index f2416438f..0c6b60730 100755 Binary files a/selfdrive/pandad/pandad_api_impl.so and b/selfdrive/pandad/pandad_api_impl.so differ diff --git a/selfdrive/pandad/tests/test_pandad_usbprotocol b/selfdrive/pandad/tests/test_pandad_usbprotocol new file mode 100755 index 000000000..9e2cd8b8e Binary files /dev/null and b/selfdrive/pandad/tests/test_pandad_usbprotocol differ diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 96161a42d..1635012f3 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -8737e368e17f859291164286feb4246e00c0b4a5 +f6ff3601bd0496e78d8bc3b019d58bb7739f096b \ No newline at end of file diff --git a/selfdrive/ui/_spinner b/selfdrive/ui/_spinner index 631ff0744..6cb9948e2 100755 Binary files a/selfdrive/ui/_spinner and b/selfdrive/ui/_spinner differ diff --git a/selfdrive/ui/_text b/selfdrive/ui/_text index c8eeff7b9..aed780067 100755 Binary files a/selfdrive/ui/_text and b/selfdrive/ui/_text differ diff --git a/selfdrive/ui/installer/installers/installer_openpilot b/selfdrive/ui/installer/installers/installer_openpilot new file mode 100755 index 000000000..9cefbb5fc Binary files /dev/null and b/selfdrive/ui/installer/installers/installer_openpilot differ diff --git a/selfdrive/ui/installer/installers/installer_openpilot_internal b/selfdrive/ui/installer/installers/installer_openpilot_internal new file mode 100755 index 000000000..356169816 Binary files /dev/null and b/selfdrive/ui/installer/installers/installer_openpilot_internal differ diff --git a/selfdrive/ui/installer/installers/installer_openpilot_nightly b/selfdrive/ui/installer/installers/installer_openpilot_nightly new file mode 100755 index 000000000..006736498 Binary files /dev/null and b/selfdrive/ui/installer/installers/installer_openpilot_nightly differ diff --git a/selfdrive/ui/installer/installers/installer_openpilot_test b/selfdrive/ui/installer/installers/installer_openpilot_test new file mode 100755 index 000000000..63603a660 Binary files /dev/null and b/selfdrive/ui/installer/installers/installer_openpilot_test differ diff --git a/selfdrive/ui/mui b/selfdrive/ui/mui new file mode 100755 index 000000000..36f949fff Binary files /dev/null and b/selfdrive/ui/mui differ diff --git a/selfdrive/ui/qt/onroad/annotated_camera.h b/selfdrive/ui/qt/onroad/annotated_camera.h index 18d0c13ba..921848caf 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.h +++ b/selfdrive/ui/qt/onroad/annotated_camera.h @@ -44,7 +44,8 @@ private: PersonalityButton *personality_btn; KnightScanner *knight_scanner; RainbowPath *rainbow_path; - ChevronExt * chevron_ext; + ChevronExt *chevron_ext; + TeTooIndicator *tt_indicator; #endif protected: diff --git a/selfdrive/ui/qt/setup/reset b/selfdrive/ui/qt/setup/reset new file mode 100755 index 000000000..e5b974554 Binary files /dev/null and b/selfdrive/ui/qt/setup/reset differ diff --git a/selfdrive/ui/qt/setup/setup b/selfdrive/ui/qt/setup/setup new file mode 100755 index 000000000..ad00d1a4c Binary files /dev/null and b/selfdrive/ui/qt/setup/setup differ diff --git a/selfdrive/ui/qt/setup/updater b/selfdrive/ui/qt/setup/updater new file mode 100755 index 000000000..fa32334e1 Binary files /dev/null and b/selfdrive/ui/qt/setup/updater differ diff --git a/selfdrive/ui/soundd.py b/selfdrive/ui/soundd.py index 0550a7db9..e0cd7abd6 100644 --- a/selfdrive/ui/soundd.py +++ b/selfdrive/ui/soundd.py @@ -12,6 +12,7 @@ from openpilot.common.retry import retry from openpilot.common.swaglog import cloudlog from openpilot.system import micd +from openpilot.common.params import Params SAMPLE_RATE = 48000 SAMPLE_BUFFER = 4096 # (approx 100ms) @@ -62,6 +63,10 @@ class Soundd: self.spl_filter_weighted = FirstOrderFilter(0, 2.5, FILTER_DT, initialized=False) + params = Params() + self._dp_device_audible_alert_mode = int(params.get("dp_device_audible_alert_mode")) + + def load_sounds(self): self.loaded_sounds: dict[int, np.ndarray] = {} @@ -82,6 +87,13 @@ class Soundd: ret = np.zeros(frames, dtype=np.float32) + # dp - set vol to 0 instead + mute = False + if self._dp_device_audible_alert_mode == 2: + mute = True + elif self._dp_device_audible_alert_mode == 1 and self.current_alert in [AudibleAlert.engage, AudibleAlert.disengage]: + mute = True + if self.current_alert != AudibleAlert.none: num_loops = sound_list[self.current_alert][1] sound_data = self.loaded_sounds[self.current_alert] @@ -97,7 +109,7 @@ class Soundd: written_frames += frames_to_write self.current_sound_frame += frames_to_write - return ret * self.current_volume + return ret * (self.current_volume if not mute else 0) def callback(self, data_out: np.ndarray, frames: int, time, status) -> None: if status: diff --git a/selfdrive/ui/tests/test_translations b/selfdrive/ui/tests/test_translations new file mode 100755 index 000000000..030f7d77d Binary files /dev/null and b/selfdrive/ui/tests/test_translations differ diff --git a/selfdrive/ui/tests/test_ui/run.py b/selfdrive/ui/tests/test_ui/run.py index 1d33c103a..98a600eeb 100644 --- a/selfdrive/ui/tests/test_ui/run.py +++ b/selfdrive/ui/tests/test_ui/run.py @@ -116,7 +116,7 @@ CASES = { TEST_DIR = pathlib.Path(__file__).parent -TEST_OUTPUT_DIR = TEST_DIR / "report" +TEST_OUTPUT_DIR = TEST_DIR / "report_1" SCREENSHOTS_DIR = TEST_OUTPUT_DIR / "screenshots" diff --git a/selfdrive/ui/tests/ui_snapshot b/selfdrive/ui/tests/ui_snapshot new file mode 100755 index 000000000..ae38eb39b Binary files /dev/null and b/selfdrive/ui/tests/ui_snapshot differ diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/main_ar.ts index 0e44d3f29..47c81e96d 100644 --- a/selfdrive/ui/translations/main_ar.ts +++ b/selfdrive/ui/translations/main_ar.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts index ee46501c3..8f115a3b4 100644 --- a/selfdrive/ui/translations/main_de.ts +++ b/selfdrive/ui/translations/main_de.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_es.ts b/selfdrive/ui/translations/main_es.ts index e82cd0b5f..0af8c9a0a 100644 --- a/selfdrive/ui/translations/main_es.ts +++ b/selfdrive/ui/translations/main_es.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/main_fr.ts index 4d556f89c..6ac06fc48 100644 --- a/selfdrive/ui/translations/main_fr.ts +++ b/selfdrive/ui/translations/main_fr.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 94e63eb73..66a332277 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 9c3667547..719e1532d 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 7c85bb35d..d88b0787c 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts index 7e98b1b88..c651dfc18 100644 --- a/selfdrive/ui/translations/main_th.ts +++ b/selfdrive/ui/translations/main_th.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/main_tr.ts index 537197c6f..fd58cd543 100644 --- a/selfdrive/ui/translations/main_tr.ts +++ b/selfdrive/ui/translations/main_tr.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 719b70d6a..d73960977 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -215,6 +215,14 @@ Reboot required. When enabled, openpilot will dynamically change between End-to-End or ACC mode. + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + On-Screen Personality Button @@ -371,6 +379,34 @@ This does not work in China. Internet required. + + Tē-Tôo (Map) + + + + Display Road Name + + + + Display Speed Camera Warning (Taiwan) + + + + When enabled, openpilot will display speed camera warning using offline database. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + Toyota / Lexus @@ -486,6 +522,50 @@ Reboot required. This will also reboot your device. + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. + + DeclinePage diff --git a/selfdrive/ui/translations/main_zh-CHT.qm b/selfdrive/ui/translations/main_zh-CHT.qm index 37b9c6fe3..5f73e048a 100644 Binary files a/selfdrive/ui/translations/main_zh-CHT.qm and b/selfdrive/ui/translations/main_zh-CHT.qm differ diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 77022d47b..fc0afc258 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -224,7 +224,7 @@ Your vehicle must support openpilot longitudinal control. Once activate, the lead vehicle indicator will display an "A" 當速度低於設定值時,openpilot將會切換到指定的「駕駛風格」。 1 km/h = 0.62 mph。 -一旦啟用,前車指示將顯示一個「A」。 +一旦啟用,前車指示將顯示一個「A」 OFF @@ -527,12 +527,100 @@ Reboot Required. Enable Stop and Go (SnG) Hack - + 啟用 Stop and Go (SnG) 修正 When enabled, openpilot will stop sending standstill signal when the car is fully stopped. ONLY WORK ON SOME VEHICLES. Reboot Required. + 啟用後,openpilot 在車輛完全停止時將不再發送停止信號。 +僅適用於部分車輛。 +需要重新啟動。 + + + Display Road Name + 顯示道路名稱 + + + When enabled, openpilot will display live road name using OpenStreetMap data. +Internet required. + 啟用後,openpilot 將使用 OpenStreetMap 資料顯示即時道路名稱。 +需要網路連線。 + + + Display Speed Camera Warning (Taiwan) + 顯示測速照相警告(台灣) + + + Tē-Tôo (Map) + 地圖 + + + When enabled, openpilot will display speed camera warning using offline database. + 啟用後,openpilot 將使用離線資料庫顯示測速照相警告。 + + + Enable Road Condition Detection + + + + When enabled, Dynamic End-to-End will check road condition such as traffic signals, large curve, stop sign. + + + + Speed Camera Warning Threshold + + + + Only show the warning when the speed camera limit is within threshold (+/-) % of the vehicle speed or cruise speed or road limit speed. + + + + % + + + + Enable Auto Shutdown + + + + When enabled, openpilot will shutdown the device automatically. +Reboot required. + + + + Auto Shutdown In + + + + Adjust your shutdown waiting period. + + + + mins + + + + When enabled, openpilot will display live road name using OpenStreetMap data. +DO NOT USE IT WITH COMMA PRIME SUBSCRIPTION. +Internet required. + + + + Warning + + + + Off + + + + Audible Alert Mode + + + + Warning - Only emits sound when there is a warning. +Off - Does not emit any sound at all. @@ -1334,23 +1422,23 @@ This may take up to a minute. Onroad/Offroad Mode - + 上線/離線 模式 Go Offroad - + 切換到離線 Are you sure you want to switch driving mode? - + 您確定要切換模式嗎? CONFIRM - + 確認 Go Onroad - + 切換到上線 diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui index dcbd2f186..b45dd694d 100755 Binary files a/selfdrive/ui/ui and b/selfdrive/ui/ui differ diff --git a/selfdrive/ui/watch3 b/selfdrive/ui/watch3 new file mode 100755 index 000000000..1af744113 Binary files /dev/null and b/selfdrive/ui/watch3 differ diff --git a/system/camerad/camerad b/system/camerad/camerad index a4b9d4bb7..3a09e2a89 100755 Binary files a/system/camerad/camerad and b/system/camerad/camerad differ diff --git a/system/hardware/power_monitoring.py b/system/hardware/power_monitoring.py index 5a94625b4..866f755cc 100644 --- a/system/hardware/power_monitoring.py +++ b/system/hardware/power_monitoring.py @@ -36,6 +36,9 @@ class PowerMonitoring: # Reset capacity if it's low self.car_battery_capacity_uWh = max((CAR_BATTERY_CAPACITY_uWh / 10), int(car_battery_capacity_uWh)) + self.dp_device_auto_shutdown = self.params.get_bool("dp_device_auto_shutdown") + self.dp_device_auto_shutdown_in = int(self.params.get("dp_device_auto_shutdown_in")) * 60 + # Calculation tick def calculate(self, voltage: int | None, ignition: bool): try: @@ -114,6 +117,10 @@ class PowerMonitoring: now = time.monotonic() should_shutdown = False offroad_time = (now - offroad_timestamp) + + if started_seen and self.dp_device_auto_shutdown and offroad_time > self.dp_device_auto_shutdown_in: + return True + low_voltage_shutdown = (self.car_voltage_mV < (VBATT_PAUSE_CHARGING * 1e3) and offroad_time > VOLTAGE_SHUTDOWN_MIN_OFFROAD_TIME_S) should_shutdown |= offroad_time > MAX_TIME_OFFROAD_S diff --git a/system/hardware/tici/id_rsa b/system/hardware/tici/id_rsa new file mode 100644 index 000000000..3f269afe2 --- /dev/null +++ b/system/hardware/tici/id_rsa @@ -0,0 +1,28 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC+iXXq30Tq+J5N +Kat3KWHCzcmwZ55nGh6WggAqECa5CasBlM9VeROpVu3beA+5h0MibRgbD4DMtVXB +t6gEvZ8nd04E7eLA9LTZyFDZ7SkSOVj4oXOQsT0GnJmKrASW5KslTWqVzTfo2XCt +Z+004ikLxmyFeBO8NOcErW1pa8gFdQDToH9FrA7kgysic/XVESTOoe7XlzRoe/eZ +acEQ+jtnmFd21A4aEADkk00Ahjr0uKaJiLUAPatxs2icIXWpgYtfqqtaKF23wSt6 +1OTu6cAwXbOWr3m+IUSRUO0IRzEIQS3z1jfd1svgzSgSSwZ1Lhj4AoKxIEAIc8qJ +rO4uymCJAgMBAAECggEBAISFevxHGdoL3Z5xkw6oO5SQKO2GxEeVhRzNgmu/HA+q +x8OryqD6O1CWY4037kft6iWxlwiLOdwna2P25ueVM3LxqdQH2KS4DmlCx+kq6FwC +gv063fQPMhC9LpWimvaQSPEC7VUPjQlo4tPY6sTTYBUOh0A1ihRm/x7juKuQCWix +Cq8C/DVnB1X4mGj+W3nJc5TwVJtgJbbiBrq6PWrhvB/3qmkxHRL7dU2SBb2iNRF1 +LLY30dJx/cD73UDKNHrlrsjk3UJc29Mp4/MladKvUkRqNwlYxSuAtJV0nZ3+iFkL +s3adSTHdJpClQer45R51rFDlVsDz2ZBpb/hRNRoGDuECgYEA6A1EixLq7QYOh3cb +Xhyh3W4kpVvA/FPfKH1OMy3ONOD/Y9Oa+M/wthW1wSoRL2n+uuIW5OAhTIvIEivj +6bAZsTT3twrvOrvYu9rx9aln4p8BhyvdjeW4kS7T8FP5ol6LoOt2sTP3T1LOuJPO +uQvOjlKPKIMh3c3RFNWTnGzMPa0CgYEA0jNiPLxP3A2nrX0keKDI+VHuvOY88gdh +0W5BuLMLovOIDk9aQFIbBbMuW1OTjHKv9NK+Lrw+YbCFqOGf1dU/UN5gSyE8lX/Q +FsUGUqUZx574nJZnOIcy3ONOnQLcvHAQToLFAGUd7PWgP3CtHkt9hEv2koUwL4vo +ikTP1u9Gkc0CgYEA2apoWxPZrY963XLKBxNQecYxNbLFaWq67t3rFnKm9E8BAICi +4zUaE5J1tMVi7Vi9iks9Ml9SnNyZRQJKfQ+kaebHXbkyAaPmfv+26rqHKboA0uxA +nDOZVwXX45zBkp6g1sdHxJx8JLoGEnkC9eyvSi0C//tRLx86OhLErXwYcNkCf1it +VMRKrWYoXJTUNo6tRhvodM88UnnIo3u3CALjhgU4uC1RTMHV4ZCGBwiAOb8GozSl +s5YD1E1iKwEULloHnK6BIh6P5v8q7J6uf/xdqoKMjlWBHgq6/roxKvkSPA1DOZ3l +jTadcgKFnRUmc+JT9p/ZbCxkA/ALFg8++G+0ghECgYA8vG3M/utweLvq4RI7l7U7 +b+i2BajfK2OmzNi/xugfeLjY6k2tfQGRuv6ppTjehtji2uvgDWkgjJUgPfZpir3I +RsVMUiFgloWGHETOy0Qvc5AwtqTJFLTD1Wza2uBilSVIEsg6Y83Gickh+ejOmEsY +6co17RFaAZHwGfCFFjO76Q== +-----END RSA PRIVATE KEY----- diff --git a/system/logcatd/logcatd b/system/logcatd/logcatd index cfaae8b15..0f8ca71be 100755 Binary files a/system/logcatd/logcatd and b/system/logcatd/logcatd differ diff --git a/system/loggerd/bootlog b/system/loggerd/bootlog index 4273a32f9..38353de58 100755 Binary files a/system/loggerd/bootlog and b/system/loggerd/bootlog differ diff --git a/system/loggerd/encoderd b/system/loggerd/encoderd index 68a4342b9..2beefe3f4 100755 Binary files a/system/loggerd/encoderd and b/system/loggerd/encoderd differ diff --git a/system/loggerd/loggerd b/system/loggerd/loggerd index ec9d44443..be50d11fd 100755 Binary files a/system/loggerd/loggerd and b/system/loggerd/loggerd differ diff --git a/system/loggerd/tests/test_logger b/system/loggerd/tests/test_logger new file mode 100755 index 000000000..f10444b75 Binary files /dev/null and b/system/loggerd/tests/test_logger differ diff --git a/system/manager/manager.py b/system/manager/manager.py index a3e79a96e..560cd9fb2 100755 --- a/system/manager/manager.py +++ b/system/manager/manager.py @@ -75,6 +75,15 @@ def manager_init() -> None: ("dp_toyota_enhanced_bsm", "0"), ("dp_toyota_auto_brake_hold", "0"), ("dp_toyota_sng", "0"), + ("dp_tetoo", "0"), + ("dp_tetoo_data", ""), + ("dp_tetoo_gps", ""), + ("dp_tetoo_speed_camera_taiwan", "0"), + ("dp_tetoo_speed_camera_threshold", "0"), + ("dp_long_de2e_road_condition", "1"), # on by default, depends on dp_long_de2e + ("dp_device_auto_shutdown", "0"), + ("dp_device_auto_shutdown_in", "30"), + ("dp_device_audible_alert_mode", "0"), ] if not PC: default_params.append(("LastUpdateTime", datetime.datetime.now(datetime.UTC).replace(tzinfo=None).isoformat().encode('utf8'))) diff --git a/system/manager/process_config.py b/system/manager/process_config.py index 4956cf72c..3336f2a21 100644 --- a/system/manager/process_config.py +++ b/system/manager/process_config.py @@ -53,6 +53,9 @@ def dp_onroad_uploads(started, params, CP: car.CarParams) -> bool: def dpdmonitoringd(started, params, CP: car.CarParams) -> bool: return params.get_bool("dp_device_dm_unavailable") and started +def tetood(started, params, CP: car.CarParams) -> bool: + return started and (params.get_bool("dp_tetoo") or params.get_bool("dp_tetoo_speed_camera_taiwan")) + procs = [ DaemonProcess("manage_athenad", "system.athena.manage_athenad", "AthenadPid"), @@ -100,6 +103,7 @@ procs = [ #dp PythonProcess("dpdmonitoringd", "dp_ext.selfdrive.monitoring.dmonitoringd", dpdmonitoringd, enabled=not PC), + NativeProcess("tetood", "dp_ext/selfdrive/tetood", ["./tetood"], tetood), ] managed_processes = {p.name: p for p in procs} diff --git a/system/proclogd/proclogd b/system/proclogd/proclogd index 646e5041c..8dc4b3ab6 100755 Binary files a/system/proclogd/proclogd and b/system/proclogd/proclogd differ diff --git a/system/proclogd/tests/test_proclog b/system/proclogd/tests/test_proclog new file mode 100755 index 000000000..996d1edc6 Binary files /dev/null and b/system/proclogd/tests/test_proclog differ diff --git a/system/sensord/sensord b/system/sensord/sensord index c95ea448a..08f11b83b 100755 Binary files a/system/sensord/sensord and b/system/sensord/sensord differ diff --git a/system/ubloxd/tests/test_glonass_runner b/system/ubloxd/tests/test_glonass_runner new file mode 100755 index 000000000..8c88fa603 Binary files /dev/null and b/system/ubloxd/tests/test_glonass_runner differ diff --git a/system/ubloxd/ubloxd b/system/ubloxd/ubloxd index 37fc29fad..d3a35f543 100755 Binary files a/system/ubloxd/ubloxd and b/system/ubloxd/ubloxd differ diff --git a/third_party/acados/acados_template/__pycache__/__init__.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..883d66f41 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/__init__.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/acados_model.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/acados_model.cpython-311.pyc new file mode 100644 index 000000000..221d0871a Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/acados_model.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/acados_ocp.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/acados_ocp.cpython-311.pyc new file mode 100644 index 000000000..191a15319 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/acados_ocp.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/acados_ocp_solver.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/acados_ocp_solver.cpython-311.pyc new file mode 100644 index 000000000..1b30507a7 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/acados_ocp_solver.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/acados_sim.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/acados_sim.cpython-311.pyc new file mode 100644 index 000000000..b553aa2b2 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/acados_sim.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/acados_sim_solver.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/acados_sim_solver.cpython-311.pyc new file mode 100644 index 000000000..79ccfe78d Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/acados_sim_solver.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/builders.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/builders.cpython-311.pyc new file mode 100644 index 000000000..75b371512 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/builders.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/casadi_function_generation.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/casadi_function_generation.cpython-311.pyc new file mode 100644 index 000000000..c2abf13cb Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/casadi_function_generation.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/utils.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/utils.cpython-311.pyc new file mode 100644 index 000000000..80af65492 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/utils.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/__pycache__/zoro_description.cpython-311.pyc b/third_party/acados/acados_template/__pycache__/zoro_description.cpython-311.pyc new file mode 100644 index 000000000..4275b5a07 Binary files /dev/null and b/third_party/acados/acados_template/__pycache__/zoro_description.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/__init__.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 000000000..6b5718a51 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/__init__.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/check_reformulation.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/check_reformulation.cpython-311.pyc new file mode 100644 index 000000000..454469585 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/check_reformulation.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/detect_affine_terms_reduce_nonlinearity.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/detect_affine_terms_reduce_nonlinearity.cpython-311.pyc new file mode 100644 index 000000000..a0c4a0212 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/detect_affine_terms_reduce_nonlinearity.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/detect_gnsf_structure.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/detect_gnsf_structure.cpython-311.pyc new file mode 100644 index 000000000..8e6ff303e Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/detect_gnsf_structure.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/determine_input_nonlinearity_function.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/determine_input_nonlinearity_function.cpython-311.pyc new file mode 100644 index 000000000..b3a8804ae Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/determine_input_nonlinearity_function.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/determine_trivial_gnsf_transcription.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/determine_trivial_gnsf_transcription.cpython-311.pyc new file mode 100644 index 000000000..ea6258925 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/determine_trivial_gnsf_transcription.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_LOS.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_LOS.cpython-311.pyc new file mode 100644 index 000000000..58f32d745 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_LOS.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_invertible_E_mat.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_invertible_E_mat.cpython-311.pyc new file mode 100644 index 000000000..6fcb4e8b7 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/reformulate_with_invertible_E_mat.cpython-311.pyc differ diff --git a/third_party/acados/acados_template/gnsf/__pycache__/structure_detection_print_summary.cpython-311.pyc b/third_party/acados/acados_template/gnsf/__pycache__/structure_detection_print_summary.cpython-311.pyc new file mode 100644 index 000000000..13253fce1 Binary files /dev/null and b/third_party/acados/acados_template/gnsf/__pycache__/structure_detection_print_summary.cpython-311.pyc differ diff --git a/third_party/json11/json11.o b/third_party/json11/json11.o new file mode 100644 index 000000000..7a2363ab0 Binary files /dev/null and b/third_party/json11/json11.o differ diff --git a/third_party/kaitai/kaitaistream.o b/third_party/kaitai/kaitaistream.o new file mode 100644 index 000000000..6555fb617 Binary files /dev/null and b/third_party/kaitai/kaitaistream.o differ diff --git a/third_party/libjson11.a b/third_party/libjson11.a new file mode 100644 index 000000000..467e1c7b8 Binary files /dev/null and b/third_party/libjson11.a differ diff --git a/third_party/libkaitai.a b/third_party/libkaitai.a new file mode 100644 index 000000000..0d4331058 Binary files /dev/null and b/third_party/libkaitai.a differ diff --git a/third_party/libspatialindex/larch64/include/spatialindex/Ball.h b/third_party/libspatialindex/larch64/include/spatialindex/Ball.h new file mode 100644 index 000000000..50299a9a6 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/Ball.h @@ -0,0 +1,98 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Peter Labadorf - plaba3.1415@gmail.com + ****************************************************************************** + * Copyright (c) 2023, Peter Labadorf + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +namespace SpatialIndex +{ + + class SIDX_DLL Ball: public Tools::IObject, public virtual IShape + { + public: + Ball(); + Ball(double radius, const Point& center); + Ball(double radius, const double *pCoords, uint32_t dimension); + Ball(const Ball& b); + ~Ball() override; + + virtual Ball& operator=(const Ball& b); + virtual bool operator==(const Ball& b) const; + + // + // IObject interface + // + + Ball* clone() override; + + // + // ISerializable interface + // + + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t *data) override; + void storeToByteArray(uint8_t **data, uint32_t &length) override; + + // + // IShape interface + // + + bool intersectsShape(const IShape &in) const override; + bool containsShape(const IShape &in) const override; + bool touchesShape(const IShape &in) const override; + void getCenter(SpatialIndex::Point &out) const override; + uint32_t getDimension() const override; + void getMBR(SpatialIndex::Region &out) const override; + double getArea() const override; + double getMinimumDistance(const IShape &in) const override; + + virtual bool containsLineSegment(const SpatialIndex::LineSegment *line) const; + virtual bool containsRegion(const SpatialIndex::Region *region) const; + + inline bool containsPoint(const Point *point) const + { + return getMinimumDistance(*point) <= m_centerPoint.m_dimension; + } + + inline bool containsBall(const Ball *ball) const + { + return getMinimumDistance(ball->m_centerPoint) + ball->m_radius <= m_radius; + } + + public: + double m_radius{0.0}; + Point m_centerPoint; + + }; // Ball + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const Ball& ball); + +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/LineSegment.h b/third_party/libspatialindex/larch64/include/spatialindex/LineSegment.h new file mode 100644 index 000000000..5cd399cee --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/LineSegment.h @@ -0,0 +1,103 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL LineSegment : public Tools::IObject, public virtual IShape + { + public: + LineSegment(); + LineSegment(const double* startPoint, const double* endPoint, uint32_t dimension); + LineSegment(const Point& startPoint, const Point& endPoint); + LineSegment(const LineSegment& l); + ~LineSegment() override; + + virtual LineSegment& operator=(const LineSegment& p); + virtual bool operator==(const LineSegment& p) const; + + // + // IObject interface + // + LineSegment* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& length) override; + + // + // IShape interface + // + bool intersectsShape(const IShape& in) const override; + bool containsShape(const IShape& in) const override; + bool touchesShape(const IShape& in) const override; + void getCenter(Point& out) const override; + uint32_t getDimension() const override; + void getMBR(Region& out) const override; + double getArea() const override; + double getMinimumDistance(const IShape& in) const override; + + virtual bool intersectsLineSegment(const LineSegment& l) const; + virtual bool intersectsRegion(const Region& p) const; + virtual double getMinimumDistance(const Point& p) const; + //virtual double getMinimumDistance(const Region& r) const; + virtual double getRelativeMinimumDistance(const Point& p) const; + virtual double getRelativeMaximumDistance(const Region& r) const; + virtual double getAngleOfPerpendicularRay(); + + virtual void makeInfinite(uint32_t dimension); + virtual void makeDimension(uint32_t dimension); + + public: + uint32_t m_dimension{0}; + double* m_pStartPoint{nullptr}; + double* m_pEndPoint{nullptr}; + + friend class Region; + friend class Point; + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt); + + protected: + + //some helpers for intersects methods + static double doubleAreaTriangle(const Point& a, const Point& b, const Point& c); + static bool leftOf(const Point& a, const Point& b, const Point& c); + static bool collinear(const Point& a, const Point& b, const Point& c); + static bool between(const Point& a, const Point& b, const Point& c); + static bool between(double a, double b, double c); + static bool intersectsProper(const Point& a, const Point& b, const Point& c, const Point& d); + static bool intersects(const Point& a, const Point& b, const Point& c, const Point& d); + + }; // LineSegment + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt); +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/MVRTree.h b/third_party/libspatialindex/larch64/include/spatialindex/MVRTree.h new file mode 100644 index 000000000..492e7428c --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/MVRTree.h @@ -0,0 +1,88 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + namespace MVRTree + { + enum MVRTreeVariant + { + RV_LINEAR = 0x0, + RV_QUADRATIC, + RV_RSTAR + }; + + enum PersistenObjectIdentifier + { + PersistentIndex = 0x1, + PersistentLeaf = 0x2 + }; + + enum RangeQueryType + { + ContainmentQuery = 0x1, + IntersectionQuery = 0x2 + }; + + class SIDX_DLL Data : public IData, public Tools::ISerializable + { + public: + Data(uint32_t len, uint8_t* pData, TimeRegion& r, id_type id); + ~Data() override; + + Data* clone() override; + id_type getIdentifier() const override; + void getShape(IShape** out) const override; + void getData(uint32_t& len, uint8_t** data) const override; + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + id_type m_id; + TimeRegion m_region; + uint8_t* m_pData; + uint32_t m_dataLength; + }; // Data + + SIDX_DLL ISpatialIndex* returnMVRTree(IStorageManager& ind, Tools::PropertySet& in); + SIDX_DLL ISpatialIndex* createNewMVRTree( + IStorageManager& in, + double fillFactor, + uint32_t indexCapacity, + uint32_t leafCapacity, + uint32_t dimension, + MVRTreeVariant rv, + id_type& out_indexIdentifier + ); + SIDX_DLL ISpatialIndex* loadMVRTree( + IStorageManager& in, + id_type indexIdentifier + ); + } +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/MovingPoint.h b/third_party/libspatialindex/larch64/include/spatialindex/MovingPoint.h new file mode 100644 index 000000000..ea9c35fbc --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/MovingPoint.h @@ -0,0 +1,85 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL MovingPoint : public TimePoint, public IEvolvingShape + { + public: + MovingPoint(); + MovingPoint(const double* pCoords, const double* pVCoords, const Tools::IInterval& ti, uint32_t dimension); + MovingPoint(const double* pCoords, const double* pVCoords, double tStart, double tEnd, uint32_t dimension); + MovingPoint(const Point& p, const Point& vp, const Tools::IInterval& ti); + MovingPoint(const Point& p, const Point& vp, double tStart, double tEnd); + MovingPoint(const MovingPoint& p); + ~MovingPoint() override; + + virtual MovingPoint& operator=(const MovingPoint& p); + virtual bool operator==(const MovingPoint& p) const; + + virtual double getCoord(uint32_t index, double t) const; + virtual double getProjectedCoord(uint32_t index, double t) const; + virtual double getVCoord(uint32_t index) const; + virtual void getPointAtTime(double t, Point& out) const; + + // + // IObject interface + // + MovingPoint* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + // + // IEvolvingShape interface + // + void getVMBR(Region& out) const override; + void getMBRAtTime(double t, Region& out) const override; + + void makeInfinite(uint32_t dimension) override; + void makeDimension(uint32_t dimension) override; + + private: + void initialize( + const double* pCoords, const double* pVCoords, + double tStart, double tEnd, uint32_t dimension); + + public: + double* m_pVCoords; + + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt); + }; // MovingPoint + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt); +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/MovingRegion.h b/third_party/libspatialindex/larch64/include/spatialindex/MovingRegion.h new file mode 100644 index 000000000..8f3f0a9d9 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/MovingRegion.h @@ -0,0 +1,166 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL MovingRegion : public TimeRegion, public IEvolvingShape + { + using Region::getLow; + using Region::getHigh; + using TimeRegion::intersectsRegionInTime; + using TimeRegion::containsRegionInTime; + using TimeRegion::combineRegionInTime; + using TimeRegion::getCombinedRegionInTime; + using TimeRegion::containsPointInTime; + + public: + MovingRegion(); + MovingRegion( + const double* pLow, const double* pHigh, + const double* pVLow, const double* pVHigh, + const Tools::IInterval& ti, uint32_t dimension); + MovingRegion( + const double* pLow, const double* pHigh, + const double* pVLow, const double* pVHigh, + double tStart, double tEnd, uint32_t dimension); + MovingRegion( + const Point& low, const Point& high, + const Point& vlow, const Point& vhigh, + const Tools::IInterval& ti); + MovingRegion( + const Point& low, const Point& high, + const Point& vlow, const Point& vhigh, + double tStart, double tEnd); + MovingRegion(const Region& mbr, const Region& vbr, const Tools::IInterval& ivI); + MovingRegion(const Region& mbr, const Region& vbr, double tStart, double tEnd); + MovingRegion(const MovingPoint& low, const MovingPoint& high); + MovingRegion(const MovingRegion& in); + ~MovingRegion() override; + + virtual MovingRegion& operator=(const MovingRegion& r); + virtual bool operator==(const MovingRegion&) const; + + bool isShrinking() const; + + virtual double getLow(uint32_t index, double t) const; + virtual double getHigh(uint32_t index, double t) const; + virtual double getExtrapolatedLow(uint32_t index, double t) const; + virtual double getExtrapolatedHigh(uint32_t index, double t) const; + virtual double getVLow(uint32_t index) const; + virtual double getVHigh(uint32_t index) const; + + virtual bool intersectsRegionInTime(const MovingRegion& r) const; + virtual bool intersectsRegionInTime(const MovingRegion& r, Tools::IInterval& out) const; + virtual bool intersectsRegionInTime(const Tools::IInterval& ivI, const MovingRegion& r, Tools::IInterval& ret) const; + virtual bool containsRegionInTime(const MovingRegion& r) const; + virtual bool containsRegionInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; + virtual bool containsRegionAfterTime(double t, const MovingRegion& r) const; + + virtual double getProjectedSurfaceAreaInTime() const; + virtual double getProjectedSurfaceAreaInTime(const Tools::IInterval& ivI) const; + + virtual double getCenterDistanceInTime(const MovingRegion& r) const; + virtual double getCenterDistanceInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; + + virtual bool intersectsRegionAtTime(double t, const MovingRegion& r) const; + virtual bool containsRegionAtTime(double t, const MovingRegion& r) const; + + virtual bool intersectsPointInTime(const MovingPoint& p) const; + virtual bool intersectsPointInTime(const MovingPoint& p, Tools::IInterval& out) const; + virtual bool intersectsPointInTime(const Tools::IInterval& ivI, const MovingPoint& p, Tools::IInterval& out) const; + virtual bool containsPointInTime(const MovingPoint& p) const; + virtual bool containsPointInTime(const Tools::IInterval& ivI, const MovingPoint& p) const; + + //virtual bool intersectsPointAtTime(double t, const MovingRegion& in) const; + //virtual bool containsPointAtTime(double t, const MovingRegion& in) const; + + virtual void combineRegionInTime(const MovingRegion& r); + virtual void combineRegionAfterTime(double t, const MovingRegion& r); + virtual void getCombinedRegionInTime(MovingRegion& out, const MovingRegion& in) const; + virtual void getCombinedRegionAfterTime(double t, MovingRegion& out, const MovingRegion& in) const; + + virtual double getIntersectingAreaInTime(const MovingRegion& r) const; + virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; + + // + // IObject interface + // + MovingRegion* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + // + // IEvolvingShape interface + // + void getVMBR(Region& out) const override; + void getMBRAtTime(double t, Region& out) const override; + + // + // ITimeShape interface + // + double getAreaInTime() const override; + double getAreaInTime(const Tools::IInterval& ivI) const override; + double getIntersectingAreaInTime(const ITimeShape& r) const override; + double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const override; + + void makeInfinite(uint32_t dimension) override; + void makeDimension(uint32_t dimension) override; + + private: + void initialize( + const double* pLow, const double* pHigh, + const double* pVLow, const double* pVHigh, + double tStart, double tEnd, uint32_t dimension); + + public: + class CrossPoint + { + public: + double m_t; + uint32_t m_dimension; + uint32_t m_boundary; + const MovingRegion* m_to; + + }; // CrossPoint + + public: + double* m_pVLow{nullptr}; + double* m_pVHigh{nullptr}; + + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingRegion& r); + }; // MovingRegion + + typedef Tools::PoolPointer MovingRegionPtr; + SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingRegion& r); +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/Point.h b/third_party/libspatialindex/larch64/include/spatialindex/Point.h new file mode 100644 index 000000000..ff7daccfd --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/Point.h @@ -0,0 +1,87 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "tools/Tools.h" + +namespace SpatialIndex +{ + class SIDX_DLL Point : public Tools::IObject, public virtual IShape + { + public: + Point(); + Point(const double* pCoords, uint32_t dimension); + Point(const Point& p); + ~Point() override; + + virtual Point& operator=(const Point& p); + virtual bool operator==(const Point& p) const; + + // + // IObject interface + // + Point* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& length) override; + + // + // IShape interface + // + bool intersectsShape(const IShape& in) const override; + bool containsShape(const IShape& in) const override; + bool touchesShape(const IShape& in) const override; + void getCenter(Point& out) const override; + uint32_t getDimension() const override; + void getMBR(Region& out) const override; + double getArea() const override; + double getMinimumDistance(const IShape& in) const override; + + virtual double getMinimumDistance(const Point& p) const; + + virtual double getCoordinate(uint32_t index) const; + + virtual void makeInfinite(uint32_t dimension); + virtual void makeDimension(uint32_t dimension); + + public: + uint32_t m_dimension{0}; + double* m_pCoords{nullptr}; + + friend class Region; + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const Point& pt); + }; // Point + + typedef Tools::PoolPointer PointPtr; + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const Point& pt); +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/RTree.h b/third_party/libspatialindex/larch64/include/spatialindex/RTree.h new file mode 100644 index 000000000..03a08ab91 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/RTree.h @@ -0,0 +1,108 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + namespace RTree + { + enum RTreeVariant + { + RV_LINEAR = 0x0, + RV_QUADRATIC, + RV_RSTAR + }; + + enum BulkLoadMethod + { + BLM_STR = 0x0 + }; + + enum PersistenObjectIdentifier + { + PersistentIndex = 0x1, + PersistentLeaf = 0x2 + }; + + enum RangeQueryType + { + ContainmentQuery = 0x1, + IntersectionQuery = 0x2 + }; + + class SIDX_DLL Data : public IData, public Tools::ISerializable + { + public: + Data(uint32_t len, uint8_t* pData, Region& r, id_type id); + ~Data() override; + + Data* clone() override; + id_type getIdentifier() const override; + void getShape(IShape** out) const override; + void getData(uint32_t& len, uint8_t** data) const override; + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + id_type m_id; + Region m_region; + uint8_t* m_pData; + uint32_t m_dataLength; + }; // Data + + SIDX_DLL ISpatialIndex* returnRTree(IStorageManager& ind, Tools::PropertySet& in); + SIDX_DLL ISpatialIndex* createNewRTree( + IStorageManager& sm, + double fillFactor, + uint32_t indexCapacity, + uint32_t leafCapacity, + uint32_t dimension, + RTreeVariant rv, + id_type& indexIdentifier + ); + SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree( + BulkLoadMethod m, + IDataStream& stream, + IStorageManager& sm, + double fillFactor, + uint32_t indexCapacity, + uint32_t leafCapacity, + uint32_t dimension, + RTreeVariant rv, + id_type& indexIdentifier + ); + SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree( + BulkLoadMethod m, + IDataStream& stream, + IStorageManager& sm, + Tools::PropertySet& ps, + id_type& indexIdentifier + ); + SIDX_DLL ISpatialIndex* loadRTree(IStorageManager& in, id_type indexIdentifier); + } +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/Region.h b/third_party/libspatialindex/larch64/include/spatialindex/Region.h new file mode 100644 index 000000000..e0e3df000 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/Region.h @@ -0,0 +1,106 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL Region : public Tools::IObject, public virtual IShape + { + public: + Region(); + Region(const double* pLow, const double* pHigh, uint32_t dimension); + Region(const Point& low, const Point& high); + Region(const Region& in); + ~Region() override; + + virtual Region& operator=(const Region& r); + virtual bool operator==(const Region&) const; + + // + // IObject interface + // + Region* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& length) override; + + // + // IShape interface + // + bool intersectsShape(const IShape& in) const override; + bool containsShape(const IShape& in) const override; + bool touchesShape(const IShape& in) const override; + void getCenter(Point& out) const override; + uint32_t getDimension() const override; + void getMBR(Region& out) const override; + double getArea() const override; + double getMinimumDistance(const IShape& in) const override; + + virtual bool intersectsRegion(const Region& in) const; + virtual bool containsRegion(const Region& in) const; + virtual bool touchesRegion(const Region& in) const; + virtual double getMinimumDistance(const Region& in) const; + + virtual bool intersectsLineSegment(const LineSegment& in) const; + + virtual bool containsPoint(const Point& in) const; + virtual bool touchesPoint(const Point& in) const; + virtual double getMinimumDistance(const Point& in) const; + + virtual Region getIntersectingRegion(const Region& r) const; + virtual double getIntersectingArea(const Region& in) const; + virtual double getMargin() const; + + virtual void combineRegion(const Region& in); + virtual void combinePoint(const Point& in); + virtual void getCombinedRegion(Region& out, const Region& in) const; + + virtual double getLow(uint32_t index) const; + virtual double getHigh(uint32_t index) const; + + virtual void makeInfinite(uint32_t dimension); + virtual void makeDimension(uint32_t dimension); + + private: + void initialize(const double* pLow, const double* pHigh, uint32_t dimension); + + public: + uint32_t m_dimension{0}; + double* m_pLow{nullptr}; + double* m_pHigh{nullptr}; + + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const Region& r); + }; // Region + + typedef Tools::PoolPointer RegionPtr; + SIDX_DLL std::ostream& operator<<(std::ostream& os, const Region& r); +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/SpatialIndex.h b/third_party/libspatialindex/larch64/include/spatialindex/SpatialIndex.h new file mode 100644 index 000000000..48dcc615a --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/SpatialIndex.h @@ -0,0 +1,265 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "tools/Tools.h" + +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661922 +#endif + +namespace SpatialIndex +{ + class Point; + class Ball; + class LineSegment; + class Region; + + + typedef int64_t id_type; + + enum CommandType + { + CT_NODEREAD = 0x0, + CT_NODEDELETE, + CT_NODEWRITE + }; + + class SIDX_DLL InvalidPageException : public Tools::Exception + { + public: + InvalidPageException(id_type id); + ~InvalidPageException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // InvalidPageException + + // + // Interfaces + // + + class SIDX_DLL IShape : public Tools::ISerializable + { + public: + virtual bool intersectsShape(const IShape& in) const = 0; + virtual bool containsShape(const IShape& in) const = 0; + virtual bool touchesShape(const IShape& in) const = 0; + virtual void getCenter(Point& out) const = 0; + virtual uint32_t getDimension() const = 0; + virtual void getMBR(Region& out) const = 0; + virtual double getArea() const = 0; + virtual double getMinimumDistance(const IShape& in) const = 0; + ~IShape() override = default; + }; // IShape + + class SIDX_DLL ITimeShape : public Tools::IInterval + { + public: + virtual bool intersectsShapeInTime(const ITimeShape& in) const = 0; + virtual bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; + virtual bool containsShapeInTime(const ITimeShape& in) const = 0; + virtual bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; + virtual bool touchesShapeInTime(const ITimeShape& in) const = 0; + virtual bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; + virtual double getAreaInTime() const = 0; + virtual double getAreaInTime(const Tools::IInterval& ivI) const = 0; + virtual double getIntersectingAreaInTime(const ITimeShape& r) const = 0; + virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const = 0; + ~ITimeShape() override = default; + }; // ITimeShape + + class SIDX_DLL IEvolvingShape + { + public: + virtual void getVMBR(Region& out) const = 0; + virtual void getMBRAtTime(double t, Region& out) const = 0; + virtual ~IEvolvingShape() = default; + }; // IEvolvingShape + + class SIDX_DLL IEntry : public Tools::IObject + { + public: + virtual id_type getIdentifier() const = 0; + virtual void getShape(IShape** out) const = 0; + ~IEntry() override = default; + }; // IEntry + + class SIDX_DLL INode : public IEntry, public Tools::ISerializable + { + public: + virtual uint32_t getChildrenCount() const = 0; + virtual id_type getChildIdentifier(uint32_t index) const = 0; + virtual void getChildData(uint32_t index, uint32_t& len, uint8_t** data) const = 0; + virtual void getChildShape(uint32_t index, IShape** out) const = 0; + virtual uint32_t getLevel() const = 0; + virtual bool isIndex() const = 0; + virtual bool isLeaf() const = 0; + ~INode() override = default; + }; // INode + + class SIDX_DLL IData : public IEntry + { + public: + virtual void getData(uint32_t& len, uint8_t** data) const = 0; + ~IData() override = default; + }; // IData + + class SIDX_DLL IDataStream : public Tools::IObjectStream + { + public: + IData* getNext() override = 0; + ~IDataStream() override = default; + }; // IDataStream + + class SIDX_DLL ICommand + { + public: + virtual void execute(const INode& in) = 0; + virtual ~ICommand() = default; + }; // ICommand + + class SIDX_DLL INearestNeighborComparator + { + public: + virtual double getMinimumDistance(const IShape& query, const IShape& entry) = 0; + virtual double getMinimumDistance(const IShape& query, const IData& data) = 0; + virtual ~INearestNeighborComparator() = default; + }; // INearestNeighborComparator + + class SIDX_DLL IStorageManager + { + public: + virtual void loadByteArray(const id_type id, uint32_t& len, uint8_t** data) = 0; + virtual void storeByteArray(id_type& id, const uint32_t len, const uint8_t* const data) = 0; + virtual void deleteByteArray(const id_type id) = 0; + virtual void flush() = 0; + virtual ~IStorageManager() = default; + }; // IStorageManager + + class SIDX_DLL IVisitor + { + public: + virtual void visitNode(const INode& in) = 0; + virtual void visitData(const IData& in) = 0; + virtual void visitData(std::vector& v) = 0; + virtual ~IVisitor() = default; + }; // IVisitor + + class SIDX_DLL IQueryStrategy + { + public: + virtual void getNextEntry(const IEntry& previouslyFetched, id_type& nextEntryToFetch, bool& bFetchNextEntry) = 0; + virtual ~IQueryStrategy() = default; + }; // IQueryStrategy + + class SIDX_DLL IStatistics + { + public: + virtual uint64_t getReads() const = 0; + virtual uint64_t getWrites() const = 0; + virtual uint32_t getNumberOfNodes() const = 0; + virtual uint64_t getNumberOfData() const = 0; + virtual ~IStatistics() = default; + }; // IStatistics + + class SIDX_DLL ISpatialIndex + { + public: + virtual void insertData(uint32_t len, const uint8_t* pData, const IShape& shape, id_type shapeIdentifier) = 0; + virtual bool deleteData(const IShape& shape, id_type shapeIdentifier) = 0; + virtual void internalNodesQuery(const IShape& query, IVisitor& v) = 0; + virtual void containsWhatQuery(const IShape& query, IVisitor& v) = 0; + virtual void intersectsWithQuery(const IShape& query, IVisitor& v) = 0; + virtual void pointLocationQuery(const Point& query, IVisitor& v) = 0; + virtual void nearestNeighborQuery(uint32_t k, const IShape& query, IVisitor& v, INearestNeighborComparator& nnc) = 0; + virtual void nearestNeighborQuery(uint32_t k, const IShape& query, IVisitor& v) = 0; + virtual void selfJoinQuery(const IShape& s, IVisitor& v) = 0; + virtual void queryStrategy(IQueryStrategy& qs) = 0; + virtual void getIndexProperties(Tools::PropertySet& out) const = 0; + virtual void addCommand(ICommand* in, CommandType ct) = 0; + virtual bool isIndexValid() = 0; + virtual void getStatistics(IStatistics** out) const = 0; + virtual void flush() = 0; + virtual ~ISpatialIndex() = default; + + }; // ISpatialIndex + + namespace StorageManager + { + enum StorageManagerConstants + { + EmptyPage = -0x1, + NewPage = -0x1 + }; + + class SIDX_DLL IBuffer : public IStorageManager + { + public: + virtual uint64_t getHits() = 0; + virtual void clear() = 0; + ~IBuffer() override = default; + }; // IBuffer + + SIDX_DLL IStorageManager* returnMemoryStorageManager(Tools::PropertySet& in); + SIDX_DLL IStorageManager* createNewMemoryStorageManager(); + + SIDX_DLL IStorageManager* returnDiskStorageManager(Tools::PropertySet& in); + SIDX_DLL IStorageManager* createNewDiskStorageManager(std::string& baseName, uint32_t pageSize); + SIDX_DLL IStorageManager* loadDiskStorageManager(std::string& baseName); + + SIDX_DLL IBuffer* returnRandomEvictionsBuffer(IStorageManager& ind, Tools::PropertySet& in); + SIDX_DLL IBuffer* createNewRandomEvictionsBuffer(IStorageManager& in, uint32_t capacity, bool bWriteThrough); + } + + // + // Global functions + // + SIDX_DLL std::ostream& operator<<(std::ostream&, const ISpatialIndex&); + SIDX_DLL std::ostream& operator<<(std::ostream&, const IStatistics&); +} + +#include "Point.h" +#include "Region.h" +#include "Ball.h" +#include "LineSegment.h" +#include "TimePoint.h" +#include "TimeRegion.h" +#include "MovingPoint.h" +#include "MovingRegion.h" +#include "RTree.h" +#include "MVRTree.h" +#include "TPRTree.h" +#include "Version.h" + + +// typedef SpatialIndex::Tools::PoolPointer RegionPtr; +// typedef SpatialIndex::Tools::PoolPointer PointPtr; +// typedef SpatialIndex::Tools::PoolPointer TimeRegionPtr; +// typedef SpatialIndex::Tools::PoolPointer MovingRegionPtr; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/TPRTree.h b/third_party/libspatialindex/larch64/include/spatialindex/TPRTree.h new file mode 100644 index 000000000..7b743f94f --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/TPRTree.h @@ -0,0 +1,85 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + + +#pragma once + +namespace SpatialIndex +{ + namespace TPRTree + { + enum TPRTreeVariant + { + TPRV_RSTAR = 0x2 + }; + + enum PersistenObjectIdentifier + { + PersistentIndex = 0x1, + PersistentLeaf = 0x2 + }; + + enum RangeQueryType + { + ContainmentQuery = 0x1, + IntersectionQuery = 0x2 + }; + + class SIDX_DLL Data : public IData, public Tools::ISerializable + { + public: + Data(uint32_t len, uint8_t* pData, MovingRegion& r, id_type id); + ~Data() override; + + Data* clone() override; + id_type getIdentifier() const override; + void getShape(IShape** out) const override; + void getData(uint32_t& len, uint8_t** data) const override; + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + id_type m_id; + MovingRegion m_region; + uint8_t* m_pData; + uint32_t m_dataLength; + }; // Data + + SIDX_DLL ISpatialIndex* returnTPRTree(IStorageManager& ind, Tools::PropertySet& in); + SIDX_DLL ISpatialIndex* createNewTPRTree( + IStorageManager& sm, + double fillFactor, + uint32_t indexCapacity, + uint32_t leafCapacity, + uint32_t dimension, + TPRTreeVariant rv, + double horizon, + id_type& indexIdentifier + ); + SIDX_DLL ISpatialIndex* loadTPRTree(IStorageManager& in, id_type indexIdentifier); + } +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/TimePoint.h b/third_party/libspatialindex/larch64/include/spatialindex/TimePoint.h new file mode 100644 index 000000000..5db346c13 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/TimePoint.h @@ -0,0 +1,95 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL TimePoint : public Point, public ITimeShape + { + public: + TimePoint(); + TimePoint(const double* pCoords, const Tools::IInterval& ti, uint32_t dimension); + TimePoint(const double* pCoords, double tStart, double tEnd, uint32_t dimension); + TimePoint(const Point& p, const Tools::IInterval& ti); + TimePoint(const Point& p, double tStart, double tEnd); + TimePoint(const TimePoint& p); + ~TimePoint() override; + + virtual TimePoint& operator=(const TimePoint& p); + virtual bool operator==(const TimePoint& p) const; + + // + // IObject interface + // + TimePoint* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + // + // ITimeShape interface + // + bool intersectsShapeInTime(const ITimeShape& in) const override; + bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + bool containsShapeInTime(const ITimeShape& in) const override; + bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + bool touchesShapeInTime(const ITimeShape& in) const override; + bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + double getAreaInTime() const override; + double getAreaInTime(const Tools::IInterval& ivI) const override; + double getIntersectingAreaInTime(const ITimeShape& r) const override; + double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const override; + + // + // IInterval interface + // + virtual Tools::IInterval& operator=(const Tools::IInterval&); + double getLowerBound() const override; + double getUpperBound() const override; + void setBounds(double, double) override; + bool intersectsInterval(const Tools::IInterval& ti) const override; + bool intersectsInterval(Tools::IntervalType t, const double start, const double end) const override; + bool containsInterval(const Tools::IInterval& ti) const override; + Tools::IntervalType getIntervalType() const override; + + void makeInfinite(uint32_t dimension) override; + void makeDimension(uint32_t dimension) override; + + public: + double m_startTime; + double m_endTime; + + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimePoint& pt); + }; // TimePoint + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimePoint& pt); +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/TimeRegion.h b/third_party/libspatialindex/larch64/include/spatialindex/TimeRegion.h new file mode 100644 index 000000000..1da0ad9ca --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/TimeRegion.h @@ -0,0 +1,109 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +namespace SpatialIndex +{ + class SIDX_DLL TimeRegion : public Region, public ITimeShape + { + public: + TimeRegion(); + TimeRegion(const double* pLow, const double* pHigh, const Tools::IInterval& ti, uint32_t dimension); + TimeRegion(const double* pLow, const double* pHigh, double tStart, double tEnd, uint32_t dimension); + TimeRegion(const Point& low, const Point& high, const Tools::IInterval& ti); + TimeRegion(const Point& low, const Point& high, double tStart, double tEnd); + TimeRegion(const Region& in, const Tools::IInterval& ti); + TimeRegion(const Region& in, double tStart, double tEnd); + TimeRegion(const TimePoint& low, const TimePoint& high); + TimeRegion(const TimeRegion& in); + ~TimeRegion() override; + + virtual TimeRegion& operator=(const TimeRegion& r); + virtual bool operator==(const TimeRegion&) const; + + virtual bool intersectsRegionInTime(const TimeRegion& in) const; + virtual bool containsRegionInTime(const TimeRegion& in) const; + virtual bool touchesRegionInTime(const TimeRegion& in) const; + + virtual bool containsPointInTime(const TimePoint& in) const; + virtual bool touchesPointInTime(const TimePoint& in) const; + + virtual void combineRegionInTime(const TimeRegion& in); + virtual void getCombinedRegionInTime(TimeRegion& out, const TimeRegion& in) const; + + // + // IObject interface + // + TimeRegion* clone() override; + + // + // ISerializable interface + // + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& len) override; + + // + // ITimeShape interface + // + bool intersectsShapeInTime(const ITimeShape& in) const override; + bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + bool containsShapeInTime(const ITimeShape& in) const override; + bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + bool touchesShapeInTime(const ITimeShape& in) const override; + bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const override; + double getAreaInTime() const override; + double getAreaInTime(const Tools::IInterval& ivI) const override; + double getIntersectingAreaInTime(const ITimeShape& r) const override; + double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const override; + + // + // IInterval interface + // + virtual Tools::IInterval& operator=(const Tools::IInterval&); + double getLowerBound() const override; + double getUpperBound() const override; + void setBounds(double, double) override; + bool intersectsInterval(const Tools::IInterval& ti) const override; + bool intersectsInterval(Tools::IntervalType t, const double start, const double end) const override; + bool containsInterval(const Tools::IInterval& ti) const override; + Tools::IntervalType getIntervalType() const override; + + void makeInfinite(uint32_t dimension) override; + void makeDimension(uint32_t dimension) override; + + public: + double m_startTime; + double m_endTime; + + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimeRegion& r); + }; // TimeRegion + + typedef Tools::PoolPointer TimeRegionPtr; + SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimeRegion& r); +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/Version.h b/third_party/libspatialindex/larch64/include/spatialindex/Version.h new file mode 100644 index 000000000..b90268f83 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/Version.h @@ -0,0 +1,48 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2003, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#ifndef SIDX_VERSION_MAJOR +#define SIDX_VERSION_MAJOR 2 +#define SIDX_VERSION_MINOR 0 +#define SIDX_VERSION_REV 0 +#define SIDX_VERSION_BUILD 0 +#endif + +#ifndef SIDX_VERSION_NUM +#define SIDX_VERSION_NUM (SIDX_VERSION_MAJOR*1000+SIDX_VERSION_MINOR*100+SIDX_VERSION_REV*10+SIDX_VERSION_BUILD) +#endif + +#ifndef SIDX_RELEASE_DATE +#define SIDX_RELEASE_DATE 20240517 +#endif + +#ifndef SIDX_RELEASE_NAME +#define SIDX_RELEASE_NAME "2.0.0" +#endif + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/BoundsQuery.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/BoundsQuery.h new file mode 100644 index 000000000..79fdcb82d --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/BoundsQuery.h @@ -0,0 +1,48 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement the bounds query. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL BoundsQuery : public SpatialIndex::IQueryStrategy +{ +private: + SpatialIndex::Region* m_bounds; + +public: + + BoundsQuery(); + ~BoundsQuery() { if (m_bounds != 0) delete m_bounds; } + void getNextEntry( const SpatialIndex::IEntry& entry, + SpatialIndex::id_type& nextEntry, + bool& hasNext); + + SpatialIndex::Region* GetBounds() const { return m_bounds; } +}; + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/CountVisitor.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/CountVisitor.h new file mode 100644 index 000000000..eaaee8dd2 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/CountVisitor.h @@ -0,0 +1,48 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ objects to implement the count visitor. + * Author: Leonard Norrgård, leonard.norrgard@refactor.fi + ****************************************************************************** + * Copyright (c) 2010, Leonard Norrgård + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL CountVisitor : public SpatialIndex::IVisitor +{ +private: + uint64_t nResults; + +public: + + CountVisitor(); + ~CountVisitor(); + + uint64_t GetResultCount() const { return nResults; } + + void visitNode(const SpatialIndex::INode& n); + void visitData(const SpatialIndex::IData& d); + void visitData(std::vector& v); +}; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/CustomStorage.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/CustomStorage.h new file mode 100644 index 000000000..fa670206b --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/CustomStorage.h @@ -0,0 +1,84 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement the custom storage manager. + * Author: Matthias (nitro), nitro@dr-code.org + ****************************************************************************** + * Copyright (c) 2010, Matthias (nitro) + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +namespace SpatialIndex +{ + namespace StorageManager + { + struct SIDX_DLL CustomStorageManagerCallbacks + { + CustomStorageManagerCallbacks() + : context(0) + , createCallback(0) + , destroyCallback(0) + , loadByteArrayCallback(0) + , storeByteArrayCallback(0) + , deleteByteArrayCallback(0) + {} + + void* context; + void (*createCallback)( const void* context, int* errorCode ); + void (*destroyCallback)( const void* context, int* errorCode ); + void (*flushCallback)( const void* context, int* errorCode ); + void (*loadByteArrayCallback)( const void* context, const id_type page, uint32_t* len, uint8_t** data, int* errorCode ); + void (*storeByteArrayCallback)( const void* context, id_type* page, const uint32_t len, const uint8_t* const data, int* errorCode ); + void (*deleteByteArrayCallback)( const void* context, const id_type page, int* errorCode ); + }; + + class SIDX_DLL CustomStorageManager : public SpatialIndex::IStorageManager + { + public: + // I'd like this to be an enum, but casting between enums and ints is not nice + static const int NoError = 0; + static const int InvalidPageError = 1; + static const int IllegalStateError = 2; + + CustomStorageManager(Tools::PropertySet&); + + virtual ~CustomStorageManager(); + + virtual void flush(); + virtual void loadByteArray(const id_type page, uint32_t& len, uint8_t** data); + virtual void storeByteArray(id_type& page, const uint32_t len, const uint8_t* const data); + virtual void deleteByteArray(const id_type page); + + private: + CustomStorageManagerCallbacks callbacks; + + inline void processErrorCode(int errorCode, const id_type page); + }; // CustomStorageManager + + // factory function + IStorageManager* returnCustomStorageManager(Tools::PropertySet& in); + } +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/DataStream.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/DataStream.h new file mode 100644 index 000000000..3334faff6 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/DataStream.h @@ -0,0 +1,56 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: Declarations to support stream loading via C API + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL DataStream : public SpatialIndex::IDataStream +{ +public: + DataStream(int (*readNext)(SpatialIndex::id_type* id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength)); + ~DataStream(); + + SpatialIndex::IData* getNext(); + bool hasNext(); + + uint32_t size(); + void rewind(); + +protected: + SpatialIndex::RTree::Data* m_pNext; + SpatialIndex::id_type m_id; + +private: + int (*iterfunct)(SpatialIndex::id_type *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength); + + bool readData(); + bool m_bDoneReading; + +}; + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/Error.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/Error.h new file mode 100644 index 000000000..e8cc647d6 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/Error.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement the error object. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL Error +{ +public: + + Error(int code, std::string const& message, std::string const& method); + + /// Copy constructor. + Error(Error const& other); + + /// Assignment operator. + Error& operator=(Error const& rhs); + + int GetCode() const { return m_code; } + const char* GetMessage() const { return m_message.c_str(); } + const char* GetMethod() const { return m_method.c_str(); } + +private: + + int m_code; + std::string m_message; + std::string m_method; +}; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/IdVisitor.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/IdVisitor.h new file mode 100644 index 000000000..959680529 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/IdVisitor.h @@ -0,0 +1,50 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement a query ids only. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL IdVisitor : public SpatialIndex::IVisitor +{ +private: + std::vector m_vector; + uint64_t nResults; + +public: + + IdVisitor(); + ~IdVisitor(); + + uint64_t GetResultCount() const { return nResults; } + std::vector& GetResults() { return m_vector; } + + void visitNode(const SpatialIndex::INode& n); + void visitData(const SpatialIndex::IData& d); + void visitData(std::vector& v); +}; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/Index.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/Index.h new file mode 100644 index 000000000..1820850ac --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/Index.h @@ -0,0 +1,82 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement the wrapper. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + + +#include "sidx_export.h" + +class SIDX_DLL Index +{ + +public: + Index(const Tools::PropertySet& poProperties); + Index(const Tools::PropertySet& poProperties, int (*readNext)(SpatialIndex::id_type *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t* nDataLength)); + ~Index(); + + const Tools::PropertySet GetProperties() { index().getIndexProperties(m_properties); return m_properties;} + + bool insertFeature(uint64_t id, double *min, double *max); + + RTIndexType GetIndexType(); + void SetIndexType(RTIndexType v); + + RTStorageType GetIndexStorage(); + void SetIndexStorage(RTStorageType v); + + RTIndexVariant GetIndexVariant(); + void SetIndexVariant(RTIndexVariant v); + + int64_t GetResultSetOffset(); + void SetResultSetOffset(int64_t v); + + int64_t GetResultSetLimit(); + void SetResultSetLimit(int64_t v); + + void flush(); + + SpatialIndex::ISpatialIndex& index() {return *m_rtree;} + SpatialIndex::StorageManager::IBuffer& buffer() {return *m_buffer;} + +private: + + Index& operator=(const Index&); + Index(); + + void Initialize(); + SpatialIndex::IStorageManager* m_storage; + SpatialIndex::StorageManager::IBuffer* m_buffer; + SpatialIndex::ISpatialIndex* m_rtree; + + Tools::PropertySet m_properties; + + void Setup(); + SpatialIndex::IStorageManager* CreateStorage(); + SpatialIndex::StorageManager::IBuffer* CreateIndexBuffer(SpatialIndex::IStorageManager& storage); + SpatialIndex::ISpatialIndex* CreateIndex(); +}; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/LeafQuery.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/LeafQuery.h new file mode 100644 index 000000000..9f30a0f3e --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/LeafQuery.h @@ -0,0 +1,73 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement a query of the index's leaves. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class LeafQueryResult; + +class SIDX_DLL LeafQuery : public SpatialIndex::IQueryStrategy +{ +private: + std::queue m_ids; + std::vector m_results; +public: + + LeafQuery(); + ~LeafQuery() { } + void getNextEntry( const SpatialIndex::IEntry& entry, + SpatialIndex::id_type& nextEntry, + bool& hasNext); + std::vector const& GetResults() const {return m_results;} +}; + +class SIDX_DLL LeafQueryResult +{ +private: + std::vector ids; + SpatialIndex::Region* bounds; + SpatialIndex::id_type m_id; + LeafQueryResult(); +public: + LeafQueryResult(SpatialIndex::id_type id) : bounds(0), m_id(id){} + ~LeafQueryResult() {if (bounds!=0) delete bounds;} + + /// Copy constructor. + LeafQueryResult(LeafQueryResult const& other); + + /// Assignment operator. + LeafQueryResult& operator=(LeafQueryResult const& rhs); + + std::vector const& GetIDs() const; + void SetIDs(std::vector& v); + const SpatialIndex::Region* GetBounds() const; + void SetBounds(const SpatialIndex::Region* b); + SpatialIndex::id_type getIdentifier() const {return m_id;} + void setIdentifier(uint32_t v) {m_id = v;} +}; diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/ObjVisitor.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/ObjVisitor.h new file mode 100644 index 000000000..2c27d5a2c --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/ObjVisitor.h @@ -0,0 +1,51 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement the object visitor. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "sidx_export.h" + +class SIDX_DLL ObjVisitor : public SpatialIndex::IVisitor +{ +private: + std::vector m_vector; + uint64_t nResults; + +public: + + ObjVisitor(); + ~ObjVisitor(); + + uint64_t GetResultCount() const { return nResults; } + std::vector& GetResults() { return m_vector; } + + void visitNode(const SpatialIndex::INode& n); + void visitData(const SpatialIndex::IData& d); + void visitData(std::vector& v); +}; + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/Utility.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/Utility.h new file mode 100644 index 000000000..9962ceb4f --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/Utility.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement utilities. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#include "ObjVisitor.h" +#include "IdVisitor.h" +#include "sidx_export.h" + +#pragma once + +SIDX_DLL Tools::PropertySet* GetDefaults(); + +SIDX_DLL void Page_ResultSet_Ids(IdVisitor& visitor, int64_t** ids, int64_t nStart, int64_t nResultLimit, uint64_t* nResults); +SIDX_DLL void Page_ResultSet_Obj(ObjVisitor& visitor, IndexItemH** items, int64_t nStart, int64_t nResultLimit, uint64_t* nResults); diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_api.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_api.h new file mode 100644 index 000000000..15e3696c4 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_api.h @@ -0,0 +1,395 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C API. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#ifndef SIDX_API_H_INCLUDED +#define SIDX_API_H_INCLUDED + +#define SIDX_C_API 1 + +#include "sidx_config.h" + +#include + +IDX_C_START + +SIDX_DLL IndexH Index_Create(IndexPropertyH properties); + +SIDX_DLL IndexH Index_CreateWithStream( IndexPropertyH properties, + int (*readNext)(int64_t *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength) + ); + +SIDX_DLL void Index_Destroy(IndexH index); +SIDX_DLL IndexPropertyH Index_GetProperties(IndexH index); + +SIDX_DLL RTError Index_DeleteData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + uint32_t nDimension); + +SIDX_C_DLL RTError Index_DeleteTPData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension + ); + +SIDX_C_DLL RTError Index_DeleteMVRData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension + ); + +SIDX_DLL RTError Index_InsertData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + uint32_t nDimension, + const uint8_t* pData, + size_t nDataLength); + +SIDX_C_DLL RTError Index_InsertTPData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + const uint8_t* pData, + size_t nDataLength); + +SIDX_C_DLL RTError Index_InsertMVRData( IndexH index, + int64_t id, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + const uint8_t* pData, + size_t nDataLength); + +SIDX_DLL uint32_t Index_IsValid(IndexH index); + +SIDX_C_DLL RTError Index_TPIntersects_obj( IndexH index, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_MVRIntersects_obj( IndexH index, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_DLL RTError Index_Intersects_obj( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_Contains_obj( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_TPIntersects_id( IndexH index, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + int64_t** ids, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_MVRIntersects_id( IndexH index, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + int64_t** ids, + uint64_t* nResults); + +SIDX_DLL RTError Index_Intersects_id( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + int64_t** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_Contains_id(IndexH index, + double *pdMin, + double *pdMax, + uint32_t nDimension, + int64_t **ids, + uint64_t *nResults); + +SIDX_C_DLL RTError Index_TPIntersects_count( IndexH index, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_MVRIntersects_count( IndexH index, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + uint64_t* nResults); + +SIDX_DLL RTError Index_Intersects_count( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_Contains_count( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_TPNearestNeighbors_obj(IndexH index, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_MVRNearestNeighbors_obj(IndexH index, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_DLL RTError Index_NearestNeighbors_obj(IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_TPNearestNeighbors_id(IndexH index, + double* pdMin, + double* pdMax, + double* pdVMin, + double* pdVMax, + double tStart, + double tEnd, + uint32_t nDimension, + int64_t** ids, + uint64_t* nResults); + +SIDX_C_DLL RTError Index_MVRNearestNeighbors_id(IndexH index, + double* pdMin, + double* pdMax, + double tStart, + double tEnd, + uint32_t nDimension, + int64_t** ids, + uint64_t* nResults); + +SIDX_DLL RTError Index_NearestNeighbors_id( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + int64_t** items, + uint64_t* nResults); + +SIDX_DLL RTError Index_Intersects_internal( IndexH index, + double* pdMin, + double* pdMax, + uint32_t nDimension, + IndexItemH** items, + uint64_t* nResults); + +SIDX_DLL RTError Index_GetBounds( IndexH index, + double** ppdMin, + double** ppdMax, + uint32_t* nDimension); + + +SIDX_C_DLL RTError Index_GetLeaves( IndexH index, + uint32_t* nLeafNodes, + uint32_t** nLeafSizes, + int64_t** nLeafIDs, + int64_t*** nLeafChildIDs, + double*** pppdMin, + double*** pppdMax, + uint32_t* nDimension); + +SIDX_DLL RTError Index_SetResultSetOffset(IndexH index, int64_t value); +SIDX_DLL int64_t Index_GetResultSetOffset(IndexH index); + +SIDX_DLL RTError Index_SetResultSetLimit(IndexH index, int64_t value); +SIDX_DLL int64_t Index_GetResultSetLimit(IndexH index); + +SIDX_DLL void Index_DestroyObjResults(IndexItemH* results, uint32_t nResults); +SIDX_DLL void Index_ClearBuffer(IndexH index); +SIDX_DLL void Index_Free(void* object); +SIDX_DLL void Index_Flush(IndexH index); + +SIDX_DLL void IndexItem_Destroy(IndexItemH item); +SIDX_DLL int64_t IndexItem_GetID(IndexItemH item); + +SIDX_DLL RTError IndexItem_GetData(IndexItemH item, uint8_t** data, uint64_t* length); + +SIDX_DLL RTError IndexItem_GetBounds( IndexItemH item, + double** ppdMin, + double** ppdMax, + uint32_t* nDimension); + +SIDX_DLL IndexPropertyH IndexProperty_Create(void); +SIDX_DLL void IndexProperty_Destroy(IndexPropertyH hProp); + +SIDX_DLL RTError IndexProperty_SetIndexType(IndexPropertyH iprop, RTIndexType value); +SIDX_DLL RTIndexType IndexProperty_GetIndexType(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetDimension(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetDimension(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetIndexVariant(IndexPropertyH iprop, RTIndexVariant value); +SIDX_DLL RTIndexVariant IndexProperty_GetIndexVariant(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetIndexStorage(IndexPropertyH iprop, RTStorageType value); +SIDX_DLL RTStorageType IndexProperty_GetIndexStorage(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetPagesize(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetPagesize(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetIndexCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetIndexCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetLeafCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetLeafCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetLeafPoolCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetLeafPoolCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetIndexPoolCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetIndexPoolCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetRegionPoolCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetRegionPoolCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetPointPoolCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetPointPoolCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetBufferingCapacity(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetBufferingCapacity(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetEnsureTightMBRs(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetEnsureTightMBRs(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetOverwrite(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetOverwrite(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetNearMinimumOverlapFactor(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetNearMinimumOverlapFactor(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetWriteThrough(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetWriteThrough(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetFillFactor(IndexPropertyH iprop, double value); +SIDX_DLL double IndexProperty_GetFillFactor(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetSplitDistributionFactor(IndexPropertyH iprop, double value); +SIDX_DLL double IndexProperty_GetSplitDistributionFactor(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetTPRHorizon(IndexPropertyH iprop, double value); +SIDX_DLL double IndexProperty_GetTPRHorizon(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetReinsertFactor(IndexPropertyH iprop, double value); +SIDX_DLL double IndexProperty_GetReinsertFactor(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetFileName(IndexPropertyH iprop, const char* value); +SIDX_DLL char* IndexProperty_GetFileName(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetFileNameExtensionDat(IndexPropertyH iprop, const char* value); +SIDX_DLL char* IndexProperty_GetFileNameExtensionDat(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetFileNameExtensionIdx(IndexPropertyH iprop, const char* value); +SIDX_DLL char* IndexProperty_GetFileNameExtensionIdx(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacksSize(IndexPropertyH iprop, uint32_t value); +SIDX_DLL uint32_t IndexProperty_GetCustomStorageCallbacksSize(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacks(IndexPropertyH iprop, const void* value); +SIDX_DLL void* IndexProperty_GetCustomStorageCallbacks(IndexPropertyH iprop); + +SIDX_DLL RTError IndexProperty_SetIndexID(IndexPropertyH iprop, int64_t value); +SIDX_DLL int64_t IndexProperty_GetIndexID(IndexPropertyH iprop); + +SIDX_C_DLL void* SIDX_NewBuffer(size_t bytes); +SIDX_C_DLL void SIDX_DeleteBuffer(void* buffer); + +SIDX_DLL RTError IndexProperty_SetResultSetLimit(IndexPropertyH iprop, uint64_t value); +SIDX_DLL uint64_t IndexProperty_GetResultSetLimit(IndexPropertyH iprop); + +SIDX_C_DLL char* SIDX_Version(void); + +SIDX_C_DLL char* Error_GetLastErrorMsg(void); + +IDX_C_END + +#endif diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_config.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_config.h new file mode 100644 index 000000000..153e2ea5f --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_config.h @@ -0,0 +1,112 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C API configuration + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#ifndef SIDX_CONFIG_H_INCLUDED +#define SIDX_CONFIG_H_INCLUDED + + + +#ifdef _MSC_VER + +#if _MSC_VER <= 1500 + typedef __int8 int8_t; + typedef __int16 int16_t; + typedef __int32 int32_t; + typedef __int64 int64_t; + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int64 uint64_t; +#else + #include +#endif + + #include + #define STRDUP _strdup + #include + +#else + + #include + #define SIDX_THREAD __thread + #define STRDUP strdup +#endif + +#include + +#include "sidx_export.h" + +typedef enum +{ + RT_None = 0, + RT_Debug = 1, + RT_Warning = 2, + RT_Failure = 3, + RT_Fatal = 4 +} RTError; + +typedef enum +{ + RT_RTree = 0, + RT_MVRTree = 1, + RT_TPRTree = 2, + RT_InvalidIndexType = -99 +} RTIndexType; + +typedef enum +{ + RT_Memory = 0, + RT_Disk = 1, + RT_Custom = 2, + RT_InvalidStorageType = -99 +} RTStorageType; + +typedef enum +{ + RT_Linear = 0, + RT_Quadratic = 1, + RT_Star = 2, + RT_InvalidIndexVariant = -99 +} RTIndexVariant; + + +#ifdef __cplusplus +# define IDX_C_START extern "C" { +# define IDX_C_END } +#else +# define IDX_C_START +# define IDX_C_END +#endif + +typedef struct IndexS *IndexH; +typedef struct SpatialIndex_IData *IndexItemH; +typedef struct Tools_PropertySet *IndexPropertyH; + + + +#endif diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_export.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_export.h new file mode 100644 index 000000000..7b0a39364 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_export.h @@ -0,0 +1,44 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement utilities. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2014, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#ifndef SIDX_C_DLL +#if defined(_MSC_VER) && defined(SIDX_DLL_EXPORT) +# define SIDX_C_DLL __declspec(dllexport) +# define SIDX_DLL __declspec(dllexport) +#else +# if defined(USE_GCC_VISIBILITY_FLAG) +# define SIDX_C_DLL __attribute__ ((visibility("default"))) +# define SIDX_DLL __attribute__ ((visibility("default"))) +# else +# define SIDX_C_DLL +# define SIDX_DLL +# endif +#endif +#endif diff --git a/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_impl.h b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_impl.h new file mode 100644 index 000000000..df665b9fb --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/capi/sidx_impl.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * Project: libsidx - A C API wrapper around libspatialindex + * Purpose: C++ object declarations to implement utilities. + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2009, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "../SpatialIndex.h" +#include "sidx_config.h" +#include "Utility.h" +#include "ObjVisitor.h" +#include "IdVisitor.h" +#include "CountVisitor.h" +#include "BoundsQuery.h" +#include "LeafQuery.h" +#include "Error.h" +#include "DataStream.h" +#include "Index.h" +#include "CustomStorage.h" diff --git a/third_party/libspatialindex/larch64/include/spatialindex/tools/PointerPool.h b/third_party/libspatialindex/larch64/include/spatialindex/tools/PointerPool.h new file mode 100644 index 000000000..4611122d3 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/tools/PointerPool.h @@ -0,0 +1,95 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "PoolPointer.h" + +namespace Tools +{ + template class PointerPool + { + public: + explicit PointerPool(uint32_t capacity) : m_capacity(capacity) + { + } + + ~PointerPool() + { + assert(m_pool.size() <= m_capacity); + + while (! m_pool.empty()) + { + X* x = m_pool.top(); m_pool.pop(); + delete x; + } + } + + PoolPointer acquire() + { + X* p = nullptr; + + if (! m_pool.empty()) + { + p = m_pool.top(); m_pool.pop(); + } + else + { + p = new X(); + } + + return PoolPointer(p, this); + } + + void release(X* p) + { + if (m_pool.size() < m_capacity) + { + m_pool.push(p); + } + else + { + delete p; + } + + assert(m_pool.size() <= m_capacity); + } + + uint32_t getCapacity() const { return m_capacity; } + void setCapacity(uint32_t c) + { + assert (c >= 0); + m_capacity = c; + } + + private: + uint32_t m_capacity; + std::stack m_pool; + + }; +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/tools/PoolPointer.h b/third_party/libspatialindex/larch64/include/spatialindex/tools/PoolPointer.h new file mode 100644 index 000000000..759701759 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/tools/PoolPointer.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + +#include "PointerPool.h" + +namespace Tools +{ + template class PointerPool; + + template class PoolPointer + { + public: + explicit PoolPointer(X* p = nullptr) : m_pointer(p), m_pPool(nullptr) { m_prev = m_next = this; } + explicit PoolPointer(X* p, PointerPool* pPool) noexcept : m_pointer(p), m_pPool(pPool) { m_prev = m_next = this; } + ~PoolPointer() { release(); } + PoolPointer(const PoolPointer& p) noexcept { acquire(p); } + PoolPointer& operator=(const PoolPointer& p) + { + if (this != &p) + { + release(); + acquire(p); + } + return *this; + } + + X& operator*() const noexcept { return *m_pointer; } + X* operator->() const noexcept { return m_pointer; } + X* get() const noexcept { return m_pointer; } + bool unique() const noexcept { return m_prev ? m_prev == this : true; } + void relinquish() noexcept + { + m_pPool = nullptr; + m_pointer = nullptr; + release(); + } + + private: + X* m_pointer; + mutable const PoolPointer* m_prev; + mutable const PoolPointer* m_next; + PointerPool* m_pPool; + + void acquire(const PoolPointer& p) noexcept + { + m_pPool = p.m_pPool; + m_pointer = p.m_pointer; + m_next = p.m_next; + m_next->m_prev = this; + m_prev = &p; + #ifndef mutable + p.m_next = this; + #else + (const_cast*>(&p))->m_next = this; + #endif + } + + void release() + { + if (unique()) + { + if (m_pPool != nullptr) m_pPool->release(m_pointer); + else delete m_pointer; + } + else + { + m_prev->m_next = m_next; + m_next->m_prev = m_prev; + m_prev = m_next = nullptr; + } + m_pointer = nullptr; + m_pPool = nullptr; + } + }; +} + diff --git a/third_party/libspatialindex/larch64/include/spatialindex/tools/Tools.h b/third_party/libspatialindex/larch64/include/spatialindex/tools/Tools.h new file mode 100644 index 000000000..07c1926e8 --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/tools/Tools.h @@ -0,0 +1,501 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Marios Hadjieleftheriou, mhadji@gmail.com + ****************************************************************************** + * Copyright (c) 2004, Marios Hadjieleftheriou + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + +#pragma once + + +#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && (defined _MSC_VER) && (_MSC_VER < 1900) && !defined __GNUC__ + typedef __int8 int8_t; + typedef __int16 int16_t; + typedef __int32 int32_t; + typedef __int64 int64_t; + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int64 uint64_t; + +#else + #include +#endif + +#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && !defined __GNUC__ + #ifdef SIDX_DLL_EXPORT + #define SIDX_DLL __declspec(dllexport) + #else + #define SIDX_DLL + #endif + + // Nuke this annoying warning. See http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html +#pragma warning( disable: 4251 ) + +#else + #define SIDX_DLL +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "PointerPool.h" +#include "PoolPointer.h" + +namespace Tools +{ + enum IntervalType + { + IT_RIGHTOPEN = 0x0, + IT_LEFTOPEN, + IT_OPEN, + IT_CLOSED + }; + + enum VariantType + { + VT_LONG = 0x0, + VT_BYTE, + VT_SHORT, + VT_FLOAT, + VT_DOUBLE, + VT_CHAR, + VT_USHORT, + VT_ULONG, + VT_INT, + VT_UINT, + VT_BOOL, + VT_PCHAR, + VT_PVOID, + VT_EMPTY, + VT_LONGLONG, + VT_ULONGLONG, + VT_PWCHAR + }; + + enum FileMode + { + APPEND = 0x0, + CREATE + }; + + // + // Exceptions + // + class SIDX_DLL Exception + { + public: + virtual std::string what() = 0; + virtual ~Exception() = default; + }; + + class SIDX_DLL IndexOutOfBoundsException : public Exception + { + public: + IndexOutOfBoundsException(size_t i); + ~IndexOutOfBoundsException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // IndexOutOfBoundsException + + class SIDX_DLL IllegalArgumentException : public Exception + { + public: + IllegalArgumentException(std::string s); + ~IllegalArgumentException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // IllegalArgumentException + + class SIDX_DLL IllegalStateException : public Exception + { + public: + IllegalStateException(std::string s); + ~IllegalStateException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // IllegalStateException + + class SIDX_DLL EndOfStreamException : public Exception + { + public: + EndOfStreamException(std::string s); + ~EndOfStreamException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // EndOfStreamException + + class SIDX_DLL ResourceLockedException : public Exception + { + public: + ResourceLockedException(std::string s); + ~ResourceLockedException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // ResourceLockedException + + class SIDX_DLL NotSupportedException : public Exception + { + public: + NotSupportedException(std::string s); + ~NotSupportedException() override = default; + std::string what() override; + + private: + std::string m_error; + }; // NotSupportedException + + // + // Interfaces + // + class SIDX_DLL IInterval + { + public: + virtual ~IInterval() = default; + + virtual double getLowerBound() const = 0; + virtual double getUpperBound() const = 0; + virtual void setBounds(double, double) = 0; + virtual bool intersectsInterval(const IInterval&) const = 0; + virtual bool intersectsInterval(IntervalType type, const double start, const double end) const = 0; + virtual bool containsInterval(const IInterval&) const = 0; + virtual IntervalType getIntervalType() const = 0; + }; // IInterval + + class SIDX_DLL IObject + { + public: + virtual ~IObject() = default; + + virtual IObject* clone() = 0; + // return a new object that is an exact copy of this one. + // IMPORTANT: do not return the this pointer! + }; // IObject + + class SIDX_DLL ISerializable + { + public: + virtual ~ISerializable() = default; + + virtual uint32_t getByteArraySize() = 0; + // returns the size of the required uint8_t array. + virtual void loadFromByteArray(const uint8_t* data) = 0; + // load this object using the uint8_t array. + virtual void storeToByteArray(uint8_t** data, uint32_t& length) = 0; + // store this object in the uint8_t array. + }; + + class SIDX_DLL IComparable + { + public: + virtual ~IComparable() = default; + + virtual bool operator<(const IComparable& o) const = 0; + virtual bool operator>(const IComparable& o) const = 0; + virtual bool operator==(const IComparable& o) const = 0; + }; //IComparable + + class SIDX_DLL IObjectComparator + { + public: + virtual ~IObjectComparator() = default; + + virtual int compare(IObject* o1, IObject* o2) = 0; + }; // IObjectComparator + + class SIDX_DLL IObjectStream + { + public: + virtual ~IObjectStream() = default; + + virtual IObject* getNext() = 0; + // returns a pointer to the next entry in the + // stream or 0 at the end of the stream. + + virtual bool hasNext() = 0; + // returns true if there are more items in the stream. + + virtual uint32_t size() = 0; + // returns the total number of entries available in the stream. + + virtual void rewind() = 0; + // sets the stream pointer to the first entry, if possible. + }; // IObjectStream + + // + // Classes & Functions + // + + class SIDX_DLL Variant + { + public: + Variant(); + + VariantType m_varType{VT_EMPTY}; + + union + { + int16_t iVal; // VT_SHORT + int32_t lVal; // VT_LONG + int64_t llVal; // VT_LONGLONG + uint8_t bVal; // VT_BYTE + float fltVal; // VT_FLOAT + double dblVal; // VT_DOUBLE + char cVal; // VT_CHAR + uint16_t uiVal; // VT_USHORT + uint32_t ulVal; // VT_ULONG + uint64_t ullVal; // VT_ULONGLONG + bool blVal; // VT_BOOL + char* pcVal; // VT_PCHAR + void* pvVal; // VT_PVOID + wchar_t* pwcVal; + } m_val; + }; // Variant + + class SIDX_DLL PropertySet; + SIDX_DLL std::ostream& operator<<(std::ostream& os, const Tools::PropertySet& p); + + class SIDX_DLL PropertySet : public ISerializable + { + public: + PropertySet(); + PropertySet(const uint8_t* data); + ~PropertySet() override; + + Variant getProperty(std::string property) const; + void setProperty(std::string property, Variant const& v); + void removeProperty(std::string property); + + uint32_t getByteArraySize() override; + void loadFromByteArray(const uint8_t* data) override; + void storeToByteArray(uint8_t** data, uint32_t& length) override; + + private: + std::map m_propertySet; +// #ifdef HAVE_PTHREAD_H +// pthread_rwlock_t m_rwLock; +// #else +// bool m_rwLock; +// #endif + friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const Tools::PropertySet& p); + }; // PropertySet + + // does not support degenerate intervals. + class SIDX_DLL Interval : public IInterval + { + public: + Interval(); + Interval(IntervalType, double, double); + Interval(double, double); + Interval(const Interval&); + ~Interval() override = default; + virtual IInterval& operator=(const IInterval&); + + virtual bool operator==(const Interval&) const; + virtual bool operator!=(const Interval&) const; + double getLowerBound() const override; + double getUpperBound() const override; + void setBounds(double, double) override; + bool intersectsInterval(const IInterval&) const override; + bool intersectsInterval(IntervalType type, const double start, const double end) const override; + bool containsInterval(const IInterval&) const override; + IntervalType getIntervalType() const override; + + IntervalType m_type{IT_RIGHTOPEN}; + double m_low{0.0}; + double m_high{0.0}; + }; // Interval + + SIDX_DLL std::ostream& operator<<(std::ostream& os, const Tools::Interval& iv); + + class SIDX_DLL Random + { + public: + Random(); + Random(uint32_t seed, uint16_t xsubi0); + virtual ~Random(); + + int32_t nextUniformLong(); + // returns a uniformly distributed long. + uint32_t nextUniformUnsignedLong(); + // returns a uniformly distributed unsigned long. + int32_t nextUniformLong(int32_t low, int32_t high); + // returns a uniformly distributed long in the range [low, high). + uint32_t nextUniformUnsignedLong(uint32_t low, uint32_t high); + // returns a uniformly distributed unsigned long in the range [low, high). + int64_t nextUniformLongLong(); + // returns a uniformly distributed long long. + uint64_t nextUniformUnsignedLongLong(); + // returns a uniformly distributed unsigned long long. + int64_t nextUniformLongLong(int64_t low, int64_t high); + // returns a uniformly distributed unsigned long long in the range [low, high). + uint64_t nextUniformUnsignedLongLong(uint64_t low, uint64_t high); + // returns a uniformly distributed unsigned long long in the range [low, high). + int16_t nextUniformShort(); + // returns a uniformly distributed short. + uint16_t nextUniformUnsignedShort(); + // returns a uniformly distributed unsigned short. + double nextUniformDouble(); + // returns a uniformly distributed double in the range [0, 1). + double nextUniformDouble(double low, double high); + // returns a uniformly distributed double in the range [low, high). + + bool flipCoin(); + + private: + void initDrand(uint32_t seed, uint16_t xsubi0); + + uint16_t* m_pBuffer; + }; // Random + + #if HAVE_PTHREAD_H + class SIDX_DLL LockGuard + { + public: + LockGuard(pthread_mutex_t* pLock); + ~LockGuard(); + + private: + pthread_mutex_t* m_pLock; + }; // LockGuard + #endif + + class SIDX_DLL BufferedFile + { + public: + BufferedFile(uint32_t u32BufferSize = 16384); + virtual ~BufferedFile(); + + virtual void close(); + virtual bool eof(); + virtual void rewind() = 0; + virtual void seek(std::fstream::off_type offset) = 0; + + protected: + std::fstream m_file; + char* m_buffer; + uint32_t m_u32BufferSize; + bool m_bEOF{true}; + }; + + class SIDX_DLL BufferedFileReader : public BufferedFile + { + public: + BufferedFileReader(); + BufferedFileReader(const std::string& sFileName, uint32_t u32BufferSize = 32768); + ~BufferedFileReader() override; + + virtual void open(const std::string& sFileName); + void rewind() override; + void seek(std::fstream::off_type offset) override; + + virtual uint8_t readUInt8(); + virtual uint16_t readUInt16(); + virtual uint32_t readUInt32(); + virtual uint64_t readUInt64(); + virtual float readFloat(); + virtual double readDouble(); + virtual bool readBoolean(); + virtual std::string readString(); + virtual void readBytes(uint32_t u32Len, uint8_t** pData); + }; + + class SIDX_DLL BufferedFileWriter : public BufferedFile + { + public: + BufferedFileWriter(); + BufferedFileWriter(const std::string& sFileName, FileMode mode = CREATE, uint32_t u32BufferSize = 32768); + ~BufferedFileWriter() override; + + virtual void open(const std::string& sFileName, FileMode mode = CREATE); + void rewind() override; + void seek(std::fstream::off_type offset) override; + + virtual void write(uint8_t i); + virtual void write(uint16_t i); + virtual void write(uint32_t i); + virtual void write(uint64_t i); + virtual void write(float i); + virtual void write(double i); + virtual void write(bool b); + virtual void write(const std::string& s); + virtual void write(uint32_t u32Len, uint8_t* pData); + }; + + class SIDX_DLL TemporaryFile + { + public: + TemporaryFile(); + virtual ~TemporaryFile(); + + void rewindForReading(); + void rewindForWriting(); + bool eof(); + std::string getFileName() const; + + uint8_t readUInt8(); + uint16_t readUInt16(); + uint32_t readUInt32(); + uint64_t readUInt64(); + float readFloat(); + double readDouble(); + std::string readString(); + void readBytes(uint32_t u32Len, uint8_t** pData); + + void write(uint8_t i); + void write(uint16_t i); + void write(uint32_t i); + void write(uint64_t i); + void write(float i); + void write(double i); + void write(const std::string& s); + void write(uint32_t u32Len, uint8_t* pData); + + private: + std::string m_sFile; + BufferedFile* m_pFile; + }; +} diff --git a/third_party/libspatialindex/larch64/include/spatialindex/tools/rand48.h b/third_party/libspatialindex/larch64/include/spatialindex/tools/rand48.h new file mode 100644 index 000000000..46ff3226a --- /dev/null +++ b/third_party/libspatialindex/larch64/include/spatialindex/tools/rand48.h @@ -0,0 +1,89 @@ +/****************************************************************************** + * Project: libspatialindex - A C++ library for spatial indexing + * Author: Howard Butler, hobu.inc@gmail.com + ****************************************************************************** + * Copyright (c) 2011, Howard Butler + * + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. +******************************************************************************/ + + +#pragma once + +/* Only define this stuff if we're not ANDROID */ +#ifndef ANDROID + +#ifndef HAVE_SRAND48 + +#if HAVE_FEATURES_H +#include +#ifndef __THROW +/* copy-pasted from sys/cdefs.h */ +/* GCC can always grok prototypes. For C++ programs we add throw() +to help it optimize the function calls. But this works only with +gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +as non-throwing using a function attribute since programs can use +the -fexceptions options for C code as well. */ +# if !defined __cplusplus && __GNUC_PREREQ (3, 3) +# define __THROW __attribute__ ((__nothrow__)) +# define __NTH(fct) __attribute__ ((__nothrow__)) fct +# else +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# define __NTH(fct) fct throw () +# else +# define __THROW +# define __NTH(fct) fct +# endif +# endif +#endif +#endif + +#ifndef __THROW +# define __THROW +#endif + +#ifndef __NTH +# define __NTH(fct) fct +#endif + +extern void srand48(long int seed) __THROW; + +extern unsigned short *seed48(unsigned short xseed[3]) __THROW; + +extern long nrand48(unsigned short xseed[3]) __THROW; + +extern long mrand48(void) __THROW; + +extern long lrand48(void) __THROW; + +extern void lcong48(unsigned short p[7]) __THROW; + +extern long jrand48(unsigned short xseed[3]) __THROW; + +extern double erand48(unsigned short xseed[3]) __THROW; + +extern double drand48(void) __THROW; + +#endif + +/* Only define this stuff if we're not ANDROID */ +#endif diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex.so b/third_party/libspatialindex/larch64/lib/libspatialindex.so new file mode 120000 index 000000000..58916f7ba --- /dev/null +++ b/third_party/libspatialindex/larch64/lib/libspatialindex.so @@ -0,0 +1 @@ +libspatialindex.so.7 \ No newline at end of file diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex.so.7 b/third_party/libspatialindex/larch64/lib/libspatialindex.so.7 new file mode 120000 index 000000000..4bde966fb --- /dev/null +++ b/third_party/libspatialindex/larch64/lib/libspatialindex.so.7 @@ -0,0 +1 @@ +libspatialindex.so.7.0.0 \ No newline at end of file diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex.so.7.0.0 b/third_party/libspatialindex/larch64/lib/libspatialindex.so.7.0.0 new file mode 100644 index 000000000..0a777458f Binary files /dev/null and b/third_party/libspatialindex/larch64/lib/libspatialindex.so.7.0.0 differ diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex_c.so b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so new file mode 120000 index 000000000..fe5192b58 --- /dev/null +++ b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so @@ -0,0 +1 @@ +libspatialindex_c.so.7 \ No newline at end of file diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7 b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7 new file mode 120000 index 000000000..c5fccf46a --- /dev/null +++ b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7 @@ -0,0 +1 @@ +libspatialindex_c.so.7.0.0 \ No newline at end of file diff --git a/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7.0.0 b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7.0.0 new file mode 100644 index 000000000..1e793dcda Binary files /dev/null and b/third_party/libspatialindex/larch64/lib/libspatialindex_c.so.7.0.0 differ diff --git a/third_party/qrcode/QrCode.o b/third_party/qrcode/QrCode.o new file mode 100644 index 000000000..bd3febec1 Binary files /dev/null and b/third_party/qrcode/QrCode.o differ diff --git a/tools/lib/logreader.py b/tools/lib/logreader.py index f6932c029..6ad77bf82 100755 --- a/tools/lib/logreader.py +++ b/tools/lib/logreader.py @@ -98,10 +98,10 @@ def auto_strategy(rlog_paths: LogPaths, qlog_paths: LogPaths, interactive: bool, missing_rlogs = [rlog is None or not valid_file(rlog) for rlog in rlog_paths].count(True) if missing_rlogs != 0: if interactive: - if input(f"{missing_rlogs} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": + if input(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": return rlog_paths else: - cloudlog.warning(f"{missing_rlogs} rlogs were not found, falling back to qlogs for those segments...") + cloudlog.warning(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, falling back to qlogs for those segments...") return [rlog if valid_file(rlog) else (qlog if valid_file(qlog) else None) for (rlog, qlog) in zip(rlog_paths, qlog_paths, strict=True)]