diff --git a/CHANGELOGS.md b/CHANGELOGS.md index dce4b54fa..dc92b1c62 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,13 +1,14 @@ dragonpilot [latest] - EON/C2 Release ======================== -* NEW: Synced to openpilot master 2022.08.29 commits. - * Nuclear Grade driving model. -* TWEAK: Used fused location service on mapd. -* TWEAK: Used fused location service on gpxd. -* NEW: Added back auto boot on C2. -* NEW: TOYOTA - Door auto lock/unlock. (Thanks to @AlexandreSato and @cydia2020) -* NEW: Added Camera based Driver Monitor back. (This may overheat your device). -* NEW: Added a toggle to turn on/off Camera based Driver Monitor. +* Synced with openpilot master 2022.09.01 commits. + * e2e longitudinal toggle. (Extremely alpha feature) + * Deprecated SNPE lib and switched to tinygrad. +* NEW: Added back nav support on EON/C2. +* WARNING: DUE TO THE INTRODUCTION OF END TO END LONGITUDINAL FEATURE, FOLLOWING FEATURES HAS BEEN CHANGED: + * WIP: Dynamic Follow has been temporary removed for refactoring. + * WIP: Vision Turn Control has been temporary removed for refactoring. + * REMOVED: Camera offset has been removed permanently. + * EON/C2 WILL NO LONGER RECEIVE ANY DRIVING/DRIVER MONITORING MODEL UPDATES. dragonpilot 2022.08.29 - EON/C2 Release ======================== @@ -40,6 +41,37 @@ dragonpilot 2022.07.29 - EON/C2 Release dragonpilot 2022.07.20 - EON/C2 Release ======================== +* Synced with openpilot master 2022.09.09 commits. +* ADDED: us-west coast can now use mapd without data. See toggle description for more detail. +* READD: Temp check toggl e, max speed toggle and couple other UI toggles. +* bug fix and improvement + +dragonpilot [2022.09.04] +* Synced with openpilot master 2022.09.01 commits. +* Refactor: Dynamic Follow has been removerd temporary. Needs a refactor. (wip) +* ADDED: Auto Toyota door lock/unlock **only works on some car** +* READDED: Camera offset toggle. +* Improvement: gpxd now uses liveLocationKalman better performance. +* bug fix and improvement. + +dragonpilot [2022.08.07] +======================== +Synced to openpilot master 2022.08.07 commits. +NEW: Added back auto shutdown toggle. +NEW: Added back LQR tune toggle. +NEW: MAZDA - Ability to enable/disable below steer speed alert. (Thanks to @TheCrowd) +TWEAKED: Panda Recovery should kill boardd process first. +FIXED: Fixed stop working issue when mapd crashed. + +dragonpilot 2022.07.27 +======================== +NEW: Synced to openpilot 2022.07.27 commits. +NEW: Included Mazda vehicles. +TWEAK: Only show road name bar when it's not empty. +TWEAK: Enlarged lead car distance text. +TWEAK: TOYOTA - Updated lowest speed override feature. +FIXED: Fixed Panda Flash/Recovery buttons. +FIXED: Included dp_patcher.py execution. * FIXED: Included correct camera/path offset values for EON/C2. * FIXED: Param bug in HKG. (Thanks to @sunnyhaibin). * FIXED: Included fan controller for UNO (C2). diff --git a/README.md b/README.md index c2c90b0e6..cfeb625bf 100755 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ We have detailed instructions for [how to mount the device in a car](https://com Running on PC ------ -All of openpilot's services can run as normal on a PC, even without special hardware or a car. To develop or experiment with openpilot you can run openpilot on recorded or simulated data. +All openpilot services can run as usual on a PC without requiring special hardware or a car. You can also run openpilot on recorded or simulated data to develop or experiment with openpilot. With openpilot's tools, you can plot logs, replay drives, and watch the full-res camera streams. See [the tools README](tools/README.md) for more information. @@ -119,7 +119,7 @@ Directory Structure ├── debug # Tools to help you debug and do car ports ├── locationd # Precise localization and vehicle parameter estimation ├── loggerd # Logger and uploader of car data - ├── manager # Deamon that starts/stops all other daemons as needed + ├── manager # Daemon that starts/stops all other daemons as needed ├── modeld # Driving and monitoring model runners ├── monitoring # Daemon to determine driver attention ├── navd # Turn-by-turn navigation diff --git a/RELEASES.md b/RELEASES.md index 28a010968..56cffeebe 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -78,7 +78,7 @@ Version 0.8.14 (2022-06-01) Version 0.8.13 (2022-02-18) ======================== * Improved driver monitoring - * Retuned driver pose learner for relaxed driving positions + * Re-tuned driver pose learner for relaxed driving positions * Added reliance on driving model to be more scene adaptive * Matched strictness between comma two and comma three * Improved performance in turns by compensating for the road bank angle @@ -224,7 +224,7 @@ Version 0.8.4 (2021-05-17) * Delay controls start until system is ready * Fuzzy car identification, enabled with Community Features toggle * Localizer optimized for increased precision and less CPU usage - * Retuned lateral control to be more aggressive when model is confident + * Re-tuned lateral control to be more aggressive when model is confident * Toyota Mirai 2021 support * Lexus NX 300 2020 support thanks to goesreallyfast! * Volkswagen Atlas 2018-19 support thanks to jyoung8607! @@ -389,7 +389,7 @@ Version 0.7 (2019-12-13) * Improve GM longitudinal control: proper computations for 15Hz radar * Move GM port, Toyota with DSU removed, comma pedal in community features; toggle switch required * Remove upload over cellular toggle: only upload qlog and qcamera files if not on wifi - * Refactor Panda code towards ISO26262 and SIL2 compliancy + * Refactor Panda code towards ISO26262 and SIL2 compliance * Forward stock FCW for Honda Nidec * Volkswagen port now standard: comma Harness intercepts stock camera diff --git a/cereal/car.capnp b/cereal/car.capnp index 7115cc3c3..b49bb66a1 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -350,8 +350,7 @@ struct CarControl { off @0; pid @1; stopping @2; - - startingDEPRECATED @3; + starting @3; } } @@ -427,20 +426,17 @@ struct CarParams { enableApgs @6 :Bool; # advanced parking guidance system enableBsm @56 :Bool; # blind spot monitoring flags @64 :UInt32; # flags for car specific quirks + experimentalLongitudinalAvailable @71 :Bool; minEnableSpeed @7 :Float32; minSteerSpeed @8 :Float32; maxSteeringAngleDeg @54 :Float32; safetyConfigs @62 :List(SafetyConfig); alternativeExperience @65 :Int16; # panda flag for features like no disengage on gas - maxLateralAccel @68 :Float32; - steerMaxBPDEPRECATED @11 :List(Float32); - steerMaxVDEPRECATED @12 :List(Float32); - gasMaxBPDEPRECATED @13 :List(Float32); - gasMaxVDEPRECATED @14 :List(Float32); - brakeMaxBPDEPRECATED @15 :List(Float32); - brakeMaxVDEPRECATED @16 :List(Float32); + # Car docs fields + maxLateralAccel @68 :Float32; + autoResumeSng @69 :Bool; # describes whether car can resume from a stop automatically # things about the car in the manual mass @17 :Float32; # [kg] curb weight: all fluids no cargo @@ -469,11 +465,13 @@ struct CarParams { vEgoStopping @29 :Float32; # Speed at which the car goes into stopping state vEgoStarting @59 :Float32; # Speed at which the car goes into starting state directAccelControl @30 :Bool; # Does the car have direct accel control or just gas/brake - stoppingControl @31 :Bool; # Does the car allows full control even at lows speeds when stopping - stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary + stoppingControl @31 :Bool; # Does the car allow full control even at lows speeds when stopping steerControlType @34 :SteerControlType; radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN + stopAccel @60 :Float32; # Required acceleration to keep vehicle stationary stoppingDecelRate @52 :Float32; # m/s^2/s while trying to stop + startAccel @32 :Float32; # Required acceleration to get car moving + startingState @70 :Bool; # Does this car make use of special starting state steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds longitudinalActuatorDelayLowerBound @61 :Float32; # Gas/Brake actuator delay in seconds, lower bound @@ -617,7 +615,7 @@ struct CarParams { enum Ecu { eps @0; - esp @1; + abs @1; fwdRadar @2; fwdCamera @3; engine @4; @@ -638,6 +636,9 @@ struct CarParams { electricBrakeBooster @15; shiftByWire @16; + # Chrysler only + hcp @18; # Hybrid Control Processor + debug @17; } @@ -660,7 +661,12 @@ struct CarParams { safetyModelDEPRECATED @9 :SafetyModel; safetyModelPassiveDEPRECATED @42 :SafetyModel = silent; minSpeedCanDEPRECATED @51 :Float32; - startAccelDEPRECATED @32 :Float32; communityFeatureDEPRECATED @46: Bool; startingAccelRateDEPRECATED @53 :Float32; + steerMaxBPDEPRECATED @11 :List(Float32); + steerMaxVDEPRECATED @12 :List(Float32); + gasMaxBPDEPRECATED @13 :List(Float32); + gasMaxVDEPRECATED @14 :List(Float32); + brakeMaxBPDEPRECATED @15 :List(Float32); + brakeMaxVDEPRECATED @16 :List(Float32); } diff --git a/cereal/dp.capnp b/cereal/dp.capnp index 89271615c..147eef63c 100644 --- a/cereal/dp.capnp +++ b/cereal/dp.capnp @@ -27,9 +27,9 @@ struct DragonConf { dpToyotaCruiseOverrideSpeed @19 :UInt8; dpToyotaAutoLock @20 :Bool; dpToyotaAutoUnlock @21 :Bool; - dpUseLanelines @22 :Bool; - dpMapd @23 :Bool; + dpMapd @22 :Bool; + dpLocalDb @23 :Bool; dpDashcamd @24 :Bool; dpMazdaSteerAlert @25 :Bool; - dpCameraOffset @26 :Int8; + dpSpeedCheck @26 :Bool; } diff --git a/cereal/libcereal_shared.so b/cereal/libcereal_shared.so index 2bd027208..44070c389 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 f3f11afce..72eb08e02 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -291,7 +291,6 @@ struct CanData { } struct DeviceState @0xa4d8b5af2aa492eb { - usbOnline @12 :Bool; networkType @22 :NetworkType; networkInfo @31 :NetworkInfo; networkStrength @24 :NetworkStrength; @@ -309,10 +308,6 @@ struct DeviceState @0xa4d8b5af2aa492eb { cpuUsagePercent @34 :List(Int8); # per-core cpu usage # power - batteryPercent @8 :Int16; - batteryCurrent @15 :Int32; - chargingError @17 :Bool; - chargingDisabled @18 :Bool; offroadPowerUsageUwh @23 :UInt32; carBatteryCapacityUwh @25 :UInt32; powerDrawW @40 :Float32; @@ -389,6 +384,11 @@ struct DeviceState @0xa4d8b5af2aa492eb { batteryStatusDEPRECATED @9 :Text; batteryVoltageDEPRECATED @16 :Int32; batteryTempCDEPRECATED @29 :Float32; + batteryPercent @8 :Int16; + batteryCurrent @15 :Int32; + chargingError @17 :Bool; + chargingDisabled @18 :Bool; + usbOnline @12 :Bool; } struct PandaState @0xa7649e2575e4591e { @@ -479,8 +479,8 @@ struct PeripheralState { voltage @1 :UInt32; current @2 :UInt32; fanSpeedRpm @3 :UInt16; - usbPowerMode @4 :UsbPowerMode; + usbPowerMode @4 :UsbPowerMode; enum UsbPowerMode @0xa8883583b32c9877 { none @0; client @1; @@ -953,11 +953,11 @@ struct LongitudinalPlan @0xe00b5b3eba12876c { struct LateralPlan @0xe1e9318e2ae8b51e { modelMonoTime @31 :UInt64; - laneWidth @0 :Float32; - lProb @5 :Float32; - rProb @7 :Float32; + laneWidthDEPRECATED @0 :Float32; + lProbDEPRECATED @5 :Float32; + rProbDEPRECATED @7 :Float32; dPathPoints @20 :List(Float32); - dProb @21 :Float32; + dProbDEPRECATED @21 :Float32; #dp dPathWLinesX @32 :List(Float32); diff --git a/cereal/visionipc/visionipc_pyx.so b/cereal/visionipc/visionipc_pyx.so index 4859b766a..388616f17 100755 Binary files a/cereal/visionipc/visionipc_pyx.so and b/cereal/visionipc/visionipc_pyx.so differ diff --git a/common/dp_conf.py b/common/dp_conf.py index d66cd69e0..a03dab96b 100644 --- a/common/dp_conf.py +++ b/common/dp_conf.py @@ -5,7 +5,6 @@ import sys import json import time from math import floor -from selfdrive.controls.lib.lane_planner import CAMERA_OFFSET ''' * type: Bool, Int8, UInt8, UInt16, Float32 @@ -49,7 +48,7 @@ confs = [ # lateral - alc {'name': 'dp_lateral_mode', 'default': 1, 'type': 'UInt8', 'min': 0, 'max': 2, 'conf_type': ['param', 'struct']}, # {'name': 'dp_signal_off_delay', 'default': 3., 'type': 'Float32', 'min': 0., 'max': 10., 'depends': [{'name': 'dp_lateral_mode', 'vals': [0]}], 'conf_type': ['param', 'struct']}, - {'name': 'dp_lc_min_mph', 'default': 30, 'type': 'UInt8', 'min': 0, 'max': 255, 'depends': [{'name': 'dp_lateral_mode', 'vals': [1, 2]}], 'conf_type': ['param', 'struct']}, + {'name': 'dp_lc_min_mph', 'default': 15, 'type': 'UInt8', 'min': 0, 'max': 255, 'depends': [{'name': 'dp_lateral_mode', 'vals': [1, 2]}], 'conf_type': ['param', 'struct']}, {'name': 'dp_lc_auto_min_mph', 'default': 40, 'type': 'UInt8', 'min': 0, 'max': 255, 'depends': [{'name': 'dp_lateral_mode', 'vals': [2]}], 'conf_type': ['param', 'struct']}, {'name': 'dp_lc_auto_delay', 'default': 3., 'type': 'Float32', 'min': 0., 'max': 10., 'depends': [{'name': 'dp_lateral_mode', 'vals': [2]}], 'conf_type': ['param', 'struct']}, @@ -75,8 +74,9 @@ confs = [ {'name': 'dp_toyota_auto_lock', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, {'name': 'dp_toyota_auto_unlock', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, - {'name': 'dp_use_lanelines', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, {'name': 'dp_mapd', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, + {'name': 'dp_local_db', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, + {'name': 'dp_lateral_lqr', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, @@ -94,6 +94,11 @@ confs = [ # {'name': 'dp_uploader', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct'], 'update_once': True}, # # {'name': 'dp_gpxd', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, {'name': 'dp_hotspot_on_boot', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, + {'name': 'dp_honda_eps_mod', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, + {'name': 'dp_dm', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, + {'name': 'dp_speed_check', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']}, + {'name': 'dp_temp_check', 'default': True, 'type': 'Bool', 'conf_type': ['param']}, + {'name': 'dp_vag_resume_fix', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, # # lat ctrl # {'name': 'dp_lane_less_mode_ctrl', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']}, # {'name': 'dp_lane_less_mode', 'default': 2, 'type': 'UInt8', 'min': 0, 'max': 2, 'depends': [{'name': 'dp_lane_less_mode_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']}, @@ -105,8 +110,6 @@ confs = [ # {'name': 'dp_accel_profile', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 2, 'depends': [{'name': 'dp_accel_profile_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']}, # # safety # {'name': 'dp_gear_check', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']}, - # {'name': 'dp_speed_check', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']}, - # {'name': 'dp_temp_monitor', 'default': True, 'type': 'Bool', 'conf_type': ['param']}, # # UIs # {'name': 'dp_ui_display_mode', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 1, 'conf_type': ['param', 'struct']}, # {'name': 'dp_ui_speed', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']}, @@ -134,7 +137,6 @@ confs = [ # # hyundai # {'name': 'dp_hkg_smart_mdps', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, # # honda - {'name': 'dp_honda_eps_mod', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, # {'name': 'dp_honda_kmh_display', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, # # volkswagen # # {'name': 'dp_vw_panda', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, @@ -142,7 +144,7 @@ confs = [ # {'name': 'dp_ip_addr', 'default': '', 'type': 'Text', 'conf_type': ['struct']}, # {'name': 'dp_fan_mode', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 2, 'conf_type': ['param']}, # {'name': 'dp_last_modified', 'default': str(floor(time.time())), 'type': 'Text', 'conf_type': ['param']}, - {'name': 'dp_camera_offset', 'default': CAMERA_OFFSET, 'type': 'Int8', 'min': -100, 'max': 100, 'conf_type': ['param', 'struct']}, + # {'name': 'dp_camera_offset', 'default': CAMERA_OFFSET, 'type': 'Int8', 'min': -100, 'max': 100, 'conf_type': ['param', 'struct']}, # {'name': 'dp_path_offset', 'default': 0 if EON else -4 if TICI else 0, 'type': 'Int8', 'min': -100, 'max': 100, 'conf_type': ['param', 'struct']}, # # {'name': 'dp_reg', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, @@ -165,7 +167,6 @@ confs = [ # # {'name': 'dp_no_offroad_fix', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, # {'name': 'dp_ftpd', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, - {'name': 'dp_dm', 'default': False, 'type': 'Bool', 'conf_type': ['param']}, ] def get_definition(name): diff --git a/common/gpio.py b/common/gpio.py index 32e5ca86c..260f8898a 100644 --- a/common/gpio.py +++ b/common/gpio.py @@ -1,3 +1,5 @@ +from typing import Optional + def gpio_init(pin: int, output: bool) -> None: try: with open(f"/sys/class/gpio/gpio{pin}/direction", 'wb') as f: @@ -5,10 +7,19 @@ def gpio_init(pin: int, output: bool) -> None: except Exception as e: print(f"Failed to set gpio {pin} direction: {e}") - def gpio_set(pin: int, high: bool) -> None: try: with open(f"/sys/class/gpio/gpio{pin}/value", 'wb') as f: f.write(b"1" if high else b"0") except Exception as e: print(f"Failed to set gpio {pin} value: {e}") + +def gpio_read(pin: int) -> Optional[bool]: + val = None + try: + with open(f"/sys/class/gpio/gpio{pin}/value", 'rb') as f: + val = bool(int(f.read().strip())) + except Exception as e: + print(f"Failed to set gpio {pin} value: {e}") + + return val diff --git a/common/i18n.py b/common/i18n.py index 32a6a8bdc..774728b32 100644 --- a/common/i18n.py +++ b/common/i18n.py @@ -4,6 +4,7 @@ from common.params import Params locale_dir = "/data/openpilot/selfdrive/assets/locales" # supported_language = ["en-US", "zh-TW", "zh-CN", "ja-JP", "ko-KR"] supported_languages = { + "main_en": "en-US", "main_zh-CHT": "zh-TW", "main_zh-CHS": "zh-CN", "main_ko": "ko-KR", @@ -11,9 +12,12 @@ supported_languages = { def events(): locale = Params().get("LanguageSetting", encoding='utf8') - if locale is not None: - locale = supported_languages[locale.strip()] - else: + try: + if locale is not None: + locale = supported_languages[locale.strip()] + else: + locale = "en-US" + except KeyError: locale = "en-US" i18n = gettext.translation("events", localedir=locale_dir, fallback=True, languages=[locale]) i18n.install() diff --git a/common/params_pyx.so b/common/params_pyx.so index a5683f615..1323317d1 100755 Binary files a/common/params_pyx.so and b/common/params_pyx.so differ diff --git a/common/version.h b/common/version.h index 2929b2bec..feff36f3c 100644 --- a/common/version.h +++ b/common/version.h @@ -1 +1 @@ -#define COMMA_VERSION "2022.09.07" +#define COMMA_VERSION "2022.09.15" diff --git a/docs/CARS.md b/docs/CARS.md index 78b4d3b16..47694fffe 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -6,213 +6,213 @@ A supported vehicle is one that just works when you install a comma three. All s # 205 Supported Cars -|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Harness| -|---|---|---|:---:|:---:|:---:|:---:|:---:| -|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|25 mph|25 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Acura|RDX 2019-22|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Audi|A3 2014-19|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Audi|A3 Sportback e-tron 2017-18|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Audi|Q2 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Audi|Q3 2020-21|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Audi|RS3 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Audi|S3 2015-17|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Cadillac|Escalade ESV 2016[1](#footnotes)|Adaptive Cruise Control (ACC) & LKAS|openpilot|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|OBD-II| -|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim without Super Cruise Package|Stock|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|GM| -|Chevrolet|Silverado 1500 2020-21|Safety Package II|Stock|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|GM| -|Chevrolet|Volt 2017-18[1](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|OBD-II| -|Chrysler|Pacifica 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Chrysler|Pacifica 2019-20|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Chrysler|Pacifica 2021|All|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Chrysler|Pacifica Hybrid 2019-22|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|comma|body|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|None| -|Genesis|G70 2018-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai F| -|Genesis|G70 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai F| -|Genesis|G80 2017-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Genesis|G90 2017-18|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|GMC|Acadia 2018[1](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|OBD-II| -|GMC|Sierra 1500 2020-21|Driver Alert Package II|Stock|0 mph|7 mph|[![star](assets/icon-star-full.svg)](##)|GM| -|Honda|Accord 2018-22|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Accord Hybrid 2018-22|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Civic 2016-18|Honda Sensing|openpilot|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Civic 2019-21|All|Stock|0 mph|2 mph[2](#footnotes)|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Civic 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Honda Bosch B| -|Honda|Civic Hatchback 2017-21|Honda Sensing|Stock|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Civic Hatchback 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Honda Bosch B| -|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|CR-V 2017-22|Honda Sensing|Stock|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|CR-V Hybrid 2017-19|Honda Sensing|Stock|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|e 2020|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Fit 2018-20|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Freed 2020|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|HR-V 2019-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Insight 2019-22|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Inspire 2018|All|Stock|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Bosch A| -|Honda|Odyssey 2018-20|Honda Sensing|openpilot|25 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Passport 2019-21|All|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Pilot 2016-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Honda|Ridgeline 2017-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|Honda Nidec| -|Hyundai|Elantra 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai B| -|Hyundai|Elantra 2021-22|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai K| -|Hyundai|Elantra Hybrid 2021-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai K| -|Hyundai|Genesis 2015-16|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|37 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai J| -|Hyundai|Ioniq 5 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai Q| -|Hyundai|Ioniq Electric 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Hyundai|Ioniq Electric 2020|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Hyundai|Ioniq Hybrid 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Hyundai|Ioniq Hybrid 2020-22|Smart Cruise Control (SCC) & LFA|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Hyundai|Ioniq Plug-in Hybrid 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Hyundai|Ioniq Plug-in Hybrid 2020-21|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Hyundai|Kona 2020|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai B| -|Hyundai|Kona Electric 2018-21|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai G| -|Hyundai|Kona Electric 2022|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai O| -|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai I| -|Hyundai|Palisade 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Hyundai|Santa Fe 2019-20|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai D| -|Hyundai|Santa Fe 2021-22|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai L| -|Hyundai|Santa Fe Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai L| -|Hyundai|Santa Fe Plug-in Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai L| -|Hyundai|Sonata 2018-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai E| -|Hyundai|Sonata 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai A| -|Hyundai|Sonata Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai A| -|Hyundai|Tucson 2021|Smart Cruise Control (SCC)|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai L| -|Hyundai|Tucson Diesel 2019|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai L| -|Hyundai|Tucson Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai N| -|Hyundai|Veloster 2019-20|Smart Cruise Control (SCC)|Stock|5 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai E| -|Jeep|Grand Cherokee 2016-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Jeep|Grand Cherokee 2019-21|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|FCA| -|Kia|Ceed 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai E| -|Kia|EV6 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai P| -|Kia|Forte 2018|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai B| -|Kia|Forte 2019-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai G| -|Kia|K5 2021-22|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai A| -|Kia|Niro Electric 2019|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Kia|Niro Electric 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai F| -|Kia|Niro Electric 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Kia|Niro Electric 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Kia|Niro Hybrid 2021|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai F| -|Kia|Niro Hybrid 2022|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Kia|Niro Plug-in Hybrid 2018-19|Smart Cruise Control (SCC) & LKAS|openpilot|10 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Kia|Optima 2017|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai B| -|Kia|Optima 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai G| -|Kia|Seltos 2021|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai A| -|Kia|Sorento 2018|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Kia|Sorento 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai E| -|Kia|Stinger 2018-20|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai C| -|Kia|Telluride 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Hyundai H| -|Lexus|CT Hybrid 2017-18|Lexus Safety System+|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|ES 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|ES Hybrid 2017-18|Lexus Safety System+|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|ES Hybrid 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|IS 2017-19|All|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|NX 2018-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|NX 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|NX Hybrid 2018-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|NX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|RC 2017-20|All|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|RX 2016-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|RX 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|RX Hybrid 2016-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|RX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Lexus|UX Hybrid 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Mazda|CX-5 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Mazda| -|Mazda|CX-9 2021-22|All|Stock|0 mph|28 mph|[![star](assets/icon-star-full.svg)](##)|Mazda| -|Nissan|Altima 2019-20|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Nissan B| -|Nissan|Leaf 2018-22|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Nissan A| -|Nissan|Rogue 2018-20|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Nissan A| -|Nissan|X-Trail 2017|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Nissan A| -|Ram|1500 2019-22|Adaptive Cruise Control|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|Ram| -|SEAT|Ateca 2018|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|SEAT|Leon 2014-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Subaru|Ascent 2019-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru A| -|Subaru|Crosstrek 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|Subaru A| -|Subaru|Crosstrek 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru A| -|Subaru|Forester 2019-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru A| -|Subaru|Impreza 2017-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|Subaru A| -|Subaru|Impreza 2020-22|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru A| -|Subaru|Legacy 2020-22|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru B| -|Subaru|Outback 2020-22|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru B| -|Subaru|XV 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|Subaru A| -|Subaru|XV 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Subaru A| -|Škoda|Kamiq 2021[5](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Karoq 2019-21[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Kodiaq 2018-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Octavia 2015, 2018-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Octavia RS 2016|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Scala 2020|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Škoda|Superb 2015-18|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Toyota|Alphard 2019-20|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Alphard Hybrid 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon 2016|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon 2017-18|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon 2019-21|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon Hybrid 2019-21|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Avalon Hybrid 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|C-HR 2017-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|C-HR Hybrid 2017-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Camry 2018-20|All|Stock|0 mph[4](#footnotes)|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Camry 2021-22|All|openpilot|0 mph[4](#footnotes)|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Camry Hybrid 2018-20|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Camry Hybrid 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla 2017-19|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla Cross (Non-US only) 2020-21|All|openpilot|17 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla Cross Hybrid (Non-US only) 2020-22|All|openpilot|17 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla Hatchback 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Corolla Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Highlander 2017-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Highlander 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Highlander Hybrid 2017-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Highlander Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Mirai 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius 2016|Toyota Safety Sense P|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius 2017-20|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius Prime 2017-20|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Prius v 2017|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 2016|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 2017-18|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 2019-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 Hybrid 2016|Toyota Safety Sense P|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 Hybrid 2017-18|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 Hybrid 2019-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|RAV4 Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Toyota|Sienna 2018-20|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|Toyota| -|Volkswagen|Arteon 2018-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Arteon eHybrid 2020-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Arteon R 2020-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Atlas 2018-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Atlas Cross Sport 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|California 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Caravelle 2020[7](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|CC 2018-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|e-Golf 2014-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf 2015-20[8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf Alltrack 2015-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf GTD 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf GTE 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf GTI 2015-21|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf R 2015-19[8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Golf SportsVan 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| -|Volkswagen|Jetta 2018-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Jetta GLI 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Passat 2015-22[6,7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Passat Alltrack 2015-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Passat GTE 2015-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Polo 2020-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Polo GTI 2020-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|T-Cross 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|T-Roc 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Taos 2022[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Teramont 2018-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Teramont Cross Sport 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Teramont X 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Tiguan 2019-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|J533| -|Volkswagen|Touran 2017|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|VW| +|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|Harness| +|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:| +|Acura|ILX 2016-19|AcuraWatch Plus|openpilot|25 mph|25 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Acura|RDX 2016-18|AcuraWatch Plus|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Acura|RDX 2019-22|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Audi|A3 2014-19|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Audi|A3 Sportback e-tron 2017-18|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Audi|Q2 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Audi|Q3 2020-21|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Audi|RS3 2018|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Audi|S3 2015-17|ACC + Lane Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Cadillac|Escalade ESV 2016[1](#footnotes)|Adaptive Cruise Control (ACC) & LKAS|openpilot|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|OBD-II| +|Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim without Super Cruise Package|Stock|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|GM| +|Chevrolet|Silverado 1500 2020-21|Safety Package II|Stock|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|GM| +|Chevrolet|Volt 2017-18[1](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|OBD-II| +|Chrysler|Pacifica 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Chrysler|Pacifica 2019-20|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Chrysler|Pacifica 2021|All|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Chrysler|Pacifica Hybrid 2019-22|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|comma|body|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|None| +|Genesis|G70 2018-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai F| +|Genesis|G70 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai F| +|Genesis|G80 2017-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Genesis|G90 2017-18|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|GMC|Acadia 2018[1](#footnotes)|Adaptive Cruise Control|openpilot|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|OBD-II| +|GMC|Sierra 1500 2020-21|Driver Alert Package II|Stock|0 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|GM| +|Honda|Accord 2018-22|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Accord Hybrid 2018-22|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Civic 2016-18|Honda Sensing|openpilot|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Civic 2019-21|All|openpilot|0 mph|2 mph[2](#footnotes)|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Civic 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch B| +|Honda|Civic Hatchback 2017-21|Honda Sensing|openpilot|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Civic Hatchback 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch B| +|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|CR-V 2017-22|Honda Sensing|openpilot|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|CR-V Hybrid 2017-19|Honda Sensing|openpilot|0 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|e 2020|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Fit 2018-20|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Freed 2020|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|HR-V 2019-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Insight 2019-22|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Inspire 2018|All|openpilot|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Bosch A| +|Honda|Odyssey 2018-20|Honda Sensing|openpilot|25 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Passport 2019-21|All|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Pilot 2016-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Honda|Ridgeline 2017-22|Honda Sensing|openpilot|25 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Honda Nidec| +|Hyundai|Elantra 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai B| +|Hyundai|Elantra 2021-22|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai K| +|Hyundai|Elantra Hybrid 2021-22|Smart Cruise Control (SCC)|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai K| +|Hyundai|Genesis 2015-16|Smart Cruise Control (SCC) & LKAS|Stock|19 mph|37 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai J| +|Hyundai|Ioniq 5 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai Q| +|Hyundai|Ioniq Electric 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Hyundai|Ioniq Electric 2020|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Hyundai|Ioniq Hybrid 2017-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Hyundai|Ioniq Hybrid 2020-22|Smart Cruise Control (SCC) & LFA|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Hyundai|Ioniq Plug-in Hybrid 2019|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Hyundai|Ioniq Plug-in Hybrid 2020-21|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Hyundai|Kona 2020|Smart Cruise Control (SCC)|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai B| +|Hyundai|Kona Electric 2018-21|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai G| +|Hyundai|Kona Electric 2022|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai O| +|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai I| +|Hyundai|Palisade 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Hyundai|Santa Fe 2019-20|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai D| +|Hyundai|Santa Fe 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai L| +|Hyundai|Santa Fe Hybrid 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai L| +|Hyundai|Santa Fe Plug-in Hybrid 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai L| +|Hyundai|Sonata 2018-19|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai E| +|Hyundai|Sonata 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai A| +|Hyundai|Sonata Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai A| +|Hyundai|Tucson 2021|Smart Cruise Control (SCC)|openpilot|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai L| +|Hyundai|Tucson Diesel 2019|Smart Cruise Control (SCC)|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai L| +|Hyundai|Tucson Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai N| +|Hyundai|Veloster 2019-20|Smart Cruise Control (SCC)|Stock|5 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai E| +|Jeep|Grand Cherokee 2016-18|Adaptive Cruise Control|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Jeep|Grand Cherokee 2019-21|Adaptive Cruise Control|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|FCA| +|Kia|Ceed 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai E| +|Kia|EV6 2022|Highway Driving Assist II|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai P| +|Kia|Forte 2018|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai B| +|Kia|Forte 2019-21|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai G| +|Kia|K5 2021-22|Smart Cruise Control (SCC)|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai A| +|Kia|Niro Electric 2019|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Kia|Niro Electric 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai F| +|Kia|Niro Electric 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Kia|Niro Electric 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Kia|Niro Hybrid 2021|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai F| +|Kia|Niro Hybrid 2022|Smart Cruise Control (SCC) & LKAS|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Kia|Niro Plug-in Hybrid 2018-19|Smart Cruise Control (SCC) & LKAS|openpilot|10 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Kia|Optima 2017|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai B| +|Kia|Optima 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai G| +|Kia|Seltos 2021|Smart Cruise Control (SCC)|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai A| +|Kia|Sorento 2018|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Kia|Sorento 2019|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai E| +|Kia|Stinger 2018-20|Smart Cruise Control (SCC) & LKAS|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai C| +|Kia|Telluride 2020|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Hyundai H| +|Lexus|CT Hybrid 2017-18|Lexus Safety System+|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|ES 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|ES Hybrid 2017-18|Lexus Safety System+|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|ES Hybrid 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|IS 2017-19|All|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|NX 2018-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|NX 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|NX Hybrid 2018-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|NX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|RC 2017-20|All|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|RX 2016-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|RX 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|RX Hybrid 2016-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Lexus|RX Hybrid 2020-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Lexus|UX Hybrid 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Mazda|CX-5 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Mazda| +|Mazda|CX-9 2021-22|All|Stock|0 mph|28 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Mazda| +|Nissan|Altima 2019-20|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Nissan B| +|Nissan|Leaf 2018-22|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Nissan A| +|Nissan|Rogue 2018-20|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Nissan A| +|Nissan|X-Trail 2017|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Nissan A| +|Ram|1500 2019-22|Adaptive Cruise Control|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Ram| +|SEAT|Ateca 2018|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|SEAT|Leon 2014-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Subaru|Ascent 2019-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Crosstrek 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Crosstrek 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Forester 2019-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Impreza 2017-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Impreza 2020-22|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|Legacy 2020-22|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru B| +|Subaru|Outback 2020-22|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru B| +|Subaru|XV 2018-19|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Subaru|XV 2020-21|EyeSight Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Subaru A| +|Škoda|Kamiq 2021[5](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Karoq 2019-21[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Kodiaq 2018-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Octavia 2015, 2018-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Octavia RS 2016|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Scala 2020|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Škoda|Superb 2015-18|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Toyota|Alphard 2019-20|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Alphard Hybrid 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Avalon 2016|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Avalon 2017-18|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Avalon 2019-21|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Avalon 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Avalon Hybrid 2019-21|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Avalon Hybrid 2022|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|C-HR 2017-21|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|C-HR Hybrid 2017-19|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Camry 2018-20|All|Stock|0 mph[4](#footnotes)|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Camry 2021-22|All|openpilot|0 mph[4](#footnotes)|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Camry Hybrid 2018-20|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Camry Hybrid 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Corolla 2017-19|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Corolla 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Corolla Cross (Non-US only) 2020-21|All|openpilot|17 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Corolla Cross Hybrid (Non-US only) 2020-22|All|openpilot|17 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Corolla Hatchback 2019-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Corolla Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Highlander 2017-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Highlander 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Highlander Hybrid 2017-19|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Highlander Hybrid 2020-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Mirai 2021|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Prius 2016|Toyota Safety Sense P|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Prius 2017-20|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Prius Prime 2017-20|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|Prius v 2017|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 2016|Toyota Safety Sense P|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 2017-18|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 2019-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|RAV4 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 Hybrid 2016|Toyota Safety Sense P|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 Hybrid 2017-18|All|Stock[3](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|RAV4 Hybrid 2019-21|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|Toyota| +|Toyota|RAV4 Hybrid 2022|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Toyota|Sienna 2018-20|All|Stock[3](#footnotes)|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|Toyota| +|Volkswagen|Arteon 2018-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Arteon eHybrid 2020-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Arteon R 2020-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Atlas 2018-23[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Atlas Cross Sport 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|California 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Caravelle 2020[7](#footnotes)|Driver Assistance|Stock|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|CC 2018-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|e-Golf 2014-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf 2015-20[8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf Alltrack 2015-19|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf GTD 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf GTE 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf GTI 2015-21|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf R 2015-19[8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Golf SportsVan 2015-20|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| +|Volkswagen|Jetta 2018-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Jetta GLI 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Passat 2015-22[6,7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Passat Alltrack 2015-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Passat GTE 2015-22[7,8](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Polo 2020-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Polo GTI 2020-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|T-Cross 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|T-Roc 2021[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Taos 2022[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Teramont 2018-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Teramont Cross Sport 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Teramont X 2021-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Tiguan 2019-22[7](#footnotes)|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|J533| +|Volkswagen|Touran 2017|Driver Assistance|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|VW| 1Requires a community built ASCM harness. NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).
diff --git a/installer/custom/install_osm.sh b/installer/custom/install_osm.sh new file mode 100755 index 000000000..10392e442 --- /dev/null +++ b/installer/custom/install_osm.sh @@ -0,0 +1,31 @@ +# OSM Installation instructions: +# https://wiki.openstreetmap.org/wiki/Overpass_API/Installation + +# Install expat. All other needed libraries are already installed. +# g++ make expat libexpat1-dev zlib1g-dev +#sudo apt-get update +#sudo apt-get install expat + +# Add required path variables to environment +export EXEC_DIR=/data/media/0/osm/v0.7.57/ +export SOURCE_FILE_ROOT=osm-3s_v0.7.57 +export GZ_FILE=${SOURCE_FILE_ROOT}.tar.xz +# export DB_DIR=/data/osm/db/ + +# Download and extract overpass library +cd /data/media/0/ +mkdir osm +cd /data/media/0/osm +#wget http://dev.overpass-api.de/releases/$GZ_FILE +cp -f /data/openpilot/selfdrive/mapd/assets/$GZ_FILE . +tar -vxf $GZ_FILE + +# Configure and install overpass +#cd $(ls | grep $SOURCE_FILE_ROOT\.[0-9]*) +#cd osm-3s_v0.7.56 +#./configure CXXFLAGS="-O2" --prefix=$EXEC_DIR +#make install + +# Remove source files after installation +#cd .. +mv osm-3s_v0.7.57 v0.7.57 diff --git a/installer/custom/install_osm_db.sh b/installer/custom/install_osm_db.sh new file mode 100755 index 000000000..162517c75 --- /dev/null +++ b/installer/custom/install_osm_db.sh @@ -0,0 +1,27 @@ +export OSM_DIR=/data/media/0/osm +export DB_DIR=${OSM_DIR}/db +export XZ_MAP_FILE_NAME=us-west.tar.xz +export XZ_MAP_FILE=${OSM_DIR}/${XZ_MAP_FILE_NAME} + +# Remove legacy compressed map file if existing +rm -rf $XZ_MAP_FILE + +# WD +cd $OSM_DIR + +# Download map file +wget -O ${XZ_MAP_FILE_NAME} "https://thecorgirosie-my.sharepoint.com/:u:/p/jason_wen/EYWdXcNpOhJCuOLymUHSwH4BwdRddfiYEbZAK1ltd-hZJA?e=TW5ia4&download=1" + +if [[ "$?" != 0 ]]; then + echo "Error downloading map file" +else + echo "Successfully downloaded map file" + # Remove current db dir if existing + rm -rf $DB_DIR + # Decompressing + tar -vxf ${XZ_MAP_FILE_NAME} + #mv us-west db + + # Remove compressed map files after expanding + # rm -rf $GZ_MAP_FILE_NAME +fi diff --git a/opendbc/can/libdbc.so b/opendbc/can/libdbc.so index a4183246f..e83fc7ddb 100755 Binary files a/opendbc/can/libdbc.so and b/opendbc/can/libdbc.so differ diff --git a/opendbc/ford_lincoln_base_pt.dbc b/opendbc/ford_lincoln_base_pt.dbc index 38fa005fe..d561f4069 100644 --- a/opendbc/ford_lincoln_base_pt.dbc +++ b/opendbc/ford_lincoln_base_pt.dbc @@ -1126,7 +1126,8 @@ BO_ 984 IPMA_Data: 8 IPMA_ADAS SG_ DasStats_D_Dsply : 47|2@0+ (1,0) [0|3] "SED" GWM SG_ DasWarn_D_Dsply : 44|2@0+ (1,0) [0|3] "SED" GWM SG_ AhbHiBeam_D_Rq : 59|2@0+ (1,0) [0|3] "SED" GWM - SG_ Set_Me_X1 : 63|4@0+ (1,0) [0|15] "" XXX + SG_ Passthru_63 : 63|4@0+ (1,0) [0|15] "" XXX + SG_ Passthru_48 : 48|1@0+ (1,0) [0|1] "" XXX BO_ 985 IPMA_Data2: 8 IPMA_ADAS SG_ LdwChime_B_Rq : 34|1@0+ (1,0) [0|1] "SED" GWM @@ -3369,7 +3370,7 @@ BO_ 979 LateralMotionControl: 8 IPMA_ADAS SG_ LatCtlRampType_D_Rq : 53|2@0+ (1,0) [0|3] "SED" GWM SG_ LatCtlPrecision_D_Rq : 33|2@0+ (1,0) [0|3] "SED" GWM SG_ LatCtlPathOffst_L_Actl : 47|10@0+ (0.01,-5.12) [-5.12|5.11] "meter" GWM - SG_ LatCtlPath_An_Actl : 31|11@0+ (0.0005,-0.5) [-0.5|0.5235] "radians" GWM + SG_ LatCtlPath_An_Actl : 31|11@0+ (0.0005,-0.4995) [-0.4995|0.5240] "radians" GWM SG_ LatCtlCurv_NoRate_Actl : 12|13@0+ (2.5E-007,-0.001024) [-0.001024|0.00102375] "1/meter" GWM SG_ LatCtlCurv_No_Actl : 7|11@0+ (2E-005,-0.02) [-0.02|0.02094] "1/meter" GWM diff --git a/opendbc/generator/toyota/_toyota_2017.dbc b/opendbc/generator/toyota/_toyota_2017.dbc index 178abdbfc..6f6f7dd66 100644 --- a/opendbc/generator/toyota/_toyota_2017.dbc +++ b/opendbc/generator/toyota/_toyota_2017.dbc @@ -204,7 +204,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM BO_ 1009 PCM_CRUISE_ALT: 8 XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX - SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX + SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX @@ -328,6 +328,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX + SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX BO_ 1553 UI_SETTING: 8 XXX SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX @@ -394,7 +395,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT."; CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit"; CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel"; CM_ SG_ 956 GEAR "on 6MT, only R shows."; -CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to"; +CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to"; CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator"; CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity"; CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle"; @@ -427,7 +428,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds"; CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds"; CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds"; CM_ SG_ 1163 TSRSPU "always 1"; -CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit"; +CM_ SG_ 1552 UI_SPEED "Does not appear to match dash"; CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state"; CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting"; CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state"; @@ -479,6 +480,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none"; VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on"; VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed"; +VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)"; VAL_ 1553 UNITS 1 "km" 2 "miles"; VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left"; VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked"; diff --git a/opendbc/hyundai_canfd.dbc b/opendbc/hyundai_canfd.dbc index 83c5f833f..a7a051189 100644 --- a/opendbc/hyundai_canfd.dbc +++ b/opendbc/hyundai_canfd.dbc @@ -62,11 +62,14 @@ BO_ 80 LKAS: 16 XXX SG_ NEW_SIGNAL_2 : 70|2@0+ (1,0) [0|3] "" XXX SG_ SET_ME_1 : 80|1@0+ (1,0) [0|1] "" XXX SG_ NEW_SIGNAL_3 : 111|8@0+ (1,0) [0|255] "" XXX + SG_ FCA_SYSWARN : 40|1@0+ (1,0) [0|1] "" XXX BO_ 96 ESP_STATUS: 32 XXX SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX SG_ COUNTER : 16|8@1+ (1,0) [0|255] "" XXX SG_ ESP_DISABLED : 42|3@1+ (1,0) [0|63] "" XXX + SG_ BRAKE_POSITION : 128|10@1+ (1,0) [0|65535] "" XXX + SG_ BRAKE_PRESSED : 148|1@1+ (1,0) [0|3] "" XXX BO_ 101 BRAKE: 32 XXX SG_ CHECKSUM : 0|16@1+ (1,0) [0|65535] "" XXX diff --git a/opendbc/hyundai_kia_generic.dbc b/opendbc/hyundai_kia_generic.dbc index c09b59f40..f35199100 100644 --- a/opendbc/hyundai_kia_generic.dbc +++ b/opendbc/hyundai_kia_generic.dbc @@ -1645,7 +1645,7 @@ CM_ "BO_ E_EMS11: All (plug-in) hybrids use this gas signal: CR_Vcu_AccPedDep_Po CM_ SG_ 1348 SpeedLim_Nav_Clu "Speed limit displayed on Nav, Cluster and HUD"; VAL_ 274 CUR_GR 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 7 "D" 8 "D" 14 "R" 0 "P"; -VAL_ 871 CF_Lvr_Gear 5 "D" 8 "S" 6 "N" 7 "R" 0 "P"; +VAL_ 871 CF_Lvr_Gear 12 "T" 5 "D" 8 "S" 6 "N" 7 "R" 0 "P"; VAL_ 882 Elect_Gear_Shifter 5 "D" 8 "S" 6 "N" 7 "R" 0 "P"; VAL_ 905 ACCMode 0 "off" 1 "enabled" 2 "driver_override" 3 "off_maybe_fault" 4 "cancelled"; VAL_ 909 CF_VSM_Warn 2 "FCW" 3 "AEB"; diff --git a/opendbc/toyota_new_mc_pt_generated.dbc b/opendbc/toyota_new_mc_pt_generated.dbc index e28893e4c..708560f64 100644 --- a/opendbc/toyota_new_mc_pt_generated.dbc +++ b/opendbc/toyota_new_mc_pt_generated.dbc @@ -249,7 +249,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM BO_ 1009 PCM_CRUISE_ALT: 8 XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX - SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX + SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX @@ -373,6 +373,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX + SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX BO_ 1553 UI_SETTING: 8 XXX SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX @@ -439,7 +440,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT."; CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit"; CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel"; CM_ SG_ 956 GEAR "on 6MT, only R shows."; -CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to"; +CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to"; CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator"; CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity"; CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle"; @@ -472,7 +473,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds"; CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds"; CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds"; CM_ SG_ 1163 TSRSPU "always 1"; -CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit"; +CM_ SG_ 1552 UI_SPEED "Does not appear to match dash"; CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state"; CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting"; CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state"; @@ -524,6 +525,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none"; VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on"; VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed"; +VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)"; VAL_ 1553 UNITS 1 "km" 2 "miles"; VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left"; VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked"; diff --git a/opendbc/toyota_nodsu_pt_generated.dbc b/opendbc/toyota_nodsu_pt_generated.dbc index 866debddc..d9cfd9a7f 100644 --- a/opendbc/toyota_nodsu_pt_generated.dbc +++ b/opendbc/toyota_nodsu_pt_generated.dbc @@ -250,7 +250,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM BO_ 1009 PCM_CRUISE_ALT: 8 XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX - SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX + SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX @@ -374,6 +374,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX + SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX BO_ 1553 UI_SETTING: 8 XXX SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX @@ -440,7 +441,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT."; CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit"; CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel"; CM_ SG_ 956 GEAR "on 6MT, only R shows."; -CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to"; +CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to"; CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator"; CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity"; CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle"; @@ -473,7 +474,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds"; CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds"; CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds"; CM_ SG_ 1163 TSRSPU "always 1"; -CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit"; +CM_ SG_ 1552 UI_SPEED "Does not appear to match dash"; CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state"; CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting"; CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state"; @@ -526,6 +527,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none"; VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on"; VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed"; +VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)"; VAL_ 1553 UNITS 1 "km" 2 "miles"; VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left"; VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked"; diff --git a/opendbc/toyota_tnga_k_pt_generated.dbc b/opendbc/toyota_tnga_k_pt_generated.dbc index f0e40dc4a..2eaef636e 100644 --- a/opendbc/toyota_tnga_k_pt_generated.dbc +++ b/opendbc/toyota_tnga_k_pt_generated.dbc @@ -249,7 +249,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM BO_ 1009 PCM_CRUISE_ALT: 8 XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX - SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX + SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX @@ -373,6 +373,7 @@ BO_ 1552 BODY_CONTROL_STATE_2: 8 XXX SG_ METER_SLIDER_BRIGHTNESS_PCT : 30|7@0+ (1,0) [12|100] "%" XXX SG_ METER_SLIDER_LOW_BRIGHTNESS : 37|1@0+ (1,0) [0|1] "" XXX SG_ METER_SLIDER_DIMMED : 38|1@0+ (1,0) [0|1] "" XXX + SG_ UNITS : 63|3@0+ (1,0) [1|4] "" XXX BO_ 1553 UI_SETTING: 8 XXX SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX @@ -439,7 +440,7 @@ CM_ SG_ 865 CLUTCH_RELEASED "boolean of clutch for 6MT."; CM_ SG_ 921 UI_SET_SPEED "set speed shown in the vehicle's UI with the vehicle's unit"; CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel"; CM_ SG_ 956 GEAR "on 6MT, only R shows."; -CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to"; +CM_ SG_ 1009 UI_SET_SPEED "units seem to be whatever the car is set to"; CM_ SG_ 1041 PCS_INDICATOR "Pre-Collision System Indicator"; CM_ SG_ 1041 PCS_SENSITIVITY "Pre-Collision System Sensitivity"; CM_ SG_ 1042 LDA_SA_TOGGLE "LDA Steering Assist Toggle"; @@ -472,7 +473,7 @@ CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds"; CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds"; CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds"; CM_ SG_ 1163 TSRSPU "always 1"; -CM_ SG_ 1552 UI_SPEED "Vehicle's speedometer's display speed after Toyota's offset was applied, uses vehicle's unit"; +CM_ SG_ 1552 UI_SPEED "Does not appear to match dash"; CM_ SG_ 1552 METER_SLIDER_BRIGHTNESS_PCT "Combination display brightness setting, scales from 12 per cent to 100 per cent, reflects combination meter settings only, not linked with headlight state"; CM_ SG_ 1552 METER_SLIDER_LOW_BRIGHTNESS "Combination display low brightness mode, also controls footwell lighting"; CM_ SG_ 1552 METER_SLIDER_DIMMED "Combination display slider not at max, reflects combination meter settings only, not linked with headlight state"; @@ -524,6 +525,7 @@ VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highwa VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none"; VAL_ 1552 METER_SLIDER_LOW_BRIGHTNESS 1 "Low brightness mode, footwell lights off" 0 "Normal mode, footwell lights on"; VAL_ 1552 METER_SLIDER_DIMMED 1 "Dimmed" 0 "Not Dimmed"; +VAL_ 1552 UNITS 1 "km (km/L)" 2 "km (L/100km)" 3 "miles (MPG US)" 4 "miles (MPG Imperial)"; VAL_ 1553 UNITS 1 "km" 2 "miles"; VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left"; VAL_ 1592 LOCK_STATUS 0 "locked" 1 "unlocked"; diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index 315ea4c2b..a48c8c4d6 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/panda.bin.signed b/panda/board/obj/panda.bin.signed index 8dc52ffc8..2640db76b 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.bin.sspoof.signed b/panda/board/obj/panda.bin.sspoof.signed index 1600b18fe..fdfe941b0 100644 Binary files a/panda/board/obj/panda.bin.sspoof.signed and b/panda/board/obj/panda.bin.sspoof.signed differ diff --git a/panda/board/obj/panda.bin.testing.signed b/panda/board/obj/panda.bin.testing.signed index c1771e7b7..3f97aedc7 100644 Binary files a/panda/board/obj/panda.bin.testing.signed and b/panda/board/obj/panda.bin.testing.signed differ diff --git a/panda/board/obj/panda.bin.testing.sspoof.signed b/panda/board/obj/panda.bin.testing.sspoof.signed index dd8a4d89b..7cb763ad7 100644 Binary files a/panda/board/obj/panda.bin.testing.sspoof.signed and b/panda/board/obj/panda.bin.testing.sspoof.signed differ diff --git a/panda/python/__init__.py b/panda/python/__init__.py index e06cf0ba1..2b4e701d7 100644 --- a/panda/python/__init__.py +++ b/panda/python/__init__.py @@ -181,6 +181,9 @@ class Panda: F4_DEVICES = (HW_TYPE_WHITE_PANDA, HW_TYPE_GREY_PANDA, HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS) H7_DEVICES = (HW_TYPE_RED_PANDA, ) + INTERNAL_DEVICES = (HW_TYPE_UNO, HW_TYPE_DOS) + HAS_OBD = (HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS, HW_TYPE_RED_PANDA) + CLOCK_SOURCE_MODE_DISABLED = 0 CLOCK_SOURCE_MODE_FREE_RUNNING = 1 @@ -498,27 +501,6 @@ class Panda: else: return (0, 0) - def is_white(self): - return self.get_type() == Panda.HW_TYPE_WHITE_PANDA - - def is_grey(self): - return self.get_type() == Panda.HW_TYPE_GREY_PANDA - - def is_black(self): - return self.get_type() == Panda.HW_TYPE_BLACK_PANDA - - def is_pedal(self): - return self.get_type() == Panda.HW_TYPE_PEDAL - - def is_uno(self): - return self.get_type() == Panda.HW_TYPE_UNO - - def is_dos(self): - return self.get_type() == Panda.HW_TYPE_DOS - - def is_red(self): - return self.get_type() == Panda.HW_TYPE_RED_PANDA - def get_mcu_type(self): hw_type = self.get_type() if hw_type in Panda.F2_DEVICES: @@ -530,13 +512,10 @@ class Panda: return None def has_obd(self): - return (self.is_uno() or self.is_dos() or self.is_black() or self.is_red()) + return self.get_type() in Panda.HAS_OBD - def has_canfd(self) -> bool: - return self.get_type() in Panda.H7_DEVICES - - def is_internal(self) -> bool: - return self.get_type() in (Panda.HW_TYPE_UNO, Panda.HW_TYPE_DOS) + def is_internal(self): + return self.get_type() in Panda.INTERNAL_DEVICES def get_serial(self): dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd0, 0, 0, 0x20) diff --git a/rednose/helpers/ekf_sym_pyx.so b/rednose/helpers/ekf_sym_pyx.so index 1fe7a15d5..d3aed61f9 100755 Binary files a/rednose/helpers/ekf_sym_pyx.so and b/rednose/helpers/ekf_sym_pyx.so differ diff --git a/selfdrive/boardd/boardd b/selfdrive/boardd/boardd index 4c48c7d85..ddeccfd07 100755 Binary files a/selfdrive/boardd/boardd and b/selfdrive/boardd/boardd differ diff --git a/selfdrive/boardd/boardd_api_impl.so b/selfdrive/boardd/boardd_api_impl.so index 0ba20ca3b..5096b2b99 100755 Binary files a/selfdrive/boardd/boardd_api_impl.so and b/selfdrive/boardd/boardd_api_impl.so differ diff --git a/selfdrive/car/body/interface.py b/selfdrive/car/body/interface.py index e85735b1a..ae7ab89aa 100644 --- a/selfdrive/car/body/interface.py +++ b/selfdrive/car/body/interface.py @@ -8,7 +8,7 @@ from selfdrive.car.body.values import SPEED_FROM_RPM class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=None, car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=None, car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index d7104b1e6..6713f9d64 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -91,7 +91,7 @@ def fingerprint(logcan, sendcan): fixed_fingerprint = car_selected if not fixed_fingerprint and not skip_fw_query: - # Vin query only reliably works thorugh OBDII + # Vin query only reliably works through OBDII bus = 1 cached_params = Params().get("CarParamsCache") @@ -213,11 +213,11 @@ def get_car(logcan, sendcan): x = threading.Thread(target=crash_log, args=(candidate,)) x.start() - disable_radar = Params().get_bool("DisableRadar") + experimental_long = Params().get_bool("ExperimentalLongitudinalEnabled") try: CarInterface, CarController, CarState = interfaces[candidate] - CP = CarInterface.get_params(candidate, fingerprints, car_fw, disable_radar) + CP = CarInterface.get_params(candidate, fingerprints, car_fw, experimental_long) CP.carVin = vin CP.carFw = car_fw CP.fingerprintSource = source diff --git a/selfdrive/car/chrysler/carstate.py b/selfdrive/car/chrysler/carstate.py index fefd351a2..0f0d30782 100644 --- a/selfdrive/car/chrysler/carstate.py +++ b/selfdrive/car/chrysler/carstate.py @@ -58,8 +58,8 @@ class CarState(CarStateBase): ) # button presses - ret.leftBlinker = cp.vl["STEERING_LEVERS"]["TURN_SIGNALS"] == 1 - ret.rightBlinker = cp.vl["STEERING_LEVERS"]["TURN_SIGNALS"] == 2 + ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_stalk(200, cp.vl["STEERING_LEVERS"]["TURN_SIGNALS"] == 1, + cp.vl["STEERING_LEVERS"]["TURN_SIGNALS"] == 2) ret.genericToggle = cp.vl["STEERING_LEVERS"]["HIGH_BEAM_PRESSED"] == 1 # steering wheel diff --git a/selfdrive/car/chrysler/interface.py b/selfdrive/car/chrysler/interface.py index 31c8017d8..94612ec8c 100755 --- a/selfdrive/car/chrysler/interface.py +++ b/selfdrive/car/chrysler/interface.py @@ -8,7 +8,7 @@ from selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "chrysler" @@ -60,7 +60,7 @@ class CarInterface(CarInterfaceBase): ret.minSteerSpeed = 14.5 if car_fw is not None: for fw in car_fw: - if fw.ecu == 'eps' and fw.fwVersion in (b"68312176AE", b"68312176AG", b"68273275AG"): + if fw.ecu == 'eps' and fw.fwVersion[:8] in (b"68312176", b"68273275"): ret.minSteerSpeed = 0. elif candidate == CAR.RAM_HD: diff --git a/selfdrive/car/chrysler/values.py b/selfdrive/car/chrysler/values.py index ef5471490..f495d06a1 100644 --- a/selfdrive/car/chrysler/values.py +++ b/selfdrive/car/chrysler/values.py @@ -130,6 +130,11 @@ FINGERPRINTS = { } FW_VERSIONS = { + CAR.PACIFICA_2019_HYBRID: { + (Ecu.hcp, 0x7e2, None): [], + (Ecu.abs, 0x7e4, None): [], + }, + CAR.RAM_1500: { (Ecu.combinationMeter, 0x742, None): [ b'68294063AH', @@ -144,7 +149,7 @@ FW_VERSIONS = { b'68428609AB', b'68500728AA', ], - (Ecu.esp, 0x747, None): [ + (Ecu.abs, 0x747, None): [ b'68432418AD', b'68432418AB', b'68436004AE', @@ -200,7 +205,7 @@ FW_VERSIONS = { b'68428503AA', b'68428505AA', ], - (Ecu.esp, 0x747, None): [ + (Ecu.abs, 0x747, None): [ b'68334977AH', b'68504022AB', b'68530686AB', diff --git a/selfdrive/car/docs_definitions.py b/selfdrive/car/docs_definitions.py index 52d6388d7..015877dcb 100644 --- a/selfdrive/car/docs_definitions.py +++ b/selfdrive/car/docs_definitions.py @@ -10,10 +10,6 @@ from common.conversions import Conversions as CV GOOD_TORQUE_THRESHOLD = 1.0 # m/s^2 MODEL_YEARS_RE = r"(?<= )((\d{4}-\d{2})|(\d{4}))(,|$)" -# Makes that lack auto-resume with stock long, and auto resume in any configuration -NO_AUTO_RESUME_STOCK_LONG = {"toyota", "gm"} -NO_AUTO_RESUME = NO_AUTO_RESUME_STOCK_LONG | {"nissan", "subaru"} - class Column(Enum): MAKE = "Make" @@ -23,6 +19,7 @@ class Column(Enum): FSR_LONGITUDINAL = "No ACC accel below" FSR_STEERING = "No ALC below" STEERING_TORQUE = "Steering Torque" + AUTO_RESUME = "Resume from stop" HARNESS = "Harness" @@ -135,10 +132,11 @@ class CarInfo: Column.MAKE: self.make, Column.MODEL: self.model, Column.PACKAGE: self.package, - Column.LONGITUDINAL: "openpilot" if CP.openpilotLongitudinalControl and not CP.radarOffCan else "Stock", + Column.LONGITUDINAL: "openpilot" if CP.openpilotLongitudinalControl or CP.experimentalLongitudinalAvailable else "Stock", Column.FSR_LONGITUDINAL: f"{max(self.min_enable_speed * CV.MS_TO_MPH, 0):.0f} mph", Column.FSR_STEERING: f"{max(self.min_steer_speed * CV.MS_TO_MPH, 0):.0f} mph", Column.STEERING_TORQUE: Star.EMPTY, + Column.AUTO_RESUME: Star.FULL if CP.autoResumeSng else Star.EMPTY, Column.HARNESS: self.harness.value, } @@ -166,7 +164,7 @@ class CarInfo: acc = "" if self.min_enable_speed > 0: acc = f" while driving above {self.min_enable_speed * CV.MS_TO_MPH:.0f} mph" - elif CP.carName not in NO_AUTO_RESUME or (CP.carName in NO_AUTO_RESUME_STOCK_LONG and CP.openpilotLongitudinalControl): + elif CP.autoResumeSng: acc = " that automatically resumes from a stop" if self.row[Column.STEERING_TORQUE] != Star.FULL: @@ -193,4 +191,3 @@ class CarInfo: item += footnote_tag.format(f'{",".join(map(str, sups))}') return item - diff --git a/selfdrive/car/ford/carcontroller.py b/selfdrive/car/ford/carcontroller.py index 11d9bb3c7..592d8586c 100644 --- a/selfdrive/car/ford/carcontroller.py +++ b/selfdrive/car/ford/carcontroller.py @@ -1,3 +1,4 @@ +import math from cereal import car from common.numpy_fast import clip, interp from opendbc.can.packer import CANPacker @@ -7,14 +8,19 @@ from selfdrive.car.ford.values import CarControllerParams VisualAlert = car.CarControl.HUDControl.VisualAlert -def apply_ford_steer_angle_limits(apply_steer, apply_steer_last, vEgo): +def apply_ford_steer_angle_limits(apply_angle, apply_angle_last, vEgo): # rate limit - steer_up = apply_steer * apply_steer_last > 0. and abs(apply_steer) > abs(apply_steer_last) - rate_limit = CarControllerParams.STEER_RATE_LIMIT_UP if steer_up else CarControllerParams.STEER_RATE_LIMIT_DOWN + steer_up = apply_angle_last * apply_angle > 0. and abs(apply_angle) > abs(apply_angle_last) + rate_limit = CarControllerParams.RATE_LIMIT_UP if steer_up else CarControllerParams.RATE_LIMIT_DOWN max_angle_diff = interp(vEgo, rate_limit.speed_points, rate_limit.max_angle_diff_points) - apply_steer = clip(apply_steer, (apply_steer_last - max_angle_diff), (apply_steer_last + max_angle_diff)) + apply_angle = clip(apply_angle, (apply_angle_last - max_angle_diff), (apply_angle_last + max_angle_diff)) - return apply_steer + # absolute limit (LatCtlPath_An_Actl) + apply_path_angle = math.radians(apply_angle) / CarControllerParams.STEER_RATIO + apply_path_angle = clip(apply_path_angle, -0.4995, 0.5240) + apply_angle = math.degrees(apply_path_angle) * CarControllerParams.STEER_RATIO + + return apply_angle class CarController: @@ -24,7 +30,7 @@ class CarController: self.packer = CANPacker(dbc_name) self.frame = 0 - self.apply_steer_last = 0 + self.apply_angle_last = 0 self.main_on_last = False self.lkas_enabled_last = False self.steer_alert_last = False @@ -38,52 +44,62 @@ class CarController: main_on = CS.out.cruiseState.available steer_alert = hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw) + ### acc buttons ### if CC.cruiseControl.cancel: - # cancel stock ACC - can_sends.append(fordcan.spam_cancel_button(self.packer)) + can_sends.append(fordcan.create_button_command(self.packer, CS.buttons_stock_values, cancel=True)) + elif CC.cruiseControl.resume: + can_sends.append(fordcan.create_button_command(self.packer, CS.buttons_stock_values, resume=True)) - # apply rate limits - new_steer = actuators.steeringAngleDeg - apply_steer = apply_ford_steer_angle_limits(new_steer, self.apply_steer_last, CS.out.vEgo) + # if stock lane centering is active or in standby, toggle it off + # the stock system checks for steering pressed, and eventually disengages cruise control + if (self.frame % 200) == 0 and CS.acc_tja_status_stock_values["Tja_D_Stat"] != 0: + can_sends.append(fordcan.create_button_command(self.packer, CS.buttons_stock_values, tja_toggle=True)) + + + ### lateral control ### + if CC.latActive: + apply_angle = apply_ford_steer_angle_limits(actuators.steeringAngleDeg, self.apply_angle_last, CS.out.vEgo) + else: + apply_angle = CS.out.steeringAngleDeg # send steering commands at 20Hz if (self.frame % CarControllerParams.LKAS_STEER_STEP) == 0: lca_rq = 1 if CC.latActive else 0 - # use LatCtlPath_An_Actl to actuate steering for now until curvature control is implemented - path_angle = apply_steer + # use LatCtlPath_An_Actl to actuate steering + # path angle is the car wheel angle, not the steering wheel angle + path_angle = math.radians(apply_angle) / CarControllerParams.STEER_RATIO - # convert steer angle to curvature - curvature = self.VM.calc_curvature(apply_steer, CS.out.vEgo, 0.0) + # ramp rate: 0=Slow, 1=Medium, 2=Fast, 3=Immediately + # TODO: try slower ramp speed when driver torque detected + ramp_type = 3 + precision = 1 # 0=Comfortable, 1=Precise (the stock system always uses comfortable) - # TODO: get other actuators - curvature_rate = 0 - path_offset = 0 + offset_roll_compensation_curvature = clip(self.VM.calc_curvature(0, CS.out.vEgo, -CS.yaw_data["VehYaw_W_Actl"]), -0.02, 0.02094) - ramp_type = 3 # 0=Slow, 1=Medium, 2=Fast, 3=Immediately - precision = 0 # 0=Comfortable, 1=Precise - - self.apply_steer_last = apply_steer - can_sends.append(fordcan.create_lkas_command(self.packer, apply_steer, curvature)) + self.apply_angle_last = apply_angle + can_sends.append(fordcan.create_lka_command(self.packer, apply_angle, 0)) can_sends.append(fordcan.create_tja_command(self.packer, lca_rq, ramp_type, precision, - path_offset, path_angle, curvature_rate, curvature)) + 0, path_angle, 0, offset_roll_compensation_curvature)) + + ### ui ### send_ui = (self.main_on_last != main_on) or (self.lkas_enabled_last != CC.latActive) or (self.steer_alert_last != steer_alert) # send lkas ui command at 1Hz or if ui state changes if (self.frame % CarControllerParams.LKAS_UI_STEP) == 0 or send_ui: - can_sends.append(fordcan.create_lkas_ui_command(self.packer, main_on, CC.latActive, steer_alert, CS.lkas_status_stock_values)) + can_sends.append(fordcan.create_lkas_ui_command(self.packer, main_on, CC.latActive, steer_alert, hud_control, CS.lkas_status_stock_values)) # send acc ui command at 20Hz or if ui state changes if (self.frame % CarControllerParams.ACC_UI_STEP) == 0 or send_ui: - can_sends.append(fordcan.create_acc_ui_command(self.packer, main_on, CC.latActive, CS.acc_tja_status_stock_values)) + can_sends.append(fordcan.create_acc_ui_command(self.packer, main_on, CC.latActive, hud_control, CS.acc_tja_status_stock_values)) self.main_on_last = main_on self.lkas_enabled_last = CC.latActive self.steer_alert_last = steer_alert new_actuators = actuators.copy() - new_actuators.steeringAngleDeg = apply_steer + new_actuators.steeringAngleDeg = apply_angle self.frame += 1 return new_actuators, can_sends diff --git a/selfdrive/car/ford/carstate.py b/selfdrive/car/ford/carstate.py index aaa3af612..a7ea19eff 100644 --- a/selfdrive/car/ford/carstate.py +++ b/selfdrive/car/ford/carstate.py @@ -3,7 +3,7 @@ from common.conversions import Conversions as CV from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser from selfdrive.car.interfaces import CarStateBase -from selfdrive.car.ford.values import CANBUS, DBC +from selfdrive.car.ford.values import CANBUS, DBC, CarControllerParams GearShifter = car.CarState.GearShifter TransmissionType = car.CarParams.TransmissionType @@ -22,7 +22,7 @@ class CarState(CarStateBase): # car speed ret.vEgoRaw = cp.vl["EngVehicleSpThrottle2"]["Veh_V_ActlEng"] * CV.KPH_TO_MS ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw) - ret.yawRate = cp.vl["Yaw_Data_FD1"]["VehYaw_W_Actl"] * CV.RAD_TO_DEG + ret.yawRate = cp.vl["Yaw_Data_FD1"]["VehYaw_W_Actl"] ret.standstill = cp.vl["DesiredTorqBrk"]["VehStop_D_Stat"] == 1 # gas pedal @@ -37,7 +37,7 @@ class CarState(CarStateBase): # steering wheel ret.steeringAngleDeg = cp.vl["SteeringPinion_Data"]["StePinComp_An_Est"] ret.steeringTorque = cp.vl["EPAS_INFO"]["SteeringColumnTorque"] - ret.steeringPressed = cp.vl["Lane_Assist_Data3_FD1"]["LaHandsOff_B_Actl"] == 0 + ret.steeringPressed = abs(ret.steeringTorque) > CarControllerParams.STEER_DRIVER_ALLOWANCE ret.steerFaultTemporary = cp.vl["EPAS_INFO"]["EPAS_Failure"] == 1 ret.steerFaultPermanent = cp.vl["EPAS_INFO"]["EPAS_Failure"] in (2, 3) # ret.espDisabled = False # TODO: find traction control signal @@ -46,6 +46,8 @@ class CarState(CarStateBase): ret.cruiseState.speed = cp.vl["EngBrakeData"]["Veh_V_DsplyCcSet"] * CV.MPH_TO_MS ret.cruiseState.enabled = cp.vl["EngBrakeData"]["CcStat_D_Actl"] in (4, 5) ret.cruiseState.available = cp.vl["EngBrakeData"]["CcStat_D_Actl"] in (3, 4, 5) + ret.cruiseState.nonAdaptive = cp.vl["Cluster_Info1_FD1"]["AccEnbl_B_RqDrv"] == 0 + ret.cruiseState.standstill = cp.vl["EngBrakeData"]["AccStopMde_D_Rq"] == 3 # gear if self.CP.transmissionType == TransmissionType.automatic: @@ -65,6 +67,7 @@ class CarState(CarStateBase): # button presses ret.leftBlinker = cp.vl["Steering_Data_FD1"]["TurnLghtSwtch_D_Stat"] == 1 ret.rightBlinker = cp.vl["Steering_Data_FD1"]["TurnLghtSwtch_D_Stat"] == 2 + # TODO: block this going to the camera otherwise it will enable stock TJA ret.genericToggle = bool(cp.vl["Steering_Data_FD1"]["TjaButtnOnOffPress"]) # lock info @@ -77,9 +80,13 @@ class CarState(CarStateBase): ret.leftBlindspot = cp.vl["Side_Detect_L_Stat"]["SodDetctLeft_D_Stat"] != 0 ret.rightBlindspot = cp.vl["Side_Detect_R_Stat"]["SodDetctRight_D_Stat"] != 0 + # Stock steering buttons so that we can passthru blinkers etc. + self.buttons_stock_values = cp.vl["Steering_Data_FD1"] # Stock values from IPMA so that we can retain some stock functionality self.acc_tja_status_stock_values = cp_cam.vl["ACCDATA_3"] self.lkas_status_stock_values = cp_cam.vl["IPMA_Data"] + # Use stock sensor values + self.yaw_data = cp.vl["Yaw_Data_FD1"] return ret @@ -97,6 +104,8 @@ class CarState(CarStateBase): ("Veh_V_DsplyCcSet", "EngBrakeData"), # PCM ACC set speed (mph) # The units might change with IPC settings? ("CcStat_D_Actl", "EngBrakeData"), # PCM ACC status + ("AccStopMde_D_Rq", "EngBrakeData"), # PCM ACC standstill + ("AccEnbl_B_RqDrv", "Cluster_Info1_FD1"), # PCM ACC enable ("StePinComp_An_Est", "SteeringPinion_Data"), # PSCM estimated steering angle (deg) # Calculates steering angle (and offset) from pinion # angle and driving measurements. @@ -104,7 +113,6 @@ class CarState(CarStateBase): # to zero at the beginning of the drive. ("SteeringColumnTorque", "EPAS_INFO"), # PSCM steering column torque (Nm) ("EPAS_Failure", "EPAS_INFO"), # PSCM EPAS status - ("LaHandsOff_B_Actl", "Lane_Assist_Data3_FD1"), # PSCM LKAS hands off wheel ("TurnLghtSwtch_D_Stat", "Steering_Data_FD1"), # SCCM Turn signal switch ("TjaButtnOnOffPress", "Steering_Data_FD1"), # SCCM ACC button, lane-centering/traffic jam assist toggle ("DrStatDrv_B_Actl", "BodyInfo_3_FD1"), # BCM Door open, driver @@ -112,6 +120,38 @@ class CarState(CarStateBase): ("DrStatRl_B_Actl", "BodyInfo_3_FD1"), # BCM Door open, rear left ("DrStatRr_B_Actl", "BodyInfo_3_FD1"), # BCM Door open, rear right ("FirstRowBuckleDriver", "RCMStatusMessage2_FD1"), # RCM Seatbelt status, driver + ("HeadLghtHiFlash_D_Stat", "Steering_Data_FD1"), # SCCM Passthru the remaining buttons + ("WiprFront_D_Stat", "Steering_Data_FD1"), + ("LghtAmb_D_Sns", "Steering_Data_FD1"), + ("AccButtnGapDecPress", "Steering_Data_FD1"), + ("AccButtnGapIncPress", "Steering_Data_FD1"), + ("AslButtnOnOffCnclPress", "Steering_Data_FD1"), + ("AslButtnOnOffPress", "Steering_Data_FD1"), + ("CcAslButtnCnclPress", "Steering_Data_FD1"), + ("LaSwtchPos_D_Stat", "Steering_Data_FD1"), + ("CcAslButtnCnclResPress", "Steering_Data_FD1"), + ("CcAslButtnDeny_B_Actl", "Steering_Data_FD1"), + ("CcAslButtnIndxDecPress", "Steering_Data_FD1"), + ("CcAslButtnIndxIncPress", "Steering_Data_FD1"), + ("CcAslButtnOffCnclPress", "Steering_Data_FD1"), + ("CcAslButtnOnOffCncl", "Steering_Data_FD1"), + ("CcAslButtnOnPress", "Steering_Data_FD1"), + ("CcAslButtnResDecPress", "Steering_Data_FD1"), + ("CcAslButtnResIncPress", "Steering_Data_FD1"), + ("CcAslButtnSetDecPress", "Steering_Data_FD1"), + ("CcAslButtnSetIncPress", "Steering_Data_FD1"), + ("CcAslButtnSetPress", "Steering_Data_FD1"), + ("CcAsllButtnResPress", "Steering_Data_FD1"), + ("CcButtnOffPress", "Steering_Data_FD1"), + ("CcButtnOnOffCnclPress", "Steering_Data_FD1"), + ("CcButtnOnOffPress", "Steering_Data_FD1"), + ("CcButtnOnPress", "Steering_Data_FD1"), + ("HeadLghtHiFlash_D_Actl", "Steering_Data_FD1"), + ("HeadLghtHiOn_B_StatAhb", "Steering_Data_FD1"), + ("AhbStat_B_Dsply", "Steering_Data_FD1"), + ("AccButtnGapTogglePress", "Steering_Data_FD1"), + ("WiprFrontSwtch_D_Stat", "Steering_Data_FD1"), + ("HeadLghtHiCtrl_D_RqAhb", "Steering_Data_FD1"), ] checks = [ @@ -122,6 +162,7 @@ class CarState(CarStateBase): ("EngVehicleSpThrottle", 100), ("BrakeSnData_4", 50), ("EngBrakeData", 10), + ("Cluster_Info1_FD1", 10), ("SteeringPinion_Data", 100), ("EPAS_INFO", 50), ("Lane_Assist_Data3_FD1", 33), @@ -203,7 +244,8 @@ class CarState(CarStateBase): ("DasStats_D_Dsply", "IPMA_Data"), # DAS status ("DasWarn_D_Dsply", "IPMA_Data"), # DAS warning ("AhbHiBeam_D_Rq", "IPMA_Data"), # AHB status - ("Set_Me_X1", "IPMA_Data"), + ("Passthru_63", "IPMA_Data"), + ("Passthru_48", "IPMA_Data"), ] checks = [ diff --git a/selfdrive/car/ford/fordcan.py b/selfdrive/car/ford/fordcan.py index 29fec1f2d..b42561df2 100644 --- a/selfdrive/car/ford/fordcan.py +++ b/selfdrive/car/ford/fordcan.py @@ -1,7 +1,10 @@ -from common.numpy_fast import clip +from cereal import car +from selfdrive.car.ford.values import CANBUS + +HUDControl = car.CarControl.HUDControl -def create_lkas_command(packer, angle_deg: float, curvature: float): +def create_lka_command(packer, angle_deg: float, curvature: float): """ Creates a CAN message for the Ford LKAS Command. @@ -20,7 +23,7 @@ def create_lkas_command(packer, angle_deg: float, curvature: float): "LdwActvStats_D_Req": 0, # LDW status [0|7] "LdwActvIntns_D_Req": 0, # LDW intensity [0|3], shake alert strength } - return packer.make_can_msg("Lane_Assist_Data1", 0, values) + return packer.make_can_msg("Lane_Assist_Data1", CANBUS.main, values) def create_tja_command(packer, lca_rq: int, ramp_type: int, precision: int, path_offset: float, path_angle: float, curvature_rate: float, curvature: float): @@ -38,20 +41,20 @@ def create_tja_command(packer, lca_rq: int, ramp_type: int, precision: int, path """ values = { - "LatCtlRng_L_Max": 0, # Unknown [0|126] meter - "HandsOffCnfm_B_Rq": 0, # Unknown: 0=Inactive, 1=Active [0|1] - "LatCtl_D_Rq": lca_rq, # Mode: 0=None, 1=ContinuousPathFollowing, 2=InterventionLeft, 3=InterventionRight, 4-7=NotUsed [0|7] - "LatCtlRampType_D_Rq": ramp_type, # Ramp speed: 0=Slow, 1=Medium, 2=Fast, 3=Immediate [0|3] - "LatCtlPrecision_D_Rq": precision, # Precision: 0=Comfortable, 1=Precise, 2/3=NotUsed [0|3] - "LatCtlPathOffst_L_Actl": clip(path_offset, -5.12, 5.11), # Path offset [-5.12|5.11] meter - "LatCtlPath_An_Actl": clip(path_angle, -0.5, 0.5235), # Path angle [-0.5|0.5235] radians - "LatCtlCurv_NoRate_Actl": clip(curvature_rate, -0.001024, 0.00102375), # Curvature rate [-0.001024|0.00102375] 1/meter^2 - "LatCtlCurv_No_Actl": clip(curvature, -0.02, 0.02094), # Curvature [-0.02|0.02094] 1/meter + "LatCtlRng_L_Max": 0, # Unknown [0|126] meter + "HandsOffCnfm_B_Rq": 0, # Unknown: 0=Inactive, 1=Active [0|1] + "LatCtl_D_Rq": lca_rq, # Mode: 0=None, 1=ContinuousPathFollowing, 2=InterventionLeft, 3=InterventionRight, 4-7=NotUsed [0|7] + "LatCtlRampType_D_Rq": ramp_type, # Ramp speed: 0=Slow, 1=Medium, 2=Fast, 3=Immediate [0|3] + "LatCtlPrecision_D_Rq": precision, # Precision: 0=Comfortable, 1=Precise, 2/3=NotUsed [0|3] + "LatCtlPathOffst_L_Actl": path_offset, # Path offset [-5.12|5.11] meter + "LatCtlPath_An_Actl": path_angle, # Path angle [-0.4995|0.5240] radians + "LatCtlCurv_NoRate_Actl": curvature_rate, # Curvature rate [-0.001024|0.00102375] 1/meter^2 + "LatCtlCurv_No_Actl": curvature, # Curvature [-0.02|0.02094] 1/meter } - return packer.make_can_msg("LateralMotionControl", 0, values) + return packer.make_can_msg("LateralMotionControl", CANBUS.main, values) -def create_lkas_ui_command(packer, main_on: bool, enabled: bool, steer_alert: bool, stock_values): +def create_lkas_ui_command(packer, main_on: bool, enabled: bool, steer_alert: bool, hud_control, stock_values: dict): """ Creates a CAN message for the Ford IPC IPMA/LKAS status. @@ -63,34 +66,47 @@ def create_lkas_ui_command(packer, main_on: bool, enabled: bool, steer_alert: bo """ # LaActvStats_D_Dsply - # TODO: get LDW state from OP + # R Intvn Warn Supprs Avail No + # L + # Intvn 24 19 14 9 4 + # Warn 23 18 13 8 3 + # Supprs 22 17 12 7 2 + # Avail 21 16 11 6 1 + # No 20 15 10 5 0 + # + # TODO: test suppress state if enabled: - lines = 6 + lines = 0 # NoLeft_NoRight + if hud_control.leftLaneDepart: + lines += 4 + elif hud_control.leftLaneVisible: + lines += 1 + if hud_control.rightLaneDepart: + lines += 20 + elif hud_control.rightLaneVisible: + lines += 5 elif main_on: lines = 0 else: - lines = 30 + if hud_control.leftLaneDepart: + lines = 3 # WarnLeft_NoRight + elif hud_control.rightLaneDepart: + lines = 15 # NoLeft_WarnRight + else: + lines = 30 # LA_Off + + # TODO: use level 1 for no sound when less severe? + hands_on_wheel_dsply = 2 if steer_alert else 0 values = { - "FeatConfigIpmaActl": stock_values["FeatConfigIpmaActl"], # [0|65535] - "FeatNoIpmaActl": stock_values["FeatNoIpmaActl"], # [0|65535] - "PersIndexIpma_D_Actl": stock_values["PersIndexIpma_D_Actl"], # [0|7] - "AhbcRampingV_D_Rq": stock_values["AhbcRampingV_D_Rq"], # AHB ramping [0|3] - "LaActvStats_D_Dsply": lines, # LKAS status (lines) [0|31] - "LaDenyStats_B_Dsply": stock_values["LaDenyStats_B_Dsply"], # LKAS error [0|1] - "LaHandsOff_D_Dsply": 2 if steer_alert else 0, # 0=HandsOn, 1=Level1 (w/o chime), 2=Level2 (w/ chime), 3=Suppressed - "CamraDefog_B_Req": stock_values["CamraDefog_B_Req"], # Windshield heater? [0|1] - "CamraStats_D_Dsply": stock_values["CamraStats_D_Dsply"], # Camera status [0|3] - "DasAlrtLvl_D_Dsply": stock_values["DasAlrtLvl_D_Dsply"], # DAS alert level [0|7] - "DasStats_D_Dsply": stock_values["DasStats_D_Dsply"], # DAS status [0|3] - "DasWarn_D_Dsply": stock_values["DasWarn_D_Dsply"], # DAS warning [0|3] - "AhbHiBeam_D_Rq": stock_values["AhbHiBeam_D_Rq"], # AHB status [0|3] - "Set_Me_X1": stock_values["Set_Me_X1"], # [0|15] + **stock_values, + "LaActvStats_D_Dsply": lines, # LKAS status (lines) [0|31] + "LaHandsOff_D_Dsply": hands_on_wheel_dsply, # 0=HandsOn, 1=Level1 (w/o chime), 2=Level2 (w/ chime), 3=Suppressed } - return packer.make_can_msg("IPMA_Data", 0, values) + return packer.make_can_msg("IPMA_Data", CANBUS.main, values) -def create_acc_ui_command(packer, main_on: bool, enabled: bool, stock_values): +def create_acc_ui_command(packer, main_on: bool, enabled: bool, hud_control, stock_values: dict): """ Creates a CAN message for the Ford IPC adaptive cruise, forward collision warning and traffic jam assist status. @@ -100,38 +116,32 @@ def create_acc_ui_command(packer, main_on: bool, enabled: bool, stock_values): Frequency is 20Hz. """ + # Tja_D_Stat + if enabled: + if hud_control.leftLaneDepart: + status = 3 # ActiveInterventionLeft + elif hud_control.rightLaneDepart: + status = 4 # ActiveInterventionRight + else: + status = 2 # Active + elif main_on: + if hud_control.leftLaneDepart: + status = 5 # ActiveWarningLeft + elif hud_control.rightLaneDepart: + status = 6 # ActiveWarningRight + else: + status = 1 # Standby + else: + status = 0 # Off + values = { - "HaDsply_No_Cs": stock_values["HaDsply_No_Cs"], # [0|255] - "HaDsply_No_Cnt": stock_values["HaDsply_No_Cnt"], # [0|15] - "AccStopStat_D_Dsply": stock_values["AccStopStat_D_Dsply"], # ACC stopped status message: 0=NoDisplay, 1=ResumeReady, 2=Stopped, 3=PressResume [0|3] - "AccTrgDist2_D_Dsply": stock_values["AccTrgDist2_D_Dsply"], # ACC target distance [0|15] - "AccStopRes_B_Dsply": stock_values["AccStopRes_B_Dsply"], # [0|1] - "TjaWarn_D_Rq": stock_values["TjaWarn_D_Rq"], # TJA warning: 0=NoWarning, 1=Cancel, 2=HardTakeOverLevel1, 3=HardTakeOverLevel2 [0|7] - "Tja_D_Stat": 2 if enabled else (1 if main_on else 0), # TJA status: 0=Off, 1=Standby, 2=Active, 3=InterventionLeft, 4=InterventionRight, 5=WarningLeft, 6=WarningRight, 7=NotUsed [0|7] - "TjaMsgTxt_D_Dsply": stock_values["TjaMsgTxt_D_Dsply"], # TJA text [0|7] - "IaccLamp_D_Rq": stock_values["IaccLamp_D_Rq"], # iACC status icon [0|3] - "AccMsgTxt_D2_Rq": stock_values["AccMsgTxt_D2_Rq"], # ACC text [0|15] - "FcwDeny_B_Dsply": stock_values["FcwDeny_B_Dsply"], # FCW disabled [0|1] - "FcwMemStat_B_Actl": stock_values["FcwMemStat_B_Actl"], # FCW enabled setting [0|1] - "AccTGap_B_Dsply": stock_values["AccTGap_B_Dsply"], # ACC time gap display setting [0|1] - "CadsAlignIncplt_B_Actl": stock_values["CadsAlignIncplt_B_Actl"], # Radar alignment? [0|1] - "AccFllwMde_B_Dsply": stock_values["AccFllwMde_B_Dsply"], # ACC follow mode display setting [0|1] - "CadsRadrBlck_B_Actl": stock_values["CadsRadrBlck_B_Actl"], # Radar blocked? [0|1] - "CmbbPostEvnt_B_Dsply": stock_values["CmbbPostEvnt_B_Dsply"], # AEB event status [0|1] - "AccStopMde_B_Dsply": stock_values["AccStopMde_B_Dsply"], # ACC stop mode display setting [0|1] - "FcwMemSens_D_Actl": stock_values["FcwMemSens_D_Actl"], # FCW sensitivity setting [0|3] - "FcwMsgTxt_D_Rq": stock_values["FcwMsgTxt_D_Rq"], # FCW text [0|7] - "AccWarn_D_Dsply": stock_values["AccWarn_D_Dsply"], # ACC warning [0|3] - "FcwVisblWarn_B_Rq": stock_values["FcwVisblWarn_B_Rq"], # FCW alert: 0=Off, 1=On [0|1] - "FcwAudioWarn_B_Rq": stock_values["FcwAudioWarn_B_Rq"], # FCW audio: 0=Off, 1=On [0|1] - "AccTGap_D_Dsply": stock_values["AccTGap_D_Dsply"], # ACC time gap: 1=Time_Gap_1, 2=Time_Gap_2, ..., 5=Time_Gap_5 [0|7] - "AccMemEnbl_B_RqDrv": stock_values["AccMemEnbl_B_RqDrv"], # ACC setting: 0=NormalCruise, 1=AdaptiveCruise [0|1] - "FdaMem_B_Stat": stock_values["FdaMem_B_Stat"], # FDA enabled setting [0|1] + **stock_values, + "Tja_D_Stat": status, } - return packer.make_can_msg("ACCDATA_3", 0, values) + return packer.make_can_msg("ACCDATA_3", CANBUS.main, values) -def spam_cancel_button(packer, cancel=1): +def create_button_command(packer, stock_values: dict, cancel = False, resume = False, tja_toggle = False, bus = CANBUS.camera): """ Creates a CAN message for the Ford SCCM buttons/switches. @@ -139,6 +149,9 @@ def spam_cancel_button(packer, cancel=1): """ values = { - "CcAslButtnCnclPress": cancel, # CC cancel button + **stock_values, + "CcAslButtnCnclPress": 1 if cancel else 0, # CC cancel button + "CcAsllButtnResPress": 1 if resume else 0, # CC resume button + "TjaButtnOnOffPress": 1 if tja_toggle else 0, # TJA toggle button } - return packer.make_can_msg("Steering_Data_FD1", 0, values) + return packer.make_can_msg("Steering_Data_FD1", bus, values) diff --git a/selfdrive/car/ford/interface.py b/selfdrive/car/ford/interface.py index 00af0536c..9f38f5535 100644 --- a/selfdrive/car/ford/interface.py +++ b/selfdrive/car/ford/interface.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from cereal import car from common.conversions import Conversions as CV -from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint -from selfdrive.car.ford.values import CAR, TransmissionType, GearShifter +from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config +from selfdrive.car.ford.values import CAR, Ecu, TransmissionType, GearShifter from selfdrive.car.interfaces import CarInterfaceBase @@ -11,60 +11,60 @@ EventName = car.CarEvent.EventName class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): + if car_fw is None: + car_fw = [] + ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "ford" - #ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.ford)] ret.dashcamOnly = True + ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.ford)] # Angle-based steering - # TODO: use curvature control when ready ret.steerControlType = car.CarParams.SteerControlType.angle - ret.steerActuatorDelay = 0.1 + ret.steerActuatorDelay = 0.4 ret.steerLimitTimer = 1.0 - - # TODO: detect stop-and-go vehicles - stop_and_go = False + tire_stiffness_factor = 1.0 if candidate == CAR.ESCAPE_MK4: ret.wheelbase = 2.71 ret.steerRatio = 14.3 # Copied from Focus - tire_stiffness_factor = 0.5328 # Copied from Focus ret.mass = 1750 + STD_CARGO_KG + elif candidate == CAR.EXPLORER_MK6: + ret.wheelbase = 3.025 + ret.steerRatio = 16.8 # learned + ret.mass = 2050 + STD_CARGO_KG + elif candidate == CAR.FOCUS_MK4: ret.wheelbase = 2.7 - ret.steerRatio = 14.3 - tire_stiffness_factor = 0.5328 + ret.steerRatio = 13.8 # learned ret.mass = 1350 + STD_CARGO_KG else: raise ValueError(f"Unsupported car: ${candidate}") - # Auto Transmission: Gear_Shift_by_Wire_FD1 - # TODO: detect transmission in car_fw? - if 0x5A in fingerprint[0]: + # Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1 + found_ecus = [fw.ecu for fw in car_fw] + if Ecu.shiftByWire in found_ecus or 0x5A in fingerprint[0]: ret.transmissionType = TransmissionType.automatic else: ret.transmissionType = TransmissionType.manual + ret.minEnableSpeed = 20.0 * CV.MPH_TO_MS # BSM: Side_Detect_L_Stat, Side_Detect_R_Stat # TODO: detect bsm in car_fw? ret.enableBsm = 0x3A6 in fingerprint[0] and 0x3A7 in fingerprint[0] - # min speed to enable ACC. if car can do stop and go, then set enabling speed - # to a negative value, so it won't matter. - ret.minEnableSpeed = -1. if (stop_and_go) else 20. * CV.MPH_TO_MS # LCA can steer down to zero ret.minSteerSpeed = 0. - ret.centerToFront = ret.wheelbase * 0.44 - + ret.autoResumeSng = ret.minEnableSpeed == -1. ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase) + ret.centerToFront = ret.wheelbase * 0.44 ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront, tire_stiffness_factor=tire_stiffness_factor) - return ret def _update(self, c): diff --git a/selfdrive/car/ford/values.py b/selfdrive/car/ford/values.py index 825d515da..54ff043a3 100644 --- a/selfdrive/car/ford/values.py +++ b/selfdrive/car/ford/values.py @@ -1,9 +1,11 @@ from collections import namedtuple +from dataclasses import dataclass +from enum import Enum from typing import Dict, List, Union from cereal import car from selfdrive.car import dbc_dict -from selfdrive.car.docs_definitions import CarInfo +from selfdrive.car.docs_definitions import CarInfo, Harness Ecu = car.CarParams.Ecu TransmissionType = car.CarParams.TransmissionType @@ -20,8 +22,11 @@ class CarControllerParams: # Message: ACCDATA_3 ACC_UI_STEP = 5 - STEER_RATE_LIMIT_UP = AngleRateLimit(speed_points=[0., 5., 15.], max_angle_diff_points=[5., .8, .15]) - STEER_RATE_LIMIT_DOWN = AngleRateLimit(speed_points=[0., 5., 15.], max_angle_diff_points=[5., 3.5, 0.4]) + STEER_RATIO = 2.75 + STEER_DRIVER_ALLOWANCE = 0.8 + + RATE_LIMIT_UP = AngleRateLimit(speed_points=[0., 5., 15.], max_angle_diff_points=[5., .8, .15]) + RATE_LIMIT_DOWN = AngleRateLimit(speed_points=[0., 5., 15.], max_angle_diff_points=[5., 3.5, 0.4]) class RADAR: @@ -37,12 +42,23 @@ class CANBUS: class CAR: ESCAPE_MK4 = "FORD ESCAPE 4TH GEN" + EXPLORER_MK6 = "FORD EXPLORER 6TH GEN" FOCUS_MK4 = "FORD FOCUS 4TH GEN" +@dataclass +class FordCarInfo(CarInfo): + package: str = "Co-Pilot360 Assist+" + harness: Enum = Harness.ford_q3 + + CAR_INFO: Dict[str, Union[CarInfo, List[CarInfo]]] = { - CAR.ESCAPE_MK4: CarInfo("Ford Escape", "NA"), - CAR.FOCUS_MK4: CarInfo("Ford Focus", "NA"), + CAR.ESCAPE_MK4: [ + FordCarInfo("Ford Escape 2020"), + FordCarInfo("Ford Kuga EU", "Driver Assistance Pack"), + ], + CAR.EXPLORER_MK6: FordCarInfo("Ford Explorer 2020-21"), + CAR.FOCUS_MK4: FordCarInfo("Ford Focus EU 2019", "Driver Assistance Pack"), } @@ -51,7 +67,7 @@ FW_VERSIONS = { (Ecu.eps, 0x730, None): [ b'LX6C-14D003-AH\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'LX6C-2D053-NS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.fwdRadar, 0x764, None): [ @@ -63,12 +79,39 @@ FW_VERSIONS = { (Ecu.engine, 0x7E0, None): [ b'LX6A-14C204-ESG\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], + (Ecu.shiftByWire, 0x732, None): [ + ], + }, + CAR.EXPLORER_MK6: { + (Ecu.eps, 0x730, None): [ + b'L1MC-14D003-AK\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'L1MC-14D003-AL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.abs, 0x760, None): [ + b'L1MC-2D053-BB\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'L1MC-2D053-BF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.fwdRadar, 0x764, None): [ + b'LB5T-14D049-AB\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.fwdCamera, 0x706, None): [ + b'LB5T-14F397-AE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'LB5T-14F397-AF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.engine, 0x7E0, None): [ + b'LB5A-14C204-EAC\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'MB5A-14C204-MD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], + (Ecu.shiftByWire, 0x732, None): [ + b'L1MP-14G395-AD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'L1MP-14G395-AE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + ], }, CAR.FOCUS_MK4: { (Ecu.eps, 0x730, None): [ b'JX6C-14D003-AH\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'JX61-2D053-CJ\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.fwdRadar, 0x764, None): [ @@ -80,11 +123,14 @@ FW_VERSIONS = { (Ecu.engine, 0x7E0, None): [ b'JX6A-14C204-BPL\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], + (Ecu.shiftByWire, 0x732, None): [ + ], }, } DBC = { CAR.ESCAPE_MK4: dbc_dict('ford_lincoln_base_pt', RADAR.DELPHI_MRR), + CAR.EXPLORER_MK6: dbc_dict('ford_lincoln_base_pt', RADAR.DELPHI_MRR), CAR.FOCUS_MK4: dbc_dict('ford_lincoln_base_pt', RADAR.DELPHI_MRR), } diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index 886bf4aff..376a743df 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -16,7 +16,7 @@ from selfdrive.car.toyota.values import CAR as TOYOTA from system.swaglog import cloudlog Ecu = car.CarParams.Ecu -ESSENTIAL_ECUS = [Ecu.engine, Ecu.eps, Ecu.esp, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.vsa] +ESSENTIAL_ECUS = [Ecu.engine, Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.vsa] def p16(val): @@ -213,14 +213,14 @@ REQUESTS: List[Request] = [ "chrysler", [CHRYSLER_VERSION_REQUEST], [CHRYSLER_VERSION_RESPONSE], - whitelist_ecus=[Ecu.esp, Ecu.eps, Ecu.srs, Ecu.gateway, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.combinationMeter], + whitelist_ecus=[Ecu.abs, Ecu.eps, Ecu.srs, Ecu.gateway, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.combinationMeter], rx_offset=CHRYSLER_RX_OFFSET, ), Request( "chrysler", [CHRYSLER_VERSION_REQUEST], [CHRYSLER_VERSION_RESPONSE], - whitelist_ecus=[Ecu.engine, Ecu.transmission], + whitelist_ecus=[Ecu.abs, Ecu.hcp, Ecu.engine, Ecu.transmission], ), Request( "chrysler", @@ -240,7 +240,7 @@ REQUESTS: List[Request] = [ [TESTER_PRESENT_REQUEST, FORD_VERSION_REQUEST], [TESTER_PRESENT_RESPONSE, FORD_VERSION_RESPONSE], bus=0, - whitelist_ecus=[Ecu.eps, Ecu.esp, Ecu.fwdRadar, Ecu.fwdCamera], + whitelist_ecus=[Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.shiftByWire], ), ] @@ -328,7 +328,7 @@ def match_fw_to_car_exact(fw_versions_dict): ecu_type = ecu[0] addr = ecu[1:] found_versions = fw_versions_dict.get(addr, set()) - if ecu_type == Ecu.esp and candidate in (TOYOTA.RAV4, TOYOTA.COROLLA, TOYOTA.HIGHLANDER, TOYOTA.SIENNA, TOYOTA.LEXUS_IS) and not len(found_versions): + if ecu_type == Ecu.abs and candidate in (TOYOTA.RAV4, TOYOTA.COROLLA, TOYOTA.HIGHLANDER, TOYOTA.SIENNA, TOYOTA.LEXUS_IS) and not len(found_versions): continue # On some Toyota models, the engine can show on two different addresses diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index d4817a9ec..9a04f7a92 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -45,10 +45,11 @@ class CarInterface(CarInterfaceBase): return CarInterfaceBase.get_steer_feedforward_default @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "gm" ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.gm)] + ret.autoResumeSng = False if candidate in EV_CAR: ret.transmissionType = TransmissionType.direct @@ -73,7 +74,7 @@ class CarInterface(CarInterfaceBase): ret.dashcamOnly = candidate in {CAR.CADILLAC_ATS, CAR.HOLDEN_ASTRA, CAR.MALIBU, CAR.BUICK_REGAL} # Start with a baseline tuning for all GM vehicles. Override tuning as needed in each model section below. - ret.minSteerSpeed = 7 * CV.MPH_TO_MS + ret.minSteerSpeed = 10 * CV.KPH_TO_MS ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.00]] ret.lateralTuning.pid.kf = 0.00004 # full torque for 20 deg at 80mph means 0.00007818594 diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 3e3320e10..bfd43e525 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -30,7 +30,7 @@ class CarInterface(CarInterfaceBase): return CarControllerParams.NIDEC_ACCEL_MIN, interp(current_speed, ACCEL_MAX_BP, ACCEL_MAX_VALS) @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disable_radar=False): # pylint: disable=dangerous-default-value + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], experimental_long=False): # pylint: disable=dangerous-default-value ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "honda" @@ -41,7 +41,8 @@ class CarInterface(CarInterfaceBase): if candidate not in HONDA_BOSCH_RADARLESS: # Disable the radar and let openpilot control longitudinal # WARNING: THIS DISABLES AEB! - ret.openpilotLongitudinalControl = disable_radar + ret.experimentalLongitudinalAvailable = True + ret.openpilotLongitudinalControl = experimental_long ret.pcmCruise = not ret.openpilotLongitudinalControl else: diff --git a/selfdrive/car/honda/values.py b/selfdrive/car/honda/values.py index ad4f73c01..ff9756e86 100644 --- a/selfdrive/car/honda/values.py +++ b/selfdrive/car/honda/values.py @@ -144,6 +144,7 @@ CAR_INFO: Dict[str, Optional[Union[HondaCarInfo, List[HondaCarInfo]]]] = { FW_VERSIONS = { + CAR.ODYSSEY_CHN: {(Ecu.vsa, 0xfff, None): [b'\x00']}, CAR.ACCORD: { (Ecu.programmedFuelInjection, 0x18da10f1, None): [ b'37805-6A0-8720\x00\x00', diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 971330a33..db80bcdf4 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -1,6 +1,6 @@ from cereal import car from common.conversions import Conversions as CV -from common.numpy_fast import clip, interp +from common.numpy_fast import clip from common.realtime import DT_CTRL from opendbc.can.packer import CANPacker from selfdrive.car import apply_std_steer_torque_limits @@ -15,6 +15,7 @@ def process_hud_alert(enabled, fingerprint, hud_control): sys_warning = (hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw)) # initialize to no line visible + # TODO: this is not accurate for all cars sys_state = 1 if hud_control.leftLaneVisible and hud_control.rightLaneVisible or sys_warning: # HUD alert only display when LKAS status is active sys_state = 3 if enabled or sys_warning else 4 @@ -122,12 +123,9 @@ class CarController: if self.frame % 2 == 0 and self.CP.openpilotLongitudinalControl: accel = actuators.accel - jerk = 0 - if CC.longActive: - jerk = clip(2.0 * (accel - CS.out.aEgo), -12.7, 12.7) - if accel < 0: - accel = interp(accel - CS.out.aEgo, [-1.0, -0.5], [2 * accel, accel]) + #TODO unclear if this is needed + jerk = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0 accel = clip(accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX) diff --git a/selfdrive/car/hyundai/hyundaican.py b/selfdrive/car/hyundai/hyundaican.py index 8a5e33f11..df5cb6ae6 100644 --- a/selfdrive/car/hyundai/hyundaican.py +++ b/selfdrive/car/hyundai/hyundaican.py @@ -37,12 +37,26 @@ def create_lkas11(packer, frame, car_fingerprint, apply_steer, steer_req, # Note: the warning is hidden while the blinkers are on values["CF_Lkas_SysWarning"] = 4 if sys_warning else 0 + # Likely cars lacking the ability to show individual lane lines in the dash + elif car_fingerprint in (CAR.KIA_OPTIMA,): + # SysWarning 4 = keep hands on wheel + beep + values["CF_Lkas_SysWarning"] = 4 if sys_warning else 0 + + # SysState 0 = no icons + # SysState 1-2 = white car + lanes + # SysState 3 = green car + lanes, green steering wheel + # SysState 4 = green car + lanes + values["CF_Lkas_LdwsSysState"] = 3 if enabled else 1 + values["CF_Lkas_LdwsOpt_USM"] = 2 # non-2 changes above SysState definition + + # these have no effect + values["CF_Lkas_LdwsActivemode"] = 0 + values["CF_Lkas_FcwOpt_USM"] = 0 + elif car_fingerprint == CAR.HYUNDAI_GENESIS: # This field is actually LdwsActivemode # Genesis and Optima fault when forwarding while engaged values["CF_Lkas_LdwsActivemode"] = 2 - elif car_fingerprint == CAR.KIA_OPTIMA: - values["CF_Lkas_LdwsActivemode"] = 0 dat = packer.make_can_msg("LKAS11", 0, values)[2] @@ -80,7 +94,7 @@ def create_lfahda_mfc(packer, enabled, hda_set_speed=0): } return packer.make_can_msg("LFAHDA_MFC", 0, values) -def create_acc_commands(packer, enabled, accel, jerk, idx, lead_visible, set_speed, stopping, gas_pressed): +def create_acc_commands(packer, enabled, accel, upper_jerk, idx, lead_visible, set_speed, stopping, gas_pressed): commands = [] scc11_values = { @@ -88,12 +102,12 @@ def create_acc_commands(packer, enabled, accel, jerk, idx, lead_visible, set_spe "TauGapSet": 4, "VSetDis": set_speed if enabled else 0, "AliveCounterACC": idx % 0x10, - "ObjValid": 0, # TODO: these two bits may allow for better longitudinal control - "ACC_ObjStatus": 0, + "ObjValid": 1, # close lead makes controls tighter + "ACC_ObjStatus": 1, # close lead makes controls tighter "ACC_ObjLatPos": 0, "ACC_ObjRelSpd": 0, - "ACC_ObjDist": 0, - } + "ACC_ObjDist": 1, # close lead makes controls tighter + } commands.append(packer.make_can_msg("SCC11", 0, scc11_values)) scc12_values = { @@ -111,8 +125,8 @@ def create_acc_commands(packer, enabled, accel, jerk, idx, lead_visible, set_spe scc14_values = { "ComfortBandUpper": 0.0, # stock usually is 0 but sometimes uses higher values "ComfortBandLower": 0.0, # stock usually is 0 but sometimes uses higher values - "JerkUpperLimit": max(jerk, 1.0) if not stopping else 0, # stock usually is 1.0 but sometimes uses higher values - "JerkLowerLimit": max(-jerk, 1.0), # stock usually is 0.5 but sometimes uses higher values + "JerkUpperLimit": upper_jerk, # stock usually is 1.0 but sometimes uses higher values + "JerkLowerLimit": 5.0, # stock usually is 0.5 but sometimes uses higher values "ACCMode": 2 if enabled and gas_pressed else 1 if enabled else 4, # stock will always be 4 instead of 0 after first disengage "ObjGap": 2 if lead_visible else 0, # 5: >30, m, 4: 25-30 m, 3: 20-25 m, 2: < 20 m, 0: no lead } diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 8c077938e..5c725b3dd 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -22,14 +22,15 @@ class CarInterface(CarInterfaceBase): return CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disable_radar=False): # pylint: disable=dangerous-default-value + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], experimental_long=False): # pylint: disable=dangerous-default-value ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "hyundai" ret.radarOffCan = RADAR_START_ADDR not in fingerprint[1] or DBC[ret.carFingerprint]["radar"] is None # WARNING: disabling radar also disables AEB (and we show the same warning on the instrument cluster as if you manually disabled AEB) - ret.openpilotLongitudinalControl = disable_radar and (candidate not in (LEGACY_SAFETY_MODE_CAR | CAMERA_SCC_CAR)) + ret.experimentalLongitudinalAvailable = candidate not in (LEGACY_SAFETY_MODE_CAR | CAMERA_SCC_CAR | CANFD_CAR) + ret.openpilotLongitudinalControl = experimental_long and ret.experimentalLongitudinalAvailable ret.pcmCruise = not ret.openpilotLongitudinalControl @@ -43,13 +44,15 @@ class CarInterface(CarInterfaceBase): tire_stiffness_factor = 1. ret.stoppingControl = True - ret.vEgoStopping = 1.0 + ret.startingState = True + ret.vEgoStarting = 0.1 + ret.startAccel = 2.0 - ret.longitudinalTuning.kpV = [0.1] + ret.longitudinalTuning.kpV = [0.5] ret.longitudinalTuning.kiV = [0.0] - ret.stopAccel = 0.0 - ret.longitudinalActuatorDelayUpperBound = 1.0 # s + ret.longitudinalActuatorDelayLowerBound = 0.5 # s + ret.longitudinalActuatorDelayUpperBound = 0.5 # s if candidate in (CAR.SANTA_FE, CAR.SANTA_FE_2022, CAR.SANTA_FE_HEV_2022, CAR.SANTA_FE_PHEV_2022): ret.lateralTuning.pid.kf = 0.00005 ret.mass = 3982. * CV.LB_TO_KG + STD_CARGO_KG @@ -300,6 +303,7 @@ class CarInterface(CarInterfaceBase): # non-HDA2 if 0x1cf not in fingerprint[4]: ret.flags |= HyundaiFlags.CANFD_ALT_BUTTONS.value + ret.safetyConfigs[1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_ALT_BUTTONS else: ret.enableBsm = 0x58b in fingerprint[0] diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index aa1823522..e2374a1c0 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -140,7 +140,7 @@ CAR_INFO: Dict[str, Optional[Union[HyundaiCarInfo, List[HyundaiCarInfo]]]] = { # Kia CAR.KIA_FORTE: [ HyundaiCarInfo("Kia Forte 2018", harness=Harness.hyundai_b), - HyundaiCarInfo("Kia Forte 2019-21", "All", harness=Harness.hyundai_g), + HyundaiCarInfo("Kia Forte 2019-21", harness=Harness.hyundai_g), ], CAR.KIA_K5_2021: HyundaiCarInfo("Kia K5 2021-22", "Smart Cruise Control (SCC)", harness=Harness.hyundai_a), CAR.KIA_NIRO_EV: [ @@ -398,7 +398,7 @@ FW_VERSIONS = { b'\xf1\x8799110L0000\xf1\x00DN8_ SCC F-CUP 1.00 1.00 99110-L0000 ', b'\xf1\x8799110L0000\xf1\x00DN8_ SCC FHCUP 1.00 1.00 99110-L0000 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00DN ESC \x07 106 \x07\x01 58910-L0100', b'\xf1\x00DN ESC \x01 102\x19\x04\x13 58910-L1300', b'\xf1\x00DN ESC \x03 100 \x08\x01 58910-L0300', @@ -518,7 +518,7 @@ FW_VERSIONS = { (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00LF__ SCC F-CUP 1.00 1.00 96401-C2200 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00LF ESC \f 11 \x17\x01\x13 58920-C2610', b'\xf1\x00LF ESC \t 11 \x17\x01\x13 58920-C2610', ], @@ -565,7 +565,7 @@ FW_VERSIONS = { b'\xf1\x00TM__ SCC F-CUP 1.00 1.02 99110-S2000 ', b'\xf1\x00TM__ SCC F-CUP 1.00 1.03 99110-S2000 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00TM ESC \r 100\x18\x031 58910-S2650', b'\xf1\x00TM ESC \r 103\x18\x11\x08 58910-S2650', b'\xf1\x00TM ESC \r 104\x19\a\b 58910-S2650', @@ -623,7 +623,7 @@ FW_VERSIONS = { b'\xf1\x8799110S1500\xf1\x00TM__ SCC FHCUP 1.00 1.00 99110-S1500 ', b'\xf1\x00TM__ SCC FHCUP 1.00 1.00 99110-S1500 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00TM ESC \x02 101 \x08\x04 58910-S2GA0', b'\xf1\x00TM ESC \x03 101 \x08\x02 58910-S2DA0', b'\xf1\x8758910-S2DA0\xf1\x00TM ESC \x03 101 \x08\x02 58910-S2DA0', @@ -744,7 +744,7 @@ FW_VERSIONS = { b'\xf1\x00LX2_ SCC FHCUP 1.00 1.05 99110-S8100 ', b'\xf1\x00ON__ FCA FHCUP 1.00 1.02 99110-S9100 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00LX ESC \x01 103\x19\t\x10 58910-S8360', b'\xf1\x00LX ESC \x01 1031\t\x10 58910-S8360', b'\xf1\x00LX ESC \x0b 101\x19\x03\x17 58910-S8330', @@ -834,7 +834,7 @@ FW_VERSIONS = { b'\xf1\x00JS__ SCC H-CUP 1.00 1.02 95650-J3200 ', b'\xf1\x00JS__ SCC HNCUP 1.00 1.02 95650-J3100 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00\x00\x00\x00\x00\x00\x00', b'\xf1\x816V8RAC00121.ELF\xf1\x00\x00\x00\x00\x00\x00\x00', ], @@ -895,7 +895,7 @@ FW_VERSIONS = { }, CAR.KONA: { (Ecu.fwdRadar, 0x7d0, None): [b'\xf1\x00OS__ SCC F-CUP 1.00 1.00 95655-J9200 ', ], - (Ecu.esp, 0x7d1, None): [b'\xf1\x816V5RAK00018.ELF\xf1\x00\x00\x00\x00\x00\x00\x00', ], + (Ecu.abs, 0x7d1, None): [b'\xf1\x816V5RAK00018.ELF\xf1\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.engine, 0x7e0, None): [b'"\x01TOS-0NU06F301J02', ], (Ecu.eps, 0x7d4, None): [b'\xf1\x00OS MDPS C 1.00 1.05 56310J9030\x00 4OSDC105', ], (Ecu.fwdCamera, 0x7c4, None): [b'\xf1\x00OS9 LKAS AT USA LHD 1.00 1.00 95740-J9300 g21', ], @@ -910,7 +910,7 @@ FW_VERSIONS = { b'\xf1\x816U2V7051\000\000\xf1\0006U2V0_C2\000\0006U2V7051\000\000DCD0T14US1\000\000\000\000', b'\xf1\x816U2V7051\x00\x00\xf1\x006U2V0_C2\x00\x006U2V7051\x00\x00DCD0T14US1U\x867Z', ], - (Ecu.esp, 0x7D1, None): [b'\xf1\000CD ESC \003 102\030\b\005 58920-J7350', ], + (Ecu.abs, 0x7D1, None): [b'\xf1\000CD ESC \003 102\030\b\005 58920-J7350', ], }, CAR.KIA_FORTE: { (Ecu.eps, 0x7D4, None): [ @@ -928,7 +928,7 @@ FW_VERSIONS = { b'\x01TBDM1NU06F200H01', b'391182B945\x00', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x816VGRAH00018.ELF\xf1\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.transmission, 0x7e1, None): [ @@ -952,7 +952,7 @@ FW_VERSIONS = { b'\xf1\x00DL3 MFC AT USA LHD 1.00 1.03 99210-L3000 200915', b'\xf1\x00DL3 MFC AT USA LHD 1.00 1.04 99210-L3000 210208', ], - (Ecu.esp, 0x7D1, None): [ + (Ecu.abs, 0x7D1, None): [ b'\xf1\000DL ESC \006 101 \004\002 58910-L3200', b'\xf1\x8758910-L3200\xf1\000DL ESC \006 101 \004\002 58910-L3200', b'\xf1\x8758910-L3800\xf1\x00DL ESC \t 101 \x07\x02 58910-L3800', @@ -972,7 +972,7 @@ FW_VERSIONS = { ], }, CAR.KONA_EV: { - (Ecu.esp, 0x7D1, None): [ + (Ecu.abs, 0x7D1, None): [ b'\xf1\x00OS IEB \r 105\x18\t\x18 58520-K4000', b'\xf1\x00OS IEB \x01 212 \x11\x13 58520-K4000', b'\xf1\x00OS IEB \x02 212 \x11\x13 58520-K4000', @@ -999,7 +999,7 @@ FW_VERSIONS = { ], }, CAR.KONA_EV_2022: { - (Ecu.esp, 0x7D1, None): [ + (Ecu.abs, 0x7D1, None): [ b'\xf1\x8758520-K4010\xf1\x00OS IEB \x02 101 \x11\x13 58520-K4010', b'\xf1\x8758520-K4010\xf1\x00OS IEB \x04 101 \x11\x13 58520-K4010', b'\xf1\x8758520-K4010\xf1\x00OS IEB \x03 101 \x11\x13 58520-K4010', @@ -1093,7 +1093,7 @@ FW_VERSIONS = { }, CAR.KIA_SELTOS: { (Ecu.fwdRadar, 0x7d0, None): [b'\xf1\x8799110Q5100\xf1\000SP2_ SCC FHCUP 1.01 1.05 99110-Q5100 ',], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x8758910-Q5450\xf1\000SP ESC \a 101\031\t\005 58910-Q5450', b'\xf1\x8758910-Q5450\xf1\000SP ESC \t 101\031\t\005 58910-Q5450', ], @@ -1121,7 +1121,7 @@ FW_VERSIONS = { (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00JF__ SCC F-CUP 1.00 1.00 96400-D4110 ', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00JF ESC \x0b 11 \x18\x030 58920-D5180', ], (Ecu.engine, 0x7e0, None): [ @@ -1158,7 +1158,7 @@ FW_VERSIONS = { b'\xf1\x00CN7 MFC AT USA LHD 1.00 1.01 99210-AB000 210205', b'\xf1\x00CN7 MFC AT USA LHD 1.00 1.06 99210-AA000 220111', ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00CN ESC \t 101 \x10\x03 58910-AB800', b'\xf1\x8758910-AA800\xf1\x00CN ESC \t 104 \x08\x03 58910-AA800', b'\xf1\x8758910-AB800\xf1\x00CN ESC \t 101 \x10\x03 58910-AB800', @@ -1204,7 +1204,7 @@ FW_VERSIONS = { ] }, CAR.KONA_HEV: { - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00OS IEB \x01 104 \x11 58520-CM000', ], (Ecu.fwdRadar, 0x7d0, None): [ @@ -1258,7 +1258,7 @@ FW_VERSIONS = { (Ecu.fwdCamera, 0x7c4, None): [ b'\xf1\x00UMP LKAS AT USA LHD 1.01 1.01 95740-C6550 d01' ], - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00UM ESC \x0c 12 \x18\x05\x06 58910-C6330' ], (Ecu.fwdRadar, 0x7D0, None): [ @@ -1272,7 +1272,7 @@ FW_VERSIONS = { ], }, CAR.KIA_EV6: { - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x8758520CV100\xf1\x00CV IEB \x02 101!\x10\x18 58520-CV100', ], (Ecu.eps, 0x7d4, None): [ @@ -1287,9 +1287,11 @@ FW_VERSIONS = { ], }, CAR.IONIQ_5: { - (Ecu.esp, 0x7d1, None): [ + (Ecu.abs, 0x7d1, None): [ b'\xf1\x00NE1 IEB \x07 106!\x11) 58520-GI010', b'\xf1\x8758520GI010\xf1\x00NE1 IEB \x07 106!\x11) 58520-GI010', + b'\xf1\x00NE1 IEB \x08 104!\x04\x05 58520-GI000', + b'\xf1\x8758520GI000\xf1\x00NE1 IEB \x08 104!\x04\x05 58520-GI000', ], (Ecu.eps, 0x7d4, None): [ b'\xf1\x00NE MDPS R 1.00 1.06 57700GI000 4NEDR106', @@ -1301,6 +1303,7 @@ FW_VERSIONS = { ], (Ecu.fwdCamera, 0x7c4, None): [ b'\xf1\x00NE1 MFC AT USA LHD 1.00 1.02 99211-GI010 211206', + b'\xf1\x00NE1 MFC AT EUR LHD 1.00 1.06 99211-GI000 210813', ], }, CAR.TUCSON_HYBRID_4TH_GEN: { diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index ebb286ae0..c9919a0cb 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -90,7 +90,7 @@ class CarInterfaceBase(ABC): @staticmethod @abstractmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): pass @staticmethod @@ -112,11 +112,14 @@ class CarInterfaceBase(ABC): ret = car.CarParams.new_message() ret.carFingerprint = candidate + # Car docs fields + ret.maxLateralAccel = get_torque_params(candidate)['MAX_LAT_ACCEL_MEASURED'] + ret.autoResumeSng = True # describes whether car can resume from a stop automatically + # standard ALC params ret.steerControlType = car.CarParams.SteerControlType.torque ret.minSteerSpeed = 0. ret.wheelSpeedFactor = 1.0 - ret.maxLateralAccel = get_torque_params(candidate)['MAX_LAT_ACCEL_MEASURED'] ret.pcmCruise = True # openpilot's state is tied to the PCM's cruise state on most cars ret.minEnableSpeed = -1. # enable is done by stock ACC, so ignore this @@ -222,7 +225,7 @@ class CarInterfaceBase(ABC): events.add(EventName.stockFcw) if cs_out.stockAeb: events.add(EventName.stockAeb) - if cs_out.vEgo > MAX_CTRL_SPEED: + if self.dragonconf.dpSpeedCheck and cs_out.vEgo > MAX_CTRL_SPEED: events.add(EventName.speedTooHigh) if self.dragonconf.dpAtl != 1 and cs_out.cruiseState.nonAdaptive: events.add(EventName.wrongCruiseMode) @@ -310,12 +313,12 @@ class CarStateBase(ABC): self.left_blinker_prev = False self.right_blinker_prev = False - # Q = np.matrix([[10.0, 0.0], [0.0, 100.0]]) - # R = 1e3 + # Q = np.matrix([[0.0, 0.0], [0.0, 100.0]]) + # R = 0.3 self.v_ego_kf = KF1D(x0=[[0.0], [0.0]], A=[[1.0, DT_CTRL], [0.0, 1.0]], C=[1.0, 0.0], - K=[[0.12287673], [0.29666309]]) + K=[[0.17406039], [1.65925647]]) def update_speed_kf(self, v_ego_raw): if abs(v_ego_raw - self.v_ego_kf.x[0][0]) > 2.0: # Prevent large accelerations when car starts at non zero speed diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index f08d9346d..669d224e7 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -15,7 +15,7 @@ class CarInterface(CarInterfaceBase): return float(accel) / 4.0 @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "mazda" diff --git a/selfdrive/car/mazda/values.py b/selfdrive/car/mazda/values.py index ed246f15d..95f140422 100644 --- a/selfdrive/car/mazda/values.py +++ b/selfdrive/car/mazda/values.py @@ -72,7 +72,7 @@ FW_VERSIONS = { (Ecu.fwdRadar, 0x764, None): [ b'K131-67XK2-F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'KSD5-437K2-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.fwdCamera, 0x706, None): [ @@ -116,7 +116,7 @@ FW_VERSIONS = { b'K131-67XK2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'K131-67XK2-F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'K123-437K2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'KBJ5-437K2-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'KL2K-437K2-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', @@ -173,7 +173,7 @@ FW_VERSIONS = { b'TK80-67XK2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'TK80-67XK2-F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'TA0B-437K2-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'TK79-437K2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'TK79-437K2-F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', @@ -217,7 +217,7 @@ FW_VERSIONS = { b'GHP9-67Y10---41\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'K131-67XK2-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'B45A-437AS-0-08\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.fwdCamera, 0x706, None): [ @@ -248,7 +248,7 @@ FW_VERSIONS = { b'K131-67XK2-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'K131-67XK2-E\000\000\000\000\000\000\000\000\000\000\000\000', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'GBVH-437K2-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'GDDM-437K2-A\000\000\000\000\000\000\000\000\000\000\000\000', ], @@ -275,7 +275,7 @@ FW_VERSIONS = { b'K131-67XK2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'K131-67XK2-F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x760, None): [ + (Ecu.abs, 0x760, None): [ b'TA0B-437K2-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ], (Ecu.fwdCamera, 0x706, None): [ diff --git a/selfdrive/car/mock/interface.py b/selfdrive/car/mock/interface.py index 715850c22..2c7f4611e 100755 --- a/selfdrive/car/mock/interface.py +++ b/selfdrive/car/mock/interface.py @@ -33,7 +33,7 @@ class CarInterface(CarInterfaceBase): return accel @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "mock" ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.noOutput)] diff --git a/selfdrive/car/nissan/interface.py b/selfdrive/car/nissan/interface.py index 0d5334818..a9c549c02 100644 --- a/selfdrive/car/nissan/interface.py +++ b/selfdrive/car/nissan/interface.py @@ -8,33 +8,32 @@ from selfdrive.car.nissan.values import CAR class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "nissan" ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.nissan)] + ret.autoResumeSng = False ret.steerLimitTimer = 1.0 ret.steerActuatorDelay = 0.1 + ret.steerRatio = 17 if candidate in (CAR.ROGUE, CAR.XTRAIL): ret.mass = 1610 + STD_CARGO_KG ret.wheelbase = 2.705 ret.centerToFront = ret.wheelbase * 0.44 - ret.steerRatio = 17 elif candidate in (CAR.LEAF, CAR.LEAF_IC): ret.mass = 1610 + STD_CARGO_KG ret.wheelbase = 2.705 ret.centerToFront = ret.wheelbase * 0.44 - ret.steerRatio = 17 elif candidate == CAR.ALTIMA: # Altima has EPS on C-CAN unlike the others that have it on V-CAN ret.safetyConfigs[0].safetyParam = 1 # EPS is on alternate bus ret.mass = 1492 + STD_CARGO_KG ret.wheelbase = 2.824 ret.centerToFront = ret.wheelbase * 0.44 - ret.steerRatio = 17 ret.steerControlType = car.CarParams.SteerControlType.angle ret.radarOffCan = True diff --git a/selfdrive/car/nissan/nissancan.py b/selfdrive/car/nissan/nissancan.py index f59714b8d..01fb3463a 100644 --- a/selfdrive/car/nissan/nissancan.py +++ b/selfdrive/car/nissan/nissancan.py @@ -24,10 +24,7 @@ def create_steering_control(packer, apply_steer, frame, steer_on, lkas_max_torqu def create_acc_cancel_cmd(packer, car_fingerprint, cruise_throttle_msg): values = copy.copy(cruise_throttle_msg) - can_bus = 2 - - if car_fingerprint == CAR.ALTIMA: - can_bus = 1 + can_bus = 1 if car_fingerprint == CAR.ALTIMA else 2 values["CANCEL_BUTTON"] = 1 values["NO_BUTTON_PRESSED"] = 0 diff --git a/selfdrive/car/nissan/values.py b/selfdrive/car/nissan/values.py index 2126e550e..440c68249 100644 --- a/selfdrive/car/nissan/values.py +++ b/selfdrive/car/nissan/values.py @@ -95,7 +95,7 @@ FW_VERSIONS = { b'5SH1BDB\x04\x18\x00\x00\x00\x00\x00_-?\x04\x91\xf2\x00\x00\x00\x80', b'5SK0ADB\x04\x18\x00\x00\x00\x00\x00_(5\x07\x9aQ\x00\x00\x00\x80', ], - (Ecu.esp, 0x740, None): [ + (Ecu.abs, 0x740, None): [ b'476605SH1D', b'476605SK2A', ], @@ -112,7 +112,7 @@ FW_VERSIONS = { (Ecu.fwdCamera, 0x707, None): [ b'284N86FR2A', ], - (Ecu.esp, 0x740, None): [ + (Ecu.abs, 0x740, None): [ b'6FU1BD\x11\x02\x00\x02e\x95e\x80iX#\x01\x00\x00\x00\x00\x00\x80', b'6FU0AD\x11\x02\x00\x02e\x95e\x80iQ#\x01\x00\x00\x00\x00\x00\x80', ], diff --git a/selfdrive/car/subaru/interface.py b/selfdrive/car/subaru/interface.py index 618d79ac4..8e8b08842 100644 --- a/selfdrive/car/subaru/interface.py +++ b/selfdrive/car/subaru/interface.py @@ -9,12 +9,13 @@ from selfdrive.car.subaru.values import CAR, GLOBAL_GEN2, PREGLOBAL_CARS class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "subaru" ret.radarOffCan = True ret.dashcamOnly = candidate in PREGLOBAL_CARS + ret.autoResumeSng = False if candidate in PREGLOBAL_CARS: ret.enableBsm = 0x25c in fingerprint[0] diff --git a/selfdrive/car/subaru/values.py b/selfdrive/car/subaru/values.py index 7d8365a11..53dd4a763 100644 --- a/selfdrive/car/subaru/values.py +++ b/selfdrive/car/subaru/values.py @@ -74,7 +74,7 @@ CAR_INFO: Dict[str, Union[SubaruCarInfo, List[SubaruCarInfo]]] = { FW_VERSIONS = { CAR.ASCENT: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\xa5 \x19\x02\x00', b'\xa5 !\002\000', b'\xf1\x82\xa5 \x19\x02\x00', @@ -104,24 +104,29 @@ FW_VERSIONS = { ], }, CAR.LEGACY: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\xa1\\ x04\x01', + b'\xa1 \x03\x03' ], (Ecu.eps, 0x746, None): [ b'\x9b\xc0\x11\x00', + b'\x9b\xc0\x11\x02' ], (Ecu.fwdCamera, 0x787, None): [ b'\x00\x00e\x80\x00\x1f@ \x19\x00', + b'\x00\x00e\x9a\x00\x00\x00\x00\x00\x00' ], (Ecu.engine, 0x7e0, None): [ b'\xde\"a0\x07', + b'\xe2"aq\x07' ], (Ecu.transmission, 0x7e1, None): [ b'\xa5\xf6\x05@\x00', + b'\xa7\xf6\x04@\x00' ], }, CAR.IMPREZA: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x7a\x94\x3f\x90\x00', b'\xa2 \x185\x00', b'\xa2 \x193\x00', @@ -196,7 +201,7 @@ FW_VERSIONS = { ], }, CAR.IMPREZA_2020: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\xa2 \0314\000', b'\xa2 \0313\000', b'\xa2 !i\000', @@ -234,7 +239,7 @@ FW_VERSIONS = { ], }, CAR.FORESTER: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\xa3 \x18\x14\x00', b'\xa3 \024\000', b'\xa3 \031\024\000', @@ -269,7 +274,7 @@ FW_VERSIONS = { ], }, CAR.FORESTER_PREGLOBAL: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x7d\x97\x14\x40', b'\xf1\x00\xbb\x0c\x04', ], @@ -298,7 +303,7 @@ FW_VERSIONS = { ], }, CAR.LEGACY_PREGLOBAL: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'k\x97D\x00', b'[\xba\xc4\x03', b'{\x97D\x00', @@ -328,7 +333,7 @@ FW_VERSIONS = { ], }, CAR.OUTBACK_PREGLOBAL: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'{\x9a\xac\x00', b'k\x97\xac\x00', b'\x5b\xf7\xbc\x03', @@ -382,7 +387,7 @@ FW_VERSIONS = { ], }, CAR.OUTBACK_PREGLOBAL_2018: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x8b\x97\xac\x00', b'\x8b\x9a\xac\x00', b'\x9b\x97\xac\x00', @@ -425,7 +430,7 @@ FW_VERSIONS = { ], }, CAR.OUTBACK: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\xa1 \x06\x01', b'\xa1 \a\x00', b'\xa1 \b\001', diff --git a/selfdrive/car/tesla/interface.py b/selfdrive/car/tesla/interface.py index 5e78c72b6..2eb29efb4 100755 --- a/selfdrive/car/tesla/interface.py +++ b/selfdrive/car/tesla/interface.py @@ -8,7 +8,7 @@ from selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "tesla" diff --git a/selfdrive/car/torque_data/override.yaml b/selfdrive/car/torque_data/override.yaml index 14ee7e223..fcc762c2b 100644 --- a/selfdrive/car/torque_data/override.yaml +++ b/selfdrive/car/torque_data/override.yaml @@ -13,6 +13,7 @@ TESLA AP2 MODEL S: [.nan, 2.5, .nan] # Guess FORD ESCAPE 4TH GEN: [.nan, 1.5, .nan] +FORD EXPLORER 6TH GEN: [.nan, 1.5, .nan] FORD FOCUS 4TH GEN: [.nan, 1.5, .nan] ### diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index d5a7a6433..4786a46d5 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -11,14 +11,17 @@ from common.conversions import Conversions as CV VisualAlert = car.CarControl.HUDControl.VisualAlert -# constants for fault workaround +# EPS faults if you apply torque while the steering rate is above 100 deg/s for too long MAX_STEER_RATE = 100 # deg/s -MAX_STEER_RATE_FRAMES = 19 +MAX_STEER_RATE_FRAMES = 18 # tx control frames needed before torque can be cut + +# EPS allows user torque above threshold for 50 frames before permanently faulting +MAX_USER_TORQUE = 500 GearShifter = car.CarState.GearShifter UNLOCK_CMD = b'\x40\x05\x30\x11\x00\x40\x00\x00' LOCK_CMD = b'\x40\x05\x30\x11\x00\x80\x00\x00' -LOCK_AT_SPEED = 25 * CV.KPH_TO_MS +LOCK_AT_SPEED = 10 * CV.KPH_TO_MS class CarController: def __init__(self, dbc_name, CP, VM): @@ -29,6 +32,7 @@ class CarController: self.alert_active = False self.last_standstill = False self.standstill_req = False + self.steer_rate_counter = 0 self.steer_rate_counter = 0 @@ -54,6 +58,7 @@ class CarController: actuators = CC.actuators hud_control = CC.hudControl pcm_cancel_cmd = CC.cruiseControl.cancel + lat_active = CC.latActive and abs(CS.out.steeringTorque) < MAX_USER_TORQUE # gas and brake if self.CP.enableGasInterceptor and CC.longActive: @@ -77,28 +82,21 @@ class CarController: new_steer = int(round(actuators.steer * CarControllerParams.STEER_MAX)) apply_steer = apply_toyota_steer_torque_limits(new_steer, self.last_steer, CS.out.steeringTorqueEps, self.torque_rate_limits) - # EPS_STATUS->LKA_STATE either goes to 21 or 25 on rising edge of a steering fault and - # the value seems to describe how many frames the steering rate was above 100 deg/s, so - # cut torque with some margin for the lower state - if CC.latActive and abs(CS.out.steeringRateDeg) >= MAX_STEER_RATE: + # Count up to MAX_STEER_RATE_FRAMES, at which point we need to cut torque to avoid a steering fault + if lat_active and abs(CS.out.steeringRateDeg) >= MAX_STEER_RATE: self.steer_rate_counter += 1 else: self.steer_rate_counter = 0 apply_steer_req = 1 - if not CC.latActive: + if not lat_active: apply_steer = 0 apply_steer_req = 0 - elif self.steer_rate_counter >= MAX_STEER_RATE_FRAMES: + elif self.steer_rate_counter > MAX_STEER_RATE_FRAMES: apply_steer_req = 0 self.steer_rate_counter = 0 - # dp - try to avoid steering fault - if self.dp_atl > 0 and abs(CS.out.steeringAngleDeg) > 500: - apply_steer = 0 - apply_steer_req = 0 - # TODO: probably can delete this. CS.pcm_acc_status uses a different signal # than CS.cruiseState.enabled. confirm they're not meaningfully different if not CC.enabled and CS.pcm_acc_status: diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index d836a6a20..f6d6ae8f6 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -81,7 +81,7 @@ class CarState(CarStateBase): ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr]) ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw) - ret.standstill = ret.vEgoRaw < 0.001 + ret.standstill = ret.vEgoRaw == 0 ret.steeringAngleDeg = cp.vl["STEER_ANGLE_SENSOR"]["STEER_ANGLE"] + cp.vl["STEER_ANGLE_SENSOR"]["STEER_FRACTION"] torque_sensor_angle_deg = cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"] @@ -158,9 +158,17 @@ class CarState(CarStateBase): if self.CP.carFingerprint in (CAR.LEXUS_IS, CAR.LEXUS_RC): ret.cruiseState.available = cp.vl["DSU_CRUISE"]["MAIN_ON"] != 0 ret.cruiseState.speed = cp.vl["DSU_CRUISE"]["SET_SPEED"] * CV.KPH_TO_MS + cluster_set_speed = cp.vl["PCM_CRUISE_ALT"]["UI_SET_SPEED"] else: ret.cruiseState.available = cp.vl["PCM_CRUISE_2"]["MAIN_ON"] != 0 ret.cruiseState.speed = cp.vl["PCM_CRUISE_2"]["SET_SPEED"] * CV.KPH_TO_MS + cluster_set_speed = cp.vl["PCM_CRUISE_SM"]["UI_SET_SPEED"] + + # UI_SET_SPEED is always non-zero when main is on, hide until first enable + if ret.cruiseState.speed != 0: + is_metric = cp.vl["BODY_CONTROL_STATE_2"]["UNITS"] in (1, 2) + conversion_factor = CV.KPH_TO_MS if is_metric else CV.MPH_TO_MS + ret.cruiseState.speedCluster = cluster_set_speed * conversion_factor cp_acc = cp_cam if self.CP.carFingerprint in (TSS2_CAR - RADAR_ACC_CAR) else cp @@ -302,6 +310,7 @@ class CarState(CarStateBase): ("DOOR_OPEN_RR", "BODY_CONTROL_STATE"), ("SEATBELT_DRIVER_UNLATCHED", "BODY_CONTROL_STATE"), ("PARKING_BRAKE", "BODY_CONTROL_STATE"), + ("UNITS", "BODY_CONTROL_STATE_2"), ("TC_DISABLED", "ESP_CONTROL"), #("BRAKE_HOLD_ACTIVE", "ESP_CONTROL"), ("STEER_FRACTION", "STEER_ANGLE_SENSOR"), @@ -309,6 +318,7 @@ class CarState(CarStateBase): ("CRUISE_ACTIVE", "PCM_CRUISE"), ("CRUISE_STATE", "PCM_CRUISE"), ("GAS_RELEASED", "PCM_CRUISE"), + ("UI_SET_SPEED", "PCM_CRUISE_SM"), ("STEER_TORQUE_DRIVER", "STEER_TORQUE_SENSOR"), ("STEER_TORQUE_EPS", "STEER_TORQUE_SENSOR"), ("STEER_ANGLE", "STEER_TORQUE_SENSOR"), @@ -328,12 +338,14 @@ class CarState(CarStateBase): ("LIGHT_STALK", 1), ("BLINKERS_STATE", 0.15), ("BODY_CONTROL_STATE", 3), + ("BODY_CONTROL_STATE_2", 2), ("ESP_CONTROL", 3), ("EPS_STATUS", 25), ("BRAKE_MODULE", 40), ("WHEEL_SPEEDS", 80), ("STEER_ANGLE_SENSOR", 80), ("PCM_CRUISE", 33), + ("PCM_CRUISE_SM", 1), ("STEER_TORQUE_SENSOR", 50), #dp ("ENGINE_RPM", 100), @@ -357,7 +369,9 @@ class CarState(CarStateBase): if CP.carFingerprint in (CAR.LEXUS_IS, CAR.LEXUS_RC): signals.append(("MAIN_ON", "DSU_CRUISE")) signals.append(("SET_SPEED", "DSU_CRUISE")) + signals.append(("UI_SET_SPEED", "PCM_CRUISE_ALT")) checks.append(("DSU_CRUISE", 5)) + checks.append(("PCM_CRUISE_ALT", 1)) else: signals.append(("MAIN_ON", "PCM_CRUISE_2")) signals.append(("SET_SPEED", "PCM_CRUISE_2")) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index fc053f5f5..02da45e94 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -26,7 +26,7 @@ class CarInterface(CarInterfaceBase): return CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disable_radar=False): # pylint: disable=dangerous-default-value + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], experimental_long=False): # pylint: disable=dangerous-default-value ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "toyota" @@ -191,8 +191,6 @@ class CarInterface(CarInterfaceBase): # set_lat_tune(ret.lateralTuning, LatTunes.PID_N) set_lat_tune(ret.lateralTuning, LatTunes.INDI_PRIUS_TSS2) ret.steerActuatorDelay = 0.3 - #ret.steerRateCost = 1.25 - ret.steerLimitTimer = 0.5 elif candidate == CAR.MIRAI: stop_and_go = True @@ -240,6 +238,7 @@ class CarInterface(CarInterfaceBase): ret.openpilotLongitudinalControl = True if not ret.openpilotLongitudinalControl: + ret.autoResumeSng = False ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_STOCK_LONGITUDINAL # we can't use the fingerprint to detect this reliably, since @@ -258,7 +257,7 @@ class CarInterface(CarInterfaceBase): ret.vEgoStopping = 0.2 # car is near 0.1 to 0.2 when car starts requesting stopping accel ret.vEgoStarting = 0.2 # needs to be > or == vEgoStopping ret.stopAccel = -2.0 # Toyota requests -0.4 when stopped - ret.stoppingDecelRate = 0.8 # reach stopping target smoothly - seems to take 0.5 seconds to go from 0 to -0.4 + ret.stoppingDecelRate = 0.3 # reach stopping target smoothly - seems to take 0.5 seconds to go from 0 to -0.4 ret.longitudinalActuatorDelayLowerBound = 0.3 ret.longitudinalActuatorDelayUpperBound = 0.3 else: diff --git a/selfdrive/car/toyota/tunes.py b/selfdrive/car/toyota/tunes.py index 4c86b6f79..8e0c6d9a9 100644 --- a/selfdrive/car/toyota/tunes.py +++ b/selfdrive/car/toyota/tunes.py @@ -33,14 +33,14 @@ def set_long_tune(tune, name): if name == LongTunes.TSS2 or name == LongTunes.PEDAL: tune.deadzoneBP = [0., 8.05] tune.deadzoneV = [.0, .14] - tune.kpBP = [0., 5., 20.] - tune.kpV = [1.3, 1.0, 0.7] - tune.kiBP = [0., 5., 12., 20., 27.] - tune.kiV = [.35, .23, .20, .17, .1] + tune.kpBP = [0., 5., 20., 30.] + tune.kpV = [1.3, 1.0, 0.7, 0.1] + tune.kiBP = [0., 0.07, 8, 13., 18., 20., 24., 25., 27., 33.] + tune.kiV = [.01, .1, .15, .21, .175, .18, .2, .01, .001, .0001] # Default longitudinal tune elif name == LongTunes.TSS: tune.deadzoneBP = [0., 9.] - tune.deadzoneV = [0., .15] + tune.deadzoneV = [.0, .15] tune.kpBP = [0., 5., 35.] tune.kiBP = [0., 35.] tune.kpV = [3.6, 2.4, 1.5] @@ -54,14 +54,22 @@ def set_lat_tune(tune, name, MAX_LAT_ACCEL=2.5, FRICTION=0.01, steering_angle_de if name == LatTunes.INDI_PRIUS_TSS2: tune.init('indi') - tune.indi.innerLoopGainBP = [20, 24, 30] - tune.indi.innerLoopGainV = [7.25, 7.5, 9] - tune.indi.outerLoopGainBP = [20, 24, 30] - tune.indi.outerLoopGainV = [6, 7.25, 6] - tune.indi.timeConstantBP = [20, 24] - tune.indi.timeConstantV = [2.0, 2.2] - tune.indi.actuatorEffectivenessBP = [20, 24] - tune.indi.actuatorEffectivenessV = [2, 3] + #tune.indi.innerLoopGainBP = [20, 24, 30] + #tune.indi.innerLoopGainV = [7.25, 7.5, 9] + #tune.indi.outerLoopGainBP = [20, 24, 30] + #tune.indi.outerLoopGainV = [6, 7.25, 6] + #tune.indi.timeConstantBP = [20, 24] + #tune.indi.timeConstantV = [2.0, 2.2] + #tune.indi.actuatorEffectivenessBP = [20, 24] + #tune.indi.actuatorEffectivenessV = [2, 3] + tune.indi.innerLoopGainBP = [0.] + tune.indi.innerLoopGainV = [15] + tune.indi.outerLoopGainBP = [0.] + tune.indi.outerLoopGainV = [17] + tune.indi.timeConstantBP = [0.] + tune.indi.timeConstantV = [4.5] + tune.indi.actuatorEffectivenessBP = [0.] + tune.indi.actuatorEffectivenessV = [15] elif 'PID' in str(name): tune.init('pid') tune.pid.kiBP = [0.0] diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index bf648424d..f2602816f 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -200,9 +200,9 @@ STATIC_DSU_MSGS = [ ] FW_VERSIONS = { - CAR.CHR_TSS2: {(Ecu.esp, 0xfff, None): [b'\x00']}, + CAR.CHR_TSS2: {(Ecu.eps, 0xfff, None): [b'\x00']}, CAR.AVALON: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152607060\x00\x00\x00\x00\x00\x00', ], (Ecu.dsu, 0x791, None): [ @@ -227,7 +227,7 @@ FW_VERSIONS = { ], }, CAR.AVALON_2019: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152607140\x00\x00\x00\x00\x00\x00', b'F152607171\x00\x00\x00\x00\x00\x00', b'F152607110\x00\x00\x00\x00\x00\x00', @@ -255,7 +255,7 @@ FW_VERSIONS = { ], }, CAR.AVALONH_2019: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152641040\x00\x00\x00\x00\x00\x00', b'F152641061\x00\x00\x00\x00\x00\x00', b'F152641050\x00\x00\x00\x00\x00\x00', @@ -282,7 +282,7 @@ FW_VERSIONS = { ], }, CAR.AVALON_TSS2: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F152607240\x00\x00\x00\x00\x00\x00', b'\x01F152607280\x00\x00\x00\x00\x00\x00', ], @@ -302,7 +302,7 @@ FW_VERSIONS = { ], }, CAR.AVALONH_TSS2: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152641080\x00\x00\x00\x00\x00\x00', ], (Ecu.eps, 0x7a1, None): [ @@ -358,7 +358,7 @@ FW_VERSIONS = { b'8821F0608200 ', b'8821F0609100 ', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152606210\x00\x00\x00\x00\x00\x00', b'F152606230\x00\x00\x00\x00\x00\x00', b'F152606270\x00\x00\x00\x00\x00\x00', @@ -422,7 +422,7 @@ FW_VERSIONS = { b'\x028966306S0100\x00\x00\x00\x00897CF3305001\x00\x00\x00\x00', b'\x028966306S1100\x00\x00\x00\x00897CF3305001\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152633214\x00\x00\x00\x00\x00\x00', b'F152633660\x00\x00\x00\x00\x00\x00', b'F152633712\x00\x00\x00\x00\x00\x00', @@ -488,7 +488,7 @@ FW_VERSIONS = { (Ecu.eps, 0x7a1, None): [ b'8965B33630\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F152606370\x00\x00\x00\x00\x00\x00', b'\x01F152606390\x00\x00\x00\x00\x00\x00', b'\x01F152606400\x00\x00\x00\x00\x00\x00', @@ -514,7 +514,7 @@ FW_VERSIONS = { (Ecu.eps, 0x7a1, None): [ b'8965B33630\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152633D00\x00\x00\x00\x00\x00\x00', ], (Ecu.engine, 0x700, None): [ @@ -549,7 +549,7 @@ FW_VERSIONS = { b'8821FF406000 ', b'8821FF407100 ', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152610020\x00\x00\x00\x00\x00\x00', b'F152610153\x00\x00\x00\x00\x00\x00', b'F152610210\x00\x00\x00\x00\x00\x00', @@ -601,7 +601,7 @@ FW_VERSIONS = { b'\x0289663F431000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00', b'\x0189663F438000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152610012\x00\x00\x00\x00\x00\x00', b'F152610013\x00\x00\x00\x00\x00\x00', b'F152610014\x00\x00\x00\x00\x00\x00', @@ -660,7 +660,7 @@ FW_VERSIONS = { b'881510201100\x00\x00\x00\x00', b'881510201200\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152602190\x00\x00\x00\x00\x00\x00', b'F152602191\x00\x00\x00\x00\x00\x00', ], @@ -720,6 +720,7 @@ FW_VERSIONS = { b'\x03312N6000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203402\x00\x00\x00\x00', b'\x03312N6100\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203302\x00\x00\x00\x00', b'\x03312N6100\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203402\x00\x00\x00\x00', + b'\x03312N6200\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00895231203302\x00\x00\x00\x00', b'\x02312K4000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00', b'\x02312U5000\x00\x00\x00\x00\x00\x00\x00\x00A0202000\x00\x00\x00\x00\x00\x00\x00\x00', ], @@ -736,7 +737,7 @@ FW_VERSIONS = { b'\x018965B12510\x00\x00\x00\x00\x00\x00', b'\x018965B1256000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F152602280\x00\x00\x00\x00\x00\x00', b'\x01F152602560\x00\x00\x00\x00\x00\x00', b'\x01F152602590\x00\x00\x00\x00\x00\x00', @@ -814,7 +815,7 @@ FW_VERSIONS = { b'\x018965B12520\x00\x00\x00\x00\x00\x00', b'\x018965B12530\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152612590\x00\x00\x00\x00\x00\x00', b'F152612691\x00\x00\x00\x00\x00\x00', b'F152612692\x00\x00\x00\x00\x00\x00', @@ -886,7 +887,7 @@ FW_VERSIONS = { b'8965B48150\x00\x00\x00\x00\x00\x00', b'8965B48210\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [b'F15260E011\x00\x00\x00\x00\x00\x00'], + (Ecu.abs, 0x7b0, None): [b'F15260E011\x00\x00\x00\x00\x00\x00'], (Ecu.dsu, 0x791, None): [ b'881510E01100\x00\x00\x00\x00', b'881510E01200\x00\x00\x00\x00', @@ -904,7 +905,7 @@ FW_VERSIONS = { (Ecu.eps, 0x7a1, None): [ b'8965B48160\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152648541\x00\x00\x00\x00\x00\x00', b'F152648542\x00\x00\x00\x00\x00\x00', ], @@ -929,7 +930,7 @@ FW_VERSIONS = { b'8965B48310\x00\x00\x00\x00\x00\x00', b'8965B48320\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15260E051\x00\x00\x00\x00\x00\x00', b'\x01F15260E061\x00\x00\x00\x00\x00\x00', b'\x01F15260E110\x00\x00\x00\x00\x00\x00', @@ -948,7 +949,9 @@ FW_VERSIONS = { b'\x01896630EB2200\x00\x00\x00\x00', b'\x01896630EC4000\x00\x00\x00\x00', b'\x01896630ED9000\x00\x00\x00\x00', + b'\x01896630ED9100\x00\x00\x00\x00', b'\x01896630EE1000\x00\x00\x00\x00', + b'\x01896630EE1100\x00\x00\x00\x00', ], (Ecu.fwdRadar, 0x750, 0xf): [ b'\x018821F3301400\x00\x00\x00\x00', @@ -966,7 +969,7 @@ FW_VERSIONS = { b'8965B48241\x00\x00\x00\x00\x00\x00', b'8965B48310\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15264872300\x00\x00\x00\x00', b'\x01F15264872400\x00\x00\x00\x00', b'\x01F15264872500\x00\x00\x00\x00', @@ -976,15 +979,16 @@ FW_VERSIONS = { b'\x01F152648J6000\x00\x00\x00\x00', ], (Ecu.engine, 0x700, None): [ - b'\x01896630EE4000\x00\x00\x00\x00', - b'\x01896630EE6000\x00\x00\x00\x00', b'\x01896630E67000\x00\x00\x00\x00', b'\x01896630EA1000\x00\x00\x00\x00', - b'\x01896630EA1000\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', + b'\x01896630EE4000\x00\x00\x00\x00', + b'\x01896630EE4100\x00\x00\x00\x00', + b'\x01896630EE6000\x00\x00\x00\x00', b'\x02896630E66000\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', + b'\x02896630E66100\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', + b'\x01896630EA1000\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', b'\x02896630EB3000\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', b'\x02896630EB3100\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', - b'\x02896630E66100\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', ], (Ecu.fwdRadar, 0x750, 0xf): [ b'\x018821F3301400\x00\x00\x00\x00', @@ -1013,7 +1017,7 @@ FW_VERSIONS = { b'\x02353P7000\x00\x00\x00\x00\x00\x00\x00\x00530J5000\x00\x00\x00\x00\x00\x00\x00\x00', b'\x02353P9000\x00\x00\x00\x00\x00\x00\x00\x00553C1000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152653300\x00\x00\x00\x00\x00\x00', b'F152653301\x00\x00\x00\x00\x00\x00', b'F152653310\x00\x00\x00\x00\x00\x00', @@ -1097,7 +1101,7 @@ FW_VERSIONS = { b'8965B47050\x00\x00\x00\x00\x00\x00', b'8965B47060\x00\x00\x00\x00\x00\x00', # This is the EPS with good angle sensor ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152647290\x00\x00\x00\x00\x00\x00', b'F152647300\x00\x00\x00\x00\x00\x00', b'F152647310\x00\x00\x00\x00\x00\x00', @@ -1138,7 +1142,7 @@ FW_VERSIONS = { ], }, CAR.PRIUS_V: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152647280\x00\x00\x00\x00\x00\x00', ], (Ecu.engine, 0x7e0, None): [ @@ -1171,7 +1175,7 @@ FW_VERSIONS = { b'8965B42082\x00\x00\x00\x00\x00\x00', b'8965B42083\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F15260R102\x00\x00\x00\x00\x00\x00', b'F15260R103\x00\x00\x00\x00\x00\x00', b'F152642493\x00\x00\x00\x00\x00\x00', @@ -1208,7 +1212,7 @@ FW_VERSIONS = { b'8965B42162\x00\x00\x00\x00\x00\x00', b'8965B42163\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152642090\x00\x00\x00\x00\x00\x00', b'F152642110\x00\x00\x00\x00\x00\x00', b'F152642120\x00\x00\x00\x00\x00\x00', @@ -1270,7 +1274,7 @@ FW_VERSIONS = { b'\x02896634A47000\x00\x00\x00\x00897CF4201001\x00\x00\x00\x00', b'\x028966342Z8000\x00\x00\x00\x00897CF1201001\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15260R210\x00\x00\x00\x00\x00\x00', b'\x01F15260R220\x00\x00\x00\x00\x00\x00', b'\x01F15260R290\x00\x00\x00\x00\x00\x00', @@ -1311,7 +1315,7 @@ FW_VERSIONS = { ], }, CAR.RAV4_TSS2_2022: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15260R350\x00\x00\x00\x00\x00\x00', b'\x01F15260R361\x00\x00\x00\x00\x00\x00', ], @@ -1351,7 +1355,7 @@ FW_VERSIONS = { b'\x02896634A14001\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', b'\x02896634A14101\x00\x00\x00\x00897CF4801001\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152642291\x00\x00\x00\x00\x00\x00', b'F152642290\x00\x00\x00\x00\x00\x00', b'F152642322\x00\x00\x00\x00\x00\x00', @@ -1390,7 +1394,7 @@ FW_VERSIONS = { ], }, CAR.RAV4H_TSS2_2022: { - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15264283100\x00\x00\x00\x00', b'\x01F15264286200\x00\x00\x00\x00', b'\x01F15264286100\x00\x00\x00\x00', @@ -1438,7 +1442,7 @@ FW_VERSIONS = { b'8965B45080\x00\x00\x00\x00\x00\x00', b'8965B45082\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152608130\x00\x00\x00\x00\x00\x00', ], (Ecu.dsu, 0x791, None): [ @@ -1457,7 +1461,7 @@ FW_VERSIONS = { (Ecu.dsu, 0x791, None): [ b'881517601100\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152676144\x00\x00\x00\x00\x00\x00', ], (Ecu.engine, 0x7e0, None): [ @@ -1479,7 +1483,7 @@ FW_VERSIONS = { b'\x018966333X6000\x00\x00\x00\x00', b'\x01896633T07000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F152606281\x00\x00\x00\x00\x00\x00', b'\x01F152606340\x00\x00\x00\x00\x00\x00', b'\x01F152606461\x00\x00\x00\x00\x00\x00', @@ -1516,7 +1520,7 @@ FW_VERSIONS = { b'\x02896633T09000\x00\x00\x00\x00897CF3307001\x00\x00\x00\x00', b'\x01896633T38000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152633423\x00\x00\x00\x00\x00\x00', b'F152633680\x00\x00\x00\x00\x00\x00', b'F152633681\x00\x00\x00\x00\x00\x00', @@ -1549,7 +1553,7 @@ FW_VERSIONS = { (Ecu.engine, 0x7e0, None): [ b'\x02333M4200\x00\x00\x00\x00\x00\x00\x00\x00A4701000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152633171\x00\x00\x00\x00\x00\x00', ], (Ecu.dsu, 0x791, None): [ @@ -1575,7 +1579,7 @@ FW_VERSIONS = { b'\x01896637854000\x00\x00\x00\x00', b'\x01896637878000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152678130\x00\x00\x00\x00\x00\x00', b'F152678140\x00\x00\x00\x00\x00\x00', ], @@ -1602,7 +1606,7 @@ FW_VERSIONS = { b'\x018966378B3000\x00\x00\x00\x00', b'\x018966378G3000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F152678221\x00\x00\x00\x00\x00\x00', ], (Ecu.eps, 0x7a1, None): [ @@ -1622,7 +1626,7 @@ FW_VERSIONS = { (Ecu.engine, 0x7e0, None): [ b'\x0237887000\x00\x00\x00\x00\x00\x00\x00\x00A4701000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152678210\x00\x00\x00\x00\x00\x00', ], (Ecu.eps, 0x7a1, None): [ @@ -1643,7 +1647,7 @@ FW_VERSIONS = { b'\x0237882000\x00\x00\x00\x00\x00\x00\x00\x00A4701000\x00\x00\x00\x00\x00\x00\x00\x00', b'\x0237886000\x00\x00\x00\x00\x00\x00\x00\x00A4701000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152678160\x00\x00\x00\x00\x00\x00', b'F152678170\x00\x00\x00\x00\x00\x00', b'F152678171\x00\x00\x00\x00\x00\x00', @@ -1670,7 +1674,7 @@ FW_VERSIONS = { (Ecu.engine, 0x7e0, None): [ b'\x0232484000\x00\x00\x00\x00\x00\x00\x00\x0052422000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152624221\x00\x00\x00\x00\x00\x00', ], (Ecu.dsu, 0x791, None): [ @@ -1706,7 +1710,7 @@ FW_VERSIONS = { b'\x018966348R8500\x00\x00\x00\x00', b'\x018966348W1300\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152648472\x00\x00\x00\x00\x00\x00', b'F152648473\x00\x00\x00\x00\x00\x00', b'F152648492\x00\x00\x00\x00\x00\x00', @@ -1753,7 +1757,7 @@ FW_VERSIONS = { b'\x02348V6000\x00\x00\x00\x00\x00\x00\x00\x00A4802000\x00\x00\x00\x00\x00\x00\x00\x00', b'\x02348Z3000\x00\x00\x00\x00\x00\x00\x00\x00A4802000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152648361\x00\x00\x00\x00\x00\x00', b'F152648501\x00\x00\x00\x00\x00\x00', b'F152648502\x00\x00\x00\x00\x00\x00', @@ -1801,7 +1805,7 @@ FW_VERSIONS = { b'\x01896634D43000\x00\x00\x00\x00', b'\x01896634D44000\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'\x01F15260E031\x00\x00\x00\x00\x00\x00', b'\x01F15260E041\x00\x00\x00\x00\x00\x00', b'\x01F152648781\x00\x00\x00\x00\x00\x00', @@ -1831,7 +1835,7 @@ FW_VERSIONS = { b'\x0234D16000\x00\x00\x00\x00\x00\x00\x00\x00A4802000\x00\x00\x00\x00\x00\x00\x00\x00', b'\x02348X4000\x00\x00\x00\x00\x00\x00\x00\x00A4802000\x00\x00\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152648831\x00\x00\x00\x00\x00\x00', b'F152648891\x00\x00\x00\x00\x00\x00', b'F152648D00\x00\x00\x00\x00\x00\x00', @@ -1861,7 +1865,7 @@ FW_VERSIONS = { b'\x038966347C5000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00897CF4707101\x00\x00\x00\x00', b'\x038966347C5100\x00\x00\x00\x008966A4703000\x00\x00\x00\x00897CF4707101\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152647500\x00\x00\x00\x00\x00\x00', b'F152647510\x00\x00\x00\x00\x00\x00', b'F152647520\x00\x00\x00\x00\x00\x00', @@ -1881,8 +1885,8 @@ FW_VERSIONS = { ], }, CAR.MIRAI: { - (Ecu.esp, 0x7D1, None): [b'\x01898A36203000\x00\x00\x00\x00',], - (Ecu.esp, 0x7B0, None): [ # a second ESP ECU + (Ecu.abs, 0x7D1, None): [b'\x01898A36203000\x00\x00\x00\x00',], + (Ecu.abs, 0x7B0, None): [ # a second ABS ECU b'\x01F15266203200\x00\x00\x00\x00', b'\x01F15266203500\x00\x00\x00\x00', ], @@ -1915,7 +1919,7 @@ FW_VERSIONS = { (Ecu.eps, 0x7a1, None): [ b'8965B58040\x00\x00\x00\x00\x00\x00', ], - (Ecu.esp, 0x7b0, None): [ + (Ecu.abs, 0x7b0, None): [ b'F152658341\x00\x00\x00\x00\x00\x00' ], (Ecu.fwdRadar, 0x750, 0xf): [ diff --git a/selfdrive/car/vin.py b/selfdrive/car/vin.py index 5ace68649..ae3aa675c 100755 --- a/selfdrive/car/vin.py +++ b/selfdrive/car/vin.py @@ -5,7 +5,6 @@ import traceback import cereal.messaging as messaging import panda.python.uds as uds -from panda.python.uds import FUNCTIONAL_ADDRS from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery from system.swaglog import cloudlog @@ -24,10 +23,11 @@ def is_valid_vin(vin: str): def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False): + addrs = [0x7e0, 0x7e2, 0x18da10f1, 0x18da0ef1] # engine, VMCU, 29-bit engine, PGM-FI for i in range(retry): for request, response in ((UDS_VIN_REQUEST, UDS_VIN_RESPONSE), (OBD_VIN_REQUEST, OBD_VIN_RESPONSE)): try: - query = IsoTpParallelQuery(sendcan, logcan, bus, FUNCTIONAL_ADDRS, [request, ], [response, ], functional_addr=True, debug=debug) + query = IsoTpParallelQuery(sendcan, logcan, bus, addrs, [request, ], [response, ], debug=debug) for (addr, rx_addr), vin in query.get_data(timeout).items(): # Honda Bosch response starts with a length, trim to correct length diff --git a/selfdrive/car/volkswagen/interface.py b/selfdrive/car/volkswagen/interface.py index 453dcd650..7787eaed6 100644 --- a/selfdrive/car/volkswagen/interface.py +++ b/selfdrive/car/volkswagen/interface.py @@ -21,7 +21,7 @@ class CarInterface(CarInterfaceBase): self.cp_ext = self.cp_cam @staticmethod - def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, disable_radar=False): + def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) ret.carName = "volkswagen" ret.radarOffCan = True @@ -49,9 +49,10 @@ class CarInterface(CarInterfaceBase): # Panda ALLOW_DEBUG firmware required. ret.dashcamOnly = True - if disable_radar and ret.networkLocation == NetworkLocation.gateway: + if experimental_long and ret.networkLocation == NetworkLocation.gateway: # Proof-of-concept, prep for E2E only. No radar points available. Follow-to-stop not yet supported, but should # be simple to add when a suitable test car becomes available. Panda ALLOW_DEBUG firmware required. + ret.experimentalLongitudinalAvailable = True ret.openpilotLongitudinalControl = True ret.safetyConfigs[0].safetyParam |= Panda.FLAG_VOLKSWAGEN_LONG_CONTROL @@ -197,6 +198,7 @@ class CarInterface(CarInterfaceBase): else: raise ValueError(f"unsupported car {candidate}") + ret.autoResumeSng = ret.minEnableSpeed == -1 ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase) ret.centerToFront = ret.wheelbase * 0.45 ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront, diff --git a/selfdrive/car/volkswagen/values.py b/selfdrive/car/volkswagen/values.py index 954b7060c..62d6dcdda 100755 --- a/selfdrive/car/volkswagen/values.py +++ b/selfdrive/car/volkswagen/values.py @@ -174,7 +174,7 @@ CAR_INFO: Dict[str, Union[VWCarInfo, List[VWCarInfo]]] = { VWCarInfo("Volkswagen CC 2018-22", footnotes=[Footnote.VW_HARNESS, Footnote.VW_VARIANT], harness=Harness.j533, video_link="https://youtu.be/FAomFKPFlDA"), ], CAR.ATLAS_MK1: [ - VWCarInfo("Volkswagen Atlas 2018-22", footnotes=[Footnote.VW_HARNESS], harness=Harness.j533), + VWCarInfo("Volkswagen Atlas 2018-23", footnotes=[Footnote.VW_HARNESS], harness=Harness.j533), VWCarInfo("Volkswagen Atlas Cross Sport 2021-22", footnotes=[Footnote.VW_HARNESS], harness=Harness.j533), VWCarInfo("Volkswagen Teramont 2018-22", footnotes=[Footnote.VW_HARNESS], harness=Harness.j533), VWCarInfo("Volkswagen Teramont Cross Sport 2021-22", footnotes=[Footnote.VW_HARNESS], harness=Harness.j533), @@ -275,6 +275,7 @@ FW_VERSIONS = { b'\xf1\x8703H906026AA\xf1\x899970', b'\xf1\x8703H906026AJ\xf1\x890638', b'\xf1\x8703H906026AT\xf1\x891922', + b'\xf1\x8703H906026BC\xf1\x892664', b'\xf1\x8703H906026F \xf1\x896696', b'\xf1\x8703H906026F \xf1\x899970', b'\xf1\x8703H906026J \xf1\x896026', @@ -287,12 +288,14 @@ FW_VERSIONS = { b'\xf1\x8709G927158DR\xf1\x893536', b'\xf1\x8709G927158DR\xf1\x893742', b'\xf1\x8709G927158FT\xf1\x893835', + b'\xf1\x8709G927158GL\xf1\x893939', ], (Ecu.srs, 0x715, None): [ b'\xf1\x873Q0959655BC\xf1\x890503\xf1\x82\0161914151912001103111122031200', b'\xf1\x873Q0959655BN\xf1\x890713\xf1\x82\0162214152212001105141122052900', b'\xf1\x873Q0959655DB\xf1\x890720\xf1\x82\0162214152212001105141122052900', b'\xf1\x873Q0959655DM\xf1\x890732\xf1\x82\x0e1114151112001105161122052J00', + b'\xf1\x873Q0959655DM\xf1\x890732\xf1\x82\x0e1115151112001105171122052J00', ], (Ecu.eps, 0x712, None): [ b'\xf1\x873QF909144B \xf1\x891582\xf1\x82\00571B60924A1', @@ -300,6 +303,7 @@ FW_VERSIONS = { b'\xf1\x875Q0909143P \xf1\x892051\xf1\x820528B6090105', ], (Ecu.fwdRadar, 0x757, None): [ + b'\xf1\x872Q0907572AA\xf1\x890396', b'\xf1\x872Q0907572R \xf1\x890372', b'\xf1\x872Q0907572T \xf1\x890383', b'\xf1\x875Q0907572H \xf1\x890620', @@ -370,6 +374,7 @@ FW_VERSIONS = { b'\xf1\x870D9300012 \xf1\x895045', b'\xf1\x870D9300014M \xf1\x895004', b'\xf1\x870D9300014Q \xf1\x895006', + b'\xf1\x870D9300020Q \xf1\x895201', b'\xf1\x870D9300020S \xf1\x895201', b'\xf1\x870D9300040A \xf1\x893613', b'\xf1\x870D9300040S \xf1\x894311', @@ -421,6 +426,7 @@ FW_VERSIONS = { b'\xf1\x873Q0909144L \xf1\x895081\xf1\x82\x0571A0JA15A1', b'\xf1\x873Q0909144M \xf1\x895082\xf1\x82\x0571A01A18A1', b'\xf1\x873Q0909144M \xf1\x895082\xf1\x82\x0571A0JA16A1', + b'\xf1\x873QM909144 \xf1\x895072\xf1\x82\x0571A01714A1', b'\xf1\x875Q0909143K \xf1\x892033\xf1\x820519A9040203', b'\xf1\x875Q0909144AA\xf1\x891081\xf1\x82\x0521A00441A1', b'\xf1\x875Q0909144AA\xf1\x891081\xf1\x82\x0521A00608A1', @@ -738,6 +744,7 @@ FW_VERSIONS = { b'\xf1\x8704E906023BL\xf1\x895190', b'\xf1\x8704E906027CJ\xf1\x897798', b'\xf1\x8704L997022N \xf1\x899459', + b'\xf1\x875G0906259A \xf1\x890004', b'\xf1\x875G0906259L \xf1\x890002', b'\xf1\x875G0906259Q \xf1\x890002', b'\xf1\x878V0906259F \xf1\x890002', @@ -750,6 +757,7 @@ FW_VERSIONS = { b'\xf1\x870CW300044T \xf1\x895245', b'\xf1\x870CW300048 \xf1\x895201', b'\xf1\x870D9300012 \xf1\x894912', + b'\xf1\x870D9300012K \xf1\x894513', b'\xf1\x870D9300013B \xf1\x894931', b'\xf1\x870D9300041N \xf1\x894512', b'\xf1\x870D9300043T \xf1\x899699', @@ -766,6 +774,7 @@ FW_VERSIONS = { b'\xf1\x875Q0959655AM\xf1\x890315\xf1\x82\x1311111111111111311411011231129321212100', b'\xf1\x875Q0959655AM\xf1\x890318\xf1\x82\x1311111111111112311411011531159321212100', b'\xf1\x875Q0959655BJ\xf1\x890339\xf1\x82\x1311110011131100311111011731179321342100', + b'\xf1\x875Q0959655J \xf1\x890825\xf1\x82\x13111112111111--241115141112221291163221', b'\xf1\x875Q0959655J \xf1\x890825\xf1\x82\023111112111111--171115141112221291163221', b'\xf1\x875Q0959655J \xf1\x890830\xf1\x82\023121111111211--261117141112231291163221', b'\xf1\x875Q0959655J \xf1\x890830\xf1\x82\x13121111111111--341117141212231291163221', @@ -779,6 +788,7 @@ FW_VERSIONS = { b'\xf1\x875Q0909144AB\xf1\x891082\xf1\x82\00521G0G809A1', b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\00503G00303A0', b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\00503G00803A0', + b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\x0503G0G803A0', b'\xf1\x875Q0909144R \xf1\x891061\xf1\x82\00516G00804A1', b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\00521G00807A1', ], diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index b8da7411f..501951176 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -12,10 +12,10 @@ import cereal.messaging as messaging from common.conversions import Conversions as CV from panda import ALTERNATIVE_EXPERIENCE from system.swaglog import cloudlog -from system.version import get_short_branch +from system.version import is_tested_branch, get_short_branch from selfdrive.boardd.boardd import can_list_to_can_capnp from selfdrive.car.car_helpers import get_car, get_startup_event, get_one_can -from selfdrive.controls.lib.lane_planner import CAMERA_OFFSET +from selfdrive.controls.lib.lateral_planner import CAMERA_OFFSET from selfdrive.controls.lib.drive_helpers import V_CRUISE_INITIAL, update_v_cruise, initialize_v_cruise from selfdrive.controls.lib.drive_helpers import get_lag_adjusted_curvature from selfdrive.controls.lib.latcontrol import LatControl @@ -39,7 +39,7 @@ LANE_DEPARTURE_THRESHOLD = 0.1 REPLAY = "REPLAY" in os.environ SIMULATION = "SIMULATION" in os.environ NOSENSOR = "NOSENSOR" in os.environ -IGNORE_PROCESSES = {"uploader", "deleter", "loggerd", "logmessaged", "tombstoned", "statsd", "mapd", +IGNORE_PROCESSES = {"uploader", "deleter", "loggerd", "logmessaged", "tombstoned", "statsd", "mapd", "navd" "logcatd", "proclogd", "clocksd", "updated", "timezoned", "manage_athenad", "laikad"} | \ {k for k, v in managed_processes.items() if not v.enabled} @@ -115,9 +115,8 @@ class Controls: # dp self.sm['dragonConf'].dpAtl = int(Params().get('dp_atl', encoding='utf8')) - self.sm['dragonConf'].dpCameraOffset = CAMERA_OFFSET * 100 # 0.04 x 100 = 4 - self.dp_camera_offset_last = None - self.camera_offset = CAMERA_OFFSET + self.dp_temp_check = Params().get_bool('dp_temp_check') + self.dp_vag_resume_fix = Params().get_bool('dp_vag_resume_fix') # set alternative experiences from parameters self.disengage_on_accelerator = params.get_bool("DisengageOnAccelerator") @@ -148,10 +147,14 @@ class Controls: safety_config.safetyModel = car.CarParams.SafetyModel.noOutput self.CP.safetyConfigs = [safety_config] + if is_tested_branch(): + self.CP.experimentalLongitudinalAvailable = False + # Write CarParams for radard cp_bytes = self.CP.to_bytes() params.put("CarParams", cp_bytes) put_nonblocking("CarParamsCache", cp_bytes) + put_nonblocking("CarParamsPersistent", cp_bytes) self.CC = car.CarControl.new_message() self.CS_prev = car.CarState.new_message() @@ -268,7 +271,7 @@ class Controls: self.events.add_from_msg(CS.events) # Create events for temperature, disk space, and memory - if self.sm['deviceState'].thermalStatus >= ThermalStatus.red: + if self.dp_temp_check and self.sm['deviceState'].thermalStatus >= ThermalStatus.red: self.events.add(EventName.overheat) if self.sm['deviceState'].freeSpacePercent < 7 and not SIMULATION: # under 7% of space free no enable allowed @@ -696,9 +699,6 @@ class Controls: self.button_timers[b.type.raw] = 1 if b.pressed else 0 def publish_logs(self, CS, start_time, CC, lac_log): - if self.sm['dragonConf'].dpCameraOffset != self.dp_camera_offset_last: - self.camera_offset = self.sm['dragonConf'].dpCameraOffset * 0.01 - self.dp_camera_offset_last = self.sm['dragonConf'].dpCameraOffset """Send actuators and hud commands to the car, send controlsstate and MPC logging""" @@ -715,11 +715,11 @@ class Controls: if self.joystick_mode and self.sm.rcv_frame['testJoystick'] > 0 and self.sm['testJoystick'].buttons[0]: CC.cruiseControl.cancel = True - speeds = self.sm['longitudinalPlan'].speeds - if len(speeds): - if self.sm['dragonConf'].dpAtl == 1 and self.sm['longitudinalPlan'].hasLead: - CC.cruiseControl.resume = CS.cruiseActualEnabled and CS.cruiseState.standstill and speeds[-1] > 0.1 - else: + if self.dp_vag_resume_fix or self.sm['dragonConf'].dpAtl == 1: + CC.cruiseControl.resume = CS.cruiseActualEnabled and CS.cruiseState.standstill + else: + speeds = self.sm['longitudinalPlan'].speeds + if len(speeds): CC.cruiseControl.resume = self.enabled and CS.cruiseState.standstill and speeds[-1] > 0.1 hudControl = CC.hudControl @@ -738,14 +738,14 @@ class Controls: model_v2 = self.sm['modelV2'] desire_prediction = model_v2.meta.desirePrediction if len(desire_prediction) and ldw_allowed: - right_lane_visible = self.sm['lateralPlan'].rProb > 0.5 - left_lane_visible = self.sm['lateralPlan'].lProb > 0.5 + right_lane_visible = model_v2.laneLineProbs[2] > 0.5 + left_lane_visible = model_v2.laneLineProbs[1] > 0.5 l_lane_change_prob = desire_prediction[Desire.laneChangeLeft - 1] r_lane_change_prob = desire_prediction[Desire.laneChangeRight - 1] lane_lines = model_v2.laneLines - l_lane_close = left_lane_visible and (lane_lines[1].y[0] > -(1.08 + self.camera_offset)) - r_lane_close = right_lane_visible and (lane_lines[2].y[0] < (1.08 - self.camera_offset)) + l_lane_close = left_lane_visible and (lane_lines[1].y[0] > -(1.08 + CAMERA_OFFSET)) + r_lane_close = right_lane_visible and (lane_lines[2].y[0] < (1.08 - CAMERA_OFFSET)) hudControl.leftLaneDepart = bool(l_lane_change_prob > LANE_DEPARTURE_THRESHOLD and l_lane_close) hudControl.rightLaneDepart = bool(r_lane_change_prob > LANE_DEPARTURE_THRESHOLD and r_lane_close) diff --git a/selfdrive/controls/lib/desire_helper.py b/selfdrive/controls/lib/desire_helper.py index fe034c87a..e33ee0755 100644 --- a/selfdrive/controls/lib/desire_helper.py +++ b/selfdrive/controls/lib/desire_helper.py @@ -5,7 +5,7 @@ from common.realtime import DT_MDL, sec_since_boot LaneChangeState = log.LateralPlan.LaneChangeState LaneChangeDirection = log.LateralPlan.LaneChangeDirection -LANE_CHANGE_SPEED_MIN = 30 * CV.MPH_TO_MS +LANE_CHANGE_SPEED_MIN = 15 * CV.MPH_TO_MS LANE_CHANGE_TIME_MAX = 10. DESIRES = { diff --git a/selfdrive/controls/lib/lane_planner.py b/selfdrive/controls/lib/lane_planner.py deleted file mode 100644 index 058ef6879..000000000 --- a/selfdrive/controls/lib/lane_planner.py +++ /dev/null @@ -1,113 +0,0 @@ -import numpy as np -from cereal import log -from common.filter_simple import FirstOrderFilter -from common.numpy_fast import interp -from common.realtime import DT_MDL -from system.swaglog import cloudlog -from system.hardware import EON, TICI - - -TRAJECTORY_SIZE = 33 -# camera offset is meters from center car to camera -# model path is in the frame of the camera. Empirically -# the model knows the difference between TICI and EON -# so a path offset is not needed -PATH_OFFSET = 0.00 -if EON: - CAMERA_OFFSET = -0.06 -elif TICI: - CAMERA_OFFSET = 0.04 -else: - CAMERA_OFFSET = 0.0 - - -class LanePlanner: - def __init__(self, wide_camera=False): - self.ll_t = np.zeros((TRAJECTORY_SIZE,)) - self.ll_x = np.zeros((TRAJECTORY_SIZE,)) - self.lll_y = np.zeros((TRAJECTORY_SIZE,)) - self.rll_y = np.zeros((TRAJECTORY_SIZE,)) - self.lane_width_estimate = FirstOrderFilter(3.7, 9.95, DT_MDL) - self.lane_width_certainty = FirstOrderFilter(1.0, 0.95, DT_MDL) - self.lane_width = 3.7 - - self.lll_prob = 0. - self.rll_prob = 0. - self.d_prob = 0. - - self.lll_std = 0. - self.rll_std = 0. - - self.l_lane_change_prob = 0. - self.r_lane_change_prob = 0. - - self.camera_offset = -CAMERA_OFFSET if wide_camera else CAMERA_OFFSET - self.path_offset = -PATH_OFFSET if wide_camera else PATH_OFFSET - - self.dp_camera_offset = None - self.wide_camera = wide_camera - - def update_offsets(self, camera_offset): - if self.dp_camera_offset != camera_offset: - self.dp_camera_offset = camera_offset - self.camera_offset = (camera_offset - 8 if self.wide_camera else camera_offset) * 0.01 - - def parse_model(self, md): - lane_lines = md.laneLines - if len(lane_lines) == 4 and len(lane_lines[0].t) == TRAJECTORY_SIZE: - self.ll_t = (np.array(lane_lines[1].t) + np.array(lane_lines[2].t))/2 - # left and right ll x is the same - self.ll_x = lane_lines[1].x - self.lll_y = np.array(lane_lines[1].y) + self.camera_offset - self.rll_y = np.array(lane_lines[2].y) + self.camera_offset - self.lll_prob = md.laneLineProbs[1] - self.rll_prob = md.laneLineProbs[2] - self.lll_std = md.laneLineStds[1] - self.rll_std = md.laneLineStds[2] - - desire_state = md.meta.desireState - if len(desire_state): - self.l_lane_change_prob = desire_state[log.LateralPlan.Desire.laneChangeLeft] - self.r_lane_change_prob = desire_state[log.LateralPlan.Desire.laneChangeRight] - - def get_d_path(self, v_ego, path_t, path_xyz): - # Reduce reliance on lanelines that are too far apart or - # will be in a few seconds - path_xyz[:, 1] += self.path_offset - l_prob, r_prob = self.lll_prob, self.rll_prob - width_pts = self.rll_y - self.lll_y - prob_mods = [] - for t_check in (0.0, 1.5, 3.0): - width_at_t = interp(t_check * (v_ego + 7), self.ll_x, width_pts) - prob_mods.append(interp(width_at_t, [4.0, 5.0], [1.0, 0.0])) - mod = min(prob_mods) - l_prob *= mod - r_prob *= mod - - # Reduce reliance on uncertain lanelines - l_std_mod = interp(self.lll_std, [.15, .3], [1.0, 0.0]) - r_std_mod = interp(self.rll_std, [.15, .3], [1.0, 0.0]) - l_prob *= l_std_mod - r_prob *= r_std_mod - - # Find current lanewidth - self.lane_width_certainty.update(l_prob * r_prob) - current_lane_width = abs(self.rll_y[0] - self.lll_y[0]) - self.lane_width_estimate.update(current_lane_width) - speed_lane_width = interp(v_ego, [0., 31.], [2.8, 3.5]) - self.lane_width = self.lane_width_certainty.x * self.lane_width_estimate.x + \ - (1 - self.lane_width_certainty.x) * speed_lane_width - - clipped_lane_width = min(4.0, self.lane_width) - path_from_left_lane = self.lll_y + clipped_lane_width / 2.0 - path_from_right_lane = self.rll_y - clipped_lane_width / 2.0 - - self.d_prob = l_prob + r_prob - l_prob * r_prob - lane_path_y = (l_prob * path_from_left_lane + r_prob * path_from_right_lane) / (l_prob + r_prob + 0.0001) - safe_idxs = np.isfinite(self.ll_t) - if safe_idxs[0]: - lane_path_y_interp = np.interp(path_t, self.ll_t[safe_idxs], lane_path_y[safe_idxs]) - path_xyz[:,1] = self.d_prob * lane_path_y_interp + (1.0 - self.d_prob) * path_xyz[:,1] - else: - cloudlog.warning("Lateral mpc - NaNs in laneline times, ignoring") - return path_xyz 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..e8d17507c --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/acados_ocp_lat.json @@ -0,0 +1,450 @@ +{ + "acados_include_path": "/data/openpilot/third_party/acados/include/acados/include", + "acados_lib_path": "/data/openpilot/third_party/acados/include/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": [ + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ] + ], + "Vu_0": [ + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ] + ], + "Vx": [ + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "Vx_0": [ + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "Vx_e": [ + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "Vz": [], + "Vz_0": [], + "W": [ + [ + 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 + ] + ], + "W_e": [ + [ + 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 + ], + "yref_0": [ + 0.0, + 0.0, + 0.0 + ], + "yref_e": [ + 0.0, + 0.0 + ], + "zl": [], + "zl_e": [], + "zu": [], + "zu_e": [] + }, + "cython_include_dirs": "/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/include", + "dims": { + "N": 16, + "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": 3, + "ny_0": 3, + "ny_e": 2, + "nz": 0 + }, + "model": { + "dyn_disc_fun": null, + "dyn_disc_fun_jac": null, + "dyn_disc_fun_jac_hess": null, + "dyn_ext_fun_type": "casadi", + "dyn_source_discrete": null, + "gnsf": { + "nontrivial_f_LO": 1, + "purely_linear": 0 + }, + "name": "lat" + }, + "parameter_values": [ + 0.0, + 0.0 + ], + "problem_class": "OCP", + "simulink_opts": { + "inputs": { + "cost_W": 0, + "cost_W_0": 0, + "cost_W_e": 0, + "lbu": 1, + "lbx": 1, + "lbx_0": 1, + "lbx_e": 1, + "lg": 1, + "lh": 1, + "parameter_traj": 1, + "reset_solver": 0, + "u_init": 0, + "ubu": 1, + "ubx": 1, + "ubx_0": 1, + "ubx_e": 1, + "ug": 1, + "uh": 1, + "x_init": 0, + "y_ref": 1, + "y_ref_0": 1, + "y_ref_e": 1 + }, + "outputs": { + "CPU_time": 1, + "CPU_time_lin": 0, + "CPU_time_qp": 0, + "CPU_time_sim": 0, + "KKT_residual": 1, + "solver_status": 1, + "sqp_iter": 1, + "u0": 1, + "utraj": 0, + "x1": 1, + "xtraj": 0 + }, + "samplingtime": "t0" + }, + "solver_options": { + "Tsim": 0.009765625, + "alpha_min": 0.05, + "alpha_reduction": 0.7, + "collocation_type": "GAUSS_LEGENDRE", + "eps_sufficient_descent": 0.0001, + "exact_hess_constr": 1, + "exact_hess_cost": 1, + "exact_hess_dyn": 1, + "ext_cost_num_hess": 0, + "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_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_iter_max": 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, + "sim_method_jac_reuse": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "sim_method_newton_iter": 3, + "sim_method_num_stages": [ + 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 + ], + "tf": 2.5, + "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 + ] + } +} \ No newline at end of file diff --git a/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.c b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.c new file mode 100644 index 000000000..d0c541d3b --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.c @@ -0,0 +1,278 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ +// standard +#include +#include + +// acados +#include "acados_c/external_function_interface.h" +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +#include "acados/sim/sim_common.h" +#include "acados/utils/external_function_generic.h" +#include "acados/utils/print.h" + + +// example specific +#include "lat_model/lat_model.h" +#include "acados_sim_solver_lat.h" + + +// ** solver data ** + +sim_solver_capsule * lat_acados_sim_solver_create_capsule() +{ + void* capsule_mem = malloc(sizeof(sim_solver_capsule)); + sim_solver_capsule *capsule = (sim_solver_capsule *) capsule_mem; + + return capsule; +} + + +int lat_acados_sim_solver_free_capsule(sim_solver_capsule * capsule) +{ + free(capsule); + return 0; +} + + +int lat_acados_sim_create(sim_solver_capsule * capsule) +{ + // initialize + const int nx = LAT_NX; + const int nu = LAT_NU; + const int nz = LAT_NZ; + const int np = LAT_NP; + bool tmp_bool; + + + double Tsim = 0.009765625; + + + // explicit ode + capsule->sim_forw_vde_casadi = (external_function_param_casadi *) malloc(sizeof(external_function_param_casadi)); + capsule->sim_expl_ode_fun_casadi = (external_function_param_casadi *) malloc(sizeof(external_function_param_casadi)); + + capsule->sim_forw_vde_casadi->casadi_fun = &lat_expl_vde_forw; + capsule->sim_forw_vde_casadi->casadi_n_in = &lat_expl_vde_forw_n_in; + capsule->sim_forw_vde_casadi->casadi_n_out = &lat_expl_vde_forw_n_out; + capsule->sim_forw_vde_casadi->casadi_sparsity_in = &lat_expl_vde_forw_sparsity_in; + capsule->sim_forw_vde_casadi->casadi_sparsity_out = &lat_expl_vde_forw_sparsity_out; + capsule->sim_forw_vde_casadi->casadi_work = &lat_expl_vde_forw_work; + external_function_param_casadi_create(capsule->sim_forw_vde_casadi, np); + + capsule->sim_expl_ode_fun_casadi->casadi_fun = &lat_expl_ode_fun; + capsule->sim_expl_ode_fun_casadi->casadi_n_in = &lat_expl_ode_fun_n_in; + capsule->sim_expl_ode_fun_casadi->casadi_n_out = &lat_expl_ode_fun_n_out; + capsule->sim_expl_ode_fun_casadi->casadi_sparsity_in = &lat_expl_ode_fun_sparsity_in; + capsule->sim_expl_ode_fun_casadi->casadi_sparsity_out = &lat_expl_ode_fun_sparsity_out; + capsule->sim_expl_ode_fun_casadi->casadi_work = &lat_expl_ode_fun_work; + external_function_param_casadi_create(capsule->sim_expl_ode_fun_casadi, np); + + + + // sim plan & config + sim_solver_plan_t plan; + plan.sim_solver = ERK; + + // create correct config based on plan + sim_config * lat_sim_config = sim_config_create(plan); + capsule->acados_sim_config = lat_sim_config; + + // sim dims + void *lat_sim_dims = sim_dims_create(lat_sim_config); + capsule->acados_sim_dims = lat_sim_dims; + sim_dims_set(lat_sim_config, lat_sim_dims, "nx", &nx); + sim_dims_set(lat_sim_config, lat_sim_dims, "nu", &nu); + sim_dims_set(lat_sim_config, lat_sim_dims, "nz", &nz); + + + // sim opts + sim_opts *lat_sim_opts = sim_opts_create(lat_sim_config, lat_sim_dims); + capsule->acados_sim_opts = lat_sim_opts; + int tmp_int = 3; + sim_opts_set(lat_sim_config, lat_sim_opts, "newton_iter", &tmp_int); + sim_collocation_type collocation_type = GAUSS_LEGENDRE; + sim_opts_set(lat_sim_config, lat_sim_opts, "collocation_type", &collocation_type); + + + tmp_int = 4; + sim_opts_set(lat_sim_config, lat_sim_opts, "num_stages", &tmp_int); + tmp_int = 1; + sim_opts_set(lat_sim_config, lat_sim_opts, "num_steps", &tmp_int); + tmp_bool = 0; + sim_opts_set(lat_sim_config, lat_sim_opts, "jac_reuse", &tmp_bool); + + + // sim in / out + sim_in *lat_sim_in = sim_in_create(lat_sim_config, lat_sim_dims); + capsule->acados_sim_in = lat_sim_in; + sim_out *lat_sim_out = sim_out_create(lat_sim_config, lat_sim_dims); + capsule->acados_sim_out = lat_sim_out; + + sim_in_set(lat_sim_config, lat_sim_dims, + lat_sim_in, "T", &Tsim); + + // model functions + lat_sim_config->model_set(lat_sim_in->model, + "expl_vde_for", capsule->sim_forw_vde_casadi); + lat_sim_config->model_set(lat_sim_in->model, + "expl_ode_fun", capsule->sim_expl_ode_fun_casadi); + + // sim solver + sim_solver *lat_sim_solver = sim_solver_create(lat_sim_config, + lat_sim_dims, lat_sim_opts); + capsule->acados_sim_solver = lat_sim_solver; + + + /* initialize parameter values */ + double* p = calloc(np, sizeof(double)); + + + lat_acados_sim_update_params(capsule, p, np); + free(p); + + + /* initialize input */ + // x + double x0[4]; + for (int ii = 0; ii < 4; ii++) + x0[ii] = 0.0; + + sim_in_set(lat_sim_config, lat_sim_dims, + lat_sim_in, "x", x0); + + + // u + double u0[1]; + for (int ii = 0; ii < 1; ii++) + u0[ii] = 0.0; + + sim_in_set(lat_sim_config, lat_sim_dims, + lat_sim_in, "u", u0); + + // S_forw + double S_forw[20]; + for (int ii = 0; ii < 20; ii++) + S_forw[ii] = 0.0; + for (int ii = 0; ii < 4; ii++) + S_forw[ii + ii * 4 ] = 1.0; + + + sim_in_set(lat_sim_config, lat_sim_dims, + lat_sim_in, "S_forw", S_forw); + + int status = sim_precompute(lat_sim_solver, lat_sim_in, lat_sim_out); + + return status; +} + + +int lat_acados_sim_solve(sim_solver_capsule *capsule) +{ + // integrate dynamics using acados sim_solver + int status = sim_solve(capsule->acados_sim_solver, + capsule->acados_sim_in, capsule->acados_sim_out); + if (status != 0) + printf("error in lat_acados_sim_solve()! Exiting.\n"); + + return status; +} + + +int lat_acados_sim_free(sim_solver_capsule *capsule) +{ + // free memory + sim_solver_destroy(capsule->acados_sim_solver); + sim_in_destroy(capsule->acados_sim_in); + sim_out_destroy(capsule->acados_sim_out); + sim_opts_destroy(capsule->acados_sim_opts); + sim_dims_destroy(capsule->acados_sim_dims); + sim_config_destroy(capsule->acados_sim_config); + + // free external function + external_function_param_casadi_free(capsule->sim_forw_vde_casadi); + external_function_param_casadi_free(capsule->sim_expl_ode_fun_casadi); + + return 0; +} + + +int lat_acados_sim_update_params(sim_solver_capsule *capsule, double *p, int np) +{ + int status = 0; + int casadi_np = LAT_NP; + + if (casadi_np != np) { + printf("lat_acados_sim_update_params: trying to set %i parameters for external functions." + " External function has %i parameters. Exiting.\n", np, casadi_np); + exit(1); + } + capsule->sim_forw_vde_casadi[0].set_param(capsule->sim_forw_vde_casadi, p); + capsule->sim_expl_ode_fun_casadi[0].set_param(capsule->sim_expl_ode_fun_casadi, p); + + return status; +} + +/* getters pointers to C objects*/ +sim_config * lat_acados_get_sim_config(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_config; +}; + +sim_in * lat_acados_get_sim_in(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_in; +}; + +sim_out * lat_acados_get_sim_out(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_out; +}; + +void * lat_acados_get_sim_dims(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_dims; +}; + +sim_opts * lat_acados_get_sim_opts(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_opts; +}; + +sim_solver * lat_acados_get_sim_solver(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_solver; +}; + diff --git a/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.h b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.h new file mode 100644 index 000000000..86b9c84c9 --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_sim_solver_lat.h @@ -0,0 +1,103 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + +#ifndef ACADOS_SIM_lat_H_ +#define ACADOS_SIM_lat_H_ + +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +#define LAT_NX 4 +#define LAT_NZ 0 +#define LAT_NU 1 +#define LAT_NP 2 + +#ifdef __cplusplus +extern "C" { +#endif + + +// ** capsule for solver data ** +typedef struct sim_solver_capsule +{ + // acados objects + sim_in *acados_sim_in; + sim_out *acados_sim_out; + sim_solver *acados_sim_solver; + sim_opts *acados_sim_opts; + sim_config *acados_sim_config; + void *acados_sim_dims; + + /* external functions */ + // ERK + external_function_param_casadi * sim_forw_vde_casadi; + external_function_param_casadi * sim_expl_ode_fun_casadi; + external_function_param_casadi * sim_expl_ode_hess; + + // IRK + external_function_param_casadi * sim_impl_dae_fun; + external_function_param_casadi * sim_impl_dae_fun_jac_x_xdot_z; + external_function_param_casadi * sim_impl_dae_jac_x_xdot_u_z; + external_function_param_casadi * sim_impl_dae_hess; + + // GNSF + external_function_param_casadi * sim_gnsf_phi_fun; + external_function_param_casadi * sim_gnsf_phi_fun_jac_y; + external_function_param_casadi * sim_gnsf_phi_jac_y_uhat; + external_function_param_casadi * sim_gnsf_f_lo_jac_x1_x1dot_u_z; + external_function_param_casadi * sim_gnsf_get_matrices_fun; + +} sim_solver_capsule; + + +ACADOS_SYMBOL_EXPORT int lat_acados_sim_create(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int lat_acados_sim_solve(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int lat_acados_sim_free(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int lat_acados_sim_update_params(sim_solver_capsule *capsule, double *value, int np); + +ACADOS_SYMBOL_EXPORT sim_config * lat_acados_get_sim_config(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_in * lat_acados_get_sim_in(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_out * lat_acados_get_sim_out(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT void * lat_acados_get_sim_dims(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_opts * lat_acados_get_sim_opts(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_solver * lat_acados_get_sim_solver(sim_solver_capsule *capsule); + + +ACADOS_SYMBOL_EXPORT sim_solver_capsule * lat_acados_sim_solver_create_capsule(void); +ACADOS_SYMBOL_EXPORT int lat_acados_sim_solver_free_capsule(sim_solver_capsule *capsule); + +#ifdef __cplusplus +} +#endif + +#endif // ACADOS_SIM_lat_H_ diff --git a/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_sfunction_lat.c b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_sfunction_lat.c new file mode 100644 index 000000000..827b6c7f0 --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/acados_solver_sfunction_lat.c @@ -0,0 +1,264 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + +#define S_FUNCTION_NAME acados_solver_sfunction_lat +#define S_FUNCTION_LEVEL 2 + +#define MDL_START + +// acados +// #include "acados/utils/print.h" +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +// example specific +#include "lat_model/lat_model.h" +#include "acados_solver_lat.h" + +#include "simstruc.h" + +#define SAMPLINGTIME 0.009765625 + +static void mdlInitializeSizes (SimStruct *S) +{ + // specify the number of continuous and discrete states + ssSetNumContStates(S, 0); + ssSetNumDiscStates(S, 0);// specify the number of input ports + if ( !ssSetNumInputPorts(S, 8) ) + return; + + // specify the number of output ports + if ( !ssSetNumOutputPorts(S, 6) ) + return; + + // specify dimension information for the input ports + // lbx_0 + ssSetInputPortVectorDimension(S, 0, 4); + // ubx_0 + ssSetInputPortVectorDimension(S, 1, 4); + // parameters + ssSetInputPortVectorDimension(S, 2, (16+1) * 2); + // y_ref_0 + ssSetInputPortVectorDimension(S, 3, 3); + // y_ref + ssSetInputPortVectorDimension(S, 4, 45); + // y_ref_e + ssSetInputPortVectorDimension(S, 5, 2); + // lbx + ssSetInputPortVectorDimension(S, 6, 30); + // ubx + ssSetInputPortVectorDimension(S, 7, 30);/* specify dimension information for the OUTPUT ports */ + ssSetOutputPortVectorDimension(S, 0, 1 ); + ssSetOutputPortVectorDimension(S, 1, 1 ); + ssSetOutputPortVectorDimension(S, 2, 1 ); + ssSetOutputPortVectorDimension(S, 3, 4 ); // state at shooting node 1 + ssSetOutputPortVectorDimension(S, 4, 1); + ssSetOutputPortVectorDimension(S, 5, 1 ); + + // specify the direct feedthrough status + // should be set to 1 for all inputs used in mdlOutputs + ssSetInputPortDirectFeedThrough(S, 0, 1); + ssSetInputPortDirectFeedThrough(S, 1, 1); + ssSetInputPortDirectFeedThrough(S, 2, 1); + ssSetInputPortDirectFeedThrough(S, 3, 1); + ssSetInputPortDirectFeedThrough(S, 4, 1); + ssSetInputPortDirectFeedThrough(S, 5, 1); + ssSetInputPortDirectFeedThrough(S, 6, 1); + ssSetInputPortDirectFeedThrough(S, 7, 1); + + // one sample time + ssSetNumSampleTimes(S, 1); +} + + +#if defined(MATLAB_MEX_FILE) + +#define MDL_SET_INPUT_PORT_DIMENSION_INFO +#define MDL_SET_OUTPUT_PORT_DIMENSION_INFO + +static void mdlSetInputPortDimensionInfo(SimStruct *S, int_T port, const DimsInfo_T *dimsInfo) +{ + if ( !ssSetInputPortDimensionInfo(S, port, dimsInfo) ) + return; +} + +static void mdlSetOutputPortDimensionInfo(SimStruct *S, int_T port, const DimsInfo_T *dimsInfo) +{ + if ( !ssSetOutputPortDimensionInfo(S, port, dimsInfo) ) + return; +} + +#endif /* MATLAB_MEX_FILE */ + + +static void mdlInitializeSampleTimes(SimStruct *S) +{ + ssSetSampleTime(S, 0, SAMPLINGTIME); + ssSetOffsetTime(S, 0, 0.0); +} + + +static void mdlStart(SimStruct *S) +{ + lat_solver_capsule *capsule = lat_acados_create_capsule(); + lat_acados_create(capsule); + + ssSetUserData(S, (void*)capsule); +} + + +static void mdlOutputs(SimStruct *S, int_T tid) +{ + lat_solver_capsule *capsule = ssGetUserData(S); + ocp_nlp_config *nlp_config = lat_acados_get_nlp_config(capsule); + ocp_nlp_dims *nlp_dims = lat_acados_get_nlp_dims(capsule); + ocp_nlp_in *nlp_in = lat_acados_get_nlp_in(capsule); + ocp_nlp_out *nlp_out = lat_acados_get_nlp_out(capsule); + + InputRealPtrsType in_sign; + + // local buffer + real_t buffer[4]; + + /* go through inputs */ + // lbx_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 0); + for (int i = 0; i < 4; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, 0, "lbx", buffer); + // ubx_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 1); + for (int i = 0; i < 4; i++) + buffer[i] = (double)(*in_sign[i]); + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, 0, "ubx", buffer); + // parameters - stage-variant !!! + in_sign = ssGetInputPortRealSignalPtrs(S, 2); + + // update value of parameters + for (int ii = 0; ii <= 16; ii++) + { + for (int jj = 0; jj < 2; jj++) + buffer[jj] = (double)(*in_sign[ii*2+jj]); + lat_acados_update_params(capsule, ii, buffer, 2); + } + + + // y_ref_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 3); + + for (int i = 0; i < 3; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, 0, "yref", (void *) buffer); + + + // y_ref - for stages 1 to N-1 + in_sign = ssGetInputPortRealSignalPtrs(S, 4); + + for (int ii = 1; ii < 16; ii++) + { + for (int jj = 0; jj < 3; jj++) + buffer[jj] = (double)(*in_sign[(ii-1)*3+jj]); + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, ii, "yref", (void *) buffer); + } + + + // y_ref_e + in_sign = ssGetInputPortRealSignalPtrs(S, 5); + + for (int i = 0; i < 2; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, 16, "yref", (void *) buffer); + // lbx + in_sign = ssGetInputPortRealSignalPtrs(S, 6); + for (int ii = 1; ii < 16; ii++) + { + for (int jj = 0; jj < 2; jj++) + buffer[jj] = (double)(*in_sign[(ii-1)*2+jj]); + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, ii, "lbx", (void *) buffer); + } + // ubx + in_sign = ssGetInputPortRealSignalPtrs(S, 7); + for (int ii = 1; ii < 16; ii++) + { + for (int jj = 0; jj < 2; jj++) + buffer[jj] = (double)(*in_sign[(ii-1)*2+jj]); + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, ii, "ubx", (void *) buffer); + } + + /* call solver */ + int rti_phase = 0; + ocp_nlp_solver_opts_set(nlp_config, capsule->nlp_opts, "rti_phase", &rti_phase); + int acados_status = lat_acados_solve(capsule); + + + /* set outputs */ + // assign pointers to output signals + real_t *out_u0, *out_utraj, *out_xtraj, *out_status, *out_sqp_iter, *out_KKT_res, *out_x1, *out_cpu_time, *out_cpu_time_sim, *out_cpu_time_qp, *out_cpu_time_lin; + int tmp_int; + out_u0 = ssGetOutputPortRealSignal(S, 0); + ocp_nlp_out_get(nlp_config, nlp_dims, nlp_out, 0, "u", (void *) out_u0); + + + out_status = ssGetOutputPortRealSignal(S, 1); + *out_status = (real_t) acados_status; + out_KKT_res = ssGetOutputPortRealSignal(S, 2); + *out_KKT_res = (real_t) nlp_out->inf_norm_res; + out_x1 = ssGetOutputPortRealSignal(S, 3); + ocp_nlp_out_get(nlp_config, nlp_dims, nlp_out, 1, "x", (void *) out_x1); + out_cpu_time = ssGetOutputPortRealSignal(S, 4); + // get solution time + ocp_nlp_get(nlp_config, capsule->nlp_solver, "time_tot", (void *) out_cpu_time); + out_sqp_iter = ssGetOutputPortRealSignal(S, 5); + // get sqp iter + ocp_nlp_get(nlp_config, capsule->nlp_solver, "sqp_iter", (void *) &tmp_int); + *out_sqp_iter = (real_t) tmp_int; + +} + +static void mdlTerminate(SimStruct *S) +{ + lat_solver_capsule *capsule = ssGetUserData(S); + + lat_acados_free(capsule); + lat_acados_free_capsule(capsule); +} + + +#ifdef MATLAB_MEX_FILE +#include "simulink.c" +#else +#include "cg_sfun.h" +#endif diff --git a/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/main_sim_lat.c b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/main_sim_lat.c new file mode 100644 index 000000000..c536654fd --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/main_sim_lat.c @@ -0,0 +1,128 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + + +// standard +#include +#include +// acados +#include "acados/utils/print.h" +#include "acados/utils/math.h" +#include "acados_c/sim_interface.h" +#include "acados_sim_solver_lat.h" + +#define NX LAT_NX +#define NZ LAT_NZ +#define NU LAT_NU +#define NP LAT_NP + + +int main() +{ + int status = 0; + sim_solver_capsule *capsule = lat_acados_sim_solver_create_capsule(); + status = lat_acados_sim_create(capsule); + + if (status) + { + printf("acados_create() returned status %d. Exiting.\n", status); + exit(1); + } + + sim_config *acados_sim_config = lat_acados_get_sim_config(capsule); + sim_in *acados_sim_in = lat_acados_get_sim_in(capsule); + sim_out *acados_sim_out = lat_acados_get_sim_out(capsule); + void *acados_sim_dims = lat_acados_get_sim_dims(capsule); + + // initial condition + double x_current[NX]; + x_current[0] = 0.0; + x_current[1] = 0.0; + x_current[2] = 0.0; + x_current[3] = 0.0; + + + x_current[0] = 0; + x_current[1] = 0; + x_current[2] = 0; + x_current[3] = 0; + + + + + // initial value for control input + double u0[NU]; + u0[0] = 0.0; + // set parameters + double p[NP]; + p[0] = 0; + p[1] = 0; + + lat_acados_sim_update_params(capsule, p, NP); + + + int n_sim_steps = 3; + // solve ocp in loop + for (int ii = 0; ii < n_sim_steps; ii++) + { + sim_in_set(acados_sim_config, acados_sim_dims, + acados_sim_in, "x", x_current); + status = lat_acados_sim_solve(capsule); + + if (status != ACADOS_SUCCESS) + { + printf("acados_solve() failed with status %d.\n", status); + } + + sim_out_get(acados_sim_config, acados_sim_dims, + acados_sim_out, "x", x_current); + + printf("\nx_current, %d\n", ii); + for (int jj = 0; jj < NX; jj++) + { + printf("%e\n", x_current[jj]); + } + } + + printf("\nPerformed %d simulation steps with acados integrator successfully.\n\n", n_sim_steps); + + // free solver + status = lat_acados_sim_free(capsule); + if (status) { + printf("lat_acados_sim_free() returned status %d. \n", status); + } + + lat_acados_sim_solver_free_capsule(capsule); + + return status; +} diff --git a/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/make_sfun_lat.m b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/make_sfun_lat.m new file mode 100644 index 000000000..2c6679ecb --- /dev/null +++ b/selfdrive/controls/lib/lateral_mpc_lib/c_generated_code/make_sfun_lat.m @@ -0,0 +1,125 @@ +% +% Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, +% Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, +% Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, +% Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl +% +% This file is part of acados. +% +% The 2-Clause BSD License +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions are met: +% +% 1. Redistributions of source code must retain the above copyright notice, +% this list of conditions and the following disclaimer. +% +% 2. Redistributions in binary form must reproduce the above copyright notice, +% this list of conditions and the following disclaimer in the documentation +% and/or other materials provided with the distribution. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE.; +% + +SOURCES = { ... + 'lat_model/lat_expl_ode_fun.c', ... + 'lat_model/lat_expl_vde_forw.c',... + 'lat_cost/lat_cost_y_0_fun.c',... + 'lat_cost/lat_cost_y_0_fun_jac_ut_xt.c',... + 'lat_cost/lat_cost_y_0_hess.c',... + 'lat_cost/lat_cost_y_fun.c',... + 'lat_cost/lat_cost_y_fun_jac_ut_xt.c',... + 'lat_cost/lat_cost_y_hess.c',... + 'lat_cost/lat_cost_y_e_fun.c',... + 'lat_cost/lat_cost_y_e_fun_jac_ut_xt.c',... + 'lat_cost/lat_cost_y_e_hess.c',... + 'acados_solver_sfunction_lat.c', ... + 'acados_solver_lat.c' + }; + +INC_PATH = '/data/openpilot/third_party/acados/include/acados/include'; + +INCS = {['-I', fullfile(INC_PATH, 'blasfeo', 'include')], ... + ['-I', fullfile(INC_PATH, 'hpipm', 'include')], ... + ['-I', fullfile(INC_PATH, 'acados')], ... + ['-I', fullfile(INC_PATH)]}; + + + +CFLAGS = 'CFLAGS=$CFLAGS'; +LDFLAGS = 'LDFLAGS=$LDFLAGS'; +COMPFLAGS = 'COMPFLAGS=$COMPFLAGS'; +COMPDEFINES = 'COMPDEFINES=$COMPDEFINES'; + + + +LIB_PATH = ['-L', fullfile('/data/openpilot/third_party/acados/include/acados/lib')]; + +LIBS = {'-lacados', '-lhpipm', '-lblasfeo'}; + +% acados linking libraries and flags + + +mex('-v', '-O', CFLAGS, LDFLAGS, COMPFLAGS, COMPDEFINES, INCS{:}, ... + LIB_PATH, LIBS{:}, SOURCES{:}, ... + '-output', 'acados_solver_sfunction_lat' ); + +fprintf( [ '\n\nSuccessfully created sfunction:\nacados_solver_sfunction_lat', '.', ... + eval('mexext')] ); + + +%% print note on usage of s-function +fprintf('\n\nNote: Usage of Sfunction is as follows:\n') +input_note = 'Inputs are:\n'; +i_in = 1; +input_note = strcat(input_note, num2str(i_in), ') lbx_0 - lower bound on x for stage 0,',... + ' size [4]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') ubx_0 - upper bound on x for stage 0,',... + ' size [4]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') parameters - concatenated for all shooting nodes 0 to N+1,',... + ' size [34]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref_0, size [3]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref - concatenated for shooting nodes 1 to N-1,',... + ' size [45]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref_e, size [2]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') lbx for shooting nodes 1 to N-1, size [30]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') ubx for shooting nodes 1 to N-1, size [30]\n '); +i_in = i_in + 1; + +fprintf(input_note) + +disp(' ') + +output_note = 'Outputs are:\n'; +i_out = 0; +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') u0, control input at node 0, size [1]\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') acados solver status (0 = SUCCESS)\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') KKT residual\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') x1, state at node 1\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') CPU time\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') SQP iterations\n '); + +fprintf(output_note) diff --git a/selfdrive/controls/lib/lateral_planner.py b/selfdrive/controls/lib/lateral_planner.py index c491c32d4..09f0833e7 100644 --- a/selfdrive/controls/lib/lateral_planner.py +++ b/selfdrive/controls/lib/lateral_planner.py @@ -4,16 +4,15 @@ from common.numpy_fast import interp from system.swaglog import cloudlog from selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import LateralMpc from selfdrive.controls.lib.drive_helpers import CONTROL_N, MPC_COST_LAT, LAT_MPC_N -from selfdrive.controls.lib.lane_planner import LanePlanner, TRAJECTORY_SIZE from selfdrive.controls.lib.desire_helper import DesireHelper import cereal.messaging as messaging from cereal import log +TRAJECTORY_SIZE = 33 +CAMERA_OFFSET = 0.04 class LateralPlanner: - def __init__(self, CP, use_lanelines=True, wide_camera=False): - self.use_lanelines = use_lanelines - self.LP = LanePlanner(wide_camera) + def __init__(self, CP): self.DH = DesireHelper() # Vehicle model parameters used to calculate lateral movement of car @@ -28,13 +27,12 @@ class LateralPlanner: self.plan_curv_rate = np.zeros((TRAJECTORY_SIZE,)) self.t_idxs = np.arange(TRAJECTORY_SIZE) self.y_pts = np.zeros(TRAJECTORY_SIZE) - self.d_path_w_lines_xyz = np.zeros((TRAJECTORY_SIZE, 3)) + #dp: mf vision controller + #self.d_path_w_lines_xyz = np.zeros((TRAJECTORY_SIZE, 3)) self.lat_mpc = LateralMpc() self.reset_mpc(np.zeros(4)) - self.dp_dlp_lanelines = True - def reset_mpc(self, x0=np.zeros(4)): self.x0 = x0 self.lat_mpc.reset(x0=self.x0) @@ -43,12 +41,8 @@ class LateralPlanner: v_ego = sm['carState'].vEgo measured_curvature = sm['controlsState'].curvature - # dp - update camera offset - self.LP.update_offsets(sm['dragonConf'].dpCameraOffset) - # Parse model predictions md = sm['modelV2'] - self.LP.parse_model(md) if len(md.position.x) == TRAJECTORY_SIZE and len(md.orientation.x) == TRAJECTORY_SIZE: self.path_xyz = np.column_stack([md.position.x, md.position.y, md.position.z]) self.t_idxs = np.array(md.position.t) @@ -57,31 +51,17 @@ class LateralPlanner: self.path_xyz_stds = np.column_stack([md.position.xStd, md.position.yStd, md.position.zStd]) # Lane change logic - lane_change_prob = self.LP.l_lane_change_prob + self.LP.r_lane_change_prob + desire_state = md.meta.desireState + if len(desire_state): + self.l_lane_change_prob = desire_state[log.LateralPlan.Desire.laneChangeLeft] + self.r_lane_change_prob = desire_state[log.LateralPlan.Desire.laneChangeRight] + lane_change_prob = self.l_lane_change_prob + self.r_lane_change_prob self.DH.update(sm['carState'], sm['carControl'].latActive, lane_change_prob, sm['dragonConf']) - # Turn off lanes during lane change - if self.DH.desire == log.LateralPlan.Desire.laneChangeRight or self.DH.desire == log.LateralPlan.Desire.laneChangeLeft: - self.LP.lll_prob *= self.DH.lane_change_ll_prob - self.LP.rll_prob *= self.DH.lane_change_ll_prob - self.d_path_w_lines_xyz = self.LP.get_d_path(v_ego, self.t_idxs, self.path_xyz) - - if sm.updated['dragonConf'] and sm['dragonConf'].dpUseLanelines: - if self.LP.lll_prob < 0.3 and self.LP.rll_prob < 0.3: - self.dp_dlp_lanelines = False - elif self.LP.lll_prob > 0.5 and self.LP.rll_prob > 0.5: - self.dp_dlp_lanelines = True - self.use_lanelines = self.dp_dlp_lanelines - - # Calculate final driving path and set MPC costs - if self.use_lanelines: - d_path_xyz = self.d_path_w_lines_xyz - self.lat_mpc.set_weights(MPC_COST_LAT.PATH, MPC_COST_LAT.HEADING, MPC_COST_LAT.STEER_RATE) - else: - d_path_xyz = self.path_xyz - # Heading cost is useful at low speed, otherwise end of plan can be off-heading - heading_cost = interp(v_ego, [5.0, 10.0], [MPC_COST_LAT.HEADING, 0.15]) - self.lat_mpc.set_weights(MPC_COST_LAT.PATH, heading_cost, MPC_COST_LAT.STEER_RATE) + d_path_xyz = self.path_xyz + # Heading cost is useful at low speed, otherwise end of plan can be off-heading + heading_cost = interp(v_ego, [5.0, 10.0], [MPC_COST_LAT.HEADING, 0.15]) + self.lat_mpc.set_weights(MPC_COST_LAT.PATH, heading_cost, MPC_COST_LAT.STEER_RATE) y_pts = np.interp(v_ego * self.t_idxs[:LAT_MPC_N + 1], np.linalg.norm(d_path_xyz, axis=1), d_path_xyz[:, 1]) heading_pts = np.interp(v_ego * self.t_idxs[:LAT_MPC_N + 1], np.linalg.norm(self.path_xyz, axis=1), self.plan_yaw) @@ -126,24 +106,21 @@ class LateralPlanner: lateralPlan = plan_send.lateralPlan lateralPlan.modelMonoTime = sm.logMonoTime['modelV2'] - lateralPlan.laneWidth = float(self.LP.lane_width) lateralPlan.dPathPoints = self.y_pts.tolist() lateralPlan.psis = self.lat_mpc.x_sol[0:CONTROL_N, 2].tolist() lateralPlan.curvatures = self.lat_mpc.x_sol[0:CONTROL_N, 3].tolist() lateralPlan.curvatureRates = [float(x) for x in self.lat_mpc.u_sol[0:CONTROL_N - 1]] + [0.0] - lateralPlan.lProb = float(self.LP.lll_prob) - lateralPlan.rProb = float(self.LP.rll_prob) - lateralPlan.dProb = float(self.LP.d_prob) lateralPlan.mpcSolutionValid = bool(plan_solution_valid) lateralPlan.solverExecutionTime = self.lat_mpc.solve_time lateralPlan.desire = self.DH.desire - lateralPlan.useLaneLines = self.use_lanelines + lateralPlan.useLaneLines = False lateralPlan.laneChangeState = self.DH.lane_change_state lateralPlan.laneChangeDirection = self.DH.lane_change_direction - plan_send.lateralPlan.dPathWLinesX = [float(x) for x in self.d_path_w_lines_xyz[:, 0]] - plan_send.lateralPlan.dPathWLinesY = [float(y) for y in self.d_path_w_lines_xyz[:, 1]] + #dp: mf vts + #plan_send.lateralPlan.dPathWLinesX = [float(x) for x in self.d_path_w_lines_xyz[:, 0]] + #plan_send.lateralPlan.dPathWLinesY = [float(y) for y in self.d_path_w_lines_xyz[:, 1]] pm.send('lateralPlan', plan_send) diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index e9458607d..082e7725d 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -11,16 +11,21 @@ LongCtrlState = car.CarControl.Actuators.LongControlState ACCEL_MIN_ISO = -3.5 # m/s^2 ACCEL_MAX_ISO = 2.0 # m/s^2 - def long_control_state_trans(CP, active, long_control_state, v_ego, v_target, - v_target_future, brake_pressed, cruise_standstill): - """Update longitudinal control state machine""" - accelerating = v_target_future > v_target - stopping_condition = (v_ego < 2.0 and cruise_standstill) or \ - (v_ego < CP.vEgoStopping and - ((v_target_future < CP.vEgoStopping and not accelerating) or brake_pressed)) + v_target_1sec, brake_pressed, cruise_standstill): + accelerating = v_target_1sec > v_target + planned_stop = (v_target < CP.vEgoStopping and + v_target_1sec < CP.vEgoStopping and + not accelerating) + stay_stopped = (v_ego < CP.vEgoStopping and + (brake_pressed or cruise_standstill)) + stopping_condition = planned_stop or stay_stopped - starting_condition = v_target_future > CP.vEgoStarting and accelerating and not cruise_standstill + starting_condition = (v_target_1sec > CP.vEgoStarting and + accelerating and + not cruise_standstill and + not brake_pressed) + started_condition = v_ego > CP.vEgoStarting if not active: long_control_state = LongCtrlState.off @@ -34,9 +39,21 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, v_target, long_control_state = LongCtrlState.stopping elif long_control_state == LongCtrlState.stopping: - if starting_condition: + if starting_condition and CP.startingState: + long_control_state = LongCtrlState.starting + elif starting_condition: long_control_state = LongCtrlState.pid + elif long_control_state == LongCtrlState.starting: + if stopping_condition: + long_control_state = LongCtrlState.stopping + elif started_condition: + long_control_state = LongCtrlState.pid + + + + + return long_control_state @@ -60,64 +77,62 @@ class LongControl: # Interp control trajectory speeds = long_plan.speeds if len(speeds) == CONTROL_N: - v_target = interp(t_since_plan, T_IDXS[:CONTROL_N], speeds) - a_target = interp(t_since_plan, T_IDXS[:CONTROL_N], long_plan.accels) + v_target_now = interp(t_since_plan, T_IDXS[:CONTROL_N], speeds) + a_target_now = interp(t_since_plan, T_IDXS[:CONTROL_N], long_plan.accels) v_target_lower = interp(self.CP.longitudinalActuatorDelayLowerBound + t_since_plan, T_IDXS[:CONTROL_N], speeds) - a_target_lower = 2 * (v_target_lower - v_target) / self.CP.longitudinalActuatorDelayLowerBound - a_target + a_target_lower = 2 * (v_target_lower - v_target_now) / self.CP.longitudinalActuatorDelayLowerBound - a_target_now v_target_upper = interp(self.CP.longitudinalActuatorDelayUpperBound + t_since_plan, T_IDXS[:CONTROL_N], speeds) - a_target_upper = 2 * (v_target_upper - v_target) / self.CP.longitudinalActuatorDelayUpperBound - a_target + a_target_upper = 2 * (v_target_upper - v_target_now) / self.CP.longitudinalActuatorDelayUpperBound - a_target_now + + v_target = min(v_target_lower, v_target_upper) a_target = min(a_target_lower, a_target_upper) - v_target_future = speeds[-1] + v_target_1sec = interp(self.CP.longitudinalActuatorDelayUpperBound + t_since_plan + 1.0, T_IDXS[:CONTROL_N], speeds) else: v_target = 0.0 - v_target_future = 0.0 + v_target_1sec = 0.0 a_target = 0.0 - # TODO: This check is not complete and needs to be enforced by MPC - a_target = clip(a_target, ACCEL_MIN_ISO, ACCEL_MAX_ISO) - self.pid.neg_limit = accel_limits[0] self.pid.pos_limit = accel_limits[1] - # Update state machine output_accel = self.last_output_accel self.long_control_state = long_control_state_trans(self.CP, active, self.long_control_state, CS.vEgo, - v_target, v_target_future, CS.brakePressed, + v_target, v_target_1sec, CS.brakePressed, CS.cruiseState.standstill) if self.long_control_state == LongCtrlState.off: self.reset(CS.vEgo) output_accel = 0. - # tracking objects and driving + elif self.long_control_state == LongCtrlState.stopping: + if output_accel > self.CP.stopAccel: + output_accel -= self.CP.stoppingDecelRate * DT_CTRL + self.reset(CS.vEgo) + + elif self.long_control_state == LongCtrlState.starting: + output_accel = self.CP.startAccel + self.reset(CS.vEgo) + elif self.long_control_state == LongCtrlState.pid: - self.v_pid = v_target + self.v_pid = v_target_now # Toyota starts braking more when it thinks you want to stop # Freeze the integrator so we don't accelerate to compensate, and don't allow positive acceleration - prevent_overshoot = not self.CP.stoppingControl and CS.vEgo < 1.5 and v_target_future < 0.7 and v_target_future < self.v_pid + # TODO too complex, needs to be simplified and tested on toyotas + prevent_overshoot = not self.CP.stoppingControl and CS.vEgo < 1.5 and v_target_1sec < 0.7 and v_target_1sec < self.v_pid deadzone = interp(CS.vEgo, self.CP.longitudinalTuning.deadzoneBP, self.CP.longitudinalTuning.deadzoneV) freeze_integrator = prevent_overshoot error = self.v_pid - CS.vEgo error_deadzone = apply_deadzone(error, deadzone) - output_accel = self.pid.update(error_deadzone, speed=CS.vEgo, feedforward=a_target, freeze_integrator=freeze_integrator) + output_accel = self.pid.update(error_deadzone, speed=CS.vEgo, + feedforward=a_target, + freeze_integrator=freeze_integrator) - if prevent_overshoot: - output_accel = min(output_accel, 0.0) - # Intention is to stop, switch to a different brake control until we stop - elif self.long_control_state == LongCtrlState.stopping: - # Keep applying brakes until the car is stopped - if not CS.standstill or output_accel > self.CP.stopAccel: - output_accel -= self.CP.stoppingDecelRate * DT_CTRL - output_accel = clip(output_accel, accel_limits[0], accel_limits[1]) - self.reset(CS.vEgo) + self.last_output_accel = clip(output_accel, accel_limits[0], accel_limits[1]) - self.last_output_accel = output_accel - final_accel = clip(output_accel, accel_limits[0], accel_limits[1]) - - return final_accel + return self.last_output_accel 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..53aa828cb --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/acados_ocp_long.json @@ -0,0 +1,627 @@ +{ + "acados_include_path": "/data/openpilot/third_party/acados/include/acados/include", + "acados_lib_path": "/data/openpilot/third_party/acados/include/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": [ + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ] + ], + "Vu_0": [ + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ], + [ + 0.0 + ] + ], + "Vx": [ + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ] + ], + "Vx_0": [ + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ] + ], + "Vx_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 + ] + ], + "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": "/data/data/com.termux/files/usr/lib/python3.8/site-packages/numpy/core/include", + "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 + }, + "model": { + "dyn_disc_fun": null, + "dyn_disc_fun_jac": null, + "dyn_disc_fun_jac_hess": null, + "dyn_ext_fun_type": "casadi", + "dyn_source_discrete": null, + "gnsf": { + "nontrivial_f_LO": 1, + "purely_linear": 0 + }, + "name": "long" + }, + "parameter_values": [ + -1.2, + 1.2, + 0.0, + 0.0, + 1.45, + 0.75 + ], + "problem_class": "OCP", + "simulink_opts": { + "inputs": { + "cost_W": 0, + "cost_W_0": 0, + "cost_W_e": 0, + "lbu": 1, + "lbx": 1, + "lbx_0": 1, + "lbx_e": 1, + "lg": 1, + "lh": 1, + "parameter_traj": 1, + "reset_solver": 0, + "u_init": 0, + "ubu": 1, + "ubx": 1, + "ubx_0": 1, + "ubx_e": 1, + "ug": 1, + "uh": 1, + "x_init": 0, + "y_ref": 1, + "y_ref_0": 1, + "y_ref_e": 1 + }, + "outputs": { + "CPU_time": 1, + "CPU_time_lin": 0, + "CPU_time_qp": 0, + "CPU_time_sim": 0, + "KKT_residual": 1, + "solver_status": 1, + "sqp_iter": 1, + "u0": 1, + "utraj": 0, + "x1": 1, + "xtraj": 0 + }, + "samplingtime": "t0" + }, + "solver_options": { + "Tsim": 0.06944444444444445, + "alpha_min": 0.05, + "alpha_reduction": 0.7, + "collocation_type": "GAUSS_LEGENDRE", + "eps_sufficient_descent": 0.0001, + "exact_hess_constr": 1, + "exact_hess_cost": 1, + "exact_hess_dyn": 1, + "ext_cost_num_hess": 0, + "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_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_iter_max": 10, + "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, + "sim_method_jac_reuse": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "sim_method_newton_iter": 3, + "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/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.c new file mode 100644 index 000000000..20f8890fc --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.c @@ -0,0 +1,282 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ +// standard +#include +#include + +// acados +#include "acados_c/external_function_interface.h" +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +#include "acados/sim/sim_common.h" +#include "acados/utils/external_function_generic.h" +#include "acados/utils/print.h" + + +// example specific +#include "long_model/long_model.h" +#include "acados_sim_solver_long.h" + + +// ** solver data ** + +sim_solver_capsule * long_acados_sim_solver_create_capsule() +{ + void* capsule_mem = malloc(sizeof(sim_solver_capsule)); + sim_solver_capsule *capsule = (sim_solver_capsule *) capsule_mem; + + return capsule; +} + + +int long_acados_sim_solver_free_capsule(sim_solver_capsule * capsule) +{ + free(capsule); + return 0; +} + + +int long_acados_sim_create(sim_solver_capsule * capsule) +{ + // initialize + const int nx = LONG_NX; + const int nu = LONG_NU; + const int nz = LONG_NZ; + const int np = LONG_NP; + bool tmp_bool; + + + double Tsim = 0.06944444444444445; + + + // explicit ode + capsule->sim_forw_vde_casadi = (external_function_param_casadi *) malloc(sizeof(external_function_param_casadi)); + capsule->sim_expl_ode_fun_casadi = (external_function_param_casadi *) malloc(sizeof(external_function_param_casadi)); + + capsule->sim_forw_vde_casadi->casadi_fun = &long_expl_vde_forw; + capsule->sim_forw_vde_casadi->casadi_n_in = &long_expl_vde_forw_n_in; + capsule->sim_forw_vde_casadi->casadi_n_out = &long_expl_vde_forw_n_out; + capsule->sim_forw_vde_casadi->casadi_sparsity_in = &long_expl_vde_forw_sparsity_in; + capsule->sim_forw_vde_casadi->casadi_sparsity_out = &long_expl_vde_forw_sparsity_out; + capsule->sim_forw_vde_casadi->casadi_work = &long_expl_vde_forw_work; + external_function_param_casadi_create(capsule->sim_forw_vde_casadi, np); + + capsule->sim_expl_ode_fun_casadi->casadi_fun = &long_expl_ode_fun; + capsule->sim_expl_ode_fun_casadi->casadi_n_in = &long_expl_ode_fun_n_in; + capsule->sim_expl_ode_fun_casadi->casadi_n_out = &long_expl_ode_fun_n_out; + capsule->sim_expl_ode_fun_casadi->casadi_sparsity_in = &long_expl_ode_fun_sparsity_in; + capsule->sim_expl_ode_fun_casadi->casadi_sparsity_out = &long_expl_ode_fun_sparsity_out; + capsule->sim_expl_ode_fun_casadi->casadi_work = &long_expl_ode_fun_work; + external_function_param_casadi_create(capsule->sim_expl_ode_fun_casadi, np); + + + + // sim plan & config + sim_solver_plan_t plan; + plan.sim_solver = ERK; + + // create correct config based on plan + sim_config * long_sim_config = sim_config_create(plan); + capsule->acados_sim_config = long_sim_config; + + // sim dims + void *long_sim_dims = sim_dims_create(long_sim_config); + capsule->acados_sim_dims = long_sim_dims; + sim_dims_set(long_sim_config, long_sim_dims, "nx", &nx); + sim_dims_set(long_sim_config, long_sim_dims, "nu", &nu); + sim_dims_set(long_sim_config, long_sim_dims, "nz", &nz); + + + // sim opts + sim_opts *long_sim_opts = sim_opts_create(long_sim_config, long_sim_dims); + capsule->acados_sim_opts = long_sim_opts; + int tmp_int = 3; + sim_opts_set(long_sim_config, long_sim_opts, "newton_iter", &tmp_int); + sim_collocation_type collocation_type = GAUSS_LEGENDRE; + sim_opts_set(long_sim_config, long_sim_opts, "collocation_type", &collocation_type); + + + tmp_int = 4; + sim_opts_set(long_sim_config, long_sim_opts, "num_stages", &tmp_int); + tmp_int = 1; + sim_opts_set(long_sim_config, long_sim_opts, "num_steps", &tmp_int); + tmp_bool = 0; + sim_opts_set(long_sim_config, long_sim_opts, "jac_reuse", &tmp_bool); + + + // sim in / out + sim_in *long_sim_in = sim_in_create(long_sim_config, long_sim_dims); + capsule->acados_sim_in = long_sim_in; + sim_out *long_sim_out = sim_out_create(long_sim_config, long_sim_dims); + capsule->acados_sim_out = long_sim_out; + + sim_in_set(long_sim_config, long_sim_dims, + long_sim_in, "T", &Tsim); + + // model functions + long_sim_config->model_set(long_sim_in->model, + "expl_vde_for", capsule->sim_forw_vde_casadi); + long_sim_config->model_set(long_sim_in->model, + "expl_ode_fun", capsule->sim_expl_ode_fun_casadi); + + // sim solver + sim_solver *long_sim_solver = sim_solver_create(long_sim_config, + long_sim_dims, long_sim_opts); + capsule->acados_sim_solver = long_sim_solver; + + + /* initialize parameter values */ + double* p = calloc(np, sizeof(double)); + + p[0] = -1.2; + p[1] = 1.2; + p[4] = 1.45; + p[5] = 0.75; + + long_acados_sim_update_params(capsule, p, np); + free(p); + + + /* initialize input */ + // x + double x0[3]; + for (int ii = 0; ii < 3; ii++) + x0[ii] = 0.0; + + sim_in_set(long_sim_config, long_sim_dims, + long_sim_in, "x", x0); + + + // u + double u0[1]; + for (int ii = 0; ii < 1; ii++) + u0[ii] = 0.0; + + sim_in_set(long_sim_config, long_sim_dims, + long_sim_in, "u", u0); + + // S_forw + double S_forw[12]; + for (int ii = 0; ii < 12; ii++) + S_forw[ii] = 0.0; + for (int ii = 0; ii < 3; ii++) + S_forw[ii + ii * 3 ] = 1.0; + + + sim_in_set(long_sim_config, long_sim_dims, + long_sim_in, "S_forw", S_forw); + + int status = sim_precompute(long_sim_solver, long_sim_in, long_sim_out); + + return status; +} + + +int long_acados_sim_solve(sim_solver_capsule *capsule) +{ + // integrate dynamics using acados sim_solver + int status = sim_solve(capsule->acados_sim_solver, + capsule->acados_sim_in, capsule->acados_sim_out); + if (status != 0) + printf("error in long_acados_sim_solve()! Exiting.\n"); + + return status; +} + + +int long_acados_sim_free(sim_solver_capsule *capsule) +{ + // free memory + sim_solver_destroy(capsule->acados_sim_solver); + sim_in_destroy(capsule->acados_sim_in); + sim_out_destroy(capsule->acados_sim_out); + sim_opts_destroy(capsule->acados_sim_opts); + sim_dims_destroy(capsule->acados_sim_dims); + sim_config_destroy(capsule->acados_sim_config); + + // free external function + external_function_param_casadi_free(capsule->sim_forw_vde_casadi); + external_function_param_casadi_free(capsule->sim_expl_ode_fun_casadi); + + return 0; +} + + +int long_acados_sim_update_params(sim_solver_capsule *capsule, double *p, int np) +{ + int status = 0; + int casadi_np = LONG_NP; + + if (casadi_np != np) { + printf("long_acados_sim_update_params: trying to set %i parameters for external functions." + " External function has %i parameters. Exiting.\n", np, casadi_np); + exit(1); + } + capsule->sim_forw_vde_casadi[0].set_param(capsule->sim_forw_vde_casadi, p); + capsule->sim_expl_ode_fun_casadi[0].set_param(capsule->sim_expl_ode_fun_casadi, p); + + return status; +} + +/* getters pointers to C objects*/ +sim_config * long_acados_get_sim_config(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_config; +}; + +sim_in * long_acados_get_sim_in(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_in; +}; + +sim_out * long_acados_get_sim_out(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_out; +}; + +void * long_acados_get_sim_dims(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_dims; +}; + +sim_opts * long_acados_get_sim_opts(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_opts; +}; + +sim_solver * long_acados_get_sim_solver(sim_solver_capsule *capsule) +{ + return capsule->acados_sim_solver; +}; + diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.h b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.h new file mode 100644 index 000000000..ea0e04c49 --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_sim_solver_long.h @@ -0,0 +1,103 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + +#ifndef ACADOS_SIM_long_H_ +#define ACADOS_SIM_long_H_ + +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +#define LONG_NX 3 +#define LONG_NZ 0 +#define LONG_NU 1 +#define LONG_NP 6 + +#ifdef __cplusplus +extern "C" { +#endif + + +// ** capsule for solver data ** +typedef struct sim_solver_capsule +{ + // acados objects + sim_in *acados_sim_in; + sim_out *acados_sim_out; + sim_solver *acados_sim_solver; + sim_opts *acados_sim_opts; + sim_config *acados_sim_config; + void *acados_sim_dims; + + /* external functions */ + // ERK + external_function_param_casadi * sim_forw_vde_casadi; + external_function_param_casadi * sim_expl_ode_fun_casadi; + external_function_param_casadi * sim_expl_ode_hess; + + // IRK + external_function_param_casadi * sim_impl_dae_fun; + external_function_param_casadi * sim_impl_dae_fun_jac_x_xdot_z; + external_function_param_casadi * sim_impl_dae_jac_x_xdot_u_z; + external_function_param_casadi * sim_impl_dae_hess; + + // GNSF + external_function_param_casadi * sim_gnsf_phi_fun; + external_function_param_casadi * sim_gnsf_phi_fun_jac_y; + external_function_param_casadi * sim_gnsf_phi_jac_y_uhat; + external_function_param_casadi * sim_gnsf_f_lo_jac_x1_x1dot_u_z; + external_function_param_casadi * sim_gnsf_get_matrices_fun; + +} sim_solver_capsule; + + +ACADOS_SYMBOL_EXPORT int long_acados_sim_create(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int long_acados_sim_solve(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int long_acados_sim_free(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT int long_acados_sim_update_params(sim_solver_capsule *capsule, double *value, int np); + +ACADOS_SYMBOL_EXPORT sim_config * long_acados_get_sim_config(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_in * long_acados_get_sim_in(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_out * long_acados_get_sim_out(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT void * long_acados_get_sim_dims(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_opts * long_acados_get_sim_opts(sim_solver_capsule *capsule); +ACADOS_SYMBOL_EXPORT sim_solver * long_acados_get_sim_solver(sim_solver_capsule *capsule); + + +ACADOS_SYMBOL_EXPORT sim_solver_capsule * long_acados_sim_solver_create_capsule(void); +ACADOS_SYMBOL_EXPORT int long_acados_sim_solver_free_capsule(sim_solver_capsule *capsule); + +#ifdef __cplusplus +} +#endif + +#endif // ACADOS_SIM_long_H_ diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c index 079c82bec..7b28e0206 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.c @@ -306,7 +306,7 @@ void long_acados_create_3_create_and_set_functions(long_solver_capsule* capsule) capsule->__CAPSULE_FNC__.casadi_sparsity_in = & __MODEL_BASE_FNC__ ## _sparsity_in; \ capsule->__CAPSULE_FNC__.casadi_sparsity_out = & __MODEL_BASE_FNC__ ## _sparsity_out; \ capsule->__CAPSULE_FNC__.casadi_work = & __MODEL_BASE_FNC__ ## _work; \ - external_function_param_casadi_create(&capsule->__CAPSULE_FNC__ , 5); \ + external_function_param_casadi_create(&capsule->__CAPSULE_FNC__ , 6); \ }while(false) @@ -376,6 +376,7 @@ void long_acados_create_4_set_default_parameters(long_solver_capsule* capsule) { p[0] = -1.2; p[1] = 1.2; p[4] = 1.45; + p[5] = 0.75; for (int i = 0; i <= N; i++) { long_acados_update_params(capsule, i, p, NP); @@ -863,7 +864,7 @@ int long_acados_update_params(long_solver_capsule* capsule, int stage, double *p { int solver_status = 0; - int casadi_np = 5; + int casadi_np = 6; if (casadi_np != np) { printf("acados_update_params: trying to set %i parameters for external functions." " External function has %i parameters. Exiting.\n", np, casadi_np); diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.h b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.h index 8bd6f0929..afc630825 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.h +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_long.h @@ -42,7 +42,7 @@ #define LONG_NX 3 #define LONG_NZ 0 #define LONG_NU 1 -#define LONG_NP 5 +#define LONG_NP 6 #define LONG_NBX 0 #define LONG_NBX0 3 #define LONG_NBU 0 diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_sfunction_long.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_sfunction_long.c new file mode 100644 index 000000000..41b6d4431 --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/acados_solver_sfunction_long.c @@ -0,0 +1,264 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + +#define S_FUNCTION_NAME acados_solver_sfunction_long +#define S_FUNCTION_LEVEL 2 + +#define MDL_START + +// acados +// #include "acados/utils/print.h" +#include "acados_c/sim_interface.h" +#include "acados_c/external_function_interface.h" + +// example specific +#include "long_model/long_model.h" +#include "acados_solver_long.h" + +#include "simstruc.h" + +#define SAMPLINGTIME 0.06944444444444445 + +static void mdlInitializeSizes (SimStruct *S) +{ + // specify the number of continuous and discrete states + ssSetNumContStates(S, 0); + ssSetNumDiscStates(S, 0);// specify the number of input ports + if ( !ssSetNumInputPorts(S, 8) ) + return; + + // specify the number of output ports + if ( !ssSetNumOutputPorts(S, 6) ) + return; + + // specify dimension information for the input ports + // lbx_0 + ssSetInputPortVectorDimension(S, 0, 3); + // ubx_0 + ssSetInputPortVectorDimension(S, 1, 3); + // parameters + ssSetInputPortVectorDimension(S, 2, (12+1) * 6); + // y_ref_0 + ssSetInputPortVectorDimension(S, 3, 6); + // y_ref + ssSetInputPortVectorDimension(S, 4, 66); + // y_ref_e + ssSetInputPortVectorDimension(S, 5, 5); + // lh + ssSetInputPortVectorDimension(S, 6, 4); + // uh + ssSetInputPortVectorDimension(S, 7, 4);/* specify dimension information for the OUTPUT ports */ + ssSetOutputPortVectorDimension(S, 0, 1 ); + ssSetOutputPortVectorDimension(S, 1, 1 ); + ssSetOutputPortVectorDimension(S, 2, 1 ); + ssSetOutputPortVectorDimension(S, 3, 3 ); // state at shooting node 1 + ssSetOutputPortVectorDimension(S, 4, 1); + ssSetOutputPortVectorDimension(S, 5, 1 ); + + // specify the direct feedthrough status + // should be set to 1 for all inputs used in mdlOutputs + ssSetInputPortDirectFeedThrough(S, 0, 1); + ssSetInputPortDirectFeedThrough(S, 1, 1); + ssSetInputPortDirectFeedThrough(S, 2, 1); + ssSetInputPortDirectFeedThrough(S, 3, 1); + ssSetInputPortDirectFeedThrough(S, 4, 1); + ssSetInputPortDirectFeedThrough(S, 5, 1); + ssSetInputPortDirectFeedThrough(S, 6, 1); + ssSetInputPortDirectFeedThrough(S, 7, 1); + + // one sample time + ssSetNumSampleTimes(S, 1); +} + + +#if defined(MATLAB_MEX_FILE) + +#define MDL_SET_INPUT_PORT_DIMENSION_INFO +#define MDL_SET_OUTPUT_PORT_DIMENSION_INFO + +static void mdlSetInputPortDimensionInfo(SimStruct *S, int_T port, const DimsInfo_T *dimsInfo) +{ + if ( !ssSetInputPortDimensionInfo(S, port, dimsInfo) ) + return; +} + +static void mdlSetOutputPortDimensionInfo(SimStruct *S, int_T port, const DimsInfo_T *dimsInfo) +{ + if ( !ssSetOutputPortDimensionInfo(S, port, dimsInfo) ) + return; +} + +#endif /* MATLAB_MEX_FILE */ + + +static void mdlInitializeSampleTimes(SimStruct *S) +{ + ssSetSampleTime(S, 0, SAMPLINGTIME); + ssSetOffsetTime(S, 0, 0.0); +} + + +static void mdlStart(SimStruct *S) +{ + long_solver_capsule *capsule = long_acados_create_capsule(); + long_acados_create(capsule); + + ssSetUserData(S, (void*)capsule); +} + + +static void mdlOutputs(SimStruct *S, int_T tid) +{ + long_solver_capsule *capsule = ssGetUserData(S); + ocp_nlp_config *nlp_config = long_acados_get_nlp_config(capsule); + ocp_nlp_dims *nlp_dims = long_acados_get_nlp_dims(capsule); + ocp_nlp_in *nlp_in = long_acados_get_nlp_in(capsule); + ocp_nlp_out *nlp_out = long_acados_get_nlp_out(capsule); + + InputRealPtrsType in_sign; + + // local buffer + real_t buffer[6]; + + /* go through inputs */ + // lbx_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 0); + for (int i = 0; i < 3; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, 0, "lbx", buffer); + // ubx_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 1); + for (int i = 0; i < 3; i++) + buffer[i] = (double)(*in_sign[i]); + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, 0, "ubx", buffer); + // parameters - stage-variant !!! + in_sign = ssGetInputPortRealSignalPtrs(S, 2); + + // update value of parameters + for (int ii = 0; ii <= 12; ii++) + { + for (int jj = 0; jj < 6; jj++) + buffer[jj] = (double)(*in_sign[ii*6+jj]); + long_acados_update_params(capsule, ii, buffer, 6); + } + + + // y_ref_0 + in_sign = ssGetInputPortRealSignalPtrs(S, 3); + + for (int i = 0; i < 6; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, 0, "yref", (void *) buffer); + + + // y_ref - for stages 1 to N-1 + in_sign = ssGetInputPortRealSignalPtrs(S, 4); + + for (int ii = 1; ii < 12; ii++) + { + for (int jj = 0; jj < 6; jj++) + buffer[jj] = (double)(*in_sign[(ii-1)*6+jj]); + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, ii, "yref", (void *) buffer); + } + + + // y_ref_e + in_sign = ssGetInputPortRealSignalPtrs(S, 5); + + for (int i = 0; i < 5; i++) + buffer[i] = (double)(*in_sign[i]); + + ocp_nlp_cost_model_set(nlp_config, nlp_dims, nlp_in, 12, "yref", (void *) buffer); + // lh + in_sign = ssGetInputPortRealSignalPtrs(S, 6); + + for (int i = 0; i < 4; i++) + buffer[i] = (double)(*in_sign[i]); + + for (int ii = 0; ii < 12; ii++) + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, ii, "lh", buffer); + // uh + in_sign = ssGetInputPortRealSignalPtrs(S, 7); + + for (int i = 0; i < 4; i++) + buffer[i] = (double)(*in_sign[i]); + + for (int ii = 0; ii < 12; ii++) + ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, ii, "uh", buffer); + + /* call solver */ + int rti_phase = 0; + ocp_nlp_solver_opts_set(nlp_config, capsule->nlp_opts, "rti_phase", &rti_phase); + int acados_status = long_acados_solve(capsule); + + + /* set outputs */ + // assign pointers to output signals + real_t *out_u0, *out_utraj, *out_xtraj, *out_status, *out_sqp_iter, *out_KKT_res, *out_x1, *out_cpu_time, *out_cpu_time_sim, *out_cpu_time_qp, *out_cpu_time_lin; + int tmp_int; + out_u0 = ssGetOutputPortRealSignal(S, 0); + ocp_nlp_out_get(nlp_config, nlp_dims, nlp_out, 0, "u", (void *) out_u0); + + + out_status = ssGetOutputPortRealSignal(S, 1); + *out_status = (real_t) acados_status; + out_KKT_res = ssGetOutputPortRealSignal(S, 2); + *out_KKT_res = (real_t) nlp_out->inf_norm_res; + out_x1 = ssGetOutputPortRealSignal(S, 3); + ocp_nlp_out_get(nlp_config, nlp_dims, nlp_out, 1, "x", (void *) out_x1); + out_cpu_time = ssGetOutputPortRealSignal(S, 4); + // get solution time + ocp_nlp_get(nlp_config, capsule->nlp_solver, "time_tot", (void *) out_cpu_time); + out_sqp_iter = ssGetOutputPortRealSignal(S, 5); + // get sqp iter + ocp_nlp_get(nlp_config, capsule->nlp_solver, "sqp_iter", (void *) &tmp_int); + *out_sqp_iter = (real_t) tmp_int; + +} + +static void mdlTerminate(SimStruct *S) +{ + long_solver_capsule *capsule = ssGetUserData(S); + + long_acados_free(capsule); + long_acados_free_capsule(capsule); +} + + +#ifdef MATLAB_MEX_FILE +#include "simulink.c" +#else +#include "cg_sfun.h" +#endif diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/libacados_ocp_solver_long.so b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/libacados_ocp_solver_long.so index 1d3884e64..0ccb7a4f9 100755 Binary files a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/libacados_ocp_solver_long.so and b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/libacados_ocp_solver_long.so differ diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c index 443bfe42a..778e2f1a7 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun.c @@ -52,10 +52,10 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; static const casadi_int casadi_s2[3] = {0, 0, 0}; -static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; static const casadi_int casadi_s4[8] = {4, 1, 0, 4, 0, 1, 2, 3}; -/* long_constr_h_fun:(i0[3],i1,i2[],i3[5])->(o0[4]) */ +/* long_constr_h_fun:(i0[3],i1,i2[],i3[6])->(o0[4]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4; a0=arg[0]? arg[0][1] : 0; @@ -70,7 +70,7 @@ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, a2=arg[3]? arg[3][2] : 0; a1=arg[0]? arg[0][0] : 0; a2=(a2-a1); - a1=7.5000000000000000e-01; + a1=arg[3]? arg[3][5] : 0; a3=casadi_sq(a0); a4=5.; a3=(a3/a4); diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c index eae00c857..93f3a360f 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_constraints/long_constr_h_fun_jac_uxt_zt.c @@ -54,12 +54,12 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; static const casadi_int casadi_s2[3] = {0, 0, 0}; -static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; static const casadi_int casadi_s4[8] = {4, 1, 0, 4, 0, 1, 2, 3}; static const casadi_int casadi_s5[12] = {4, 4, 0, 1, 2, 3, 5, 2, 3, 3, 1, 2}; static const casadi_int casadi_s6[3] = {4, 0, 0}; -/* long_constr_h_fun_jac_uxt_zt:(i0[3],i1,i2[],i3[5])->(o0[4],o1[4x4,5nz],o2[4x0]) */ +/* long_constr_h_fun_jac_uxt_zt:(i0[3],i1,i2[],i3[6])->(o0[4],o1[4x4,5nz],o2[4x0]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4, a5; a0=arg[0]? arg[0][1] : 0; @@ -74,7 +74,7 @@ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, a2=arg[3]? arg[3][2] : 0; a1=arg[0]? arg[0][0] : 0; a2=(a2-a1); - a1=7.5000000000000000e-01; + a1=arg[3]? arg[3][5] : 0; a3=casadi_sq(a0); a4=5.; a3=(a3/a4); diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c index 7c8872566..131d66921 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun.c @@ -28,7 +28,6 @@ extern "C" { #define casadi_s0 CASADI_PREFIX(s0) #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) -#define casadi_s3 CASADI_PREFIX(s3) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -50,10 +49,9 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -/* long_cost_y_0_fun:(i0[3],i1,i2[5])->(o0[6]) */ +/* long_cost_y_0_fun:(i0[3],i1,i2[6])->(o0[6]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4; a0=arg[2]? arg[2][2] : 0; @@ -150,7 +148,7 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_fun_sparsity_in(casadi_int CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_fun_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s3; + case 0: return casadi_s2; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c index 64c8253c5..5f59cbc68 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_fun_jac_ut_xt.c @@ -29,7 +29,6 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) -#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -51,11 +50,10 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -static const casadi_int casadi_s4[16] = {4, 6, 0, 2, 3, 4, 5, 6, 7, 1, 2, 1, 2, 3, 3, 0}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s3[16] = {4, 6, 0, 2, 3, 4, 5, 6, 7, 1, 2, 1, 2, 3, 3, 0}; -/* long_cost_y_0_fun_jac_ut_xt:(i0[3],i1,i2[5])->(o0[6],o1[4x6,7nz]) */ +/* long_cost_y_0_fun_jac_ut_xt:(i0[3],i1,i2[6])->(o0[6],o1[4x6,7nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4, a5; a0=arg[2]? arg[2][2] : 0; @@ -171,8 +169,8 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_fun_jac_ut_xt_sparsity_in(c CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_fun_jac_ut_xt_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s3; - case 1: return casadi_s4; + case 0: return casadi_s2; + case 1: return casadi_s3; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c index a66b403a5..e8be99743 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_0_hess.c @@ -29,7 +29,6 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) -#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -52,10 +51,9 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s4[10] = {4, 4, 0, 0, 1, 3, 3, 2, 1, 2}; +static const casadi_int casadi_s3[10] = {4, 4, 0, 0, 1, 3, 3, 2, 1, 2}; -/* long_cost_y_0_hess:(i0[3],i1,i2[6],i3[5])->(o0[4x4,3nz]) */ +/* long_cost_y_0_hess:(i0[3],i1,i2[6],i3[6])->(o0[4x4,3nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a10, a2, a3, a4, a5, a6, a7, a8, a9; a0=arg[2]? arg[2][0] : 0; @@ -168,14 +166,14 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_hess_sparsity_in(casadi_int case 0: return casadi_s0; case 1: return casadi_s1; case 2: return casadi_s2; - case 3: return casadi_s3; + case 3: return casadi_s2; default: return 0; } } CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_0_hess_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s4; + case 0: return casadi_s3; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c index a0fbee66f..238389130 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun.c @@ -28,6 +28,7 @@ extern "C" { #define casadi_s0 CASADI_PREFIX(s0) #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) +#define casadi_s3 CASADI_PREFIX(s3) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -49,9 +50,10 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[3] = {0, 0, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -/* long_cost_y_e_fun:(i0[3],i1[],i2[5])->(o0[5]) */ +/* long_cost_y_e_fun:(i0[3],i1[],i2[6])->(o0[5]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4; a0=arg[2]? arg[2][2] : 0; @@ -146,7 +148,7 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_fun_sparsity_in(casadi_int CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_fun_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s2; + case 0: return casadi_s3; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c index 769e09dec..b5e864668 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_fun_jac_ut_xt.c @@ -29,6 +29,7 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) +#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -50,10 +51,11 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[3] = {0, 0, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[14] = {3, 5, 0, 2, 3, 4, 5, 6, 0, 1, 0, 1, 2, 2}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s4[14] = {3, 5, 0, 2, 3, 4, 5, 6, 0, 1, 0, 1, 2, 2}; -/* long_cost_y_e_fun_jac_ut_xt:(i0[3],i1[],i2[5])->(o0[5],o1[3x5,6nz]) */ +/* long_cost_y_e_fun_jac_ut_xt:(i0[3],i1[],i2[6])->(o0[5],o1[3x5,6nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4, a5; a0=arg[2]? arg[2][2] : 0; @@ -166,8 +168,8 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_fun_jac_ut_xt_sparsity_in(c CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_fun_jac_ut_xt_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s2; - case 1: return casadi_s3; + case 0: return casadi_s3; + case 1: return casadi_s4; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c index 23cae9749..7df077555 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_e_hess.c @@ -29,6 +29,7 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) +#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -51,9 +52,10 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[3] = {0, 0, 0}; static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[9] = {3, 3, 0, 1, 3, 3, 1, 0, 1}; +static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s4[9] = {3, 3, 0, 1, 3, 3, 1, 0, 1}; -/* long_cost_y_e_hess:(i0[3],i1[],i2[5],i3[5])->(o0[3x3,3nz]) */ +/* long_cost_y_e_hess:(i0[3],i1[],i2[5],i3[6])->(o0[3x3,3nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a10, a2, a3, a4, a5, a6, a7, a8, a9; a0=arg[2]? arg[2][0] : 0; @@ -166,14 +168,14 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_hess_sparsity_in(casadi_int case 0: return casadi_s0; case 1: return casadi_s1; case 2: return casadi_s2; - case 3: return casadi_s2; + case 3: return casadi_s3; default: return 0; } } CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_e_hess_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s3; + case 0: return casadi_s4; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c index 99ec6b889..f519a2423 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun.c @@ -28,7 +28,6 @@ extern "C" { #define casadi_s0 CASADI_PREFIX(s0) #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) -#define casadi_s3 CASADI_PREFIX(s3) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -50,10 +49,9 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -/* long_cost_y_fun:(i0[3],i1,i2[5])->(o0[6]) */ +/* long_cost_y_fun:(i0[3],i1,i2[6])->(o0[6]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4; a0=arg[2]? arg[2][2] : 0; @@ -150,7 +148,7 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_fun_sparsity_in(casadi_int i) CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_fun_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s3; + case 0: return casadi_s2; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c index 4f5130691..4ba65e972 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_fun_jac_ut_xt.c @@ -29,7 +29,6 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) -#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -51,11 +50,10 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -static const casadi_int casadi_s4[16] = {4, 6, 0, 2, 3, 4, 5, 6, 7, 1, 2, 1, 2, 3, 3, 0}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; +static const casadi_int casadi_s3[16] = {4, 6, 0, 2, 3, 4, 5, 6, 7, 1, 2, 1, 2, 3, 3, 0}; -/* long_cost_y_fun_jac_ut_xt:(i0[3],i1,i2[5])->(o0[6],o1[4x6,7nz]) */ +/* long_cost_y_fun_jac_ut_xt:(i0[3],i1,i2[6])->(o0[6],o1[4x6,7nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a2, a3, a4, a5; a0=arg[2]? arg[2][2] : 0; @@ -171,8 +169,8 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_fun_jac_ut_xt_sparsity_in(cas CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_fun_jac_ut_xt_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s3; - case 1: return casadi_s4; + case 0: return casadi_s2; + case 1: return casadi_s3; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c index fd1a9b0a2..2046a1373 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_cost/long_cost_y_hess.c @@ -29,7 +29,6 @@ extern "C" { #define casadi_s1 CASADI_PREFIX(s1) #define casadi_s2 CASADI_PREFIX(s2) #define casadi_s3 CASADI_PREFIX(s3) -#define casadi_s4 CASADI_PREFIX(s4) #define casadi_sq CASADI_PREFIX(sq) /* Symbol visibility in DLLs */ @@ -52,10 +51,9 @@ casadi_real casadi_sq(casadi_real x) { return x*x;} static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; -static const casadi_int casadi_s4[10] = {4, 4, 0, 0, 1, 3, 3, 2, 1, 2}; +static const casadi_int casadi_s3[10] = {4, 4, 0, 0, 1, 3, 3, 2, 1, 2}; -/* long_cost_y_hess:(i0[3],i1,i2[6],i3[5])->(o0[4x4,3nz]) */ +/* long_cost_y_hess:(i0[3],i1,i2[6],i3[6])->(o0[4x4,3nz]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1, a10, a2, a3, a4, a5, a6, a7, a8, a9; a0=arg[2]? arg[2][0] : 0; @@ -168,14 +166,14 @@ CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_hess_sparsity_in(casadi_int i case 0: return casadi_s0; case 1: return casadi_s1; case 2: return casadi_s2; - case 3: return casadi_s3; + case 3: return casadi_s2; default: return 0; } } CASADI_SYMBOL_EXPORT const casadi_int* long_cost_y_hess_sparsity_out(casadi_int i) { switch (i) { - case 0: return casadi_s4; + case 0: return casadi_s3; default: return 0; } } diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c index 8d69c200a..34df2aaf9 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_ode_fun.c @@ -46,9 +46,9 @@ extern "C" { static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -/* long_expl_ode_fun:(i0[3],i1,i2[5])->(o0[3]) */ +/* long_expl_ode_fun:(i0[3],i1,i2[6])->(o0[3]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0; a0=arg[0]? arg[0][1] : 0; diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_adj.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_adj.c index 53c7bac38..3af9ebe40 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_adj.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_adj.c @@ -47,10 +47,10 @@ extern "C" { static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s2[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s2[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; static const casadi_int casadi_s3[8] = {4, 1, 0, 4, 0, 1, 2, 3}; -/* long_expl_vde_adj:(i0[3],i1[3],i2,i3[5])->(o0[4]) */ +/* long_expl_vde_adj:(i0[3],i1[3],i2,i3[6])->(o0[4]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0; a0=0.; diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c index b0a2775be..bf2e5ff31 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/long_model/long_expl_vde_forw.c @@ -48,9 +48,9 @@ extern "C" { static const casadi_int casadi_s0[7] = {3, 1, 0, 3, 0, 1, 2}; static const casadi_int casadi_s1[15] = {3, 3, 0, 3, 6, 9, 0, 1, 2, 0, 1, 2, 0, 1, 2}; static const casadi_int casadi_s2[5] = {1, 1, 0, 1, 0}; -static const casadi_int casadi_s3[9] = {5, 1, 0, 5, 0, 1, 2, 3, 4}; +static const casadi_int casadi_s3[10] = {6, 1, 0, 6, 0, 1, 2, 3, 4, 5}; -/* long_expl_vde_forw:(i0[3],i1[3x3],i2[3],i3,i4[5])->(o0[3],o1[3x3],o2[3]) */ +/* long_expl_vde_forw:(i0[3],i1[3x3],i2[3],i3,i4[6])->(o0[3],o1[3x3],o2[3]) */ static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) { casadi_real a0, a1; a0=arg[0]? arg[0][1] : 0; diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_long.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_long.c index 401454943..a52250226 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_long.c +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_long.c @@ -131,6 +131,7 @@ int main() p[2] = 0; p[3] = 0; p[4] = 1.45; + p[5] = 0.75; for (int ii = 0; ii <= N; ii++) { diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_sim_long.c b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_sim_long.c new file mode 100644 index 000000000..21165e164 --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/main_sim_long.c @@ -0,0 +1,130 @@ +/* + * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, + * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, + * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, + * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl + * + * This file is part of acados. + * + * The 2-Clause BSD License + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE.; + */ + + +// standard +#include +#include +// acados +#include "acados/utils/print.h" +#include "acados/utils/math.h" +#include "acados_c/sim_interface.h" +#include "acados_sim_solver_long.h" + +#define NX LONG_NX +#define NZ LONG_NZ +#define NU LONG_NU +#define NP LONG_NP + + +int main() +{ + int status = 0; + sim_solver_capsule *capsule = long_acados_sim_solver_create_capsule(); + status = long_acados_sim_create(capsule); + + if (status) + { + printf("acados_create() returned status %d. Exiting.\n", status); + exit(1); + } + + sim_config *acados_sim_config = long_acados_get_sim_config(capsule); + sim_in *acados_sim_in = long_acados_get_sim_in(capsule); + sim_out *acados_sim_out = long_acados_get_sim_out(capsule); + void *acados_sim_dims = long_acados_get_sim_dims(capsule); + + // initial condition + double x_current[NX]; + x_current[0] = 0.0; + x_current[1] = 0.0; + x_current[2] = 0.0; + + + x_current[0] = 0; + x_current[1] = 0; + x_current[2] = 0; + + + + + // initial value for control input + double u0[NU]; + u0[0] = 0.0; + // set parameters + double p[NP]; + p[0] = -1.2; + p[1] = 1.2; + p[2] = 0; + p[3] = 0; + p[4] = 1.45; + p[5] = 0.75; + + long_acados_sim_update_params(capsule, p, NP); + + + int n_sim_steps = 3; + // solve ocp in loop + for (int ii = 0; ii < n_sim_steps; ii++) + { + sim_in_set(acados_sim_config, acados_sim_dims, + acados_sim_in, "x", x_current); + status = long_acados_sim_solve(capsule); + + if (status != ACADOS_SUCCESS) + { + printf("acados_solve() failed with status %d.\n", status); + } + + sim_out_get(acados_sim_config, acados_sim_dims, + acados_sim_out, "x", x_current); + + printf("\nx_current, %d\n", ii); + for (int jj = 0; jj < NX; jj++) + { + printf("%e\n", x_current[jj]); + } + } + + printf("\nPerformed %d simulation steps with acados integrator successfully.\n\n", n_sim_steps); + + // free solver + status = long_acados_sim_free(capsule); + if (status) { + printf("long_acados_sim_free() returned status %d. \n", status); + } + + long_acados_sim_solver_free_capsule(capsule); + + return status; +} diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/make_sfun_long.m b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/make_sfun_long.m new file mode 100644 index 000000000..a79ed85f1 --- /dev/null +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/c_generated_code/make_sfun_long.m @@ -0,0 +1,128 @@ +% +% Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, +% Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, +% Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, +% Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl +% +% This file is part of acados. +% +% The 2-Clause BSD License +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions are met: +% +% 1. Redistributions of source code must retain the above copyright notice, +% this list of conditions and the following disclaimer. +% +% 2. Redistributions in binary form must reproduce the above copyright notice, +% this list of conditions and the following disclaimer in the documentation +% and/or other materials provided with the distribution. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE.; +% + +SOURCES = { ... + 'long_model/long_expl_ode_fun.c', ... + 'long_model/long_expl_vde_forw.c',... + 'long_cost/long_cost_y_0_fun.c',... + 'long_cost/long_cost_y_0_fun_jac_ut_xt.c',... + 'long_cost/long_cost_y_0_hess.c',... + 'long_cost/long_cost_y_fun.c',... + 'long_cost/long_cost_y_fun_jac_ut_xt.c',... + 'long_cost/long_cost_y_hess.c',... + 'long_cost/long_cost_y_e_fun.c',... + 'long_cost/long_cost_y_e_fun_jac_ut_xt.c',... + 'long_cost/long_cost_y_e_hess.c',... + 'long_constraints/long_constr_h_fun.c', ... + 'long_constraints/long_constr_h_fun_jac_uxt_zt_hess.c', ... + 'long_constraints/long_constr_h_fun_jac_uxt_zt.c', ... + 'acados_solver_sfunction_long.c', ... + 'acados_solver_long.c' + }; + +INC_PATH = '/data/openpilot/third_party/acados/include/acados/include'; + +INCS = {['-I', fullfile(INC_PATH, 'blasfeo', 'include')], ... + ['-I', fullfile(INC_PATH, 'hpipm', 'include')], ... + ['-I', fullfile(INC_PATH, 'acados')], ... + ['-I', fullfile(INC_PATH)]}; + + + +CFLAGS = 'CFLAGS=$CFLAGS'; +LDFLAGS = 'LDFLAGS=$LDFLAGS'; +COMPFLAGS = 'COMPFLAGS=$COMPFLAGS'; +COMPDEFINES = 'COMPDEFINES=$COMPDEFINES'; + + + +LIB_PATH = ['-L', fullfile('/data/openpilot/third_party/acados/include/acados/lib')]; + +LIBS = {'-lacados', '-lhpipm', '-lblasfeo'}; + +% acados linking libraries and flags + + +mex('-v', '-O', CFLAGS, LDFLAGS, COMPFLAGS, COMPDEFINES, INCS{:}, ... + LIB_PATH, LIBS{:}, SOURCES{:}, ... + '-output', 'acados_solver_sfunction_long' ); + +fprintf( [ '\n\nSuccessfully created sfunction:\nacados_solver_sfunction_long', '.', ... + eval('mexext')] ); + + +%% print note on usage of s-function +fprintf('\n\nNote: Usage of Sfunction is as follows:\n') +input_note = 'Inputs are:\n'; +i_in = 1; +input_note = strcat(input_note, num2str(i_in), ') lbx_0 - lower bound on x for stage 0,',... + ' size [3]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') ubx_0 - upper bound on x for stage 0,',... + ' size [3]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') parameters - concatenated for all shooting nodes 0 to N+1,',... + ' size [78]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref_0, size [6]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref - concatenated for shooting nodes 1 to N-1,',... + ' size [66]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') y_ref_e, size [5]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') lh, size [4]\n '); +i_in = i_in + 1; +input_note = strcat(input_note, num2str(i_in), ') uh, size [4]\n '); +i_in = i_in + 1; + +fprintf(input_note) + +disp(' ') + +output_note = 'Outputs are:\n'; +i_out = 0; +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') u0, control input at node 0, size [1]\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') acados solver status (0 = SUCCESS)\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') KKT residual\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') x1, state at node 1\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') CPU time\n '); +i_out = i_out + 1; +output_note = strcat(output_note, num2str(i_out), ') SQP iterations\n '); + +fprintf(output_note) diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index 59cc05771..3415dd6b0 100644 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -20,11 +20,11 @@ LONG_MPC_DIR = os.path.dirname(os.path.abspath(__file__)) EXPORT_DIR = os.path.join(LONG_MPC_DIR, "c_generated_code") JSON_FILE = os.path.join(LONG_MPC_DIR, "acados_ocp_long.json") -SOURCES = ['lead0', 'lead1', 'cruise'] +SOURCES = ['lead0', 'lead1', 'cruise', 'e2e'] X_DIM = 3 U_DIM = 1 -PARAM_DIM = 5 +PARAM_DIM = 6 COST_E_DIM = 5 COST_DIM = COST_E_DIM + 1 CONSTR_DIM = 4 @@ -37,6 +37,7 @@ J_EGO_COST = 5.0 A_CHANGE_COST = 200. DANGER_ZONE_COST = 100. CRASH_DISTANCE = .5 +LEAD_DANGER_FACTOR = 0.75 LIMIT_COST = 1e6 ACADOS_SOLVER_TYPE = 'SQP_RTI' @@ -50,6 +51,7 @@ T_IDXS_LST = [index_function(idx, max_val=MAX_T, max_idx=N) for idx in range(N+1 T_IDXS = np.array(T_IDXS_LST) T_DIFFS = np.diff(T_IDXS, prepend=[0.]) MIN_ACCEL = -3.5 +MAX_ACCEL = 2.0 T_FOLLOW = 1.45 COMFORT_BRAKE = 2.5 STOP_DISTANCE = 5.5 @@ -97,8 +99,9 @@ def gen_long_model(): a_max = SX.sym('a_max') x_obstacle = SX.sym('x_obstacle') prev_a = SX.sym('prev_a') - desired_TF = SX.sym('desired_TF') - model.p = vertcat(a_min, a_max, x_obstacle, prev_a, desired_TF) + lead_t_follow = SX.sym('lead_t_follow') + lead_danger_factor = SX.sym('lead_danger_factor') + model.p = vertcat(a_min, a_max, x_obstacle, prev_a, lead_t_follow, lead_danger_factor) # dynamics model f_expl = vertcat(v_ego, a_ego, j_ego) @@ -132,12 +135,13 @@ def gen_long_ocp(): a_min, a_max = ocp.model.p[0], ocp.model.p[1] x_obstacle = ocp.model.p[2] prev_a = ocp.model.p[3] - desired_TF = ocp.model.p[4] + lead_t_follow = ocp.model.p[4] + lead_danger_factor = ocp.model.p[5] ocp.cost.yref = np.zeros((COST_DIM, )) ocp.cost.yref_e = np.zeros((COST_E_DIM, )) - desired_dist_comfort = get_safe_obstacle_distance(v_ego, desired_TF) + desired_dist_comfort = get_safe_obstacle_distance(v_ego, lead_t_follow) # The main cost in normal operation is how close you are to the "desired" distance # from an obstacle at every timestep. This obstacle can be a lead car @@ -158,12 +162,12 @@ def gen_long_ocp(): constraints = vertcat(v_ego, (a_ego - a_min), (a_max - a_ego), - ((x_obstacle - x_ego) - (3/4) * (desired_dist_comfort)) / (v_ego + 10.)) + ((x_obstacle - x_ego) - lead_danger_factor * (desired_dist_comfort)) / (v_ego + 10.)) ocp.model.con_h_expr = constraints x0 = np.zeros(X_DIM) ocp.constraints.x0 = x0 - ocp.parameter_values = np.array([-1.2, 1.2, 0.0, 0.0, T_FOLLOW]) + ocp.parameter_values = np.array([-1.2, 1.2, 0.0, 0.0, T_FOLLOW, LEAD_DANGER_FACTOR]) # We put all constraint cost weights to 0 and only set them at runtime cost_weights = np.zeros(CONSTR_DIM) @@ -200,8 +204,8 @@ def gen_long_ocp(): class LongitudinalMpc: - def __init__(self, e2e=False): - self.e2e = e2e + def __init__(self, mode='acc'): + self.mode = mode self.solver = AcadosOcpSolverCython(MODEL_NAME, ACADOS_SOLVER_TYPE, N) self.desired_TF = T_FOLLOW self.reset() @@ -236,24 +240,35 @@ class LongitudinalMpc: self.x0 = np.zeros(X_DIM) self.set_weights() - def set_weights(self, prev_accel_constraint=True, v_lead0=0, v_lead1=0): - if self.e2e: - self.set_weights_for_xva_policy() - self.params[:,0] = -10. - self.params[:,1] = 10. - self.params[:,2] = 1e5 + def set_cost_weights(self, cost_weights, constraint_cost_weights, cost_multipliers): + W = np.asfortranarray(np.diag(cost_weights)) + if self.mode == 'acc': + a_change_tf = cost_weights[4] * cost_multipliers[0] else: - self.set_weights_for_lead_policy(prev_accel_constraint, v_lead0, v_lead1) + a_change_tf = cost_weights[4] + for i in range(N): + # TODO don't hardcode A_CHANGE_COST idx + # reduce the cost on (a-a_prev) later in the horizon. + W[4,4] = a_change_tf * np.interp(T_IDXS[i], [0.0, 1.0, 2.0], [1.0, 1.0, 0.0]) + self.solver.cost_set(i, 'W', W) + # Setting the slice without the copy make the array not contiguous, + # causing issues with the C interface. + self.solver.cost_set(N, 'W', np.copy(W[:COST_E_DIM, :COST_E_DIM])) + + # Set L2 slack cost on lower bound constraints + Zl = np.array(constraint_cost_weights) + for i in range(N): + self.solver.cost_set(i, 'Zl', Zl) def get_cost_multipliers(self, v_lead0, v_lead1): v_ego = self.x0[1] v_ego_bps = [0, 10] - TFs = [1.0, 1.25, T_FOLLOW] + TFs = [1.0, 1.25, T_FOLLOW, 1.8] # KRKeegan adjustments to costs for different TFs # these were calculated using the test_longitudial.py deceleration tests - a_change_tf = interp(self.desired_TF, TFs, [.1, .8, 1.]) - j_ego_tf = interp(self.desired_TF, TFs, [.6, .8, 1.]) - d_zone_tf = interp(self.desired_TF, TFs, [1.6, 1.3, 1.]) + a_change_tf = interp(self.desired_TF, TFs, [.1, .8, 1., 1.1]) + j_ego_tf = interp(self.desired_TF, TFs, [.6, .8, 1., 1.1]) + d_zone_tf = interp(self.desired_TF, TFs, [1.6, 1.3, 1., 1.]) # KRKeegan adjustments to improve sluggish acceleration # do not apply to deceleration j_ego_v_ego = 1 @@ -264,44 +279,29 @@ class LongitudinalMpc: # Select the appropriate min/max of the options j_ego = min(j_ego_tf, j_ego_v_ego) a_change = min(a_change_tf, a_change_v_ego) - return (a_change, j_ego, d_zone_tf) + return a_change, j_ego, d_zone_tf - def set_weights_for_lead_policy(self, prev_accel_constraint=True, v_lead0=0, v_lead1=0): - a_change_cost = A_CHANGE_COST if prev_accel_constraint else 0 - cost_mulitpliers = self.get_cost_multipliers(v_lead0, v_lead1) - W = np.asfortranarray(np.diag([X_EGO_OBSTACLE_COST, X_EGO_COST, V_EGO_COST, - A_EGO_COST, a_change_cost * cost_mulitpliers[0], - J_EGO_COST * cost_mulitpliers[1]])) - for i in range(N): - W[4,4] = a_change_cost * cost_mulitpliers[0] * np.interp(T_IDXS[i], [0.0, 1.0, 2.0], [1.0, 1.0, 0.0]) - self.solver.cost_set(i, 'W', W) - # Setting the slice without the copy make the array not contiguous, - # causing issues with the C interface. - self.solver.cost_set(N, 'W', np.copy(W[:COST_E_DIM, :COST_E_DIM])) - - # Set L2 slack cost on lower bound constraints - Zl = np.array([LIMIT_COST, LIMIT_COST, LIMIT_COST, DANGER_ZONE_COST * cost_mulitpliers[2]]) - for i in range(N): - self.solver.cost_set(i, 'Zl', Zl) - - def set_weights_for_xva_policy(self): - W = np.asfortranarray(np.diag([0., 0.2, 0.25, 1., 0.0, .1])) - for i in range(N): - self.solver.cost_set(i, 'W', W) - # Setting the slice without the copy make the array not contiguous, - # causing issues with the C interface. - self.solver.cost_set(N, 'W', np.copy(W[:COST_E_DIM, :COST_E_DIM])) - - # Set L2 slack cost on lower bound constraints - Zl = np.array([LIMIT_COST, LIMIT_COST, LIMIT_COST, 0.0]) - for i in range(N): - self.solver.cost_set(i, 'Zl', Zl) + def set_weights(self, prev_accel_constraint=True, v_lead0=0, v_lead1=0): + cost_multipliers = self.get_cost_multipliers(v_lead0, v_lead1) + if self.mode == 'acc': + a_change_cost = A_CHANGE_COST if prev_accel_constraint else 0 + cost_weights = [X_EGO_OBSTACLE_COST, X_EGO_COST, V_EGO_COST, A_EGO_COST, a_change_cost * cost_multipliers[0], J_EGO_COST * cost_multipliers[1]] + constraint_cost_weights = [LIMIT_COST, LIMIT_COST, LIMIT_COST, DANGER_ZONE_COST * cost_multipliers[2]] + elif self.mode == 'blended': + cost_weights = [0., 0.2, 0.25, 1.0, 0.0, 1.0] + constraint_cost_weights = [LIMIT_COST, LIMIT_COST, LIMIT_COST, 50.0] + elif self.mode == 'e2e': + cost_weights = [0., 0.2, 0.25, 1., 0.0, .1] + constraint_cost_weights = [LIMIT_COST, LIMIT_COST, LIMIT_COST, 0.0] + else: + raise NotImplementedError(f'Planner mode {self.mode} not recognized in planner cost set') + self.set_cost_weights(cost_weights, constraint_cost_weights, cost_multipliers) def set_cur_state(self, v, a): v_prev = self.x0[1] self.x0[1] = v self.x0[2] = a - if abs(v_prev - v) > 2.: # probably only helps if v < v_prev + if abs(v_prev - v) > 2.: # probably only helps if v < v_prev for i in range(0, N+1): self.solver.set(i, 'x', self.x0) @@ -344,15 +344,20 @@ class LongitudinalMpc: if carstate.distanceLines == 1: # Traffic # At slow speeds more time, decrease time up to 60mph # in mph ~= 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 - x_vel = [0, 2.25, 4.5, 6.75, 9, 11.25, 13.5, 15.75, 18, 20.25, 22.5, 24.75, 27, 29.25, 31.5, 33.75, 36, 38.25, 40.5] - y_dist = [1.25, 1.24, 1.23, 1.22, 1.21, 1.20, 1.18, 1.16, 1.13, 1.11, 1.09, 1.07, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05, 1.05] + x_vel = [0.0, 1, 2.78, 5.56, 8.33, 11.11, 13.89, 16.67, 19.44, 22.22, 25.0, 27.78, 30.56, 33.33, 36.11, 38.89, 41.67] + y_dist = [1.1, 1.15, 1.25, 1.3, 1.3368, 1.3368, 1.3, 1.24, 1.16, 1.2, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27] self.desired_TF = np.interp(carstate.vEgo, x_vel, y_dist) elif carstate.distanceLines == 2: # Relaxed - self.desired_TF = 1.25 + x_vel = [0.0, 1, 2.78, 5.56, 8.33, 11.11, 13.89, 16.67, 19.44, 22.22, 27.78, 30.56, 33.33, 36.11, 38.89, 41.67] + y_dist = [1.3, 1.38, 1.45, 1.5045, 1.535, 1.59, 1.642, 1.683, 1.726, 1.76, 1.83, 1.9, 1.99, 2.1, 2.23, 2.4] + self.desired_TF = np.interp(carstate.vEgo, x_vel, y_dist) else: + #x_vel = [0.0, 1, 2.78, 5.56, 8.33, 11.11, 13.89, 16.67, 19.44, 22.22, 27.78, 30.56, 33.33, 36.11, 38.89, 41.67] + #y_dist = [1.3, 1.38, 1.45, 1.5045, 1.535, 1.59, 1.642, 1.683, 1.726, 1.76, 1.83, 1.9, 1.99, 2.1, 2.23, 2.4] + #self.desired_TF = np.interp(carstate.vEgo, x_vel, y_dist) self.desired_TF = T_FOLLOW - def update(self, carstate, radarstate, v_cruise, prev_accel_constraint): + def update(self, carstate, radarstate, v_cruise, x, v, a, j, prev_accel_constraint): v_ego = self.x0[1] self.status = radarstate.leadOne.status or radarstate.leadTwo.status @@ -362,27 +367,59 @@ class LongitudinalMpc: self.update_TF(carstate) self.set_weights(prev_accel_constraint=prev_accel_constraint, v_lead0=lead_xv_0[0,1], v_lead1=lead_xv_1[0,1]) - # set accel limits in params - self.params[:,0] = interp(float(self.status), [0.0, 1.0], [self.cruise_min_a, MIN_ACCEL]) - self.params[:,1] = self.cruise_max_a - # To estimate a safe distance from a moving lead, we calculate how much stopping # distance that lead needs as a minimum. We can add that to the current distance # and then treat that as a stopped car/obstacle at this new distance. lead_0_obstacle = lead_xv_0[:,0] + get_stopped_equivalence_factor(lead_xv_0[:,1], self.x_sol[:,1], self.desired_TF) lead_1_obstacle = lead_xv_1[:,0] + get_stopped_equivalence_factor(lead_xv_1[:,1], self.x_sol[:,1], self.desired_TF) - # Fake an obstacle for cruise, this ensures smooth acceleration to set speed - # when the leads are no factor. - v_lower = v_ego + (T_IDXS * self.cruise_min_a * 1.05) - v_upper = v_ego + (T_IDXS * self.cruise_max_a * 1.05) - v_cruise_clipped = np.clip(v_cruise * np.ones(N+1), - v_lower, - v_upper) - cruise_obstacle = np.cumsum(T_DIFFS * v_cruise_clipped) + get_safe_obstacle_distance(v_cruise_clipped, self.desired_TF) + # Update in ACC mode or ACC/e2e blend + if self.mode == 'acc': + self.params[:,0] = MIN_ACCEL if self.status else self.cruise_min_a + self.params[:,1] = self.cruise_max_a + self.params[:,5] = LEAD_DANGER_FACTOR + + # Fake an obstacle for cruise, this ensures smooth acceleration to set speed + # when the leads are no factor. + v_lower = v_ego + (T_IDXS * self.cruise_min_a * 1.05) + v_upper = v_ego + (T_IDXS * self.cruise_max_a * 1.05) + v_cruise_clipped = np.clip(v_cruise * np.ones(N+1), + v_lower, + v_upper) + cruise_obstacle = np.cumsum(T_DIFFS * v_cruise_clipped) + get_safe_obstacle_distance(v_cruise_clipped, self.desired_TF) + x_obstacles = np.column_stack([lead_0_obstacle, lead_1_obstacle, cruise_obstacle]) + self.source = SOURCES[np.argmin(x_obstacles[0])] + + # These are not used in ACC mode + x[:], v[:], a[:], j[:] = 0.0, 0.0, 0.0, 0.0 + + elif self.mode == 'blended': + self.params[:,0] = MIN_ACCEL + self.params[:,1] = MAX_ACCEL + self.params[:,5] = 1.0 + + x_obstacles = np.column_stack([lead_0_obstacle, + lead_1_obstacle]) + cruise_target = T_IDXS * v_cruise + x[0] + xforward = ((v[1:] + v[:-1]) / 2) * (T_IDXS[1:] - T_IDXS[:-1]) + x = np.cumsum(np.insert(xforward, 0, x[0])) + + x_and_cruise = np.column_stack([x, cruise_target]) + x = np.min(x_and_cruise, axis=1) + + self.source = 'e2e' if x_and_cruise[0,0] < x_and_cruise[0,1] else 'cruise' + + else: + raise NotImplementedError(f'Planner mode {self.mode} not recognized in planner update') + + self.yref[:,1] = x + self.yref[:,2] = v + self.yref[:,3] = a + self.yref[:,5] = j + for i in range(N): + self.solver.set(i, "yref", self.yref[i]) + self.solver.set(N, "yref", self.yref[N][:COST_E_DIM]) - x_obstacles = np.column_stack([lead_0_obstacle, lead_1_obstacle, cruise_obstacle]) - self.source = SOURCES[np.argmin(x_obstacles[0])] self.params[:,2] = np.min(x_obstacles, axis=1) self.params[:,3] = np.copy(self.prev_a) self.params[:,4] = self.desired_TF @@ -394,7 +431,24 @@ class LongitudinalMpc: else: self.crash_cnt = 0 + # Check if it got within lead comfort range + # TODO This should be done cleaner + if self.mode == 'blended': + if any((lead_0_obstacle - get_safe_obstacle_distance(self.x_sol[:,1], self.desired_TF))- self.x_sol[:,0] < 0.0): + self.source = 'lead0' + if any((lead_1_obstacle - get_safe_obstacle_distance(self.x_sol[:,1], self.desired_TF))- self.x_sol[:,0] < 0.0) and \ + (lead_1_obstacle[0] - lead_0_obstacle[0]): + self.source = 'lead1' + + + def update_with_xva(self, x, v, a): + self.params[:,0] = -10. + self.params[:,1] = 10. + self.params[:,2] = 1e5 + self.params[:,4] = self.desired_TF + self.params[:,5] = LEAD_DANGER_FACTOR + # v, and a are in local frame, but x is wrt the x[0] position # In >90degree turns, x goes to 0 (and may even be -ve) # So, we use integral(v) + x[0] to obtain the forward-distance diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index c77171d50..16f9e7292 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -6,6 +6,7 @@ from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter +from common.params import Params from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdrive.controls.lib.longcontrol import LongCtrlState @@ -13,7 +14,7 @@ from selfdrive.controls.lib.longitudinal_mpc_lib.long_mpc import LongitudinalMpc from selfdrive.controls.lib.longitudinal_mpc_lib.long_mpc import T_IDXS as T_IDXS_MPC from selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX, CONTROL_N from system.swaglog import cloudlog -from selfdrive.controls.lib.vision_turn_controller import VisionTurnController +#from selfdrive.controls.lib.vision_turn_controller import VisionTurnController from selfdrive.controls.lib.speed_limit_controller import SpeedLimitController, SpeedLimitResolver from selfdrive.controls.lib.turn_speed_controller import TurnSpeedController from selfdrive.controls.lib.events import Events @@ -81,15 +82,20 @@ def limit_accel_in_turns(v_ego, angle_steers, a_target, CP): return [a_target[0], min(a_target[1], a_x_allowed)] -class Planner: +class LongitudinalPlanner: def __init__(self, CP, init_v=0.0, init_a=0.0): self.CP = CP + self.params = Params() + self.param_read_counter = 0 + self.mpc = LongitudinalMpc() + self.read_param() self.fcw = False self.a_desired = init_a self.v_desired_filter = FirstOrderFilter(init_v, 2.0, DT_MDL) + self.t_uniform = np.arange(0.0, T_IDXS_MPC[-1] + 0.5, 0.5) self.v_desired_trajectory = np.zeros(CONTROL_N) self.a_desired_trajectory = np.zeros(CONTROL_N) @@ -100,18 +106,43 @@ class Planner: self.dp_accel_profile_ctrl = False self.dp_accel_profile = DP_ACCEL_ECO self.cruise_source = 'cruise' - self.vision_turn_controller = VisionTurnController(CP) + #self.vision_turn_controller = VisionTurnController(CP) self.speed_limit_controller = SpeedLimitController() self.events = Events() self.turn_speed_controller = TurnSpeedController() + def read_param(self): + e2e = self.params.get_bool('EndToEndLong') and self.CP.openpilotLongitudinalControl + self.mpc.mode = 'blended' if e2e else 'acc' + + def parse_model(self, model_msg): + if (len(model_msg.position.x) == 33 and + len(model_msg.velocity.x) == 33 and + len(model_msg.acceleration.x) == 33): + x = np.interp(T_IDXS_MPC, T_IDXS, model_msg.position.x) + v = np.interp(T_IDXS_MPC, T_IDXS, model_msg.velocity.x) + a = np.interp(T_IDXS_MPC, T_IDXS, model_msg.acceleration.x) + # Uniform interp so gradient is less noisy + a_sparse = np.interp(self.t_uniform, T_IDXS, model_msg.acceleration.x) + j_sparse = np.gradient(a_sparse, self.t_uniform) + j = np.interp(T_IDXS_MPC, self.t_uniform, j_sparse) + else: + x = np.zeros(len(T_IDXS_MPC)) + v = np.zeros(len(T_IDXS_MPC)) + a = np.zeros(len(T_IDXS_MPC)) + j = np.zeros(len(T_IDXS_MPC)) + return x, v, a, j + def update(self, sm): - v_ego = sm['carState'].vEgo + if self.param_read_counter % 50 == 0: + self.read_param() + self.param_read_counter += 1 # dp self.dp_accel_profile_ctrl = sm['dragonConf'].dpAccelProfileCtrl self.dp_accel_profile = sm['dragonConf'].dpAccelProfile + v_ego = sm['carState'].vEgo v_cruise_kph = sm['controlsState'].vCruise v_cruise_kph = min(v_cruise_kph, V_CRUISE_MAX) v_cruise = v_cruise_kph * CV.KPH_TO_MS @@ -152,14 +183,16 @@ class Planner: self.mpc.set_accel_limits(accel_limits_turns[0], accel_limits_turns[1]) self.mpc.set_cur_state(self.v_desired_filter.x, self.a_desired) - self.mpc.update(sm['carState'], sm['radarState'], v_cruise_sol, prev_accel_constraint) + x, v, a, j = self.parse_model(sm['modelV2']) + self.mpc.update(sm['carState'], sm['radarState'], v_cruise_sol, x, v, a, j, prev_accel_constraint) self.v_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC, self.mpc.v_solution) self.a_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC, self.mpc.a_solution) self.j_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC[:-1], self.mpc.j_solution) # TODO counter is only needed because radar is glitchy, remove once radar is gone - self.fcw = self.mpc.crash_cnt > 5 + # TODO write fcw in e2e_long mode + self.fcw = self.mpc.mode == 'acc' and self.mpc.crash_cnt > 5 if self.fcw: cloudlog.info("FCW triggered") @@ -187,8 +220,9 @@ class Planner: longitudinalPlan.solverExecutionTime = self.mpc.solve_time - longitudinalPlan.visionTurnControllerState = self.vision_turn_controller.state - longitudinalPlan.visionTurnSpeed = float(self.vision_turn_controller.v_turn) + #dp: mf modules + #longitudinalPlan.visionTurnControllerState = self.vision_turn_controller.state + #longitudinalPlan.visionTurnSpeed = float(self.vision_turn_controller.v_turn) longitudinalPlan.speedLimitControlState = self.speed_limit_controller.state longitudinalPlan.speedLimit = float(self.speed_limit_controller.speed_limit) @@ -206,7 +240,7 @@ class Planner: def cruise_solutions(self, enabled, v_ego, a_ego, v_cruise, sm): # Update controllers - self.vision_turn_controller.update(enabled, v_ego, a_ego, v_cruise, sm) + #self.vision_turn_controller.update(enabled, v_ego, a_ego, v_cruise, sm) self.events = Events() self.speed_limit_controller.update(enabled, v_ego, a_ego, sm, v_cruise, self.events) self.turn_speed_controller.update(enabled, v_ego, a_ego, sm) @@ -215,9 +249,9 @@ class Planner: a_solutions = {'cruise': float("inf")} v_solutions = {'cruise': v_cruise} - if self.vision_turn_controller.is_active: - a_solutions['turn'] = self.vision_turn_controller.a_target - v_solutions['turn'] = self.vision_turn_controller.v_turn + #if self.vision_turn_controller.is_active: + # a_solutions['turn'] = self.vision_turn_controller.a_target + # v_solutions['turn'] = self.vision_turn_controller.v_turn if self.speed_limit_controller.is_active: a_solutions['limit'] = self.speed_limit_controller.a_target diff --git a/selfdrive/controls/lib/radar_helpers.py b/selfdrive/controls/lib/radar_helpers.py index 85699866b..0e2b96668 100644 --- a/selfdrive/controls/lib/radar_helpers.py +++ b/selfdrive/controls/lib/radar_helpers.py @@ -152,7 +152,7 @@ class Cluster(): def potential_low_speed_lead(self, v_ego): # stop for stuff in front of you and low speed, even without model confirmation - return abs(self.yRel) < 1.5 and (v_ego < v_ego_stationary) and self.dRel < 25 + return abs(self.yRel) < 1.0 and (v_ego < v_ego_stationary) and self.dRel < 25 def is_potential_fcw(self, model_prob): return model_prob > .9 diff --git a/selfdrive/controls/lib/vision_turn_controller.py b/selfdrive/controls/lib/vision_turn_controller.py index 9d5e9b76e..291850c05 100644 --- a/selfdrive/controls/lib/vision_turn_controller.py +++ b/selfdrive/controls/lib/vision_turn_controller.py @@ -35,8 +35,8 @@ _ENTERING_SMOOTH_DECEL_BP = [1.3, 3.] # absolute value of lat acc ahead # Lookup table for the acceleration for the TURNING state # depending on the current lateral acceleration of the vehicle. -_TURNING_ACC_V = [0.5, 0., -0.4] # acc value -_TURNING_ACC_BP = [1.5, 2.3, 3.] # absolute value of current lat acc +_TURNING_ACC_V = [1.2, 0.94, 0.9, 0.8, -0.1] # acc value +_TURNING_ACC_BP = [1.5, 10, 12, 14, 16] # absolute value of current lat acc _LEAVING_ACC = 0.5 # Confortble acceleration to regain speed while leaving a turn. diff --git a/selfdrive/controls/plannerd.py b/selfdrive/controls/plannerd.py index 1dd55c1c4..0730cc568 100755 --- a/selfdrive/controls/plannerd.py +++ b/selfdrive/controls/plannerd.py @@ -3,7 +3,7 @@ from cereal import car from common.params import Params from common.realtime import Priority, config_realtime_process from system.swaglog import cloudlog -from selfdrive.controls.lib.longitudinal_planner import Planner +from selfdrive.controls.lib.longitudinal_planner import LongitudinalPlanner from selfdrive.controls.lib.lateral_planner import LateralPlanner import cereal.messaging as messaging from system.hardware import TICI @@ -17,13 +17,8 @@ def plannerd_thread(sm=None, pm=None): CP = car.CarParams.from_bytes(params.get("CarParams", block=True)) cloudlog.info("plannerd got CarParams: %s", CP.carName) - use_lanelines = False - wide_camera = False #params.get_bool('WideCameraOnly') - - cloudlog.event("e2e mode", on=use_lanelines) - - longitudinal_planner = Planner(CP) - lateral_planner = LateralPlanner(CP, use_lanelines=use_lanelines, wide_camera=wide_camera) + longitudinal_planner = LongitudinalPlanner(CP) + lateral_planner = LateralPlanner(CP) if sm is None: sm = messaging.SubMaster(['carControl', 'carState', 'controlsState', 'radarState', 'modelV2', 'dragonConf', 'lateralPlan', 'navInstruction', 'liveMapData'], diff --git a/selfdrive/debug/hyundai_enable_radar_points.py b/selfdrive/debug/hyundai_enable_radar_points.py index f182026aa..ac7e7102d 100755 --- a/selfdrive/debug/hyundai_enable_radar_points.py +++ b/selfdrive/debug/hyundai_enable_radar_points.py @@ -6,7 +6,7 @@ firmware versions. If you want to try on a new radar make sure to note the defau in case it's different from the other radars and you need to revert the changes. After changing the config the car should not show any faults when openpilot is not running. -These config changes are persistent accross car reboots. You need to run this script again +These config changes are persistent across car reboots. You need to run this script again to go back to the default values. USE AT YOUR OWN RISK! Safety features, like AEB and FCW, might be affected by these changes.""" diff --git a/selfdrive/locationd/laikad.py b/selfdrive/locationd/laikad.py index 830eb3320..c7f2d2cea 100755 --- a/selfdrive/locationd/laikad.py +++ b/selfdrive/locationd/laikad.py @@ -28,7 +28,7 @@ from system.swaglog import cloudlog MAX_TIME_GAP = 10 EPHEMERIS_CACHE = 'LaikadEphemeris' -DOWNLOADS_CACHE_FOLDER = "/tmp/comma_download_cache" +DOWNLOADS_CACHE_FOLDER = "/tmp/comma_download_cache/" CACHE_VERSION = 0.1 POS_FIX_RESIDUAL_THRESHOLD = 100.0 diff --git a/selfdrive/locationd/locationd b/selfdrive/locationd/locationd index 6b5a2aa62..85b03f781 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 afe1239b0..1fc6c058d 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_1694732445564659799) { - out_1694732445564659799[0] = delta_x[0] + nom_x[0]; - out_1694732445564659799[1] = delta_x[1] + nom_x[1]; - out_1694732445564659799[2] = delta_x[2] + nom_x[2]; - out_1694732445564659799[3] = delta_x[3] + nom_x[3]; - out_1694732445564659799[4] = delta_x[4] + nom_x[4]; - out_1694732445564659799[5] = delta_x[5] + nom_x[5]; - out_1694732445564659799[6] = delta_x[6] + nom_x[6]; - out_1694732445564659799[7] = delta_x[7] + nom_x[7]; - out_1694732445564659799[8] = delta_x[8] + nom_x[8]; +void err_fun(double *nom_x, double *delta_x, double *out_6920520309618378367) { + out_6920520309618378367[0] = delta_x[0] + nom_x[0]; + out_6920520309618378367[1] = delta_x[1] + nom_x[1]; + out_6920520309618378367[2] = delta_x[2] + nom_x[2]; + out_6920520309618378367[3] = delta_x[3] + nom_x[3]; + out_6920520309618378367[4] = delta_x[4] + nom_x[4]; + out_6920520309618378367[5] = delta_x[5] + nom_x[5]; + out_6920520309618378367[6] = delta_x[6] + nom_x[6]; + out_6920520309618378367[7] = delta_x[7] + nom_x[7]; + out_6920520309618378367[8] = delta_x[8] + nom_x[8]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_425293828362209991) { - out_425293828362209991[0] = -nom_x[0] + true_x[0]; - out_425293828362209991[1] = -nom_x[1] + true_x[1]; - out_425293828362209991[2] = -nom_x[2] + true_x[2]; - out_425293828362209991[3] = -nom_x[3] + true_x[3]; - out_425293828362209991[4] = -nom_x[4] + true_x[4]; - out_425293828362209991[5] = -nom_x[5] + true_x[5]; - out_425293828362209991[6] = -nom_x[6] + true_x[6]; - out_425293828362209991[7] = -nom_x[7] + true_x[7]; - out_425293828362209991[8] = -nom_x[8] + true_x[8]; +void inv_err_fun(double *nom_x, double *true_x, double *out_5302696854806540781) { + out_5302696854806540781[0] = -nom_x[0] + true_x[0]; + out_5302696854806540781[1] = -nom_x[1] + true_x[1]; + out_5302696854806540781[2] = -nom_x[2] + true_x[2]; + out_5302696854806540781[3] = -nom_x[3] + true_x[3]; + out_5302696854806540781[4] = -nom_x[4] + true_x[4]; + out_5302696854806540781[5] = -nom_x[5] + true_x[5]; + out_5302696854806540781[6] = -nom_x[6] + true_x[6]; + out_5302696854806540781[7] = -nom_x[7] + true_x[7]; + out_5302696854806540781[8] = -nom_x[8] + true_x[8]; } -void H_mod_fun(double *state, double *out_7930286674743613659) { - out_7930286674743613659[0] = 1.0; - out_7930286674743613659[1] = 0; - out_7930286674743613659[2] = 0; - out_7930286674743613659[3] = 0; - out_7930286674743613659[4] = 0; - out_7930286674743613659[5] = 0; - out_7930286674743613659[6] = 0; - out_7930286674743613659[7] = 0; - out_7930286674743613659[8] = 0; - out_7930286674743613659[9] = 0; - out_7930286674743613659[10] = 1.0; - out_7930286674743613659[11] = 0; - out_7930286674743613659[12] = 0; - out_7930286674743613659[13] = 0; - out_7930286674743613659[14] = 0; - out_7930286674743613659[15] = 0; - out_7930286674743613659[16] = 0; - out_7930286674743613659[17] = 0; - out_7930286674743613659[18] = 0; - out_7930286674743613659[19] = 0; - out_7930286674743613659[20] = 1.0; - out_7930286674743613659[21] = 0; - out_7930286674743613659[22] = 0; - out_7930286674743613659[23] = 0; - out_7930286674743613659[24] = 0; - out_7930286674743613659[25] = 0; - out_7930286674743613659[26] = 0; - out_7930286674743613659[27] = 0; - out_7930286674743613659[28] = 0; - out_7930286674743613659[29] = 0; - out_7930286674743613659[30] = 1.0; - out_7930286674743613659[31] = 0; - out_7930286674743613659[32] = 0; - out_7930286674743613659[33] = 0; - out_7930286674743613659[34] = 0; - out_7930286674743613659[35] = 0; - out_7930286674743613659[36] = 0; - out_7930286674743613659[37] = 0; - out_7930286674743613659[38] = 0; - out_7930286674743613659[39] = 0; - out_7930286674743613659[40] = 1.0; - out_7930286674743613659[41] = 0; - out_7930286674743613659[42] = 0; - out_7930286674743613659[43] = 0; - out_7930286674743613659[44] = 0; - out_7930286674743613659[45] = 0; - out_7930286674743613659[46] = 0; - out_7930286674743613659[47] = 0; - out_7930286674743613659[48] = 0; - out_7930286674743613659[49] = 0; - out_7930286674743613659[50] = 1.0; - out_7930286674743613659[51] = 0; - out_7930286674743613659[52] = 0; - out_7930286674743613659[53] = 0; - out_7930286674743613659[54] = 0; - out_7930286674743613659[55] = 0; - out_7930286674743613659[56] = 0; - out_7930286674743613659[57] = 0; - out_7930286674743613659[58] = 0; - out_7930286674743613659[59] = 0; - out_7930286674743613659[60] = 1.0; - out_7930286674743613659[61] = 0; - out_7930286674743613659[62] = 0; - out_7930286674743613659[63] = 0; - out_7930286674743613659[64] = 0; - out_7930286674743613659[65] = 0; - out_7930286674743613659[66] = 0; - out_7930286674743613659[67] = 0; - out_7930286674743613659[68] = 0; - out_7930286674743613659[69] = 0; - out_7930286674743613659[70] = 1.0; - out_7930286674743613659[71] = 0; - out_7930286674743613659[72] = 0; - out_7930286674743613659[73] = 0; - out_7930286674743613659[74] = 0; - out_7930286674743613659[75] = 0; - out_7930286674743613659[76] = 0; - out_7930286674743613659[77] = 0; - out_7930286674743613659[78] = 0; - out_7930286674743613659[79] = 0; - out_7930286674743613659[80] = 1.0; +void H_mod_fun(double *state, double *out_4449921069090285960) { + out_4449921069090285960[0] = 1.0; + out_4449921069090285960[1] = 0; + out_4449921069090285960[2] = 0; + out_4449921069090285960[3] = 0; + out_4449921069090285960[4] = 0; + out_4449921069090285960[5] = 0; + out_4449921069090285960[6] = 0; + out_4449921069090285960[7] = 0; + out_4449921069090285960[8] = 0; + out_4449921069090285960[9] = 0; + out_4449921069090285960[10] = 1.0; + out_4449921069090285960[11] = 0; + out_4449921069090285960[12] = 0; + out_4449921069090285960[13] = 0; + out_4449921069090285960[14] = 0; + out_4449921069090285960[15] = 0; + out_4449921069090285960[16] = 0; + out_4449921069090285960[17] = 0; + out_4449921069090285960[18] = 0; + out_4449921069090285960[19] = 0; + out_4449921069090285960[20] = 1.0; + out_4449921069090285960[21] = 0; + out_4449921069090285960[22] = 0; + out_4449921069090285960[23] = 0; + out_4449921069090285960[24] = 0; + out_4449921069090285960[25] = 0; + out_4449921069090285960[26] = 0; + out_4449921069090285960[27] = 0; + out_4449921069090285960[28] = 0; + out_4449921069090285960[29] = 0; + out_4449921069090285960[30] = 1.0; + out_4449921069090285960[31] = 0; + out_4449921069090285960[32] = 0; + out_4449921069090285960[33] = 0; + out_4449921069090285960[34] = 0; + out_4449921069090285960[35] = 0; + out_4449921069090285960[36] = 0; + out_4449921069090285960[37] = 0; + out_4449921069090285960[38] = 0; + out_4449921069090285960[39] = 0; + out_4449921069090285960[40] = 1.0; + out_4449921069090285960[41] = 0; + out_4449921069090285960[42] = 0; + out_4449921069090285960[43] = 0; + out_4449921069090285960[44] = 0; + out_4449921069090285960[45] = 0; + out_4449921069090285960[46] = 0; + out_4449921069090285960[47] = 0; + out_4449921069090285960[48] = 0; + out_4449921069090285960[49] = 0; + out_4449921069090285960[50] = 1.0; + out_4449921069090285960[51] = 0; + out_4449921069090285960[52] = 0; + out_4449921069090285960[53] = 0; + out_4449921069090285960[54] = 0; + out_4449921069090285960[55] = 0; + out_4449921069090285960[56] = 0; + out_4449921069090285960[57] = 0; + out_4449921069090285960[58] = 0; + out_4449921069090285960[59] = 0; + out_4449921069090285960[60] = 1.0; + out_4449921069090285960[61] = 0; + out_4449921069090285960[62] = 0; + out_4449921069090285960[63] = 0; + out_4449921069090285960[64] = 0; + out_4449921069090285960[65] = 0; + out_4449921069090285960[66] = 0; + out_4449921069090285960[67] = 0; + out_4449921069090285960[68] = 0; + out_4449921069090285960[69] = 0; + out_4449921069090285960[70] = 1.0; + out_4449921069090285960[71] = 0; + out_4449921069090285960[72] = 0; + out_4449921069090285960[73] = 0; + out_4449921069090285960[74] = 0; + out_4449921069090285960[75] = 0; + out_4449921069090285960[76] = 0; + out_4449921069090285960[77] = 0; + out_4449921069090285960[78] = 0; + out_4449921069090285960[79] = 0; + out_4449921069090285960[80] = 1.0; } -void f_fun(double *state, double dt, double *out_4344037338675685761) { - out_4344037338675685761[0] = state[0]; - out_4344037338675685761[1] = state[1]; - out_4344037338675685761[2] = state[2]; - out_4344037338675685761[3] = state[3]; - out_4344037338675685761[4] = state[4]; - out_4344037338675685761[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_4344037338675685761[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_4344037338675685761[7] = state[7]; - out_4344037338675685761[8] = state[8]; +void f_fun(double *state, double dt, double *out_7814524287760230042) { + out_7814524287760230042[0] = state[0]; + out_7814524287760230042[1] = state[1]; + out_7814524287760230042[2] = state[2]; + out_7814524287760230042[3] = state[3]; + out_7814524287760230042[4] = state[4]; + out_7814524287760230042[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_7814524287760230042[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_7814524287760230042[7] = state[7]; + out_7814524287760230042[8] = state[8]; } -void F_fun(double *state, double dt, double *out_5293371990253890476) { - out_5293371990253890476[0] = 1; - out_5293371990253890476[1] = 0; - out_5293371990253890476[2] = 0; - out_5293371990253890476[3] = 0; - out_5293371990253890476[4] = 0; - out_5293371990253890476[5] = 0; - out_5293371990253890476[6] = 0; - out_5293371990253890476[7] = 0; - out_5293371990253890476[8] = 0; - out_5293371990253890476[9] = 0; - out_5293371990253890476[10] = 1; - out_5293371990253890476[11] = 0; - out_5293371990253890476[12] = 0; - out_5293371990253890476[13] = 0; - out_5293371990253890476[14] = 0; - out_5293371990253890476[15] = 0; - out_5293371990253890476[16] = 0; - out_5293371990253890476[17] = 0; - out_5293371990253890476[18] = 0; - out_5293371990253890476[19] = 0; - out_5293371990253890476[20] = 1; - out_5293371990253890476[21] = 0; - out_5293371990253890476[22] = 0; - out_5293371990253890476[23] = 0; - out_5293371990253890476[24] = 0; - out_5293371990253890476[25] = 0; - out_5293371990253890476[26] = 0; - out_5293371990253890476[27] = 0; - out_5293371990253890476[28] = 0; - out_5293371990253890476[29] = 0; - out_5293371990253890476[30] = 1; - out_5293371990253890476[31] = 0; - out_5293371990253890476[32] = 0; - out_5293371990253890476[33] = 0; - out_5293371990253890476[34] = 0; - out_5293371990253890476[35] = 0; - out_5293371990253890476[36] = 0; - out_5293371990253890476[37] = 0; - out_5293371990253890476[38] = 0; - out_5293371990253890476[39] = 0; - out_5293371990253890476[40] = 1; - out_5293371990253890476[41] = 0; - out_5293371990253890476[42] = 0; - out_5293371990253890476[43] = 0; - out_5293371990253890476[44] = 0; - out_5293371990253890476[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_5293371990253890476[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); - out_5293371990253890476[47] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_5293371990253890476[48] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_5293371990253890476[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_5293371990253890476[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; - out_5293371990253890476[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); - out_5293371990253890476[52] = dt*stiffness_front*state[0]/(mass*state[1]); - out_5293371990253890476[53] = -9.8000000000000007*dt; - out_5293371990253890476[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_5293371990253890476[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); - out_5293371990253890476[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_5293371990253890476[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_5293371990253890476[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_5293371990253890476[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); - out_5293371990253890476[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_5293371990253890476[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_5293371990253890476[62] = 0; - out_5293371990253890476[63] = 0; - out_5293371990253890476[64] = 0; - out_5293371990253890476[65] = 0; - out_5293371990253890476[66] = 0; - out_5293371990253890476[67] = 0; - out_5293371990253890476[68] = 0; - out_5293371990253890476[69] = 0; - out_5293371990253890476[70] = 1; - out_5293371990253890476[71] = 0; - out_5293371990253890476[72] = 0; - out_5293371990253890476[73] = 0; - out_5293371990253890476[74] = 0; - out_5293371990253890476[75] = 0; - out_5293371990253890476[76] = 0; - out_5293371990253890476[77] = 0; - out_5293371990253890476[78] = 0; - out_5293371990253890476[79] = 0; - out_5293371990253890476[80] = 1; +void F_fun(double *state, double dt, double *out_411706590768419199) { + out_411706590768419199[0] = 1; + out_411706590768419199[1] = 0; + out_411706590768419199[2] = 0; + out_411706590768419199[3] = 0; + out_411706590768419199[4] = 0; + out_411706590768419199[5] = 0; + out_411706590768419199[6] = 0; + out_411706590768419199[7] = 0; + out_411706590768419199[8] = 0; + out_411706590768419199[9] = 0; + out_411706590768419199[10] = 1; + out_411706590768419199[11] = 0; + out_411706590768419199[12] = 0; + out_411706590768419199[13] = 0; + out_411706590768419199[14] = 0; + out_411706590768419199[15] = 0; + out_411706590768419199[16] = 0; + out_411706590768419199[17] = 0; + out_411706590768419199[18] = 0; + out_411706590768419199[19] = 0; + out_411706590768419199[20] = 1; + out_411706590768419199[21] = 0; + out_411706590768419199[22] = 0; + out_411706590768419199[23] = 0; + out_411706590768419199[24] = 0; + out_411706590768419199[25] = 0; + out_411706590768419199[26] = 0; + out_411706590768419199[27] = 0; + out_411706590768419199[28] = 0; + out_411706590768419199[29] = 0; + out_411706590768419199[30] = 1; + out_411706590768419199[31] = 0; + out_411706590768419199[32] = 0; + out_411706590768419199[33] = 0; + out_411706590768419199[34] = 0; + out_411706590768419199[35] = 0; + out_411706590768419199[36] = 0; + out_411706590768419199[37] = 0; + out_411706590768419199[38] = 0; + out_411706590768419199[39] = 0; + out_411706590768419199[40] = 1; + out_411706590768419199[41] = 0; + out_411706590768419199[42] = 0; + out_411706590768419199[43] = 0; + out_411706590768419199[44] = 0; + out_411706590768419199[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_411706590768419199[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); + out_411706590768419199[47] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_411706590768419199[48] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_411706590768419199[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_411706590768419199[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; + out_411706590768419199[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); + out_411706590768419199[52] = dt*stiffness_front*state[0]/(mass*state[1]); + out_411706590768419199[53] = -9.8000000000000007*dt; + out_411706590768419199[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_411706590768419199[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); + out_411706590768419199[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_411706590768419199[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_411706590768419199[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_411706590768419199[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); + out_411706590768419199[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_411706590768419199[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_411706590768419199[62] = 0; + out_411706590768419199[63] = 0; + out_411706590768419199[64] = 0; + out_411706590768419199[65] = 0; + out_411706590768419199[66] = 0; + out_411706590768419199[67] = 0; + out_411706590768419199[68] = 0; + out_411706590768419199[69] = 0; + out_411706590768419199[70] = 1; + out_411706590768419199[71] = 0; + out_411706590768419199[72] = 0; + out_411706590768419199[73] = 0; + out_411706590768419199[74] = 0; + out_411706590768419199[75] = 0; + out_411706590768419199[76] = 0; + out_411706590768419199[77] = 0; + out_411706590768419199[78] = 0; + out_411706590768419199[79] = 0; + out_411706590768419199[80] = 1; } -void h_25(double *state, double *unused, double *out_6157449178476545177) { - out_6157449178476545177[0] = state[6]; +void h_25(double *state, double *unused, double *out_624214668376866341) { + out_624214668376866341[0] = state[6]; } -void H_25(double *state, double *unused, double *out_2441201791329547719) { - out_2441201791329547719[0] = 0; - out_2441201791329547719[1] = 0; - out_2441201791329547719[2] = 0; - out_2441201791329547719[3] = 0; - out_2441201791329547719[4] = 0; - out_2441201791329547719[5] = 0; - out_2441201791329547719[6] = 1; - out_2441201791329547719[7] = 0; - out_2441201791329547719[8] = 0; +void H_25(double *state, double *unused, double *out_4996036056466787679) { + out_4996036056466787679[0] = 0; + out_4996036056466787679[1] = 0; + out_4996036056466787679[2] = 0; + out_4996036056466787679[3] = 0; + out_4996036056466787679[4] = 0; + out_4996036056466787679[5] = 0; + out_4996036056466787679[6] = 1; + out_4996036056466787679[7] = 0; + out_4996036056466787679[8] = 0; } -void h_24(double *state, double *unused, double *out_7099854435825100532) { - out_7099854435825100532[0] = state[4]; - out_7099854435825100532[1] = state[5]; +void h_24(double *state, double *unused, double *out_7726624714175041949) { + out_7726624714175041949[0] = state[4]; + out_7726624714175041949[1] = state[5]; } -void H_24(double *state, double *unused, double *out_8562867689391287577) { - out_8562867689391287577[0] = 0; - out_8562867689391287577[1] = 0; - out_8562867689391287577[2] = 0; - out_8562867689391287577[3] = 0; - out_8562867689391287577[4] = 1; - out_8562867689391287577[5] = 0; - out_8562867689391287577[6] = 0; - out_8562867689391287577[7] = 0; - out_8562867689391287577[8] = 0; - out_8562867689391287577[9] = 0; - out_8562867689391287577[10] = 0; - out_8562867689391287577[11] = 0; - out_8562867689391287577[12] = 0; - out_8562867689391287577[13] = 0; - out_8562867689391287577[14] = 1; - out_8562867689391287577[15] = 0; - out_8562867689391287577[16] = 0; - out_8562867689391287577[17] = 0; +void H_24(double *state, double *unused, double *out_8630386512586775674) { + out_8630386512586775674[0] = 0; + out_8630386512586775674[1] = 0; + out_8630386512586775674[2] = 0; + out_8630386512586775674[3] = 0; + out_8630386512586775674[4] = 1; + out_8630386512586775674[5] = 0; + out_8630386512586775674[6] = 0; + out_8630386512586775674[7] = 0; + out_8630386512586775674[8] = 0; + out_8630386512586775674[9] = 0; + out_8630386512586775674[10] = 0; + out_8630386512586775674[11] = 0; + out_8630386512586775674[12] = 0; + out_8630386512586775674[13] = 0; + out_8630386512586775674[14] = 1; + out_8630386512586775674[15] = 0; + out_8630386512586775674[16] = 0; + out_8630386512586775674[17] = 0; } -void h_30(double *state, double *unused, double *out_8651845366978984089) { - out_8651845366978984089[0] = state[4]; +void h_30(double *state, double *unused, double *out_2951458280903618951) { + out_2951458280903618951[0] = state[4]; } -void H_30(double *state, double *unused, double *out_77131167177700908) { - out_77131167177700908[0] = 0; - out_77131167177700908[1] = 0; - out_77131167177700908[2] = 0; - out_77131167177700908[3] = 0; - out_77131167177700908[4] = 1; - out_77131167177700908[5] = 0; - out_77131167177700908[6] = 0; - out_77131167177700908[7] = 0; - out_77131167177700908[8] = 0; +void H_30(double *state, double *unused, double *out_5125375003610027749) { + out_5125375003610027749[0] = 0; + out_5125375003610027749[1] = 0; + out_5125375003610027749[2] = 0; + out_5125375003610027749[3] = 0; + out_5125375003610027749[4] = 1; + out_5125375003610027749[5] = 0; + out_5125375003610027749[6] = 0; + out_5125375003610027749[7] = 0; + out_5125375003610027749[8] = 0; } -void h_26(double *state, double *unused, double *out_7484101565902842352) { - out_7484101565902842352[0] = state[7]; +void h_26(double *state, double *unused, double *out_464815008745451065) { + out_464815008745451065[0] = state[7]; } -void H_26(double *state, double *unused, double *out_6182705110203603943) { - out_6182705110203603943[0] = 0; - out_6182705110203603943[1] = 0; - out_6182705110203603943[2] = 0; - out_6182705110203603943[3] = 0; - out_6182705110203603943[4] = 0; - out_6182705110203603943[5] = 0; - out_6182705110203603943[6] = 0; - out_6182705110203603943[7] = 1; - out_6182705110203603943[8] = 0; +void H_26(double *state, double *unused, double *out_8737539375340843903) { + out_8737539375340843903[0] = 0; + out_8737539375340843903[1] = 0; + out_8737539375340843903[2] = 0; + out_8737539375340843903[3] = 0; + out_8737539375340843903[4] = 0; + out_8737539375340843903[5] = 0; + out_8737539375340843903[6] = 0; + out_8737539375340843903[7] = 1; + out_8737539375340843903[8] = 0; } -void h_27(double *state, double *unused, double *out_3701132213428165031) { - out_3701132213428165031[0] = state[3]; +void h_27(double *state, double *unused, double *out_2651633144370590248) { + out_2651633144370590248[0] = state[3]; } -void H_27(double *state, double *unused, double *out_9143661433257580828) { - out_9143661433257580828[0] = 0; - out_9143661433257580828[1] = 0; - out_9143661433257580828[2] = 0; - out_9143661433257580828[3] = 1; - out_9143661433257580828[4] = 0; - out_9143661433257580828[5] = 0; - out_9143661433257580828[6] = 0; - out_9143661433257580828[7] = 0; - out_9143661433257580828[8] = 0; +void H_27(double *state, double *unused, double *out_7300138315410452660) { + out_7300138315410452660[0] = 0; + out_7300138315410452660[1] = 0; + out_7300138315410452660[2] = 0; + out_7300138315410452660[3] = 1; + out_7300138315410452660[4] = 0; + out_7300138315410452660[5] = 0; + out_7300138315410452660[6] = 0; + out_7300138315410452660[7] = 0; + out_7300138315410452660[8] = 0; } -void h_29(double *state, double *unused, double *out_3425938151143659142) { - out_3425938151143659142[0] = state[1]; +void h_29(double *state, double *unused, double *out_2926827206655096137) { + out_2926827206655096137[0] = state[1]; } -void H_29(double *state, double *unused, double *out_6458666777142763733) { - out_6458666777142763733[0] = 0; - out_6458666777142763733[1] = 1; - out_6458666777142763733[2] = 0; - out_6458666777142763733[3] = 0; - out_6458666777142763733[4] = 0; - out_6458666777142763733[5] = 0; - out_6458666777142763733[6] = 0; - out_6458666777142763733[7] = 0; - out_6458666777142763733[8] = 0; +void H_29(double *state, double *unused, double *out_4615143659295635565) { + out_4615143659295635565[0] = 0; + out_4615143659295635565[1] = 1; + out_4615143659295635565[2] = 0; + out_4615143659295635565[3] = 0; + out_4615143659295635565[4] = 0; + out_4615143659295635565[5] = 0; + out_4615143659295635565[6] = 0; + out_4615143659295635565[7] = 0; + out_4615143659295635565[8] = 0; } -void h_28(double *state, double *unused, double *out_6305537534236862682) { - out_6305537534236862682[0] = state[0]; +void h_28(double *state, double *unused, double *out_2833450886970242207) { + out_2833450886970242207[0] = state[0]; } -void H_28(double *state, double *unused, double *out_4495036505577437482) { - out_4495036505577437482[0] = 1; - out_4495036505577437482[1] = 0; - out_4495036505577437482[2] = 0; - out_4495036505577437482[3] = 0; - out_4495036505577437482[4] = 0; - out_4495036505577437482[5] = 0; - out_4495036505577437482[6] = 0; - out_4495036505577437482[7] = 0; - out_4495036505577437482[8] = 0; +void H_28(double *state, double *unused, double *out_8749201397344385477) { + out_8749201397344385477[0] = 1; + out_8749201397344385477[1] = 0; + out_8749201397344385477[2] = 0; + out_8749201397344385477[3] = 0; + out_8749201397344385477[4] = 0; + out_8749201397344385477[5] = 0; + out_8749201397344385477[6] = 0; + out_8749201397344385477[7] = 0; + out_8749201397344385477[8] = 0; } -void h_31(double *state, double *unused, double *out_206144799825270684) { - out_206144799825270684[0] = state[8]; +void h_31(double *state, double *unused, double *out_899408730661372230) { + out_899408730661372230[0] = state[8]; } -void H_31(double *state, double *unused, double *out_6808913212436955419) { - out_6808913212436955419[0] = 0; - out_6808913212436955419[1] = 0; - out_6808913212436955419[2] = 0; - out_6808913212436955419[3] = 0; - out_6808913212436955419[4] = 0; - out_6808913212436955419[5] = 0; - out_6808913212436955419[6] = 0; - out_6808913212436955419[7] = 0; - out_6808913212436955419[8] = 1; +void H_31(double *state, double *unused, double *out_4965390094589827251) { + out_4965390094589827251[0] = 0; + out_4965390094589827251[1] = 0; + out_4965390094589827251[2] = 0; + out_4965390094589827251[3] = 0; + out_4965390094589827251[4] = 0; + out_4965390094589827251[5] = 0; + out_4965390094589827251[6] = 0; + out_4965390094589827251[7] = 0; + out_4965390094589827251[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_1694732445564659799) { - err_fun(nom_x, delta_x, out_1694732445564659799); +void car_err_fun(double *nom_x, double *delta_x, double *out_6920520309618378367) { + err_fun(nom_x, delta_x, out_6920520309618378367); } -void car_inv_err_fun(double *nom_x, double *true_x, double *out_425293828362209991) { - inv_err_fun(nom_x, true_x, out_425293828362209991); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_5302696854806540781) { + inv_err_fun(nom_x, true_x, out_5302696854806540781); } -void car_H_mod_fun(double *state, double *out_7930286674743613659) { - H_mod_fun(state, out_7930286674743613659); +void car_H_mod_fun(double *state, double *out_4449921069090285960) { + H_mod_fun(state, out_4449921069090285960); } -void car_f_fun(double *state, double dt, double *out_4344037338675685761) { - f_fun(state, dt, out_4344037338675685761); +void car_f_fun(double *state, double dt, double *out_7814524287760230042) { + f_fun(state, dt, out_7814524287760230042); } -void car_F_fun(double *state, double dt, double *out_5293371990253890476) { - F_fun(state, dt, out_5293371990253890476); +void car_F_fun(double *state, double dt, double *out_411706590768419199) { + F_fun(state, dt, out_411706590768419199); } -void car_h_25(double *state, double *unused, double *out_6157449178476545177) { - h_25(state, unused, out_6157449178476545177); +void car_h_25(double *state, double *unused, double *out_624214668376866341) { + h_25(state, unused, out_624214668376866341); } -void car_H_25(double *state, double *unused, double *out_2441201791329547719) { - H_25(state, unused, out_2441201791329547719); +void car_H_25(double *state, double *unused, double *out_4996036056466787679) { + H_25(state, unused, out_4996036056466787679); } -void car_h_24(double *state, double *unused, double *out_7099854435825100532) { - h_24(state, unused, out_7099854435825100532); +void car_h_24(double *state, double *unused, double *out_7726624714175041949) { + h_24(state, unused, out_7726624714175041949); } -void car_H_24(double *state, double *unused, double *out_8562867689391287577) { - H_24(state, unused, out_8562867689391287577); +void car_H_24(double *state, double *unused, double *out_8630386512586775674) { + H_24(state, unused, out_8630386512586775674); } -void car_h_30(double *state, double *unused, double *out_8651845366978984089) { - h_30(state, unused, out_8651845366978984089); +void car_h_30(double *state, double *unused, double *out_2951458280903618951) { + h_30(state, unused, out_2951458280903618951); } -void car_H_30(double *state, double *unused, double *out_77131167177700908) { - H_30(state, unused, out_77131167177700908); +void car_H_30(double *state, double *unused, double *out_5125375003610027749) { + H_30(state, unused, out_5125375003610027749); } -void car_h_26(double *state, double *unused, double *out_7484101565902842352) { - h_26(state, unused, out_7484101565902842352); +void car_h_26(double *state, double *unused, double *out_464815008745451065) { + h_26(state, unused, out_464815008745451065); } -void car_H_26(double *state, double *unused, double *out_6182705110203603943) { - H_26(state, unused, out_6182705110203603943); +void car_H_26(double *state, double *unused, double *out_8737539375340843903) { + H_26(state, unused, out_8737539375340843903); } -void car_h_27(double *state, double *unused, double *out_3701132213428165031) { - h_27(state, unused, out_3701132213428165031); +void car_h_27(double *state, double *unused, double *out_2651633144370590248) { + h_27(state, unused, out_2651633144370590248); } -void car_H_27(double *state, double *unused, double *out_9143661433257580828) { - H_27(state, unused, out_9143661433257580828); +void car_H_27(double *state, double *unused, double *out_7300138315410452660) { + H_27(state, unused, out_7300138315410452660); } -void car_h_29(double *state, double *unused, double *out_3425938151143659142) { - h_29(state, unused, out_3425938151143659142); +void car_h_29(double *state, double *unused, double *out_2926827206655096137) { + h_29(state, unused, out_2926827206655096137); } -void car_H_29(double *state, double *unused, double *out_6458666777142763733) { - H_29(state, unused, out_6458666777142763733); +void car_H_29(double *state, double *unused, double *out_4615143659295635565) { + H_29(state, unused, out_4615143659295635565); } -void car_h_28(double *state, double *unused, double *out_6305537534236862682) { - h_28(state, unused, out_6305537534236862682); +void car_h_28(double *state, double *unused, double *out_2833450886970242207) { + h_28(state, unused, out_2833450886970242207); } -void car_H_28(double *state, double *unused, double *out_4495036505577437482) { - H_28(state, unused, out_4495036505577437482); +void car_H_28(double *state, double *unused, double *out_8749201397344385477) { + H_28(state, unused, out_8749201397344385477); } -void car_h_31(double *state, double *unused, double *out_206144799825270684) { - h_31(state, unused, out_206144799825270684); +void car_h_31(double *state, double *unused, double *out_899408730661372230) { + h_31(state, unused, out_899408730661372230); } -void car_H_31(double *state, double *unused, double *out_6808913212436955419) { - H_31(state, unused, out_6808913212436955419); +void car_H_31(double *state, double *unused, double *out_4965390094589827251) { + H_31(state, unused, out_4965390094589827251); } 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 1f77a1b3e..9eb39d06c 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_1694732445564659799); -void car_inv_err_fun(double *nom_x, double *true_x, double *out_425293828362209991); -void car_H_mod_fun(double *state, double *out_7930286674743613659); -void car_f_fun(double *state, double dt, double *out_4344037338675685761); -void car_F_fun(double *state, double dt, double *out_5293371990253890476); -void car_h_25(double *state, double *unused, double *out_6157449178476545177); -void car_H_25(double *state, double *unused, double *out_2441201791329547719); -void car_h_24(double *state, double *unused, double *out_7099854435825100532); -void car_H_24(double *state, double *unused, double *out_8562867689391287577); -void car_h_30(double *state, double *unused, double *out_8651845366978984089); -void car_H_30(double *state, double *unused, double *out_77131167177700908); -void car_h_26(double *state, double *unused, double *out_7484101565902842352); -void car_H_26(double *state, double *unused, double *out_6182705110203603943); -void car_h_27(double *state, double *unused, double *out_3701132213428165031); -void car_H_27(double *state, double *unused, double *out_9143661433257580828); -void car_h_29(double *state, double *unused, double *out_3425938151143659142); -void car_H_29(double *state, double *unused, double *out_6458666777142763733); -void car_h_28(double *state, double *unused, double *out_6305537534236862682); -void car_H_28(double *state, double *unused, double *out_4495036505577437482); -void car_h_31(double *state, double *unused, double *out_206144799825270684); -void car_H_31(double *state, double *unused, double *out_6808913212436955419); +void car_err_fun(double *nom_x, double *delta_x, double *out_6920520309618378367); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_5302696854806540781); +void car_H_mod_fun(double *state, double *out_4449921069090285960); +void car_f_fun(double *state, double dt, double *out_7814524287760230042); +void car_F_fun(double *state, double dt, double *out_411706590768419199); +void car_h_25(double *state, double *unused, double *out_624214668376866341); +void car_H_25(double *state, double *unused, double *out_4996036056466787679); +void car_h_24(double *state, double *unused, double *out_7726624714175041949); +void car_H_24(double *state, double *unused, double *out_8630386512586775674); +void car_h_30(double *state, double *unused, double *out_2951458280903618951); +void car_H_30(double *state, double *unused, double *out_5125375003610027749); +void car_h_26(double *state, double *unused, double *out_464815008745451065); +void car_H_26(double *state, double *unused, double *out_8737539375340843903); +void car_h_27(double *state, double *unused, double *out_2651633144370590248); +void car_H_27(double *state, double *unused, double *out_7300138315410452660); +void car_h_29(double *state, double *unused, double *out_2926827206655096137); +void car_H_29(double *state, double *unused, double *out_4615143659295635565); +void car_h_28(double *state, double *unused, double *out_2833450886970242207); +void car_H_28(double *state, double *unused, double *out_8749201397344385477); +void car_h_31(double *state, double *unused, double *out_899408730661372230); +void car_H_31(double *state, double *unused, double *out_4965390094589827251); 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/gnss.cpp b/selfdrive/locationd/models/generated/gnss.cpp index 7fae7f279..1183c753c 100644 --- a/selfdrive/locationd/models/generated/gnss.cpp +++ b/selfdrive/locationd/models/generated/gnss.cpp @@ -17,354 +17,354 @@ const static double MAHA_THRESH_21 = 3.8414588206941227; * * * This file is part of 'ekf' * ******************************************************************************/ -void err_fun(double *nom_x, double *delta_x, double *out_7861368562585023949) { - out_7861368562585023949[0] = delta_x[0] + nom_x[0]; - out_7861368562585023949[1] = delta_x[1] + nom_x[1]; - out_7861368562585023949[2] = delta_x[2] + nom_x[2]; - out_7861368562585023949[3] = delta_x[3] + nom_x[3]; - out_7861368562585023949[4] = delta_x[4] + nom_x[4]; - out_7861368562585023949[5] = delta_x[5] + nom_x[5]; - out_7861368562585023949[6] = delta_x[6] + nom_x[6]; - out_7861368562585023949[7] = delta_x[7] + nom_x[7]; - out_7861368562585023949[8] = delta_x[8] + nom_x[8]; - out_7861368562585023949[9] = delta_x[9] + nom_x[9]; - out_7861368562585023949[10] = delta_x[10] + nom_x[10]; +void err_fun(double *nom_x, double *delta_x, double *out_2097260997154060327) { + out_2097260997154060327[0] = delta_x[0] + nom_x[0]; + out_2097260997154060327[1] = delta_x[1] + nom_x[1]; + out_2097260997154060327[2] = delta_x[2] + nom_x[2]; + out_2097260997154060327[3] = delta_x[3] + nom_x[3]; + out_2097260997154060327[4] = delta_x[4] + nom_x[4]; + out_2097260997154060327[5] = delta_x[5] + nom_x[5]; + out_2097260997154060327[6] = delta_x[6] + nom_x[6]; + out_2097260997154060327[7] = delta_x[7] + nom_x[7]; + out_2097260997154060327[8] = delta_x[8] + nom_x[8]; + out_2097260997154060327[9] = delta_x[9] + nom_x[9]; + out_2097260997154060327[10] = delta_x[10] + nom_x[10]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_6509090499931839816) { - out_6509090499931839816[0] = -nom_x[0] + true_x[0]; - out_6509090499931839816[1] = -nom_x[1] + true_x[1]; - out_6509090499931839816[2] = -nom_x[2] + true_x[2]; - out_6509090499931839816[3] = -nom_x[3] + true_x[3]; - out_6509090499931839816[4] = -nom_x[4] + true_x[4]; - out_6509090499931839816[5] = -nom_x[5] + true_x[5]; - out_6509090499931839816[6] = -nom_x[6] + true_x[6]; - out_6509090499931839816[7] = -nom_x[7] + true_x[7]; - out_6509090499931839816[8] = -nom_x[8] + true_x[8]; - out_6509090499931839816[9] = -nom_x[9] + true_x[9]; - out_6509090499931839816[10] = -nom_x[10] + true_x[10]; +void inv_err_fun(double *nom_x, double *true_x, double *out_407819598143463209) { + out_407819598143463209[0] = -nom_x[0] + true_x[0]; + out_407819598143463209[1] = -nom_x[1] + true_x[1]; + out_407819598143463209[2] = -nom_x[2] + true_x[2]; + out_407819598143463209[3] = -nom_x[3] + true_x[3]; + out_407819598143463209[4] = -nom_x[4] + true_x[4]; + out_407819598143463209[5] = -nom_x[5] + true_x[5]; + out_407819598143463209[6] = -nom_x[6] + true_x[6]; + out_407819598143463209[7] = -nom_x[7] + true_x[7]; + out_407819598143463209[8] = -nom_x[8] + true_x[8]; + out_407819598143463209[9] = -nom_x[9] + true_x[9]; + out_407819598143463209[10] = -nom_x[10] + true_x[10]; } -void H_mod_fun(double *state, double *out_475664012759985504) { - out_475664012759985504[0] = 1.0; - out_475664012759985504[1] = 0; - out_475664012759985504[2] = 0; - out_475664012759985504[3] = 0; - out_475664012759985504[4] = 0; - out_475664012759985504[5] = 0; - out_475664012759985504[6] = 0; - out_475664012759985504[7] = 0; - out_475664012759985504[8] = 0; - out_475664012759985504[9] = 0; - out_475664012759985504[10] = 0; - out_475664012759985504[11] = 0; - out_475664012759985504[12] = 1.0; - out_475664012759985504[13] = 0; - out_475664012759985504[14] = 0; - out_475664012759985504[15] = 0; - out_475664012759985504[16] = 0; - out_475664012759985504[17] = 0; - out_475664012759985504[18] = 0; - out_475664012759985504[19] = 0; - out_475664012759985504[20] = 0; - out_475664012759985504[21] = 0; - out_475664012759985504[22] = 0; - out_475664012759985504[23] = 0; - out_475664012759985504[24] = 1.0; - out_475664012759985504[25] = 0; - out_475664012759985504[26] = 0; - out_475664012759985504[27] = 0; - out_475664012759985504[28] = 0; - out_475664012759985504[29] = 0; - out_475664012759985504[30] = 0; - out_475664012759985504[31] = 0; - out_475664012759985504[32] = 0; - out_475664012759985504[33] = 0; - out_475664012759985504[34] = 0; - out_475664012759985504[35] = 0; - out_475664012759985504[36] = 1.0; - out_475664012759985504[37] = 0; - out_475664012759985504[38] = 0; - out_475664012759985504[39] = 0; - out_475664012759985504[40] = 0; - out_475664012759985504[41] = 0; - out_475664012759985504[42] = 0; - out_475664012759985504[43] = 0; - out_475664012759985504[44] = 0; - out_475664012759985504[45] = 0; - out_475664012759985504[46] = 0; - out_475664012759985504[47] = 0; - out_475664012759985504[48] = 1.0; - out_475664012759985504[49] = 0; - out_475664012759985504[50] = 0; - out_475664012759985504[51] = 0; - out_475664012759985504[52] = 0; - out_475664012759985504[53] = 0; - out_475664012759985504[54] = 0; - out_475664012759985504[55] = 0; - out_475664012759985504[56] = 0; - out_475664012759985504[57] = 0; - out_475664012759985504[58] = 0; - out_475664012759985504[59] = 0; - out_475664012759985504[60] = 1.0; - out_475664012759985504[61] = 0; - out_475664012759985504[62] = 0; - out_475664012759985504[63] = 0; - out_475664012759985504[64] = 0; - out_475664012759985504[65] = 0; - out_475664012759985504[66] = 0; - out_475664012759985504[67] = 0; - out_475664012759985504[68] = 0; - out_475664012759985504[69] = 0; - out_475664012759985504[70] = 0; - out_475664012759985504[71] = 0; - out_475664012759985504[72] = 1.0; - out_475664012759985504[73] = 0; - out_475664012759985504[74] = 0; - out_475664012759985504[75] = 0; - out_475664012759985504[76] = 0; - out_475664012759985504[77] = 0; - out_475664012759985504[78] = 0; - out_475664012759985504[79] = 0; - out_475664012759985504[80] = 0; - out_475664012759985504[81] = 0; - out_475664012759985504[82] = 0; - out_475664012759985504[83] = 0; - out_475664012759985504[84] = 1.0; - out_475664012759985504[85] = 0; - out_475664012759985504[86] = 0; - out_475664012759985504[87] = 0; - out_475664012759985504[88] = 0; - out_475664012759985504[89] = 0; - out_475664012759985504[90] = 0; - out_475664012759985504[91] = 0; - out_475664012759985504[92] = 0; - out_475664012759985504[93] = 0; - out_475664012759985504[94] = 0; - out_475664012759985504[95] = 0; - out_475664012759985504[96] = 1.0; - out_475664012759985504[97] = 0; - out_475664012759985504[98] = 0; - out_475664012759985504[99] = 0; - out_475664012759985504[100] = 0; - out_475664012759985504[101] = 0; - out_475664012759985504[102] = 0; - out_475664012759985504[103] = 0; - out_475664012759985504[104] = 0; - out_475664012759985504[105] = 0; - out_475664012759985504[106] = 0; - out_475664012759985504[107] = 0; - out_475664012759985504[108] = 1.0; - out_475664012759985504[109] = 0; - out_475664012759985504[110] = 0; - out_475664012759985504[111] = 0; - out_475664012759985504[112] = 0; - out_475664012759985504[113] = 0; - out_475664012759985504[114] = 0; - out_475664012759985504[115] = 0; - out_475664012759985504[116] = 0; - out_475664012759985504[117] = 0; - out_475664012759985504[118] = 0; - out_475664012759985504[119] = 0; - out_475664012759985504[120] = 1.0; +void H_mod_fun(double *state, double *out_4427837971737845911) { + out_4427837971737845911[0] = 1.0; + out_4427837971737845911[1] = 0; + out_4427837971737845911[2] = 0; + out_4427837971737845911[3] = 0; + out_4427837971737845911[4] = 0; + out_4427837971737845911[5] = 0; + out_4427837971737845911[6] = 0; + out_4427837971737845911[7] = 0; + out_4427837971737845911[8] = 0; + out_4427837971737845911[9] = 0; + out_4427837971737845911[10] = 0; + out_4427837971737845911[11] = 0; + out_4427837971737845911[12] = 1.0; + out_4427837971737845911[13] = 0; + out_4427837971737845911[14] = 0; + out_4427837971737845911[15] = 0; + out_4427837971737845911[16] = 0; + out_4427837971737845911[17] = 0; + out_4427837971737845911[18] = 0; + out_4427837971737845911[19] = 0; + out_4427837971737845911[20] = 0; + out_4427837971737845911[21] = 0; + out_4427837971737845911[22] = 0; + out_4427837971737845911[23] = 0; + out_4427837971737845911[24] = 1.0; + out_4427837971737845911[25] = 0; + out_4427837971737845911[26] = 0; + out_4427837971737845911[27] = 0; + out_4427837971737845911[28] = 0; + out_4427837971737845911[29] = 0; + out_4427837971737845911[30] = 0; + out_4427837971737845911[31] = 0; + out_4427837971737845911[32] = 0; + out_4427837971737845911[33] = 0; + out_4427837971737845911[34] = 0; + out_4427837971737845911[35] = 0; + out_4427837971737845911[36] = 1.0; + out_4427837971737845911[37] = 0; + out_4427837971737845911[38] = 0; + out_4427837971737845911[39] = 0; + out_4427837971737845911[40] = 0; + out_4427837971737845911[41] = 0; + out_4427837971737845911[42] = 0; + out_4427837971737845911[43] = 0; + out_4427837971737845911[44] = 0; + out_4427837971737845911[45] = 0; + out_4427837971737845911[46] = 0; + out_4427837971737845911[47] = 0; + out_4427837971737845911[48] = 1.0; + out_4427837971737845911[49] = 0; + out_4427837971737845911[50] = 0; + out_4427837971737845911[51] = 0; + out_4427837971737845911[52] = 0; + out_4427837971737845911[53] = 0; + out_4427837971737845911[54] = 0; + out_4427837971737845911[55] = 0; + out_4427837971737845911[56] = 0; + out_4427837971737845911[57] = 0; + out_4427837971737845911[58] = 0; + out_4427837971737845911[59] = 0; + out_4427837971737845911[60] = 1.0; + out_4427837971737845911[61] = 0; + out_4427837971737845911[62] = 0; + out_4427837971737845911[63] = 0; + out_4427837971737845911[64] = 0; + out_4427837971737845911[65] = 0; + out_4427837971737845911[66] = 0; + out_4427837971737845911[67] = 0; + out_4427837971737845911[68] = 0; + out_4427837971737845911[69] = 0; + out_4427837971737845911[70] = 0; + out_4427837971737845911[71] = 0; + out_4427837971737845911[72] = 1.0; + out_4427837971737845911[73] = 0; + out_4427837971737845911[74] = 0; + out_4427837971737845911[75] = 0; + out_4427837971737845911[76] = 0; + out_4427837971737845911[77] = 0; + out_4427837971737845911[78] = 0; + out_4427837971737845911[79] = 0; + out_4427837971737845911[80] = 0; + out_4427837971737845911[81] = 0; + out_4427837971737845911[82] = 0; + out_4427837971737845911[83] = 0; + out_4427837971737845911[84] = 1.0; + out_4427837971737845911[85] = 0; + out_4427837971737845911[86] = 0; + out_4427837971737845911[87] = 0; + out_4427837971737845911[88] = 0; + out_4427837971737845911[89] = 0; + out_4427837971737845911[90] = 0; + out_4427837971737845911[91] = 0; + out_4427837971737845911[92] = 0; + out_4427837971737845911[93] = 0; + out_4427837971737845911[94] = 0; + out_4427837971737845911[95] = 0; + out_4427837971737845911[96] = 1.0; + out_4427837971737845911[97] = 0; + out_4427837971737845911[98] = 0; + out_4427837971737845911[99] = 0; + out_4427837971737845911[100] = 0; + out_4427837971737845911[101] = 0; + out_4427837971737845911[102] = 0; + out_4427837971737845911[103] = 0; + out_4427837971737845911[104] = 0; + out_4427837971737845911[105] = 0; + out_4427837971737845911[106] = 0; + out_4427837971737845911[107] = 0; + out_4427837971737845911[108] = 1.0; + out_4427837971737845911[109] = 0; + out_4427837971737845911[110] = 0; + out_4427837971737845911[111] = 0; + out_4427837971737845911[112] = 0; + out_4427837971737845911[113] = 0; + out_4427837971737845911[114] = 0; + out_4427837971737845911[115] = 0; + out_4427837971737845911[116] = 0; + out_4427837971737845911[117] = 0; + out_4427837971737845911[118] = 0; + out_4427837971737845911[119] = 0; + out_4427837971737845911[120] = 1.0; } -void f_fun(double *state, double dt, double *out_4292385048460003663) { - out_4292385048460003663[0] = dt*state[3] + state[0]; - out_4292385048460003663[1] = dt*state[4] + state[1]; - out_4292385048460003663[2] = dt*state[5] + state[2]; - out_4292385048460003663[3] = state[3]; - out_4292385048460003663[4] = state[4]; - out_4292385048460003663[5] = state[5]; - out_4292385048460003663[6] = dt*state[7] + state[6]; - out_4292385048460003663[7] = dt*state[8] + state[7]; - out_4292385048460003663[8] = state[8]; - out_4292385048460003663[9] = state[9]; - out_4292385048460003663[10] = state[10]; +void f_fun(double *state, double dt, double *out_2405095626721301493) { + out_2405095626721301493[0] = dt*state[3] + state[0]; + out_2405095626721301493[1] = dt*state[4] + state[1]; + out_2405095626721301493[2] = dt*state[5] + state[2]; + out_2405095626721301493[3] = state[3]; + out_2405095626721301493[4] = state[4]; + out_2405095626721301493[5] = state[5]; + out_2405095626721301493[6] = dt*state[7] + state[6]; + out_2405095626721301493[7] = dt*state[8] + state[7]; + out_2405095626721301493[8] = state[8]; + out_2405095626721301493[9] = state[9]; + out_2405095626721301493[10] = state[10]; } -void F_fun(double *state, double dt, double *out_7071174528671579157) { - out_7071174528671579157[0] = 1; - out_7071174528671579157[1] = 0; - out_7071174528671579157[2] = 0; - out_7071174528671579157[3] = dt; - out_7071174528671579157[4] = 0; - out_7071174528671579157[5] = 0; - out_7071174528671579157[6] = 0; - out_7071174528671579157[7] = 0; - out_7071174528671579157[8] = 0; - out_7071174528671579157[9] = 0; - out_7071174528671579157[10] = 0; - out_7071174528671579157[11] = 0; - out_7071174528671579157[12] = 1; - out_7071174528671579157[13] = 0; - out_7071174528671579157[14] = 0; - out_7071174528671579157[15] = dt; - out_7071174528671579157[16] = 0; - out_7071174528671579157[17] = 0; - out_7071174528671579157[18] = 0; - out_7071174528671579157[19] = 0; - out_7071174528671579157[20] = 0; - out_7071174528671579157[21] = 0; - out_7071174528671579157[22] = 0; - out_7071174528671579157[23] = 0; - out_7071174528671579157[24] = 1; - out_7071174528671579157[25] = 0; - out_7071174528671579157[26] = 0; - out_7071174528671579157[27] = dt; - out_7071174528671579157[28] = 0; - out_7071174528671579157[29] = 0; - out_7071174528671579157[30] = 0; - out_7071174528671579157[31] = 0; - out_7071174528671579157[32] = 0; - out_7071174528671579157[33] = 0; - out_7071174528671579157[34] = 0; - out_7071174528671579157[35] = 0; - out_7071174528671579157[36] = 1; - out_7071174528671579157[37] = 0; - out_7071174528671579157[38] = 0; - out_7071174528671579157[39] = 0; - out_7071174528671579157[40] = 0; - out_7071174528671579157[41] = 0; - out_7071174528671579157[42] = 0; - out_7071174528671579157[43] = 0; - out_7071174528671579157[44] = 0; - out_7071174528671579157[45] = 0; - out_7071174528671579157[46] = 0; - out_7071174528671579157[47] = 0; - out_7071174528671579157[48] = 1; - out_7071174528671579157[49] = 0; - out_7071174528671579157[50] = 0; - out_7071174528671579157[51] = 0; - out_7071174528671579157[52] = 0; - out_7071174528671579157[53] = 0; - out_7071174528671579157[54] = 0; - out_7071174528671579157[55] = 0; - out_7071174528671579157[56] = 0; - out_7071174528671579157[57] = 0; - out_7071174528671579157[58] = 0; - out_7071174528671579157[59] = 0; - out_7071174528671579157[60] = 1; - out_7071174528671579157[61] = 0; - out_7071174528671579157[62] = 0; - out_7071174528671579157[63] = 0; - out_7071174528671579157[64] = 0; - out_7071174528671579157[65] = 0; - out_7071174528671579157[66] = 0; - out_7071174528671579157[67] = 0; - out_7071174528671579157[68] = 0; - out_7071174528671579157[69] = 0; - out_7071174528671579157[70] = 0; - out_7071174528671579157[71] = 0; - out_7071174528671579157[72] = 1; - out_7071174528671579157[73] = dt; - out_7071174528671579157[74] = 0; - out_7071174528671579157[75] = 0; - out_7071174528671579157[76] = 0; - out_7071174528671579157[77] = 0; - out_7071174528671579157[78] = 0; - out_7071174528671579157[79] = 0; - out_7071174528671579157[80] = 0; - out_7071174528671579157[81] = 0; - out_7071174528671579157[82] = 0; - out_7071174528671579157[83] = 0; - out_7071174528671579157[84] = 1; - out_7071174528671579157[85] = dt; - out_7071174528671579157[86] = 0; - out_7071174528671579157[87] = 0; - out_7071174528671579157[88] = 0; - out_7071174528671579157[89] = 0; - out_7071174528671579157[90] = 0; - out_7071174528671579157[91] = 0; - out_7071174528671579157[92] = 0; - out_7071174528671579157[93] = 0; - out_7071174528671579157[94] = 0; - out_7071174528671579157[95] = 0; - out_7071174528671579157[96] = 1; - out_7071174528671579157[97] = 0; - out_7071174528671579157[98] = 0; - out_7071174528671579157[99] = 0; - out_7071174528671579157[100] = 0; - out_7071174528671579157[101] = 0; - out_7071174528671579157[102] = 0; - out_7071174528671579157[103] = 0; - out_7071174528671579157[104] = 0; - out_7071174528671579157[105] = 0; - out_7071174528671579157[106] = 0; - out_7071174528671579157[107] = 0; - out_7071174528671579157[108] = 1; - out_7071174528671579157[109] = 0; - out_7071174528671579157[110] = 0; - out_7071174528671579157[111] = 0; - out_7071174528671579157[112] = 0; - out_7071174528671579157[113] = 0; - out_7071174528671579157[114] = 0; - out_7071174528671579157[115] = 0; - out_7071174528671579157[116] = 0; - out_7071174528671579157[117] = 0; - out_7071174528671579157[118] = 0; - out_7071174528671579157[119] = 0; - out_7071174528671579157[120] = 1; +void F_fun(double *state, double dt, double *out_1835212025890269909) { + out_1835212025890269909[0] = 1; + out_1835212025890269909[1] = 0; + out_1835212025890269909[2] = 0; + out_1835212025890269909[3] = dt; + out_1835212025890269909[4] = 0; + out_1835212025890269909[5] = 0; + out_1835212025890269909[6] = 0; + out_1835212025890269909[7] = 0; + out_1835212025890269909[8] = 0; + out_1835212025890269909[9] = 0; + out_1835212025890269909[10] = 0; + out_1835212025890269909[11] = 0; + out_1835212025890269909[12] = 1; + out_1835212025890269909[13] = 0; + out_1835212025890269909[14] = 0; + out_1835212025890269909[15] = dt; + out_1835212025890269909[16] = 0; + out_1835212025890269909[17] = 0; + out_1835212025890269909[18] = 0; + out_1835212025890269909[19] = 0; + out_1835212025890269909[20] = 0; + out_1835212025890269909[21] = 0; + out_1835212025890269909[22] = 0; + out_1835212025890269909[23] = 0; + out_1835212025890269909[24] = 1; + out_1835212025890269909[25] = 0; + out_1835212025890269909[26] = 0; + out_1835212025890269909[27] = dt; + out_1835212025890269909[28] = 0; + out_1835212025890269909[29] = 0; + out_1835212025890269909[30] = 0; + out_1835212025890269909[31] = 0; + out_1835212025890269909[32] = 0; + out_1835212025890269909[33] = 0; + out_1835212025890269909[34] = 0; + out_1835212025890269909[35] = 0; + out_1835212025890269909[36] = 1; + out_1835212025890269909[37] = 0; + out_1835212025890269909[38] = 0; + out_1835212025890269909[39] = 0; + out_1835212025890269909[40] = 0; + out_1835212025890269909[41] = 0; + out_1835212025890269909[42] = 0; + out_1835212025890269909[43] = 0; + out_1835212025890269909[44] = 0; + out_1835212025890269909[45] = 0; + out_1835212025890269909[46] = 0; + out_1835212025890269909[47] = 0; + out_1835212025890269909[48] = 1; + out_1835212025890269909[49] = 0; + out_1835212025890269909[50] = 0; + out_1835212025890269909[51] = 0; + out_1835212025890269909[52] = 0; + out_1835212025890269909[53] = 0; + out_1835212025890269909[54] = 0; + out_1835212025890269909[55] = 0; + out_1835212025890269909[56] = 0; + out_1835212025890269909[57] = 0; + out_1835212025890269909[58] = 0; + out_1835212025890269909[59] = 0; + out_1835212025890269909[60] = 1; + out_1835212025890269909[61] = 0; + out_1835212025890269909[62] = 0; + out_1835212025890269909[63] = 0; + out_1835212025890269909[64] = 0; + out_1835212025890269909[65] = 0; + out_1835212025890269909[66] = 0; + out_1835212025890269909[67] = 0; + out_1835212025890269909[68] = 0; + out_1835212025890269909[69] = 0; + out_1835212025890269909[70] = 0; + out_1835212025890269909[71] = 0; + out_1835212025890269909[72] = 1; + out_1835212025890269909[73] = dt; + out_1835212025890269909[74] = 0; + out_1835212025890269909[75] = 0; + out_1835212025890269909[76] = 0; + out_1835212025890269909[77] = 0; + out_1835212025890269909[78] = 0; + out_1835212025890269909[79] = 0; + out_1835212025890269909[80] = 0; + out_1835212025890269909[81] = 0; + out_1835212025890269909[82] = 0; + out_1835212025890269909[83] = 0; + out_1835212025890269909[84] = 1; + out_1835212025890269909[85] = dt; + out_1835212025890269909[86] = 0; + out_1835212025890269909[87] = 0; + out_1835212025890269909[88] = 0; + out_1835212025890269909[89] = 0; + out_1835212025890269909[90] = 0; + out_1835212025890269909[91] = 0; + out_1835212025890269909[92] = 0; + out_1835212025890269909[93] = 0; + out_1835212025890269909[94] = 0; + out_1835212025890269909[95] = 0; + out_1835212025890269909[96] = 1; + out_1835212025890269909[97] = 0; + out_1835212025890269909[98] = 0; + out_1835212025890269909[99] = 0; + out_1835212025890269909[100] = 0; + out_1835212025890269909[101] = 0; + out_1835212025890269909[102] = 0; + out_1835212025890269909[103] = 0; + out_1835212025890269909[104] = 0; + out_1835212025890269909[105] = 0; + out_1835212025890269909[106] = 0; + out_1835212025890269909[107] = 0; + out_1835212025890269909[108] = 1; + out_1835212025890269909[109] = 0; + out_1835212025890269909[110] = 0; + out_1835212025890269909[111] = 0; + out_1835212025890269909[112] = 0; + out_1835212025890269909[113] = 0; + out_1835212025890269909[114] = 0; + out_1835212025890269909[115] = 0; + out_1835212025890269909[116] = 0; + out_1835212025890269909[117] = 0; + out_1835212025890269909[118] = 0; + out_1835212025890269909[119] = 0; + out_1835212025890269909[120] = 1; } -void h_6(double *state, double *sat_pos, double *out_2481230479465319936) { - out_2481230479465319936[0] = sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)) + state[6]; +void h_6(double *state, double *sat_pos, double *out_1528125412600993628) { + out_1528125412600993628[0] = sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)) + state[6]; } -void H_6(double *state, double *sat_pos, double *out_7645196925630164082) { - out_7645196925630164082[0] = (-sat_pos[0] + state[0])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_7645196925630164082[1] = (-sat_pos[1] + state[1])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_7645196925630164082[2] = (-sat_pos[2] + state[2])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_7645196925630164082[3] = 0; - out_7645196925630164082[4] = 0; - out_7645196925630164082[5] = 0; - out_7645196925630164082[6] = 1; - out_7645196925630164082[7] = 0; - out_7645196925630164082[8] = 0; - out_7645196925630164082[9] = 0; - out_7645196925630164082[10] = 0; +void H_6(double *state, double *sat_pos, double *out_104140276440086105) { + out_104140276440086105[0] = (-sat_pos[0] + state[0])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_104140276440086105[1] = (-sat_pos[1] + state[1])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_104140276440086105[2] = (-sat_pos[2] + state[2])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_104140276440086105[3] = 0; + out_104140276440086105[4] = 0; + out_104140276440086105[5] = 0; + out_104140276440086105[6] = 1; + out_104140276440086105[7] = 0; + out_104140276440086105[8] = 0; + out_104140276440086105[9] = 0; + out_104140276440086105[10] = 0; } -void h_20(double *state, double *sat_pos, double *out_7507301208942135576) { - out_7507301208942135576[0] = sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)) + sat_pos[3]*state[10] + state[6] + state[9]; +void h_20(double *state, double *sat_pos, double *out_601402367496244624) { + out_601402367496244624[0] = sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)) + sat_pos[3]*state[10] + state[6] + state[9]; } -void H_20(double *state, double *sat_pos, double *out_1693366137112332184) { - out_1693366137112332184[0] = (-sat_pos[0] + state[0])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_1693366137112332184[1] = (-sat_pos[1] + state[1])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_1693366137112332184[2] = (-sat_pos[2] + state[2])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); - out_1693366137112332184[3] = 0; - out_1693366137112332184[4] = 0; - out_1693366137112332184[5] = 0; - out_1693366137112332184[6] = 1; - out_1693366137112332184[7] = 0; - out_1693366137112332184[8] = 0; - out_1693366137112332184[9] = 1; - out_1693366137112332184[10] = sat_pos[3]; +void H_20(double *state, double *sat_pos, double *out_4705666395271220693) { + out_4705666395271220693[0] = (-sat_pos[0] + state[0])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_4705666395271220693[1] = (-sat_pos[1] + state[1])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_4705666395271220693[2] = (-sat_pos[2] + state[2])/sqrt(pow(-sat_pos[0] + state[0], 2) + pow(-sat_pos[1] + state[1], 2) + pow(-sat_pos[2] + state[2], 2)); + out_4705666395271220693[3] = 0; + out_4705666395271220693[4] = 0; + out_4705666395271220693[5] = 0; + out_4705666395271220693[6] = 1; + out_4705666395271220693[7] = 0; + out_4705666395271220693[8] = 0; + out_4705666395271220693[9] = 1; + out_4705666395271220693[10] = sat_pos[3]; } -void h_7(double *state, double *sat_pos_vel, double *out_2861812996390348550) { - out_2861812996390348550[0] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + state[7]; +void h_7(double *state, double *sat_pos_vel, double *out_2964007189672083137) { + out_2964007189672083137[0] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + state[7]; } -void H_7(double *state, double *sat_pos_vel, double *out_1823365369839474784) { - out_1823365369839474784[0] = pow(sat_pos_vel[0] - state[0], 2)*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[1] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[1] - state[1], 2)*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[2] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[2] - state[2], 2)*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[3] = -(sat_pos_vel[0] - state[0])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[4] = -(sat_pos_vel[1] - state[1])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[5] = -(sat_pos_vel[2] - state[2])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[6] = 0; - out_1823365369839474784[7] = 1; - out_1823365369839474784[8] = 0; - out_1823365369839474784[9] = 0; - out_1823365369839474784[10] = 0; +void H_7(double *state, double *sat_pos_vel, double *out_45965290841563331) { + out_45965290841563331[0] = pow(sat_pos_vel[0] - state[0], 2)*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[1] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[1] - state[1], 2)*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[2] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[2] - state[2], 2)*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[3] = -(sat_pos_vel[0] - state[0])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[4] = -(sat_pos_vel[1] - state[1])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[5] = -(sat_pos_vel[2] - state[2])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[6] = 0; + out_45965290841563331[7] = 1; + out_45965290841563331[8] = 0; + out_45965290841563331[9] = 0; + out_45965290841563331[10] = 0; } -void h_21(double *state, double *sat_pos_vel, double *out_2861812996390348550) { - out_2861812996390348550[0] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + state[7]; +void h_21(double *state, double *sat_pos_vel, double *out_2964007189672083137) { + out_2964007189672083137[0] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + (sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)) + state[7]; } -void H_21(double *state, double *sat_pos_vel, double *out_1823365369839474784) { - out_1823365369839474784[0] = pow(sat_pos_vel[0] - state[0], 2)*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[1] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[1] - state[1], 2)*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[2] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[2] - state[2], 2)*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[3] = -(sat_pos_vel[0] - state[0])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[4] = -(sat_pos_vel[1] - state[1])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[5] = -(sat_pos_vel[2] - state[2])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); - out_1823365369839474784[6] = 0; - out_1823365369839474784[7] = 1; - out_1823365369839474784[8] = 0; - out_1823365369839474784[9] = 0; - out_1823365369839474784[10] = 0; +void H_21(double *state, double *sat_pos_vel, double *out_45965290841563331) { + out_45965290841563331[0] = pow(sat_pos_vel[0] - state[0], 2)*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[3] - state[3])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[1] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[1] - state[1])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[1] - state[1], 2)*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[4] - state[4])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[2] = (sat_pos_vel[0] - state[0])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[3] - state[3])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + (sat_pos_vel[1] - state[1])*(sat_pos_vel[2] - state[2])*(sat_pos_vel[4] - state[4])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) + pow(sat_pos_vel[2] - state[2], 2)*(sat_pos_vel[5] - state[5])/pow(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2), 3.0/2.0) - (sat_pos_vel[5] - state[5])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[3] = -(sat_pos_vel[0] - state[0])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[4] = -(sat_pos_vel[1] - state[1])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[5] = -(sat_pos_vel[2] - state[2])/sqrt(pow(sat_pos_vel[0] - state[0], 2) + pow(sat_pos_vel[1] - state[1], 2) + pow(sat_pos_vel[2] - state[2], 2)); + out_45965290841563331[6] = 0; + out_45965290841563331[7] = 1; + out_45965290841563331[8] = 0; + out_45965290841563331[9] = 0; + out_45965290841563331[10] = 0; } #include #include @@ -506,44 +506,44 @@ void gnss_update_7(double *in_x, double *in_P, double *in_z, double *in_R, doubl void gnss_update_21(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<1, 3, 0>(in_x, in_P, h_21, H_21, NULL, in_z, in_R, in_ea, MAHA_THRESH_21); } -void gnss_err_fun(double *nom_x, double *delta_x, double *out_7861368562585023949) { - err_fun(nom_x, delta_x, out_7861368562585023949); +void gnss_err_fun(double *nom_x, double *delta_x, double *out_2097260997154060327) { + err_fun(nom_x, delta_x, out_2097260997154060327); } -void gnss_inv_err_fun(double *nom_x, double *true_x, double *out_6509090499931839816) { - inv_err_fun(nom_x, true_x, out_6509090499931839816); +void gnss_inv_err_fun(double *nom_x, double *true_x, double *out_407819598143463209) { + inv_err_fun(nom_x, true_x, out_407819598143463209); } -void gnss_H_mod_fun(double *state, double *out_475664012759985504) { - H_mod_fun(state, out_475664012759985504); +void gnss_H_mod_fun(double *state, double *out_4427837971737845911) { + H_mod_fun(state, out_4427837971737845911); } -void gnss_f_fun(double *state, double dt, double *out_4292385048460003663) { - f_fun(state, dt, out_4292385048460003663); +void gnss_f_fun(double *state, double dt, double *out_2405095626721301493) { + f_fun(state, dt, out_2405095626721301493); } -void gnss_F_fun(double *state, double dt, double *out_7071174528671579157) { - F_fun(state, dt, out_7071174528671579157); +void gnss_F_fun(double *state, double dt, double *out_1835212025890269909) { + F_fun(state, dt, out_1835212025890269909); } -void gnss_h_6(double *state, double *sat_pos, double *out_2481230479465319936) { - h_6(state, sat_pos, out_2481230479465319936); +void gnss_h_6(double *state, double *sat_pos, double *out_1528125412600993628) { + h_6(state, sat_pos, out_1528125412600993628); } -void gnss_H_6(double *state, double *sat_pos, double *out_7645196925630164082) { - H_6(state, sat_pos, out_7645196925630164082); +void gnss_H_6(double *state, double *sat_pos, double *out_104140276440086105) { + H_6(state, sat_pos, out_104140276440086105); } -void gnss_h_20(double *state, double *sat_pos, double *out_7507301208942135576) { - h_20(state, sat_pos, out_7507301208942135576); +void gnss_h_20(double *state, double *sat_pos, double *out_601402367496244624) { + h_20(state, sat_pos, out_601402367496244624); } -void gnss_H_20(double *state, double *sat_pos, double *out_1693366137112332184) { - H_20(state, sat_pos, out_1693366137112332184); +void gnss_H_20(double *state, double *sat_pos, double *out_4705666395271220693) { + H_20(state, sat_pos, out_4705666395271220693); } -void gnss_h_7(double *state, double *sat_pos_vel, double *out_2861812996390348550) { - h_7(state, sat_pos_vel, out_2861812996390348550); +void gnss_h_7(double *state, double *sat_pos_vel, double *out_2964007189672083137) { + h_7(state, sat_pos_vel, out_2964007189672083137); } -void gnss_H_7(double *state, double *sat_pos_vel, double *out_1823365369839474784) { - H_7(state, sat_pos_vel, out_1823365369839474784); +void gnss_H_7(double *state, double *sat_pos_vel, double *out_45965290841563331) { + H_7(state, sat_pos_vel, out_45965290841563331); } -void gnss_h_21(double *state, double *sat_pos_vel, double *out_2861812996390348550) { - h_21(state, sat_pos_vel, out_2861812996390348550); +void gnss_h_21(double *state, double *sat_pos_vel, double *out_2964007189672083137) { + h_21(state, sat_pos_vel, out_2964007189672083137); } -void gnss_H_21(double *state, double *sat_pos_vel, double *out_1823365369839474784) { - H_21(state, sat_pos_vel, out_1823365369839474784); +void gnss_H_21(double *state, double *sat_pos_vel, double *out_45965290841563331) { + H_21(state, sat_pos_vel, out_45965290841563331); } void gnss_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/gnss.h b/selfdrive/locationd/models/generated/gnss.h index b22a2b882..913357800 100644 --- a/selfdrive/locationd/models/generated/gnss.h +++ b/selfdrive/locationd/models/generated/gnss.h @@ -5,18 +5,18 @@ void gnss_update_6(double *in_x, double *in_P, double *in_z, double *in_R, doubl void gnss_update_20(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void gnss_update_7(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void gnss_update_21(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); -void gnss_err_fun(double *nom_x, double *delta_x, double *out_7861368562585023949); -void gnss_inv_err_fun(double *nom_x, double *true_x, double *out_6509090499931839816); -void gnss_H_mod_fun(double *state, double *out_475664012759985504); -void gnss_f_fun(double *state, double dt, double *out_4292385048460003663); -void gnss_F_fun(double *state, double dt, double *out_7071174528671579157); -void gnss_h_6(double *state, double *sat_pos, double *out_2481230479465319936); -void gnss_H_6(double *state, double *sat_pos, double *out_7645196925630164082); -void gnss_h_20(double *state, double *sat_pos, double *out_7507301208942135576); -void gnss_H_20(double *state, double *sat_pos, double *out_1693366137112332184); -void gnss_h_7(double *state, double *sat_pos_vel, double *out_2861812996390348550); -void gnss_H_7(double *state, double *sat_pos_vel, double *out_1823365369839474784); -void gnss_h_21(double *state, double *sat_pos_vel, double *out_2861812996390348550); -void gnss_H_21(double *state, double *sat_pos_vel, double *out_1823365369839474784); +void gnss_err_fun(double *nom_x, double *delta_x, double *out_2097260997154060327); +void gnss_inv_err_fun(double *nom_x, double *true_x, double *out_407819598143463209); +void gnss_H_mod_fun(double *state, double *out_4427837971737845911); +void gnss_f_fun(double *state, double dt, double *out_2405095626721301493); +void gnss_F_fun(double *state, double dt, double *out_1835212025890269909); +void gnss_h_6(double *state, double *sat_pos, double *out_1528125412600993628); +void gnss_H_6(double *state, double *sat_pos, double *out_104140276440086105); +void gnss_h_20(double *state, double *sat_pos, double *out_601402367496244624); +void gnss_H_20(double *state, double *sat_pos, double *out_4705666395271220693); +void gnss_h_7(double *state, double *sat_pos_vel, double *out_2964007189672083137); +void gnss_H_7(double *state, double *sat_pos_vel, double *out_45965290841563331); +void gnss_h_21(double *state, double *sat_pos_vel, double *out_2964007189672083137); +void gnss_H_21(double *state, double *sat_pos_vel, double *out_45965290841563331); void gnss_predict(double *in_x, double *in_P, double *in_Q, double dt); } \ No newline at end of file diff --git a/selfdrive/locationd/models/generated/libkf.so b/selfdrive/locationd/models/generated/libkf.so index 352283e37..9ee8cc4ef 100755 Binary files a/selfdrive/locationd/models/generated/libkf.so and b/selfdrive/locationd/models/generated/libkf.so differ diff --git a/selfdrive/locationd/models/generated/live.cpp b/selfdrive/locationd/models/generated/live.cpp index ae0b6f978..3a159db02 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_734965431798586088) { - out_734965431798586088[0] = 0; - out_734965431798586088[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_734965431798586088[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; - out_734965431798586088[3] = cos(in_vec[1])*cos(in_vec[2]); - out_734965431798586088[4] = sin(in_vec[2])*cos(in_vec[1]); - out_734965431798586088[5] = -sin(in_vec[1]); - out_734965431798586088[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_734965431798586088[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_734965431798586088[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_734965431798586088[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); - out_734965431798586088[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); - out_734965431798586088[11] = sin(in_vec[0])*cos(in_vec[1]); - out_734965431798586088[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_734965431798586088[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_734965431798586088[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_734965431798586088[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); - out_734965431798586088[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); - out_734965431798586088[17] = cos(in_vec[0])*cos(in_vec[1]); +void H(double *in_vec, double *out_7275051445048872074) { + out_7275051445048872074[0] = 0; + out_7275051445048872074[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_7275051445048872074[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; + out_7275051445048872074[3] = cos(in_vec[1])*cos(in_vec[2]); + out_7275051445048872074[4] = sin(in_vec[2])*cos(in_vec[1]); + out_7275051445048872074[5] = -sin(in_vec[1]); + out_7275051445048872074[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_7275051445048872074[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_7275051445048872074[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_7275051445048872074[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); + out_7275051445048872074[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); + out_7275051445048872074[11] = sin(in_vec[0])*cos(in_vec[1]); + out_7275051445048872074[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_7275051445048872074[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_7275051445048872074[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_7275051445048872074[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); + out_7275051445048872074[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); + out_7275051445048872074[17] = cos(in_vec[0])*cos(in_vec[1]); } -void err_fun(double *nom_x, double *delta_x, double *out_7867135572176938343) { - out_7867135572176938343[0] = delta_x[0] + nom_x[0]; - out_7867135572176938343[1] = delta_x[1] + nom_x[1]; - out_7867135572176938343[2] = delta_x[2] + nom_x[2]; - out_7867135572176938343[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_7867135572176938343[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_7867135572176938343[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_7867135572176938343[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_7867135572176938343[7] = delta_x[6] + nom_x[7]; - out_7867135572176938343[8] = delta_x[7] + nom_x[8]; - out_7867135572176938343[9] = delta_x[8] + nom_x[9]; - out_7867135572176938343[10] = delta_x[9] + nom_x[10]; - out_7867135572176938343[11] = delta_x[10] + nom_x[11]; - out_7867135572176938343[12] = delta_x[11] + nom_x[12]; - out_7867135572176938343[13] = delta_x[12] + nom_x[13]; - out_7867135572176938343[14] = delta_x[13] + nom_x[14]; - out_7867135572176938343[15] = delta_x[14] + nom_x[15]; - out_7867135572176938343[16] = delta_x[15] + nom_x[16]; - out_7867135572176938343[17] = delta_x[16] + nom_x[17]; - out_7867135572176938343[18] = delta_x[17] + nom_x[18]; - out_7867135572176938343[19] = delta_x[18] + nom_x[19]; - out_7867135572176938343[20] = delta_x[19] + nom_x[20]; - out_7867135572176938343[21] = delta_x[20] + nom_x[21]; +void err_fun(double *nom_x, double *delta_x, double *out_900214999320880639) { + out_900214999320880639[0] = delta_x[0] + nom_x[0]; + out_900214999320880639[1] = delta_x[1] + nom_x[1]; + out_900214999320880639[2] = delta_x[2] + nom_x[2]; + out_900214999320880639[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_900214999320880639[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_900214999320880639[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_900214999320880639[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_900214999320880639[7] = delta_x[6] + nom_x[7]; + out_900214999320880639[8] = delta_x[7] + nom_x[8]; + out_900214999320880639[9] = delta_x[8] + nom_x[9]; + out_900214999320880639[10] = delta_x[9] + nom_x[10]; + out_900214999320880639[11] = delta_x[10] + nom_x[11]; + out_900214999320880639[12] = delta_x[11] + nom_x[12]; + out_900214999320880639[13] = delta_x[12] + nom_x[13]; + out_900214999320880639[14] = delta_x[13] + nom_x[14]; + out_900214999320880639[15] = delta_x[14] + nom_x[15]; + out_900214999320880639[16] = delta_x[15] + nom_x[16]; + out_900214999320880639[17] = delta_x[16] + nom_x[17]; + out_900214999320880639[18] = delta_x[17] + nom_x[18]; + out_900214999320880639[19] = delta_x[18] + nom_x[19]; + out_900214999320880639[20] = delta_x[19] + nom_x[20]; + out_900214999320880639[21] = delta_x[20] + nom_x[21]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_4469849344899012791) { - out_4469849344899012791[0] = -nom_x[0] + true_x[0]; - out_4469849344899012791[1] = -nom_x[1] + true_x[1]; - out_4469849344899012791[2] = -nom_x[2] + true_x[2]; - out_4469849344899012791[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_4469849344899012791[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_4469849344899012791[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_4469849344899012791[6] = -nom_x[7] + true_x[7]; - out_4469849344899012791[7] = -nom_x[8] + true_x[8]; - out_4469849344899012791[8] = -nom_x[9] + true_x[9]; - out_4469849344899012791[9] = -nom_x[10] + true_x[10]; - out_4469849344899012791[10] = -nom_x[11] + true_x[11]; - out_4469849344899012791[11] = -nom_x[12] + true_x[12]; - out_4469849344899012791[12] = -nom_x[13] + true_x[13]; - out_4469849344899012791[13] = -nom_x[14] + true_x[14]; - out_4469849344899012791[14] = -nom_x[15] + true_x[15]; - out_4469849344899012791[15] = -nom_x[16] + true_x[16]; - out_4469849344899012791[16] = -nom_x[17] + true_x[17]; - out_4469849344899012791[17] = -nom_x[18] + true_x[18]; - out_4469849344899012791[18] = -nom_x[19] + true_x[19]; - out_4469849344899012791[19] = -nom_x[20] + true_x[20]; - out_4469849344899012791[20] = -nom_x[21] + true_x[21]; +void inv_err_fun(double *nom_x, double *true_x, double *out_6228497090895348531) { + out_6228497090895348531[0] = -nom_x[0] + true_x[0]; + out_6228497090895348531[1] = -nom_x[1] + true_x[1]; + out_6228497090895348531[2] = -nom_x[2] + true_x[2]; + out_6228497090895348531[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_6228497090895348531[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_6228497090895348531[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_6228497090895348531[6] = -nom_x[7] + true_x[7]; + out_6228497090895348531[7] = -nom_x[8] + true_x[8]; + out_6228497090895348531[8] = -nom_x[9] + true_x[9]; + out_6228497090895348531[9] = -nom_x[10] + true_x[10]; + out_6228497090895348531[10] = -nom_x[11] + true_x[11]; + out_6228497090895348531[11] = -nom_x[12] + true_x[12]; + out_6228497090895348531[12] = -nom_x[13] + true_x[13]; + out_6228497090895348531[13] = -nom_x[14] + true_x[14]; + out_6228497090895348531[14] = -nom_x[15] + true_x[15]; + out_6228497090895348531[15] = -nom_x[16] + true_x[16]; + out_6228497090895348531[16] = -nom_x[17] + true_x[17]; + out_6228497090895348531[17] = -nom_x[18] + true_x[18]; + out_6228497090895348531[18] = -nom_x[19] + true_x[19]; + out_6228497090895348531[19] = -nom_x[20] + true_x[20]; + out_6228497090895348531[20] = -nom_x[21] + true_x[21]; } -void H_mod_fun(double *state, double *out_482044005104989923) { - out_482044005104989923[0] = 1.0; - out_482044005104989923[1] = 0; - out_482044005104989923[2] = 0; - out_482044005104989923[3] = 0; - out_482044005104989923[4] = 0; - out_482044005104989923[5] = 0; - out_482044005104989923[6] = 0; - out_482044005104989923[7] = 0; - out_482044005104989923[8] = 0; - out_482044005104989923[9] = 0; - out_482044005104989923[10] = 0; - out_482044005104989923[11] = 0; - out_482044005104989923[12] = 0; - out_482044005104989923[13] = 0; - out_482044005104989923[14] = 0; - out_482044005104989923[15] = 0; - out_482044005104989923[16] = 0; - out_482044005104989923[17] = 0; - out_482044005104989923[18] = 0; - out_482044005104989923[19] = 0; - out_482044005104989923[20] = 0; - out_482044005104989923[21] = 0; - out_482044005104989923[22] = 1.0; - out_482044005104989923[23] = 0; - out_482044005104989923[24] = 0; - out_482044005104989923[25] = 0; - out_482044005104989923[26] = 0; - out_482044005104989923[27] = 0; - out_482044005104989923[28] = 0; - out_482044005104989923[29] = 0; - out_482044005104989923[30] = 0; - out_482044005104989923[31] = 0; - out_482044005104989923[32] = 0; - out_482044005104989923[33] = 0; - out_482044005104989923[34] = 0; - out_482044005104989923[35] = 0; - out_482044005104989923[36] = 0; - out_482044005104989923[37] = 0; - out_482044005104989923[38] = 0; - out_482044005104989923[39] = 0; - out_482044005104989923[40] = 0; - out_482044005104989923[41] = 0; - out_482044005104989923[42] = 0; - out_482044005104989923[43] = 0; - out_482044005104989923[44] = 1.0; - out_482044005104989923[45] = 0; - out_482044005104989923[46] = 0; - out_482044005104989923[47] = 0; - out_482044005104989923[48] = 0; - out_482044005104989923[49] = 0; - out_482044005104989923[50] = 0; - out_482044005104989923[51] = 0; - out_482044005104989923[52] = 0; - out_482044005104989923[53] = 0; - out_482044005104989923[54] = 0; - out_482044005104989923[55] = 0; - out_482044005104989923[56] = 0; - out_482044005104989923[57] = 0; - out_482044005104989923[58] = 0; - out_482044005104989923[59] = 0; - out_482044005104989923[60] = 0; - out_482044005104989923[61] = 0; - out_482044005104989923[62] = 0; - out_482044005104989923[63] = 0; - out_482044005104989923[64] = 0; - out_482044005104989923[65] = 0; - out_482044005104989923[66] = -0.5*state[4]; - out_482044005104989923[67] = -0.5*state[5]; - out_482044005104989923[68] = -0.5*state[6]; - out_482044005104989923[69] = 0; - out_482044005104989923[70] = 0; - out_482044005104989923[71] = 0; - out_482044005104989923[72] = 0; - out_482044005104989923[73] = 0; - out_482044005104989923[74] = 0; - out_482044005104989923[75] = 0; - out_482044005104989923[76] = 0; - out_482044005104989923[77] = 0; - out_482044005104989923[78] = 0; - out_482044005104989923[79] = 0; - out_482044005104989923[80] = 0; - out_482044005104989923[81] = 0; - out_482044005104989923[82] = 0; - out_482044005104989923[83] = 0; - out_482044005104989923[84] = 0; - out_482044005104989923[85] = 0; - out_482044005104989923[86] = 0; - out_482044005104989923[87] = 0.5*state[3]; - out_482044005104989923[88] = 0.5*state[6]; - out_482044005104989923[89] = -0.5*state[5]; - out_482044005104989923[90] = 0; - out_482044005104989923[91] = 0; - out_482044005104989923[92] = 0; - out_482044005104989923[93] = 0; - out_482044005104989923[94] = 0; - out_482044005104989923[95] = 0; - out_482044005104989923[96] = 0; - out_482044005104989923[97] = 0; - out_482044005104989923[98] = 0; - out_482044005104989923[99] = 0; - out_482044005104989923[100] = 0; - out_482044005104989923[101] = 0; - out_482044005104989923[102] = 0; - out_482044005104989923[103] = 0; - out_482044005104989923[104] = 0; - out_482044005104989923[105] = 0; - out_482044005104989923[106] = 0; - out_482044005104989923[107] = 0; - out_482044005104989923[108] = -0.5*state[6]; - out_482044005104989923[109] = 0.5*state[3]; - out_482044005104989923[110] = 0.5*state[4]; - out_482044005104989923[111] = 0; - out_482044005104989923[112] = 0; - out_482044005104989923[113] = 0; - out_482044005104989923[114] = 0; - out_482044005104989923[115] = 0; - out_482044005104989923[116] = 0; - out_482044005104989923[117] = 0; - out_482044005104989923[118] = 0; - out_482044005104989923[119] = 0; - out_482044005104989923[120] = 0; - out_482044005104989923[121] = 0; - out_482044005104989923[122] = 0; - out_482044005104989923[123] = 0; - out_482044005104989923[124] = 0; - out_482044005104989923[125] = 0; - out_482044005104989923[126] = 0; - out_482044005104989923[127] = 0; - out_482044005104989923[128] = 0; - out_482044005104989923[129] = 0.5*state[5]; - out_482044005104989923[130] = -0.5*state[4]; - out_482044005104989923[131] = 0.5*state[3]; - out_482044005104989923[132] = 0; - out_482044005104989923[133] = 0; - out_482044005104989923[134] = 0; - out_482044005104989923[135] = 0; - out_482044005104989923[136] = 0; - out_482044005104989923[137] = 0; - out_482044005104989923[138] = 0; - out_482044005104989923[139] = 0; - out_482044005104989923[140] = 0; - out_482044005104989923[141] = 0; - out_482044005104989923[142] = 0; - out_482044005104989923[143] = 0; - out_482044005104989923[144] = 0; - out_482044005104989923[145] = 0; - out_482044005104989923[146] = 0; - out_482044005104989923[147] = 0; - out_482044005104989923[148] = 0; - out_482044005104989923[149] = 0; - out_482044005104989923[150] = 0; - out_482044005104989923[151] = 0; - out_482044005104989923[152] = 0; - out_482044005104989923[153] = 1.0; - out_482044005104989923[154] = 0; - out_482044005104989923[155] = 0; - out_482044005104989923[156] = 0; - out_482044005104989923[157] = 0; - out_482044005104989923[158] = 0; - out_482044005104989923[159] = 0; - out_482044005104989923[160] = 0; - out_482044005104989923[161] = 0; - out_482044005104989923[162] = 0; - out_482044005104989923[163] = 0; - out_482044005104989923[164] = 0; - out_482044005104989923[165] = 0; - out_482044005104989923[166] = 0; - out_482044005104989923[167] = 0; - out_482044005104989923[168] = 0; - out_482044005104989923[169] = 0; - out_482044005104989923[170] = 0; - out_482044005104989923[171] = 0; - out_482044005104989923[172] = 0; - out_482044005104989923[173] = 0; - out_482044005104989923[174] = 0; - out_482044005104989923[175] = 1.0; - out_482044005104989923[176] = 0; - out_482044005104989923[177] = 0; - out_482044005104989923[178] = 0; - out_482044005104989923[179] = 0; - out_482044005104989923[180] = 0; - out_482044005104989923[181] = 0; - out_482044005104989923[182] = 0; - out_482044005104989923[183] = 0; - out_482044005104989923[184] = 0; - out_482044005104989923[185] = 0; - out_482044005104989923[186] = 0; - out_482044005104989923[187] = 0; - out_482044005104989923[188] = 0; - out_482044005104989923[189] = 0; - out_482044005104989923[190] = 0; - out_482044005104989923[191] = 0; - out_482044005104989923[192] = 0; - out_482044005104989923[193] = 0; - out_482044005104989923[194] = 0; - out_482044005104989923[195] = 0; - out_482044005104989923[196] = 0; - out_482044005104989923[197] = 1.0; - out_482044005104989923[198] = 0; - out_482044005104989923[199] = 0; - out_482044005104989923[200] = 0; - out_482044005104989923[201] = 0; - out_482044005104989923[202] = 0; - out_482044005104989923[203] = 0; - out_482044005104989923[204] = 0; - out_482044005104989923[205] = 0; - out_482044005104989923[206] = 0; - out_482044005104989923[207] = 0; - out_482044005104989923[208] = 0; - out_482044005104989923[209] = 0; - out_482044005104989923[210] = 0; - out_482044005104989923[211] = 0; - out_482044005104989923[212] = 0; - out_482044005104989923[213] = 0; - out_482044005104989923[214] = 0; - out_482044005104989923[215] = 0; - out_482044005104989923[216] = 0; - out_482044005104989923[217] = 0; - out_482044005104989923[218] = 0; - out_482044005104989923[219] = 1.0; - out_482044005104989923[220] = 0; - out_482044005104989923[221] = 0; - out_482044005104989923[222] = 0; - out_482044005104989923[223] = 0; - out_482044005104989923[224] = 0; - out_482044005104989923[225] = 0; - out_482044005104989923[226] = 0; - out_482044005104989923[227] = 0; - out_482044005104989923[228] = 0; - out_482044005104989923[229] = 0; - out_482044005104989923[230] = 0; - out_482044005104989923[231] = 0; - out_482044005104989923[232] = 0; - out_482044005104989923[233] = 0; - out_482044005104989923[234] = 0; - out_482044005104989923[235] = 0; - out_482044005104989923[236] = 0; - out_482044005104989923[237] = 0; - out_482044005104989923[238] = 0; - out_482044005104989923[239] = 0; - out_482044005104989923[240] = 0; - out_482044005104989923[241] = 1.0; - out_482044005104989923[242] = 0; - out_482044005104989923[243] = 0; - out_482044005104989923[244] = 0; - out_482044005104989923[245] = 0; - out_482044005104989923[246] = 0; - out_482044005104989923[247] = 0; - out_482044005104989923[248] = 0; - out_482044005104989923[249] = 0; - out_482044005104989923[250] = 0; - out_482044005104989923[251] = 0; - out_482044005104989923[252] = 0; - out_482044005104989923[253] = 0; - out_482044005104989923[254] = 0; - out_482044005104989923[255] = 0; - out_482044005104989923[256] = 0; - out_482044005104989923[257] = 0; - out_482044005104989923[258] = 0; - out_482044005104989923[259] = 0; - out_482044005104989923[260] = 0; - out_482044005104989923[261] = 0; - out_482044005104989923[262] = 0; - out_482044005104989923[263] = 1.0; - out_482044005104989923[264] = 0; - out_482044005104989923[265] = 0; - out_482044005104989923[266] = 0; - out_482044005104989923[267] = 0; - out_482044005104989923[268] = 0; - out_482044005104989923[269] = 0; - out_482044005104989923[270] = 0; - out_482044005104989923[271] = 0; - out_482044005104989923[272] = 0; - out_482044005104989923[273] = 0; - out_482044005104989923[274] = 0; - out_482044005104989923[275] = 0; - out_482044005104989923[276] = 0; - out_482044005104989923[277] = 0; - out_482044005104989923[278] = 0; - out_482044005104989923[279] = 0; - out_482044005104989923[280] = 0; - out_482044005104989923[281] = 0; - out_482044005104989923[282] = 0; - out_482044005104989923[283] = 0; - out_482044005104989923[284] = 0; - out_482044005104989923[285] = 1.0; - out_482044005104989923[286] = 0; - out_482044005104989923[287] = 0; - out_482044005104989923[288] = 0; - out_482044005104989923[289] = 0; - out_482044005104989923[290] = 0; - out_482044005104989923[291] = 0; - out_482044005104989923[292] = 0; - out_482044005104989923[293] = 0; - out_482044005104989923[294] = 0; - out_482044005104989923[295] = 0; - out_482044005104989923[296] = 0; - out_482044005104989923[297] = 0; - out_482044005104989923[298] = 0; - out_482044005104989923[299] = 0; - out_482044005104989923[300] = 0; - out_482044005104989923[301] = 0; - out_482044005104989923[302] = 0; - out_482044005104989923[303] = 0; - out_482044005104989923[304] = 0; - out_482044005104989923[305] = 0; - out_482044005104989923[306] = 0; - out_482044005104989923[307] = 1.0; - out_482044005104989923[308] = 0; - out_482044005104989923[309] = 0; - out_482044005104989923[310] = 0; - out_482044005104989923[311] = 0; - out_482044005104989923[312] = 0; - out_482044005104989923[313] = 0; - out_482044005104989923[314] = 0; - out_482044005104989923[315] = 0; - out_482044005104989923[316] = 0; - out_482044005104989923[317] = 0; - out_482044005104989923[318] = 0; - out_482044005104989923[319] = 0; - out_482044005104989923[320] = 0; - out_482044005104989923[321] = 0; - out_482044005104989923[322] = 0; - out_482044005104989923[323] = 0; - out_482044005104989923[324] = 0; - out_482044005104989923[325] = 0; - out_482044005104989923[326] = 0; - out_482044005104989923[327] = 0; - out_482044005104989923[328] = 0; - out_482044005104989923[329] = 1.0; - out_482044005104989923[330] = 0; - out_482044005104989923[331] = 0; - out_482044005104989923[332] = 0; - out_482044005104989923[333] = 0; - out_482044005104989923[334] = 0; - out_482044005104989923[335] = 0; - out_482044005104989923[336] = 0; - out_482044005104989923[337] = 0; - out_482044005104989923[338] = 0; - out_482044005104989923[339] = 0; - out_482044005104989923[340] = 0; - out_482044005104989923[341] = 0; - out_482044005104989923[342] = 0; - out_482044005104989923[343] = 0; - out_482044005104989923[344] = 0; - out_482044005104989923[345] = 0; - out_482044005104989923[346] = 0; - out_482044005104989923[347] = 0; - out_482044005104989923[348] = 0; - out_482044005104989923[349] = 0; - out_482044005104989923[350] = 0; - out_482044005104989923[351] = 1.0; - out_482044005104989923[352] = 0; - out_482044005104989923[353] = 0; - out_482044005104989923[354] = 0; - out_482044005104989923[355] = 0; - out_482044005104989923[356] = 0; - out_482044005104989923[357] = 0; - out_482044005104989923[358] = 0; - out_482044005104989923[359] = 0; - out_482044005104989923[360] = 0; - out_482044005104989923[361] = 0; - out_482044005104989923[362] = 0; - out_482044005104989923[363] = 0; - out_482044005104989923[364] = 0; - out_482044005104989923[365] = 0; - out_482044005104989923[366] = 0; - out_482044005104989923[367] = 0; - out_482044005104989923[368] = 0; - out_482044005104989923[369] = 0; - out_482044005104989923[370] = 0; - out_482044005104989923[371] = 0; - out_482044005104989923[372] = 0; - out_482044005104989923[373] = 1.0; - out_482044005104989923[374] = 0; - out_482044005104989923[375] = 0; - out_482044005104989923[376] = 0; - out_482044005104989923[377] = 0; - out_482044005104989923[378] = 0; - out_482044005104989923[379] = 0; - out_482044005104989923[380] = 0; - out_482044005104989923[381] = 0; - out_482044005104989923[382] = 0; - out_482044005104989923[383] = 0; - out_482044005104989923[384] = 0; - out_482044005104989923[385] = 0; - out_482044005104989923[386] = 0; - out_482044005104989923[387] = 0; - out_482044005104989923[388] = 0; - out_482044005104989923[389] = 0; - out_482044005104989923[390] = 0; - out_482044005104989923[391] = 0; - out_482044005104989923[392] = 0; - out_482044005104989923[393] = 0; - out_482044005104989923[394] = 0; - out_482044005104989923[395] = 1.0; - out_482044005104989923[396] = 0; - out_482044005104989923[397] = 0; - out_482044005104989923[398] = 0; - out_482044005104989923[399] = 0; - out_482044005104989923[400] = 0; - out_482044005104989923[401] = 0; - out_482044005104989923[402] = 0; - out_482044005104989923[403] = 0; - out_482044005104989923[404] = 0; - out_482044005104989923[405] = 0; - out_482044005104989923[406] = 0; - out_482044005104989923[407] = 0; - out_482044005104989923[408] = 0; - out_482044005104989923[409] = 0; - out_482044005104989923[410] = 0; - out_482044005104989923[411] = 0; - out_482044005104989923[412] = 0; - out_482044005104989923[413] = 0; - out_482044005104989923[414] = 0; - out_482044005104989923[415] = 0; - out_482044005104989923[416] = 0; - out_482044005104989923[417] = 1.0; - out_482044005104989923[418] = 0; - out_482044005104989923[419] = 0; - out_482044005104989923[420] = 0; - out_482044005104989923[421] = 0; - out_482044005104989923[422] = 0; - out_482044005104989923[423] = 0; - out_482044005104989923[424] = 0; - out_482044005104989923[425] = 0; - out_482044005104989923[426] = 0; - out_482044005104989923[427] = 0; - out_482044005104989923[428] = 0; - out_482044005104989923[429] = 0; - out_482044005104989923[430] = 0; - out_482044005104989923[431] = 0; - out_482044005104989923[432] = 0; - out_482044005104989923[433] = 0; - out_482044005104989923[434] = 0; - out_482044005104989923[435] = 0; - out_482044005104989923[436] = 0; - out_482044005104989923[437] = 0; - out_482044005104989923[438] = 0; - out_482044005104989923[439] = 1.0; - out_482044005104989923[440] = 0; - out_482044005104989923[441] = 0; - out_482044005104989923[442] = 0; - out_482044005104989923[443] = 0; - out_482044005104989923[444] = 0; - out_482044005104989923[445] = 0; - out_482044005104989923[446] = 0; - out_482044005104989923[447] = 0; - out_482044005104989923[448] = 0; - out_482044005104989923[449] = 0; - out_482044005104989923[450] = 0; - out_482044005104989923[451] = 0; - out_482044005104989923[452] = 0; - out_482044005104989923[453] = 0; - out_482044005104989923[454] = 0; - out_482044005104989923[455] = 0; - out_482044005104989923[456] = 0; - out_482044005104989923[457] = 0; - out_482044005104989923[458] = 0; - out_482044005104989923[459] = 0; - out_482044005104989923[460] = 0; - out_482044005104989923[461] = 1.0; +void H_mod_fun(double *state, double *out_6900568612264374751) { + out_6900568612264374751[0] = 1.0; + out_6900568612264374751[1] = 0; + out_6900568612264374751[2] = 0; + out_6900568612264374751[3] = 0; + out_6900568612264374751[4] = 0; + out_6900568612264374751[5] = 0; + out_6900568612264374751[6] = 0; + out_6900568612264374751[7] = 0; + out_6900568612264374751[8] = 0; + out_6900568612264374751[9] = 0; + out_6900568612264374751[10] = 0; + out_6900568612264374751[11] = 0; + out_6900568612264374751[12] = 0; + out_6900568612264374751[13] = 0; + out_6900568612264374751[14] = 0; + out_6900568612264374751[15] = 0; + out_6900568612264374751[16] = 0; + out_6900568612264374751[17] = 0; + out_6900568612264374751[18] = 0; + out_6900568612264374751[19] = 0; + out_6900568612264374751[20] = 0; + out_6900568612264374751[21] = 0; + out_6900568612264374751[22] = 1.0; + out_6900568612264374751[23] = 0; + out_6900568612264374751[24] = 0; + out_6900568612264374751[25] = 0; + out_6900568612264374751[26] = 0; + out_6900568612264374751[27] = 0; + out_6900568612264374751[28] = 0; + out_6900568612264374751[29] = 0; + out_6900568612264374751[30] = 0; + out_6900568612264374751[31] = 0; + out_6900568612264374751[32] = 0; + out_6900568612264374751[33] = 0; + out_6900568612264374751[34] = 0; + out_6900568612264374751[35] = 0; + out_6900568612264374751[36] = 0; + out_6900568612264374751[37] = 0; + out_6900568612264374751[38] = 0; + out_6900568612264374751[39] = 0; + out_6900568612264374751[40] = 0; + out_6900568612264374751[41] = 0; + out_6900568612264374751[42] = 0; + out_6900568612264374751[43] = 0; + out_6900568612264374751[44] = 1.0; + out_6900568612264374751[45] = 0; + out_6900568612264374751[46] = 0; + out_6900568612264374751[47] = 0; + out_6900568612264374751[48] = 0; + out_6900568612264374751[49] = 0; + out_6900568612264374751[50] = 0; + out_6900568612264374751[51] = 0; + out_6900568612264374751[52] = 0; + out_6900568612264374751[53] = 0; + out_6900568612264374751[54] = 0; + out_6900568612264374751[55] = 0; + out_6900568612264374751[56] = 0; + out_6900568612264374751[57] = 0; + out_6900568612264374751[58] = 0; + out_6900568612264374751[59] = 0; + out_6900568612264374751[60] = 0; + out_6900568612264374751[61] = 0; + out_6900568612264374751[62] = 0; + out_6900568612264374751[63] = 0; + out_6900568612264374751[64] = 0; + out_6900568612264374751[65] = 0; + out_6900568612264374751[66] = -0.5*state[4]; + out_6900568612264374751[67] = -0.5*state[5]; + out_6900568612264374751[68] = -0.5*state[6]; + out_6900568612264374751[69] = 0; + out_6900568612264374751[70] = 0; + out_6900568612264374751[71] = 0; + out_6900568612264374751[72] = 0; + out_6900568612264374751[73] = 0; + out_6900568612264374751[74] = 0; + out_6900568612264374751[75] = 0; + out_6900568612264374751[76] = 0; + out_6900568612264374751[77] = 0; + out_6900568612264374751[78] = 0; + out_6900568612264374751[79] = 0; + out_6900568612264374751[80] = 0; + out_6900568612264374751[81] = 0; + out_6900568612264374751[82] = 0; + out_6900568612264374751[83] = 0; + out_6900568612264374751[84] = 0; + out_6900568612264374751[85] = 0; + out_6900568612264374751[86] = 0; + out_6900568612264374751[87] = 0.5*state[3]; + out_6900568612264374751[88] = 0.5*state[6]; + out_6900568612264374751[89] = -0.5*state[5]; + out_6900568612264374751[90] = 0; + out_6900568612264374751[91] = 0; + out_6900568612264374751[92] = 0; + out_6900568612264374751[93] = 0; + out_6900568612264374751[94] = 0; + out_6900568612264374751[95] = 0; + out_6900568612264374751[96] = 0; + out_6900568612264374751[97] = 0; + out_6900568612264374751[98] = 0; + out_6900568612264374751[99] = 0; + out_6900568612264374751[100] = 0; + out_6900568612264374751[101] = 0; + out_6900568612264374751[102] = 0; + out_6900568612264374751[103] = 0; + out_6900568612264374751[104] = 0; + out_6900568612264374751[105] = 0; + out_6900568612264374751[106] = 0; + out_6900568612264374751[107] = 0; + out_6900568612264374751[108] = -0.5*state[6]; + out_6900568612264374751[109] = 0.5*state[3]; + out_6900568612264374751[110] = 0.5*state[4]; + out_6900568612264374751[111] = 0; + out_6900568612264374751[112] = 0; + out_6900568612264374751[113] = 0; + out_6900568612264374751[114] = 0; + out_6900568612264374751[115] = 0; + out_6900568612264374751[116] = 0; + out_6900568612264374751[117] = 0; + out_6900568612264374751[118] = 0; + out_6900568612264374751[119] = 0; + out_6900568612264374751[120] = 0; + out_6900568612264374751[121] = 0; + out_6900568612264374751[122] = 0; + out_6900568612264374751[123] = 0; + out_6900568612264374751[124] = 0; + out_6900568612264374751[125] = 0; + out_6900568612264374751[126] = 0; + out_6900568612264374751[127] = 0; + out_6900568612264374751[128] = 0; + out_6900568612264374751[129] = 0.5*state[5]; + out_6900568612264374751[130] = -0.5*state[4]; + out_6900568612264374751[131] = 0.5*state[3]; + out_6900568612264374751[132] = 0; + out_6900568612264374751[133] = 0; + out_6900568612264374751[134] = 0; + out_6900568612264374751[135] = 0; + out_6900568612264374751[136] = 0; + out_6900568612264374751[137] = 0; + out_6900568612264374751[138] = 0; + out_6900568612264374751[139] = 0; + out_6900568612264374751[140] = 0; + out_6900568612264374751[141] = 0; + out_6900568612264374751[142] = 0; + out_6900568612264374751[143] = 0; + out_6900568612264374751[144] = 0; + out_6900568612264374751[145] = 0; + out_6900568612264374751[146] = 0; + out_6900568612264374751[147] = 0; + out_6900568612264374751[148] = 0; + out_6900568612264374751[149] = 0; + out_6900568612264374751[150] = 0; + out_6900568612264374751[151] = 0; + out_6900568612264374751[152] = 0; + out_6900568612264374751[153] = 1.0; + out_6900568612264374751[154] = 0; + out_6900568612264374751[155] = 0; + out_6900568612264374751[156] = 0; + out_6900568612264374751[157] = 0; + out_6900568612264374751[158] = 0; + out_6900568612264374751[159] = 0; + out_6900568612264374751[160] = 0; + out_6900568612264374751[161] = 0; + out_6900568612264374751[162] = 0; + out_6900568612264374751[163] = 0; + out_6900568612264374751[164] = 0; + out_6900568612264374751[165] = 0; + out_6900568612264374751[166] = 0; + out_6900568612264374751[167] = 0; + out_6900568612264374751[168] = 0; + out_6900568612264374751[169] = 0; + out_6900568612264374751[170] = 0; + out_6900568612264374751[171] = 0; + out_6900568612264374751[172] = 0; + out_6900568612264374751[173] = 0; + out_6900568612264374751[174] = 0; + out_6900568612264374751[175] = 1.0; + out_6900568612264374751[176] = 0; + out_6900568612264374751[177] = 0; + out_6900568612264374751[178] = 0; + out_6900568612264374751[179] = 0; + out_6900568612264374751[180] = 0; + out_6900568612264374751[181] = 0; + out_6900568612264374751[182] = 0; + out_6900568612264374751[183] = 0; + out_6900568612264374751[184] = 0; + out_6900568612264374751[185] = 0; + out_6900568612264374751[186] = 0; + out_6900568612264374751[187] = 0; + out_6900568612264374751[188] = 0; + out_6900568612264374751[189] = 0; + out_6900568612264374751[190] = 0; + out_6900568612264374751[191] = 0; + out_6900568612264374751[192] = 0; + out_6900568612264374751[193] = 0; + out_6900568612264374751[194] = 0; + out_6900568612264374751[195] = 0; + out_6900568612264374751[196] = 0; + out_6900568612264374751[197] = 1.0; + out_6900568612264374751[198] = 0; + out_6900568612264374751[199] = 0; + out_6900568612264374751[200] = 0; + out_6900568612264374751[201] = 0; + out_6900568612264374751[202] = 0; + out_6900568612264374751[203] = 0; + out_6900568612264374751[204] = 0; + out_6900568612264374751[205] = 0; + out_6900568612264374751[206] = 0; + out_6900568612264374751[207] = 0; + out_6900568612264374751[208] = 0; + out_6900568612264374751[209] = 0; + out_6900568612264374751[210] = 0; + out_6900568612264374751[211] = 0; + out_6900568612264374751[212] = 0; + out_6900568612264374751[213] = 0; + out_6900568612264374751[214] = 0; + out_6900568612264374751[215] = 0; + out_6900568612264374751[216] = 0; + out_6900568612264374751[217] = 0; + out_6900568612264374751[218] = 0; + out_6900568612264374751[219] = 1.0; + out_6900568612264374751[220] = 0; + out_6900568612264374751[221] = 0; + out_6900568612264374751[222] = 0; + out_6900568612264374751[223] = 0; + out_6900568612264374751[224] = 0; + out_6900568612264374751[225] = 0; + out_6900568612264374751[226] = 0; + out_6900568612264374751[227] = 0; + out_6900568612264374751[228] = 0; + out_6900568612264374751[229] = 0; + out_6900568612264374751[230] = 0; + out_6900568612264374751[231] = 0; + out_6900568612264374751[232] = 0; + out_6900568612264374751[233] = 0; + out_6900568612264374751[234] = 0; + out_6900568612264374751[235] = 0; + out_6900568612264374751[236] = 0; + out_6900568612264374751[237] = 0; + out_6900568612264374751[238] = 0; + out_6900568612264374751[239] = 0; + out_6900568612264374751[240] = 0; + out_6900568612264374751[241] = 1.0; + out_6900568612264374751[242] = 0; + out_6900568612264374751[243] = 0; + out_6900568612264374751[244] = 0; + out_6900568612264374751[245] = 0; + out_6900568612264374751[246] = 0; + out_6900568612264374751[247] = 0; + out_6900568612264374751[248] = 0; + out_6900568612264374751[249] = 0; + out_6900568612264374751[250] = 0; + out_6900568612264374751[251] = 0; + out_6900568612264374751[252] = 0; + out_6900568612264374751[253] = 0; + out_6900568612264374751[254] = 0; + out_6900568612264374751[255] = 0; + out_6900568612264374751[256] = 0; + out_6900568612264374751[257] = 0; + out_6900568612264374751[258] = 0; + out_6900568612264374751[259] = 0; + out_6900568612264374751[260] = 0; + out_6900568612264374751[261] = 0; + out_6900568612264374751[262] = 0; + out_6900568612264374751[263] = 1.0; + out_6900568612264374751[264] = 0; + out_6900568612264374751[265] = 0; + out_6900568612264374751[266] = 0; + out_6900568612264374751[267] = 0; + out_6900568612264374751[268] = 0; + out_6900568612264374751[269] = 0; + out_6900568612264374751[270] = 0; + out_6900568612264374751[271] = 0; + out_6900568612264374751[272] = 0; + out_6900568612264374751[273] = 0; + out_6900568612264374751[274] = 0; + out_6900568612264374751[275] = 0; + out_6900568612264374751[276] = 0; + out_6900568612264374751[277] = 0; + out_6900568612264374751[278] = 0; + out_6900568612264374751[279] = 0; + out_6900568612264374751[280] = 0; + out_6900568612264374751[281] = 0; + out_6900568612264374751[282] = 0; + out_6900568612264374751[283] = 0; + out_6900568612264374751[284] = 0; + out_6900568612264374751[285] = 1.0; + out_6900568612264374751[286] = 0; + out_6900568612264374751[287] = 0; + out_6900568612264374751[288] = 0; + out_6900568612264374751[289] = 0; + out_6900568612264374751[290] = 0; + out_6900568612264374751[291] = 0; + out_6900568612264374751[292] = 0; + out_6900568612264374751[293] = 0; + out_6900568612264374751[294] = 0; + out_6900568612264374751[295] = 0; + out_6900568612264374751[296] = 0; + out_6900568612264374751[297] = 0; + out_6900568612264374751[298] = 0; + out_6900568612264374751[299] = 0; + out_6900568612264374751[300] = 0; + out_6900568612264374751[301] = 0; + out_6900568612264374751[302] = 0; + out_6900568612264374751[303] = 0; + out_6900568612264374751[304] = 0; + out_6900568612264374751[305] = 0; + out_6900568612264374751[306] = 0; + out_6900568612264374751[307] = 1.0; + out_6900568612264374751[308] = 0; + out_6900568612264374751[309] = 0; + out_6900568612264374751[310] = 0; + out_6900568612264374751[311] = 0; + out_6900568612264374751[312] = 0; + out_6900568612264374751[313] = 0; + out_6900568612264374751[314] = 0; + out_6900568612264374751[315] = 0; + out_6900568612264374751[316] = 0; + out_6900568612264374751[317] = 0; + out_6900568612264374751[318] = 0; + out_6900568612264374751[319] = 0; + out_6900568612264374751[320] = 0; + out_6900568612264374751[321] = 0; + out_6900568612264374751[322] = 0; + out_6900568612264374751[323] = 0; + out_6900568612264374751[324] = 0; + out_6900568612264374751[325] = 0; + out_6900568612264374751[326] = 0; + out_6900568612264374751[327] = 0; + out_6900568612264374751[328] = 0; + out_6900568612264374751[329] = 1.0; + out_6900568612264374751[330] = 0; + out_6900568612264374751[331] = 0; + out_6900568612264374751[332] = 0; + out_6900568612264374751[333] = 0; + out_6900568612264374751[334] = 0; + out_6900568612264374751[335] = 0; + out_6900568612264374751[336] = 0; + out_6900568612264374751[337] = 0; + out_6900568612264374751[338] = 0; + out_6900568612264374751[339] = 0; + out_6900568612264374751[340] = 0; + out_6900568612264374751[341] = 0; + out_6900568612264374751[342] = 0; + out_6900568612264374751[343] = 0; + out_6900568612264374751[344] = 0; + out_6900568612264374751[345] = 0; + out_6900568612264374751[346] = 0; + out_6900568612264374751[347] = 0; + out_6900568612264374751[348] = 0; + out_6900568612264374751[349] = 0; + out_6900568612264374751[350] = 0; + out_6900568612264374751[351] = 1.0; + out_6900568612264374751[352] = 0; + out_6900568612264374751[353] = 0; + out_6900568612264374751[354] = 0; + out_6900568612264374751[355] = 0; + out_6900568612264374751[356] = 0; + out_6900568612264374751[357] = 0; + out_6900568612264374751[358] = 0; + out_6900568612264374751[359] = 0; + out_6900568612264374751[360] = 0; + out_6900568612264374751[361] = 0; + out_6900568612264374751[362] = 0; + out_6900568612264374751[363] = 0; + out_6900568612264374751[364] = 0; + out_6900568612264374751[365] = 0; + out_6900568612264374751[366] = 0; + out_6900568612264374751[367] = 0; + out_6900568612264374751[368] = 0; + out_6900568612264374751[369] = 0; + out_6900568612264374751[370] = 0; + out_6900568612264374751[371] = 0; + out_6900568612264374751[372] = 0; + out_6900568612264374751[373] = 1.0; + out_6900568612264374751[374] = 0; + out_6900568612264374751[375] = 0; + out_6900568612264374751[376] = 0; + out_6900568612264374751[377] = 0; + out_6900568612264374751[378] = 0; + out_6900568612264374751[379] = 0; + out_6900568612264374751[380] = 0; + out_6900568612264374751[381] = 0; + out_6900568612264374751[382] = 0; + out_6900568612264374751[383] = 0; + out_6900568612264374751[384] = 0; + out_6900568612264374751[385] = 0; + out_6900568612264374751[386] = 0; + out_6900568612264374751[387] = 0; + out_6900568612264374751[388] = 0; + out_6900568612264374751[389] = 0; + out_6900568612264374751[390] = 0; + out_6900568612264374751[391] = 0; + out_6900568612264374751[392] = 0; + out_6900568612264374751[393] = 0; + out_6900568612264374751[394] = 0; + out_6900568612264374751[395] = 1.0; + out_6900568612264374751[396] = 0; + out_6900568612264374751[397] = 0; + out_6900568612264374751[398] = 0; + out_6900568612264374751[399] = 0; + out_6900568612264374751[400] = 0; + out_6900568612264374751[401] = 0; + out_6900568612264374751[402] = 0; + out_6900568612264374751[403] = 0; + out_6900568612264374751[404] = 0; + out_6900568612264374751[405] = 0; + out_6900568612264374751[406] = 0; + out_6900568612264374751[407] = 0; + out_6900568612264374751[408] = 0; + out_6900568612264374751[409] = 0; + out_6900568612264374751[410] = 0; + out_6900568612264374751[411] = 0; + out_6900568612264374751[412] = 0; + out_6900568612264374751[413] = 0; + out_6900568612264374751[414] = 0; + out_6900568612264374751[415] = 0; + out_6900568612264374751[416] = 0; + out_6900568612264374751[417] = 1.0; + out_6900568612264374751[418] = 0; + out_6900568612264374751[419] = 0; + out_6900568612264374751[420] = 0; + out_6900568612264374751[421] = 0; + out_6900568612264374751[422] = 0; + out_6900568612264374751[423] = 0; + out_6900568612264374751[424] = 0; + out_6900568612264374751[425] = 0; + out_6900568612264374751[426] = 0; + out_6900568612264374751[427] = 0; + out_6900568612264374751[428] = 0; + out_6900568612264374751[429] = 0; + out_6900568612264374751[430] = 0; + out_6900568612264374751[431] = 0; + out_6900568612264374751[432] = 0; + out_6900568612264374751[433] = 0; + out_6900568612264374751[434] = 0; + out_6900568612264374751[435] = 0; + out_6900568612264374751[436] = 0; + out_6900568612264374751[437] = 0; + out_6900568612264374751[438] = 0; + out_6900568612264374751[439] = 1.0; + out_6900568612264374751[440] = 0; + out_6900568612264374751[441] = 0; + out_6900568612264374751[442] = 0; + out_6900568612264374751[443] = 0; + out_6900568612264374751[444] = 0; + out_6900568612264374751[445] = 0; + out_6900568612264374751[446] = 0; + out_6900568612264374751[447] = 0; + out_6900568612264374751[448] = 0; + out_6900568612264374751[449] = 0; + out_6900568612264374751[450] = 0; + out_6900568612264374751[451] = 0; + out_6900568612264374751[452] = 0; + out_6900568612264374751[453] = 0; + out_6900568612264374751[454] = 0; + out_6900568612264374751[455] = 0; + out_6900568612264374751[456] = 0; + out_6900568612264374751[457] = 0; + out_6900568612264374751[458] = 0; + out_6900568612264374751[459] = 0; + out_6900568612264374751[460] = 0; + out_6900568612264374751[461] = 1.0; } -void f_fun(double *state, double dt, double *out_5277401503139322236) { - out_5277401503139322236[0] = dt*state[7] + state[0]; - out_5277401503139322236[1] = dt*state[8] + state[1]; - out_5277401503139322236[2] = dt*state[9] + state[2]; - out_5277401503139322236[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; - out_5277401503139322236[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; - out_5277401503139322236[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; - out_5277401503139322236[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; - out_5277401503139322236[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_5277401503139322236[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_5277401503139322236[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_5277401503139322236[10] = state[10]; - out_5277401503139322236[11] = state[11]; - out_5277401503139322236[12] = state[12]; - out_5277401503139322236[13] = state[13]; - out_5277401503139322236[14] = state[14]; - out_5277401503139322236[15] = state[15]; - out_5277401503139322236[16] = state[16]; - out_5277401503139322236[17] = state[17]; - out_5277401503139322236[18] = state[18]; - out_5277401503139322236[19] = state[19]; - out_5277401503139322236[20] = state[20]; - out_5277401503139322236[21] = state[21]; +void f_fun(double *state, double dt, double *out_444317293709373841) { + out_444317293709373841[0] = dt*state[7] + state[0]; + out_444317293709373841[1] = dt*state[8] + state[1]; + out_444317293709373841[2] = dt*state[9] + state[2]; + out_444317293709373841[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; + out_444317293709373841[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; + out_444317293709373841[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; + out_444317293709373841[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; + out_444317293709373841[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_444317293709373841[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_444317293709373841[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_444317293709373841[10] = state[10]; + out_444317293709373841[11] = state[11]; + out_444317293709373841[12] = state[12]; + out_444317293709373841[13] = state[13]; + out_444317293709373841[14] = state[14]; + out_444317293709373841[15] = state[15]; + out_444317293709373841[16] = state[16]; + out_444317293709373841[17] = state[17]; + out_444317293709373841[18] = state[18]; + out_444317293709373841[19] = state[19]; + out_444317293709373841[20] = state[20]; + out_444317293709373841[21] = state[21]; } -void F_fun(double *state, double dt, double *out_6716422747633413136) { - out_6716422747633413136[0] = 1; - out_6716422747633413136[1] = 0; - out_6716422747633413136[2] = 0; - out_6716422747633413136[3] = 0; - out_6716422747633413136[4] = 0; - out_6716422747633413136[5] = 0; - out_6716422747633413136[6] = dt; - out_6716422747633413136[7] = 0; - out_6716422747633413136[8] = 0; - out_6716422747633413136[9] = 0; - out_6716422747633413136[10] = 0; - out_6716422747633413136[11] = 0; - out_6716422747633413136[12] = 0; - out_6716422747633413136[13] = 0; - out_6716422747633413136[14] = 0; - out_6716422747633413136[15] = 0; - out_6716422747633413136[16] = 0; - out_6716422747633413136[17] = 0; - out_6716422747633413136[18] = 0; - out_6716422747633413136[19] = 0; - out_6716422747633413136[20] = 0; - out_6716422747633413136[21] = 0; - out_6716422747633413136[22] = 1; - out_6716422747633413136[23] = 0; - out_6716422747633413136[24] = 0; - out_6716422747633413136[25] = 0; - out_6716422747633413136[26] = 0; - out_6716422747633413136[27] = 0; - out_6716422747633413136[28] = dt; - out_6716422747633413136[29] = 0; - out_6716422747633413136[30] = 0; - out_6716422747633413136[31] = 0; - out_6716422747633413136[32] = 0; - out_6716422747633413136[33] = 0; - out_6716422747633413136[34] = 0; - out_6716422747633413136[35] = 0; - out_6716422747633413136[36] = 0; - out_6716422747633413136[37] = 0; - out_6716422747633413136[38] = 0; - out_6716422747633413136[39] = 0; - out_6716422747633413136[40] = 0; - out_6716422747633413136[41] = 0; - out_6716422747633413136[42] = 0; - out_6716422747633413136[43] = 0; - out_6716422747633413136[44] = 1; - out_6716422747633413136[45] = 0; - out_6716422747633413136[46] = 0; - out_6716422747633413136[47] = 0; - out_6716422747633413136[48] = 0; - out_6716422747633413136[49] = 0; - out_6716422747633413136[50] = dt; - out_6716422747633413136[51] = 0; - out_6716422747633413136[52] = 0; - out_6716422747633413136[53] = 0; - out_6716422747633413136[54] = 0; - out_6716422747633413136[55] = 0; - out_6716422747633413136[56] = 0; - out_6716422747633413136[57] = 0; - out_6716422747633413136[58] = 0; - out_6716422747633413136[59] = 0; - out_6716422747633413136[60] = 0; - out_6716422747633413136[61] = 0; - out_6716422747633413136[62] = 0; - out_6716422747633413136[63] = 0; - out_6716422747633413136[64] = 0; - out_6716422747633413136[65] = 0; - out_6716422747633413136[66] = 1; - out_6716422747633413136[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_6716422747633413136[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_6716422747633413136[69] = 0; - out_6716422747633413136[70] = 0; - out_6716422747633413136[71] = 0; - out_6716422747633413136[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_6716422747633413136[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_6716422747633413136[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_6716422747633413136[75] = 0; - out_6716422747633413136[76] = 0; - out_6716422747633413136[77] = 0; - out_6716422747633413136[78] = 0; - out_6716422747633413136[79] = 0; - out_6716422747633413136[80] = 0; - out_6716422747633413136[81] = 0; - out_6716422747633413136[82] = 0; - out_6716422747633413136[83] = 0; - out_6716422747633413136[84] = 0; - out_6716422747633413136[85] = 0; - out_6716422747633413136[86] = 0; - out_6716422747633413136[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_6716422747633413136[88] = 1; - out_6716422747633413136[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_6716422747633413136[90] = 0; - out_6716422747633413136[91] = 0; - out_6716422747633413136[92] = 0; - out_6716422747633413136[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_6716422747633413136[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_6716422747633413136[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_6716422747633413136[96] = 0; - out_6716422747633413136[97] = 0; - out_6716422747633413136[98] = 0; - out_6716422747633413136[99] = 0; - out_6716422747633413136[100] = 0; - out_6716422747633413136[101] = 0; - out_6716422747633413136[102] = 0; - out_6716422747633413136[103] = 0; - out_6716422747633413136[104] = 0; - out_6716422747633413136[105] = 0; - out_6716422747633413136[106] = 0; - out_6716422747633413136[107] = 0; - out_6716422747633413136[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_6716422747633413136[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_6716422747633413136[110] = 1; - out_6716422747633413136[111] = 0; - out_6716422747633413136[112] = 0; - out_6716422747633413136[113] = 0; - out_6716422747633413136[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_6716422747633413136[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_6716422747633413136[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_6716422747633413136[117] = 0; - out_6716422747633413136[118] = 0; - out_6716422747633413136[119] = 0; - out_6716422747633413136[120] = 0; - out_6716422747633413136[121] = 0; - out_6716422747633413136[122] = 0; - out_6716422747633413136[123] = 0; - out_6716422747633413136[124] = 0; - out_6716422747633413136[125] = 0; - out_6716422747633413136[126] = 0; - out_6716422747633413136[127] = 0; - out_6716422747633413136[128] = 0; - out_6716422747633413136[129] = 0; - out_6716422747633413136[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_6716422747633413136[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_6716422747633413136[132] = 1; - out_6716422747633413136[133] = 0; - out_6716422747633413136[134] = 0; - out_6716422747633413136[135] = 0; - out_6716422747633413136[136] = 0; - out_6716422747633413136[137] = 0; - out_6716422747633413136[138] = 0; - out_6716422747633413136[139] = 0; - out_6716422747633413136[140] = 0; - out_6716422747633413136[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_6716422747633413136[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_6716422747633413136[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_6716422747633413136[144] = 0; - out_6716422747633413136[145] = 0; - out_6716422747633413136[146] = 0; - out_6716422747633413136[147] = 0; - out_6716422747633413136[148] = 0; - out_6716422747633413136[149] = 0; - out_6716422747633413136[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_6716422747633413136[151] = 0; - out_6716422747633413136[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_6716422747633413136[153] = 0; - out_6716422747633413136[154] = 1; - out_6716422747633413136[155] = 0; - out_6716422747633413136[156] = 0; - out_6716422747633413136[157] = 0; - out_6716422747633413136[158] = 0; - out_6716422747633413136[159] = 0; - out_6716422747633413136[160] = 0; - out_6716422747633413136[161] = 0; - out_6716422747633413136[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_6716422747633413136[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_6716422747633413136[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_6716422747633413136[165] = 0; - out_6716422747633413136[166] = 0; - out_6716422747633413136[167] = 0; - out_6716422747633413136[168] = 0; - out_6716422747633413136[169] = 0; - out_6716422747633413136[170] = 0; - out_6716422747633413136[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_6716422747633413136[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_6716422747633413136[173] = 0; - out_6716422747633413136[174] = 0; - out_6716422747633413136[175] = 0; - out_6716422747633413136[176] = 1; - out_6716422747633413136[177] = 0; - out_6716422747633413136[178] = 0; - out_6716422747633413136[179] = 0; - out_6716422747633413136[180] = 0; - out_6716422747633413136[181] = 0; - out_6716422747633413136[182] = 0; - out_6716422747633413136[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_6716422747633413136[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_6716422747633413136[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_6716422747633413136[186] = 0; - out_6716422747633413136[187] = 0; - out_6716422747633413136[188] = 0; - out_6716422747633413136[189] = 0; - out_6716422747633413136[190] = 0; - out_6716422747633413136[191] = 0; - out_6716422747633413136[192] = 0; - out_6716422747633413136[193] = 0; - out_6716422747633413136[194] = 0; - out_6716422747633413136[195] = 0; - out_6716422747633413136[196] = 0; - out_6716422747633413136[197] = 0; - out_6716422747633413136[198] = 1; - out_6716422747633413136[199] = 0; - out_6716422747633413136[200] = 0; - out_6716422747633413136[201] = 0; - out_6716422747633413136[202] = 0; - out_6716422747633413136[203] = 0; - out_6716422747633413136[204] = 0; - out_6716422747633413136[205] = 0; - out_6716422747633413136[206] = 0; - out_6716422747633413136[207] = 0; - out_6716422747633413136[208] = 0; - out_6716422747633413136[209] = 0; - out_6716422747633413136[210] = 0; - out_6716422747633413136[211] = 0; - out_6716422747633413136[212] = 0; - out_6716422747633413136[213] = 0; - out_6716422747633413136[214] = 0; - out_6716422747633413136[215] = 0; - out_6716422747633413136[216] = 0; - out_6716422747633413136[217] = 0; - out_6716422747633413136[218] = 0; - out_6716422747633413136[219] = 0; - out_6716422747633413136[220] = 1; - out_6716422747633413136[221] = 0; - out_6716422747633413136[222] = 0; - out_6716422747633413136[223] = 0; - out_6716422747633413136[224] = 0; - out_6716422747633413136[225] = 0; - out_6716422747633413136[226] = 0; - out_6716422747633413136[227] = 0; - out_6716422747633413136[228] = 0; - out_6716422747633413136[229] = 0; - out_6716422747633413136[230] = 0; - out_6716422747633413136[231] = 0; - out_6716422747633413136[232] = 0; - out_6716422747633413136[233] = 0; - out_6716422747633413136[234] = 0; - out_6716422747633413136[235] = 0; - out_6716422747633413136[236] = 0; - out_6716422747633413136[237] = 0; - out_6716422747633413136[238] = 0; - out_6716422747633413136[239] = 0; - out_6716422747633413136[240] = 0; - out_6716422747633413136[241] = 0; - out_6716422747633413136[242] = 1; - out_6716422747633413136[243] = 0; - out_6716422747633413136[244] = 0; - out_6716422747633413136[245] = 0; - out_6716422747633413136[246] = 0; - out_6716422747633413136[247] = 0; - out_6716422747633413136[248] = 0; - out_6716422747633413136[249] = 0; - out_6716422747633413136[250] = 0; - out_6716422747633413136[251] = 0; - out_6716422747633413136[252] = 0; - out_6716422747633413136[253] = 0; - out_6716422747633413136[254] = 0; - out_6716422747633413136[255] = 0; - out_6716422747633413136[256] = 0; - out_6716422747633413136[257] = 0; - out_6716422747633413136[258] = 0; - out_6716422747633413136[259] = 0; - out_6716422747633413136[260] = 0; - out_6716422747633413136[261] = 0; - out_6716422747633413136[262] = 0; - out_6716422747633413136[263] = 0; - out_6716422747633413136[264] = 1; - out_6716422747633413136[265] = 0; - out_6716422747633413136[266] = 0; - out_6716422747633413136[267] = 0; - out_6716422747633413136[268] = 0; - out_6716422747633413136[269] = 0; - out_6716422747633413136[270] = 0; - out_6716422747633413136[271] = 0; - out_6716422747633413136[272] = 0; - out_6716422747633413136[273] = 0; - out_6716422747633413136[274] = 0; - out_6716422747633413136[275] = 0; - out_6716422747633413136[276] = 0; - out_6716422747633413136[277] = 0; - out_6716422747633413136[278] = 0; - out_6716422747633413136[279] = 0; - out_6716422747633413136[280] = 0; - out_6716422747633413136[281] = 0; - out_6716422747633413136[282] = 0; - out_6716422747633413136[283] = 0; - out_6716422747633413136[284] = 0; - out_6716422747633413136[285] = 0; - out_6716422747633413136[286] = 1; - out_6716422747633413136[287] = 0; - out_6716422747633413136[288] = 0; - out_6716422747633413136[289] = 0; - out_6716422747633413136[290] = 0; - out_6716422747633413136[291] = 0; - out_6716422747633413136[292] = 0; - out_6716422747633413136[293] = 0; - out_6716422747633413136[294] = 0; - out_6716422747633413136[295] = 0; - out_6716422747633413136[296] = 0; - out_6716422747633413136[297] = 0; - out_6716422747633413136[298] = 0; - out_6716422747633413136[299] = 0; - out_6716422747633413136[300] = 0; - out_6716422747633413136[301] = 0; - out_6716422747633413136[302] = 0; - out_6716422747633413136[303] = 0; - out_6716422747633413136[304] = 0; - out_6716422747633413136[305] = 0; - out_6716422747633413136[306] = 0; - out_6716422747633413136[307] = 0; - out_6716422747633413136[308] = 1; - out_6716422747633413136[309] = 0; - out_6716422747633413136[310] = 0; - out_6716422747633413136[311] = 0; - out_6716422747633413136[312] = 0; - out_6716422747633413136[313] = 0; - out_6716422747633413136[314] = 0; - out_6716422747633413136[315] = 0; - out_6716422747633413136[316] = 0; - out_6716422747633413136[317] = 0; - out_6716422747633413136[318] = 0; - out_6716422747633413136[319] = 0; - out_6716422747633413136[320] = 0; - out_6716422747633413136[321] = 0; - out_6716422747633413136[322] = 0; - out_6716422747633413136[323] = 0; - out_6716422747633413136[324] = 0; - out_6716422747633413136[325] = 0; - out_6716422747633413136[326] = 0; - out_6716422747633413136[327] = 0; - out_6716422747633413136[328] = 0; - out_6716422747633413136[329] = 0; - out_6716422747633413136[330] = 1; - out_6716422747633413136[331] = 0; - out_6716422747633413136[332] = 0; - out_6716422747633413136[333] = 0; - out_6716422747633413136[334] = 0; - out_6716422747633413136[335] = 0; - out_6716422747633413136[336] = 0; - out_6716422747633413136[337] = 0; - out_6716422747633413136[338] = 0; - out_6716422747633413136[339] = 0; - out_6716422747633413136[340] = 0; - out_6716422747633413136[341] = 0; - out_6716422747633413136[342] = 0; - out_6716422747633413136[343] = 0; - out_6716422747633413136[344] = 0; - out_6716422747633413136[345] = 0; - out_6716422747633413136[346] = 0; - out_6716422747633413136[347] = 0; - out_6716422747633413136[348] = 0; - out_6716422747633413136[349] = 0; - out_6716422747633413136[350] = 0; - out_6716422747633413136[351] = 0; - out_6716422747633413136[352] = 1; - out_6716422747633413136[353] = 0; - out_6716422747633413136[354] = 0; - out_6716422747633413136[355] = 0; - out_6716422747633413136[356] = 0; - out_6716422747633413136[357] = 0; - out_6716422747633413136[358] = 0; - out_6716422747633413136[359] = 0; - out_6716422747633413136[360] = 0; - out_6716422747633413136[361] = 0; - out_6716422747633413136[362] = 0; - out_6716422747633413136[363] = 0; - out_6716422747633413136[364] = 0; - out_6716422747633413136[365] = 0; - out_6716422747633413136[366] = 0; - out_6716422747633413136[367] = 0; - out_6716422747633413136[368] = 0; - out_6716422747633413136[369] = 0; - out_6716422747633413136[370] = 0; - out_6716422747633413136[371] = 0; - out_6716422747633413136[372] = 0; - out_6716422747633413136[373] = 0; - out_6716422747633413136[374] = 1; - out_6716422747633413136[375] = 0; - out_6716422747633413136[376] = 0; - out_6716422747633413136[377] = 0; - out_6716422747633413136[378] = 0; - out_6716422747633413136[379] = 0; - out_6716422747633413136[380] = 0; - out_6716422747633413136[381] = 0; - out_6716422747633413136[382] = 0; - out_6716422747633413136[383] = 0; - out_6716422747633413136[384] = 0; - out_6716422747633413136[385] = 0; - out_6716422747633413136[386] = 0; - out_6716422747633413136[387] = 0; - out_6716422747633413136[388] = 0; - out_6716422747633413136[389] = 0; - out_6716422747633413136[390] = 0; - out_6716422747633413136[391] = 0; - out_6716422747633413136[392] = 0; - out_6716422747633413136[393] = 0; - out_6716422747633413136[394] = 0; - out_6716422747633413136[395] = 0; - out_6716422747633413136[396] = 1; - out_6716422747633413136[397] = 0; - out_6716422747633413136[398] = 0; - out_6716422747633413136[399] = 0; - out_6716422747633413136[400] = 0; - out_6716422747633413136[401] = 0; - out_6716422747633413136[402] = 0; - out_6716422747633413136[403] = 0; - out_6716422747633413136[404] = 0; - out_6716422747633413136[405] = 0; - out_6716422747633413136[406] = 0; - out_6716422747633413136[407] = 0; - out_6716422747633413136[408] = 0; - out_6716422747633413136[409] = 0; - out_6716422747633413136[410] = 0; - out_6716422747633413136[411] = 0; - out_6716422747633413136[412] = 0; - out_6716422747633413136[413] = 0; - out_6716422747633413136[414] = 0; - out_6716422747633413136[415] = 0; - out_6716422747633413136[416] = 0; - out_6716422747633413136[417] = 0; - out_6716422747633413136[418] = 1; - out_6716422747633413136[419] = 0; - out_6716422747633413136[420] = 0; - out_6716422747633413136[421] = 0; - out_6716422747633413136[422] = 0; - out_6716422747633413136[423] = 0; - out_6716422747633413136[424] = 0; - out_6716422747633413136[425] = 0; - out_6716422747633413136[426] = 0; - out_6716422747633413136[427] = 0; - out_6716422747633413136[428] = 0; - out_6716422747633413136[429] = 0; - out_6716422747633413136[430] = 0; - out_6716422747633413136[431] = 0; - out_6716422747633413136[432] = 0; - out_6716422747633413136[433] = 0; - out_6716422747633413136[434] = 0; - out_6716422747633413136[435] = 0; - out_6716422747633413136[436] = 0; - out_6716422747633413136[437] = 0; - out_6716422747633413136[438] = 0; - out_6716422747633413136[439] = 0; - out_6716422747633413136[440] = 1; +void F_fun(double *state, double dt, double *out_833440091851189730) { + out_833440091851189730[0] = 1; + out_833440091851189730[1] = 0; + out_833440091851189730[2] = 0; + out_833440091851189730[3] = 0; + out_833440091851189730[4] = 0; + out_833440091851189730[5] = 0; + out_833440091851189730[6] = dt; + out_833440091851189730[7] = 0; + out_833440091851189730[8] = 0; + out_833440091851189730[9] = 0; + out_833440091851189730[10] = 0; + out_833440091851189730[11] = 0; + out_833440091851189730[12] = 0; + out_833440091851189730[13] = 0; + out_833440091851189730[14] = 0; + out_833440091851189730[15] = 0; + out_833440091851189730[16] = 0; + out_833440091851189730[17] = 0; + out_833440091851189730[18] = 0; + out_833440091851189730[19] = 0; + out_833440091851189730[20] = 0; + out_833440091851189730[21] = 0; + out_833440091851189730[22] = 1; + out_833440091851189730[23] = 0; + out_833440091851189730[24] = 0; + out_833440091851189730[25] = 0; + out_833440091851189730[26] = 0; + out_833440091851189730[27] = 0; + out_833440091851189730[28] = dt; + out_833440091851189730[29] = 0; + out_833440091851189730[30] = 0; + out_833440091851189730[31] = 0; + out_833440091851189730[32] = 0; + out_833440091851189730[33] = 0; + out_833440091851189730[34] = 0; + out_833440091851189730[35] = 0; + out_833440091851189730[36] = 0; + out_833440091851189730[37] = 0; + out_833440091851189730[38] = 0; + out_833440091851189730[39] = 0; + out_833440091851189730[40] = 0; + out_833440091851189730[41] = 0; + out_833440091851189730[42] = 0; + out_833440091851189730[43] = 0; + out_833440091851189730[44] = 1; + out_833440091851189730[45] = 0; + out_833440091851189730[46] = 0; + out_833440091851189730[47] = 0; + out_833440091851189730[48] = 0; + out_833440091851189730[49] = 0; + out_833440091851189730[50] = dt; + out_833440091851189730[51] = 0; + out_833440091851189730[52] = 0; + out_833440091851189730[53] = 0; + out_833440091851189730[54] = 0; + out_833440091851189730[55] = 0; + out_833440091851189730[56] = 0; + out_833440091851189730[57] = 0; + out_833440091851189730[58] = 0; + out_833440091851189730[59] = 0; + out_833440091851189730[60] = 0; + out_833440091851189730[61] = 0; + out_833440091851189730[62] = 0; + out_833440091851189730[63] = 0; + out_833440091851189730[64] = 0; + out_833440091851189730[65] = 0; + out_833440091851189730[66] = 1; + out_833440091851189730[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_833440091851189730[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_833440091851189730[69] = 0; + out_833440091851189730[70] = 0; + out_833440091851189730[71] = 0; + out_833440091851189730[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_833440091851189730[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_833440091851189730[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_833440091851189730[75] = 0; + out_833440091851189730[76] = 0; + out_833440091851189730[77] = 0; + out_833440091851189730[78] = 0; + out_833440091851189730[79] = 0; + out_833440091851189730[80] = 0; + out_833440091851189730[81] = 0; + out_833440091851189730[82] = 0; + out_833440091851189730[83] = 0; + out_833440091851189730[84] = 0; + out_833440091851189730[85] = 0; + out_833440091851189730[86] = 0; + out_833440091851189730[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_833440091851189730[88] = 1; + out_833440091851189730[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_833440091851189730[90] = 0; + out_833440091851189730[91] = 0; + out_833440091851189730[92] = 0; + out_833440091851189730[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_833440091851189730[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_833440091851189730[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_833440091851189730[96] = 0; + out_833440091851189730[97] = 0; + out_833440091851189730[98] = 0; + out_833440091851189730[99] = 0; + out_833440091851189730[100] = 0; + out_833440091851189730[101] = 0; + out_833440091851189730[102] = 0; + out_833440091851189730[103] = 0; + out_833440091851189730[104] = 0; + out_833440091851189730[105] = 0; + out_833440091851189730[106] = 0; + out_833440091851189730[107] = 0; + out_833440091851189730[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_833440091851189730[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_833440091851189730[110] = 1; + out_833440091851189730[111] = 0; + out_833440091851189730[112] = 0; + out_833440091851189730[113] = 0; + out_833440091851189730[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_833440091851189730[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_833440091851189730[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_833440091851189730[117] = 0; + out_833440091851189730[118] = 0; + out_833440091851189730[119] = 0; + out_833440091851189730[120] = 0; + out_833440091851189730[121] = 0; + out_833440091851189730[122] = 0; + out_833440091851189730[123] = 0; + out_833440091851189730[124] = 0; + out_833440091851189730[125] = 0; + out_833440091851189730[126] = 0; + out_833440091851189730[127] = 0; + out_833440091851189730[128] = 0; + out_833440091851189730[129] = 0; + out_833440091851189730[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_833440091851189730[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_833440091851189730[132] = 1; + out_833440091851189730[133] = 0; + out_833440091851189730[134] = 0; + out_833440091851189730[135] = 0; + out_833440091851189730[136] = 0; + out_833440091851189730[137] = 0; + out_833440091851189730[138] = 0; + out_833440091851189730[139] = 0; + out_833440091851189730[140] = 0; + out_833440091851189730[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_833440091851189730[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_833440091851189730[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_833440091851189730[144] = 0; + out_833440091851189730[145] = 0; + out_833440091851189730[146] = 0; + out_833440091851189730[147] = 0; + out_833440091851189730[148] = 0; + out_833440091851189730[149] = 0; + out_833440091851189730[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_833440091851189730[151] = 0; + out_833440091851189730[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_833440091851189730[153] = 0; + out_833440091851189730[154] = 1; + out_833440091851189730[155] = 0; + out_833440091851189730[156] = 0; + out_833440091851189730[157] = 0; + out_833440091851189730[158] = 0; + out_833440091851189730[159] = 0; + out_833440091851189730[160] = 0; + out_833440091851189730[161] = 0; + out_833440091851189730[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_833440091851189730[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_833440091851189730[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_833440091851189730[165] = 0; + out_833440091851189730[166] = 0; + out_833440091851189730[167] = 0; + out_833440091851189730[168] = 0; + out_833440091851189730[169] = 0; + out_833440091851189730[170] = 0; + out_833440091851189730[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_833440091851189730[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_833440091851189730[173] = 0; + out_833440091851189730[174] = 0; + out_833440091851189730[175] = 0; + out_833440091851189730[176] = 1; + out_833440091851189730[177] = 0; + out_833440091851189730[178] = 0; + out_833440091851189730[179] = 0; + out_833440091851189730[180] = 0; + out_833440091851189730[181] = 0; + out_833440091851189730[182] = 0; + out_833440091851189730[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_833440091851189730[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_833440091851189730[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_833440091851189730[186] = 0; + out_833440091851189730[187] = 0; + out_833440091851189730[188] = 0; + out_833440091851189730[189] = 0; + out_833440091851189730[190] = 0; + out_833440091851189730[191] = 0; + out_833440091851189730[192] = 0; + out_833440091851189730[193] = 0; + out_833440091851189730[194] = 0; + out_833440091851189730[195] = 0; + out_833440091851189730[196] = 0; + out_833440091851189730[197] = 0; + out_833440091851189730[198] = 1; + out_833440091851189730[199] = 0; + out_833440091851189730[200] = 0; + out_833440091851189730[201] = 0; + out_833440091851189730[202] = 0; + out_833440091851189730[203] = 0; + out_833440091851189730[204] = 0; + out_833440091851189730[205] = 0; + out_833440091851189730[206] = 0; + out_833440091851189730[207] = 0; + out_833440091851189730[208] = 0; + out_833440091851189730[209] = 0; + out_833440091851189730[210] = 0; + out_833440091851189730[211] = 0; + out_833440091851189730[212] = 0; + out_833440091851189730[213] = 0; + out_833440091851189730[214] = 0; + out_833440091851189730[215] = 0; + out_833440091851189730[216] = 0; + out_833440091851189730[217] = 0; + out_833440091851189730[218] = 0; + out_833440091851189730[219] = 0; + out_833440091851189730[220] = 1; + out_833440091851189730[221] = 0; + out_833440091851189730[222] = 0; + out_833440091851189730[223] = 0; + out_833440091851189730[224] = 0; + out_833440091851189730[225] = 0; + out_833440091851189730[226] = 0; + out_833440091851189730[227] = 0; + out_833440091851189730[228] = 0; + out_833440091851189730[229] = 0; + out_833440091851189730[230] = 0; + out_833440091851189730[231] = 0; + out_833440091851189730[232] = 0; + out_833440091851189730[233] = 0; + out_833440091851189730[234] = 0; + out_833440091851189730[235] = 0; + out_833440091851189730[236] = 0; + out_833440091851189730[237] = 0; + out_833440091851189730[238] = 0; + out_833440091851189730[239] = 0; + out_833440091851189730[240] = 0; + out_833440091851189730[241] = 0; + out_833440091851189730[242] = 1; + out_833440091851189730[243] = 0; + out_833440091851189730[244] = 0; + out_833440091851189730[245] = 0; + out_833440091851189730[246] = 0; + out_833440091851189730[247] = 0; + out_833440091851189730[248] = 0; + out_833440091851189730[249] = 0; + out_833440091851189730[250] = 0; + out_833440091851189730[251] = 0; + out_833440091851189730[252] = 0; + out_833440091851189730[253] = 0; + out_833440091851189730[254] = 0; + out_833440091851189730[255] = 0; + out_833440091851189730[256] = 0; + out_833440091851189730[257] = 0; + out_833440091851189730[258] = 0; + out_833440091851189730[259] = 0; + out_833440091851189730[260] = 0; + out_833440091851189730[261] = 0; + out_833440091851189730[262] = 0; + out_833440091851189730[263] = 0; + out_833440091851189730[264] = 1; + out_833440091851189730[265] = 0; + out_833440091851189730[266] = 0; + out_833440091851189730[267] = 0; + out_833440091851189730[268] = 0; + out_833440091851189730[269] = 0; + out_833440091851189730[270] = 0; + out_833440091851189730[271] = 0; + out_833440091851189730[272] = 0; + out_833440091851189730[273] = 0; + out_833440091851189730[274] = 0; + out_833440091851189730[275] = 0; + out_833440091851189730[276] = 0; + out_833440091851189730[277] = 0; + out_833440091851189730[278] = 0; + out_833440091851189730[279] = 0; + out_833440091851189730[280] = 0; + out_833440091851189730[281] = 0; + out_833440091851189730[282] = 0; + out_833440091851189730[283] = 0; + out_833440091851189730[284] = 0; + out_833440091851189730[285] = 0; + out_833440091851189730[286] = 1; + out_833440091851189730[287] = 0; + out_833440091851189730[288] = 0; + out_833440091851189730[289] = 0; + out_833440091851189730[290] = 0; + out_833440091851189730[291] = 0; + out_833440091851189730[292] = 0; + out_833440091851189730[293] = 0; + out_833440091851189730[294] = 0; + out_833440091851189730[295] = 0; + out_833440091851189730[296] = 0; + out_833440091851189730[297] = 0; + out_833440091851189730[298] = 0; + out_833440091851189730[299] = 0; + out_833440091851189730[300] = 0; + out_833440091851189730[301] = 0; + out_833440091851189730[302] = 0; + out_833440091851189730[303] = 0; + out_833440091851189730[304] = 0; + out_833440091851189730[305] = 0; + out_833440091851189730[306] = 0; + out_833440091851189730[307] = 0; + out_833440091851189730[308] = 1; + out_833440091851189730[309] = 0; + out_833440091851189730[310] = 0; + out_833440091851189730[311] = 0; + out_833440091851189730[312] = 0; + out_833440091851189730[313] = 0; + out_833440091851189730[314] = 0; + out_833440091851189730[315] = 0; + out_833440091851189730[316] = 0; + out_833440091851189730[317] = 0; + out_833440091851189730[318] = 0; + out_833440091851189730[319] = 0; + out_833440091851189730[320] = 0; + out_833440091851189730[321] = 0; + out_833440091851189730[322] = 0; + out_833440091851189730[323] = 0; + out_833440091851189730[324] = 0; + out_833440091851189730[325] = 0; + out_833440091851189730[326] = 0; + out_833440091851189730[327] = 0; + out_833440091851189730[328] = 0; + out_833440091851189730[329] = 0; + out_833440091851189730[330] = 1; + out_833440091851189730[331] = 0; + out_833440091851189730[332] = 0; + out_833440091851189730[333] = 0; + out_833440091851189730[334] = 0; + out_833440091851189730[335] = 0; + out_833440091851189730[336] = 0; + out_833440091851189730[337] = 0; + out_833440091851189730[338] = 0; + out_833440091851189730[339] = 0; + out_833440091851189730[340] = 0; + out_833440091851189730[341] = 0; + out_833440091851189730[342] = 0; + out_833440091851189730[343] = 0; + out_833440091851189730[344] = 0; + out_833440091851189730[345] = 0; + out_833440091851189730[346] = 0; + out_833440091851189730[347] = 0; + out_833440091851189730[348] = 0; + out_833440091851189730[349] = 0; + out_833440091851189730[350] = 0; + out_833440091851189730[351] = 0; + out_833440091851189730[352] = 1; + out_833440091851189730[353] = 0; + out_833440091851189730[354] = 0; + out_833440091851189730[355] = 0; + out_833440091851189730[356] = 0; + out_833440091851189730[357] = 0; + out_833440091851189730[358] = 0; + out_833440091851189730[359] = 0; + out_833440091851189730[360] = 0; + out_833440091851189730[361] = 0; + out_833440091851189730[362] = 0; + out_833440091851189730[363] = 0; + out_833440091851189730[364] = 0; + out_833440091851189730[365] = 0; + out_833440091851189730[366] = 0; + out_833440091851189730[367] = 0; + out_833440091851189730[368] = 0; + out_833440091851189730[369] = 0; + out_833440091851189730[370] = 0; + out_833440091851189730[371] = 0; + out_833440091851189730[372] = 0; + out_833440091851189730[373] = 0; + out_833440091851189730[374] = 1; + out_833440091851189730[375] = 0; + out_833440091851189730[376] = 0; + out_833440091851189730[377] = 0; + out_833440091851189730[378] = 0; + out_833440091851189730[379] = 0; + out_833440091851189730[380] = 0; + out_833440091851189730[381] = 0; + out_833440091851189730[382] = 0; + out_833440091851189730[383] = 0; + out_833440091851189730[384] = 0; + out_833440091851189730[385] = 0; + out_833440091851189730[386] = 0; + out_833440091851189730[387] = 0; + out_833440091851189730[388] = 0; + out_833440091851189730[389] = 0; + out_833440091851189730[390] = 0; + out_833440091851189730[391] = 0; + out_833440091851189730[392] = 0; + out_833440091851189730[393] = 0; + out_833440091851189730[394] = 0; + out_833440091851189730[395] = 0; + out_833440091851189730[396] = 1; + out_833440091851189730[397] = 0; + out_833440091851189730[398] = 0; + out_833440091851189730[399] = 0; + out_833440091851189730[400] = 0; + out_833440091851189730[401] = 0; + out_833440091851189730[402] = 0; + out_833440091851189730[403] = 0; + out_833440091851189730[404] = 0; + out_833440091851189730[405] = 0; + out_833440091851189730[406] = 0; + out_833440091851189730[407] = 0; + out_833440091851189730[408] = 0; + out_833440091851189730[409] = 0; + out_833440091851189730[410] = 0; + out_833440091851189730[411] = 0; + out_833440091851189730[412] = 0; + out_833440091851189730[413] = 0; + out_833440091851189730[414] = 0; + out_833440091851189730[415] = 0; + out_833440091851189730[416] = 0; + out_833440091851189730[417] = 0; + out_833440091851189730[418] = 1; + out_833440091851189730[419] = 0; + out_833440091851189730[420] = 0; + out_833440091851189730[421] = 0; + out_833440091851189730[422] = 0; + out_833440091851189730[423] = 0; + out_833440091851189730[424] = 0; + out_833440091851189730[425] = 0; + out_833440091851189730[426] = 0; + out_833440091851189730[427] = 0; + out_833440091851189730[428] = 0; + out_833440091851189730[429] = 0; + out_833440091851189730[430] = 0; + out_833440091851189730[431] = 0; + out_833440091851189730[432] = 0; + out_833440091851189730[433] = 0; + out_833440091851189730[434] = 0; + out_833440091851189730[435] = 0; + out_833440091851189730[436] = 0; + out_833440091851189730[437] = 0; + out_833440091851189730[438] = 0; + out_833440091851189730[439] = 0; + out_833440091851189730[440] = 1; } -void h_4(double *state, double *unused, double *out_7766204740505938751) { - out_7766204740505938751[0] = state[10] + state[13]; - out_7766204740505938751[1] = state[11] + state[14]; - out_7766204740505938751[2] = state[12] + state[15]; +void h_4(double *state, double *unused, double *out_5875214861579885541) { + out_5875214861579885541[0] = state[10] + state[13]; + out_5875214861579885541[1] = state[11] + state[14]; + out_5875214861579885541[2] = state[12] + state[15]; } -void H_4(double *state, double *unused, double *out_5987995952750113477) { - out_5987995952750113477[0] = 0; - out_5987995952750113477[1] = 0; - out_5987995952750113477[2] = 0; - out_5987995952750113477[3] = 0; - out_5987995952750113477[4] = 0; - out_5987995952750113477[5] = 0; - out_5987995952750113477[6] = 0; - out_5987995952750113477[7] = 0; - out_5987995952750113477[8] = 0; - out_5987995952750113477[9] = 0; - out_5987995952750113477[10] = 1; - out_5987995952750113477[11] = 0; - out_5987995952750113477[12] = 0; - out_5987995952750113477[13] = 1; - out_5987995952750113477[14] = 0; - out_5987995952750113477[15] = 0; - out_5987995952750113477[16] = 0; - out_5987995952750113477[17] = 0; - out_5987995952750113477[18] = 0; - out_5987995952750113477[19] = 0; - out_5987995952750113477[20] = 0; - out_5987995952750113477[21] = 0; - out_5987995952750113477[22] = 0; - out_5987995952750113477[23] = 0; - out_5987995952750113477[24] = 0; - out_5987995952750113477[25] = 0; - out_5987995952750113477[26] = 0; - out_5987995952750113477[27] = 0; - out_5987995952750113477[28] = 0; - out_5987995952750113477[29] = 0; - out_5987995952750113477[30] = 0; - out_5987995952750113477[31] = 0; - out_5987995952750113477[32] = 0; - out_5987995952750113477[33] = 1; - out_5987995952750113477[34] = 0; - out_5987995952750113477[35] = 0; - out_5987995952750113477[36] = 1; - out_5987995952750113477[37] = 0; - out_5987995952750113477[38] = 0; - out_5987995952750113477[39] = 0; - out_5987995952750113477[40] = 0; - out_5987995952750113477[41] = 0; - out_5987995952750113477[42] = 0; - out_5987995952750113477[43] = 0; - out_5987995952750113477[44] = 0; - out_5987995952750113477[45] = 0; - out_5987995952750113477[46] = 0; - out_5987995952750113477[47] = 0; - out_5987995952750113477[48] = 0; - out_5987995952750113477[49] = 0; - out_5987995952750113477[50] = 0; - out_5987995952750113477[51] = 0; - out_5987995952750113477[52] = 0; - out_5987995952750113477[53] = 0; - out_5987995952750113477[54] = 0; - out_5987995952750113477[55] = 0; - out_5987995952750113477[56] = 1; - out_5987995952750113477[57] = 0; - out_5987995952750113477[58] = 0; - out_5987995952750113477[59] = 1; - out_5987995952750113477[60] = 0; - out_5987995952750113477[61] = 0; - out_5987995952750113477[62] = 0; - out_5987995952750113477[63] = 0; - out_5987995952750113477[64] = 0; - out_5987995952750113477[65] = 0; +void H_4(double *state, double *unused, double *out_276857831883521901) { + out_276857831883521901[0] = 0; + out_276857831883521901[1] = 0; + out_276857831883521901[2] = 0; + out_276857831883521901[3] = 0; + out_276857831883521901[4] = 0; + out_276857831883521901[5] = 0; + out_276857831883521901[6] = 0; + out_276857831883521901[7] = 0; + out_276857831883521901[8] = 0; + out_276857831883521901[9] = 0; + out_276857831883521901[10] = 1; + out_276857831883521901[11] = 0; + out_276857831883521901[12] = 0; + out_276857831883521901[13] = 1; + out_276857831883521901[14] = 0; + out_276857831883521901[15] = 0; + out_276857831883521901[16] = 0; + out_276857831883521901[17] = 0; + out_276857831883521901[18] = 0; + out_276857831883521901[19] = 0; + out_276857831883521901[20] = 0; + out_276857831883521901[21] = 0; + out_276857831883521901[22] = 0; + out_276857831883521901[23] = 0; + out_276857831883521901[24] = 0; + out_276857831883521901[25] = 0; + out_276857831883521901[26] = 0; + out_276857831883521901[27] = 0; + out_276857831883521901[28] = 0; + out_276857831883521901[29] = 0; + out_276857831883521901[30] = 0; + out_276857831883521901[31] = 0; + out_276857831883521901[32] = 0; + out_276857831883521901[33] = 1; + out_276857831883521901[34] = 0; + out_276857831883521901[35] = 0; + out_276857831883521901[36] = 1; + out_276857831883521901[37] = 0; + out_276857831883521901[38] = 0; + out_276857831883521901[39] = 0; + out_276857831883521901[40] = 0; + out_276857831883521901[41] = 0; + out_276857831883521901[42] = 0; + out_276857831883521901[43] = 0; + out_276857831883521901[44] = 0; + out_276857831883521901[45] = 0; + out_276857831883521901[46] = 0; + out_276857831883521901[47] = 0; + out_276857831883521901[48] = 0; + out_276857831883521901[49] = 0; + out_276857831883521901[50] = 0; + out_276857831883521901[51] = 0; + out_276857831883521901[52] = 0; + out_276857831883521901[53] = 0; + out_276857831883521901[54] = 0; + out_276857831883521901[55] = 0; + out_276857831883521901[56] = 1; + out_276857831883521901[57] = 0; + out_276857831883521901[58] = 0; + out_276857831883521901[59] = 1; + out_276857831883521901[60] = 0; + out_276857831883521901[61] = 0; + out_276857831883521901[62] = 0; + out_276857831883521901[63] = 0; + out_276857831883521901[64] = 0; + out_276857831883521901[65] = 0; } -void h_9(double *state, double *unused, double *out_2388230207696517986) { - out_2388230207696517986[0] = state[10]; - out_2388230207696517986[1] = state[11]; - out_2388230207696517986[2] = state[12]; +void h_9(double *state, double *unused, double *out_7431485379286447551) { + out_7431485379286447551[0] = state[10]; + out_7431485379286447551[1] = state[11]; + out_7431485379286447551[2] = state[12]; } -void H_9(double *state, double *unused, double *out_6229185599379704122) { - out_6229185599379704122[0] = 0; - out_6229185599379704122[1] = 0; - out_6229185599379704122[2] = 0; - out_6229185599379704122[3] = 0; - out_6229185599379704122[4] = 0; - out_6229185599379704122[5] = 0; - out_6229185599379704122[6] = 0; - out_6229185599379704122[7] = 0; - out_6229185599379704122[8] = 0; - out_6229185599379704122[9] = 0; - out_6229185599379704122[10] = 1; - out_6229185599379704122[11] = 0; - out_6229185599379704122[12] = 0; - out_6229185599379704122[13] = 0; - out_6229185599379704122[14] = 0; - out_6229185599379704122[15] = 0; - out_6229185599379704122[16] = 0; - out_6229185599379704122[17] = 0; - out_6229185599379704122[18] = 0; - out_6229185599379704122[19] = 0; - out_6229185599379704122[20] = 0; - out_6229185599379704122[21] = 0; - out_6229185599379704122[22] = 0; - out_6229185599379704122[23] = 0; - out_6229185599379704122[24] = 0; - out_6229185599379704122[25] = 0; - out_6229185599379704122[26] = 0; - out_6229185599379704122[27] = 0; - out_6229185599379704122[28] = 0; - out_6229185599379704122[29] = 0; - out_6229185599379704122[30] = 0; - out_6229185599379704122[31] = 0; - out_6229185599379704122[32] = 0; - out_6229185599379704122[33] = 1; - out_6229185599379704122[34] = 0; - out_6229185599379704122[35] = 0; - out_6229185599379704122[36] = 0; - out_6229185599379704122[37] = 0; - out_6229185599379704122[38] = 0; - out_6229185599379704122[39] = 0; - out_6229185599379704122[40] = 0; - out_6229185599379704122[41] = 0; - out_6229185599379704122[42] = 0; - out_6229185599379704122[43] = 0; - out_6229185599379704122[44] = 0; - out_6229185599379704122[45] = 0; - out_6229185599379704122[46] = 0; - out_6229185599379704122[47] = 0; - out_6229185599379704122[48] = 0; - out_6229185599379704122[49] = 0; - out_6229185599379704122[50] = 0; - out_6229185599379704122[51] = 0; - out_6229185599379704122[52] = 0; - out_6229185599379704122[53] = 0; - out_6229185599379704122[54] = 0; - out_6229185599379704122[55] = 0; - out_6229185599379704122[56] = 1; - out_6229185599379704122[57] = 0; - out_6229185599379704122[58] = 0; - out_6229185599379704122[59] = 0; - out_6229185599379704122[60] = 0; - out_6229185599379704122[61] = 0; - out_6229185599379704122[62] = 0; - out_6229185599379704122[63] = 0; - out_6229185599379704122[64] = 0; - out_6229185599379704122[65] = 0; +void H_9(double *state, double *unused, double *out_7564076767147969371) { + out_7564076767147969371[0] = 0; + out_7564076767147969371[1] = 0; + out_7564076767147969371[2] = 0; + out_7564076767147969371[3] = 0; + out_7564076767147969371[4] = 0; + out_7564076767147969371[5] = 0; + out_7564076767147969371[6] = 0; + out_7564076767147969371[7] = 0; + out_7564076767147969371[8] = 0; + out_7564076767147969371[9] = 0; + out_7564076767147969371[10] = 1; + out_7564076767147969371[11] = 0; + out_7564076767147969371[12] = 0; + out_7564076767147969371[13] = 0; + out_7564076767147969371[14] = 0; + out_7564076767147969371[15] = 0; + out_7564076767147969371[16] = 0; + out_7564076767147969371[17] = 0; + out_7564076767147969371[18] = 0; + out_7564076767147969371[19] = 0; + out_7564076767147969371[20] = 0; + out_7564076767147969371[21] = 0; + out_7564076767147969371[22] = 0; + out_7564076767147969371[23] = 0; + out_7564076767147969371[24] = 0; + out_7564076767147969371[25] = 0; + out_7564076767147969371[26] = 0; + out_7564076767147969371[27] = 0; + out_7564076767147969371[28] = 0; + out_7564076767147969371[29] = 0; + out_7564076767147969371[30] = 0; + out_7564076767147969371[31] = 0; + out_7564076767147969371[32] = 0; + out_7564076767147969371[33] = 1; + out_7564076767147969371[34] = 0; + out_7564076767147969371[35] = 0; + out_7564076767147969371[36] = 0; + out_7564076767147969371[37] = 0; + out_7564076767147969371[38] = 0; + out_7564076767147969371[39] = 0; + out_7564076767147969371[40] = 0; + out_7564076767147969371[41] = 0; + out_7564076767147969371[42] = 0; + out_7564076767147969371[43] = 0; + out_7564076767147969371[44] = 0; + out_7564076767147969371[45] = 0; + out_7564076767147969371[46] = 0; + out_7564076767147969371[47] = 0; + out_7564076767147969371[48] = 0; + out_7564076767147969371[49] = 0; + out_7564076767147969371[50] = 0; + out_7564076767147969371[51] = 0; + out_7564076767147969371[52] = 0; + out_7564076767147969371[53] = 0; + out_7564076767147969371[54] = 0; + out_7564076767147969371[55] = 0; + out_7564076767147969371[56] = 1; + out_7564076767147969371[57] = 0; + out_7564076767147969371[58] = 0; + out_7564076767147969371[59] = 0; + out_7564076767147969371[60] = 0; + out_7564076767147969371[61] = 0; + out_7564076767147969371[62] = 0; + out_7564076767147969371[63] = 0; + out_7564076767147969371[64] = 0; + out_7564076767147969371[65] = 0; } -void h_10(double *state, double *unused, double *out_9053893872496357561) { - out_9053893872496357561[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_9053893872496357561[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_9053893872496357561[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_8274293454775594883) { + out_8274293454775594883[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_8274293454775594883[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_8274293454775594883[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_140518164600154776) { - out_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[7] = 0; - out_140518164600154776[8] = 0; - out_140518164600154776[9] = 0; - out_140518164600154776[10] = 0; - out_140518164600154776[11] = 0; - out_140518164600154776[12] = 0; - out_140518164600154776[13] = 0; - out_140518164600154776[14] = 0; - out_140518164600154776[15] = 0; - out_140518164600154776[16] = 1; - out_140518164600154776[17] = 0; - out_140518164600154776[18] = 0; - out_140518164600154776[19] = 1; - out_140518164600154776[20] = 0; - out_140518164600154776[21] = 0; - out_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[29] = 0; - out_140518164600154776[30] = 0; - out_140518164600154776[31] = 0; - out_140518164600154776[32] = 0; - out_140518164600154776[33] = 0; - out_140518164600154776[34] = 0; - out_140518164600154776[35] = 0; - out_140518164600154776[36] = 0; - out_140518164600154776[37] = 0; - out_140518164600154776[38] = 0; - out_140518164600154776[39] = 1; - out_140518164600154776[40] = 0; - out_140518164600154776[41] = 0; - out_140518164600154776[42] = 1; - out_140518164600154776[43] = 0; - out_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[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_140518164600154776[51] = 0; - out_140518164600154776[52] = 0; - out_140518164600154776[53] = 0; - out_140518164600154776[54] = 0; - out_140518164600154776[55] = 0; - out_140518164600154776[56] = 0; - out_140518164600154776[57] = 0; - out_140518164600154776[58] = 0; - out_140518164600154776[59] = 0; - out_140518164600154776[60] = 0; - out_140518164600154776[61] = 0; - out_140518164600154776[62] = 1; - out_140518164600154776[63] = 0; - out_140518164600154776[64] = 0; - out_140518164600154776[65] = 1; +void H_10(double *state, double *unused, double *out_3646697484698039257) { + out_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[7] = 0; + out_3646697484698039257[8] = 0; + out_3646697484698039257[9] = 0; + out_3646697484698039257[10] = 0; + out_3646697484698039257[11] = 0; + out_3646697484698039257[12] = 0; + out_3646697484698039257[13] = 0; + out_3646697484698039257[14] = 0; + out_3646697484698039257[15] = 0; + out_3646697484698039257[16] = 1; + out_3646697484698039257[17] = 0; + out_3646697484698039257[18] = 0; + out_3646697484698039257[19] = 1; + out_3646697484698039257[20] = 0; + out_3646697484698039257[21] = 0; + out_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[29] = 0; + out_3646697484698039257[30] = 0; + out_3646697484698039257[31] = 0; + out_3646697484698039257[32] = 0; + out_3646697484698039257[33] = 0; + out_3646697484698039257[34] = 0; + out_3646697484698039257[35] = 0; + out_3646697484698039257[36] = 0; + out_3646697484698039257[37] = 0; + out_3646697484698039257[38] = 0; + out_3646697484698039257[39] = 1; + out_3646697484698039257[40] = 0; + out_3646697484698039257[41] = 0; + out_3646697484698039257[42] = 1; + out_3646697484698039257[43] = 0; + out_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[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_3646697484698039257[51] = 0; + out_3646697484698039257[52] = 0; + out_3646697484698039257[53] = 0; + out_3646697484698039257[54] = 0; + out_3646697484698039257[55] = 0; + out_3646697484698039257[56] = 0; + out_3646697484698039257[57] = 0; + out_3646697484698039257[58] = 0; + out_3646697484698039257[59] = 0; + out_3646697484698039257[60] = 0; + out_3646697484698039257[61] = 0; + out_3646697484698039257[62] = 1; + out_3646697484698039257[63] = 0; + out_3646697484698039257[64] = 0; + out_3646697484698039257[65] = 1; } -void h_12(double *state, double *unused, double *out_835136029362175519) { - out_835136029362175519[0] = state[0]; - out_835136029362175519[1] = state[1]; - out_835136029362175519[2] = state[2]; +void h_12(double *state, double *unused, double *out_7462563038781612366) { + out_7462563038781612366[0] = state[0]; + out_7462563038781612366[1] = state[1]; + out_7462563038781612366[2] = state[2]; } -void H_12(double *state, double *unused, double *out_6609094977797707144) { - out_6609094977797707144[0] = 1; - out_6609094977797707144[1] = 0; - out_6609094977797707144[2] = 0; - out_6609094977797707144[3] = 0; - out_6609094977797707144[4] = 0; - out_6609094977797707144[5] = 0; - out_6609094977797707144[6] = 0; - out_6609094977797707144[7] = 0; - out_6609094977797707144[8] = 0; - out_6609094977797707144[9] = 0; - out_6609094977797707144[10] = 0; - out_6609094977797707144[11] = 0; - out_6609094977797707144[12] = 0; - out_6609094977797707144[13] = 0; - out_6609094977797707144[14] = 0; - out_6609094977797707144[15] = 0; - out_6609094977797707144[16] = 0; - out_6609094977797707144[17] = 0; - out_6609094977797707144[18] = 0; - out_6609094977797707144[19] = 0; - out_6609094977797707144[20] = 0; - out_6609094977797707144[21] = 0; - out_6609094977797707144[22] = 0; - out_6609094977797707144[23] = 1; - out_6609094977797707144[24] = 0; - out_6609094977797707144[25] = 0; - out_6609094977797707144[26] = 0; - out_6609094977797707144[27] = 0; - out_6609094977797707144[28] = 0; - out_6609094977797707144[29] = 0; - out_6609094977797707144[30] = 0; - out_6609094977797707144[31] = 0; - out_6609094977797707144[32] = 0; - out_6609094977797707144[33] = 0; - out_6609094977797707144[34] = 0; - out_6609094977797707144[35] = 0; - out_6609094977797707144[36] = 0; - out_6609094977797707144[37] = 0; - out_6609094977797707144[38] = 0; - out_6609094977797707144[39] = 0; - out_6609094977797707144[40] = 0; - out_6609094977797707144[41] = 0; - out_6609094977797707144[42] = 0; - out_6609094977797707144[43] = 0; - out_6609094977797707144[44] = 0; - out_6609094977797707144[45] = 0; - out_6609094977797707144[46] = 1; - out_6609094977797707144[47] = 0; - out_6609094977797707144[48] = 0; - out_6609094977797707144[49] = 0; - out_6609094977797707144[50] = 0; - out_6609094977797707144[51] = 0; - out_6609094977797707144[52] = 0; - out_6609094977797707144[53] = 0; - out_6609094977797707144[54] = 0; - out_6609094977797707144[55] = 0; - out_6609094977797707144[56] = 0; - out_6609094977797707144[57] = 0; - out_6609094977797707144[58] = 0; - out_6609094977797707144[59] = 0; - out_6609094977797707144[60] = 0; - out_6609094977797707144[61] = 0; - out_6609094977797707144[62] = 0; - out_6609094977797707144[63] = 0; - out_6609094977797707144[64] = 0; - out_6609094977797707144[65] = 0; +void H_12(double *state, double *unused, double *out_6104400545159211095) { + out_6104400545159211095[0] = 1; + out_6104400545159211095[1] = 0; + out_6104400545159211095[2] = 0; + out_6104400545159211095[3] = 0; + out_6104400545159211095[4] = 0; + out_6104400545159211095[5] = 0; + out_6104400545159211095[6] = 0; + out_6104400545159211095[7] = 0; + out_6104400545159211095[8] = 0; + out_6104400545159211095[9] = 0; + out_6104400545159211095[10] = 0; + out_6104400545159211095[11] = 0; + out_6104400545159211095[12] = 0; + out_6104400545159211095[13] = 0; + out_6104400545159211095[14] = 0; + out_6104400545159211095[15] = 0; + out_6104400545159211095[16] = 0; + out_6104400545159211095[17] = 0; + out_6104400545159211095[18] = 0; + out_6104400545159211095[19] = 0; + out_6104400545159211095[20] = 0; + out_6104400545159211095[21] = 0; + out_6104400545159211095[22] = 0; + out_6104400545159211095[23] = 1; + out_6104400545159211095[24] = 0; + out_6104400545159211095[25] = 0; + out_6104400545159211095[26] = 0; + out_6104400545159211095[27] = 0; + out_6104400545159211095[28] = 0; + out_6104400545159211095[29] = 0; + out_6104400545159211095[30] = 0; + out_6104400545159211095[31] = 0; + out_6104400545159211095[32] = 0; + out_6104400545159211095[33] = 0; + out_6104400545159211095[34] = 0; + out_6104400545159211095[35] = 0; + out_6104400545159211095[36] = 0; + out_6104400545159211095[37] = 0; + out_6104400545159211095[38] = 0; + out_6104400545159211095[39] = 0; + out_6104400545159211095[40] = 0; + out_6104400545159211095[41] = 0; + out_6104400545159211095[42] = 0; + out_6104400545159211095[43] = 0; + out_6104400545159211095[44] = 0; + out_6104400545159211095[45] = 0; + out_6104400545159211095[46] = 1; + out_6104400545159211095[47] = 0; + out_6104400545159211095[48] = 0; + out_6104400545159211095[49] = 0; + out_6104400545159211095[50] = 0; + out_6104400545159211095[51] = 0; + out_6104400545159211095[52] = 0; + out_6104400545159211095[53] = 0; + out_6104400545159211095[54] = 0; + out_6104400545159211095[55] = 0; + out_6104400545159211095[56] = 0; + out_6104400545159211095[57] = 0; + out_6104400545159211095[58] = 0; + out_6104400545159211095[59] = 0; + out_6104400545159211095[60] = 0; + out_6104400545159211095[61] = 0; + out_6104400545159211095[62] = 0; + out_6104400545159211095[63] = 0; + out_6104400545159211095[64] = 0; + out_6104400545159211095[65] = 0; } -void h_35(double *state, double *unused, double *out_93555897102822674) { - out_93555897102822674[0] = state[7]; - out_93555897102822674[1] = state[8]; - out_93555897102822674[2] = state[9]; +void h_35(double *state, double *unused, double *out_3219025280718560296) { + out_3219025280718560296[0] = state[7]; + out_3219025280718560296[1] = state[8]; + out_3219025280718560296[2] = state[9]; } -void H_35(double *state, double *unused, double *out_9092086063586830763) { - out_9092086063586830763[0] = 0; - out_9092086063586830763[1] = 0; - out_9092086063586830763[2] = 0; - out_9092086063586830763[3] = 0; - out_9092086063586830763[4] = 0; - out_9092086063586830763[5] = 0; - out_9092086063586830763[6] = 0; - out_9092086063586830763[7] = 1; - out_9092086063586830763[8] = 0; - out_9092086063586830763[9] = 0; - out_9092086063586830763[10] = 0; - out_9092086063586830763[11] = 0; - out_9092086063586830763[12] = 0; - out_9092086063586830763[13] = 0; - out_9092086063586830763[14] = 0; - out_9092086063586830763[15] = 0; - out_9092086063586830763[16] = 0; - out_9092086063586830763[17] = 0; - out_9092086063586830763[18] = 0; - out_9092086063586830763[19] = 0; - out_9092086063586830763[20] = 0; - out_9092086063586830763[21] = 0; - out_9092086063586830763[22] = 0; - out_9092086063586830763[23] = 0; - out_9092086063586830763[24] = 0; - out_9092086063586830763[25] = 0; - out_9092086063586830763[26] = 0; - out_9092086063586830763[27] = 0; - out_9092086063586830763[28] = 0; - out_9092086063586830763[29] = 0; - out_9092086063586830763[30] = 1; - out_9092086063586830763[31] = 0; - out_9092086063586830763[32] = 0; - out_9092086063586830763[33] = 0; - out_9092086063586830763[34] = 0; - out_9092086063586830763[35] = 0; - out_9092086063586830763[36] = 0; - out_9092086063586830763[37] = 0; - out_9092086063586830763[38] = 0; - out_9092086063586830763[39] = 0; - out_9092086063586830763[40] = 0; - out_9092086063586830763[41] = 0; - out_9092086063586830763[42] = 0; - out_9092086063586830763[43] = 0; - out_9092086063586830763[44] = 0; - out_9092086063586830763[45] = 0; - out_9092086063586830763[46] = 0; - out_9092086063586830763[47] = 0; - out_9092086063586830763[48] = 0; - out_9092086063586830763[49] = 0; - out_9092086063586830763[50] = 0; - out_9092086063586830763[51] = 0; - out_9092086063586830763[52] = 0; - out_9092086063586830763[53] = 1; - out_9092086063586830763[54] = 0; - out_9092086063586830763[55] = 0; - out_9092086063586830763[56] = 0; - out_9092086063586830763[57] = 0; - out_9092086063586830763[58] = 0; - out_9092086063586830763[59] = 0; - out_9092086063586830763[60] = 0; - out_9092086063586830763[61] = 0; - out_9092086063586830763[62] = 0; - out_9092086063586830763[63] = 0; - out_9092086063586830763[64] = 0; - out_9092086063586830763[65] = 0; +void H_35(double *state, double *unused, double *out_3358837512834197386) { + out_3358837512834197386[0] = 0; + out_3358837512834197386[1] = 0; + out_3358837512834197386[2] = 0; + out_3358837512834197386[3] = 0; + out_3358837512834197386[4] = 0; + out_3358837512834197386[5] = 0; + out_3358837512834197386[6] = 0; + out_3358837512834197386[7] = 1; + out_3358837512834197386[8] = 0; + out_3358837512834197386[9] = 0; + out_3358837512834197386[10] = 0; + out_3358837512834197386[11] = 0; + out_3358837512834197386[12] = 0; + out_3358837512834197386[13] = 0; + out_3358837512834197386[14] = 0; + out_3358837512834197386[15] = 0; + out_3358837512834197386[16] = 0; + out_3358837512834197386[17] = 0; + out_3358837512834197386[18] = 0; + out_3358837512834197386[19] = 0; + out_3358837512834197386[20] = 0; + out_3358837512834197386[21] = 0; + out_3358837512834197386[22] = 0; + out_3358837512834197386[23] = 0; + out_3358837512834197386[24] = 0; + out_3358837512834197386[25] = 0; + out_3358837512834197386[26] = 0; + out_3358837512834197386[27] = 0; + out_3358837512834197386[28] = 0; + out_3358837512834197386[29] = 0; + out_3358837512834197386[30] = 1; + out_3358837512834197386[31] = 0; + out_3358837512834197386[32] = 0; + out_3358837512834197386[33] = 0; + out_3358837512834197386[34] = 0; + out_3358837512834197386[35] = 0; + out_3358837512834197386[36] = 0; + out_3358837512834197386[37] = 0; + out_3358837512834197386[38] = 0; + out_3358837512834197386[39] = 0; + out_3358837512834197386[40] = 0; + out_3358837512834197386[41] = 0; + out_3358837512834197386[42] = 0; + out_3358837512834197386[43] = 0; + out_3358837512834197386[44] = 0; + out_3358837512834197386[45] = 0; + out_3358837512834197386[46] = 0; + out_3358837512834197386[47] = 0; + out_3358837512834197386[48] = 0; + out_3358837512834197386[49] = 0; + out_3358837512834197386[50] = 0; + out_3358837512834197386[51] = 0; + out_3358837512834197386[52] = 0; + out_3358837512834197386[53] = 1; + out_3358837512834197386[54] = 0; + out_3358837512834197386[55] = 0; + out_3358837512834197386[56] = 0; + out_3358837512834197386[57] = 0; + out_3358837512834197386[58] = 0; + out_3358837512834197386[59] = 0; + out_3358837512834197386[60] = 0; + out_3358837512834197386[61] = 0; + out_3358837512834197386[62] = 0; + out_3358837512834197386[63] = 0; + out_3358837512834197386[64] = 0; + out_3358837512834197386[65] = 0; } -void h_32(double *state, double *unused, double *out_6290965057558394135) { - out_6290965057558394135[0] = state[3]; - out_6290965057558394135[1] = state[4]; - out_6290965057558394135[2] = state[5]; - out_6290965057558394135[3] = state[6]; +void h_32(double *state, double *unused, double *out_5537109185631613612) { + out_5537109185631613612[0] = state[3]; + out_5537109185631613612[1] = state[4]; + out_5537109185631613612[2] = state[5]; + out_5537109185631613612[3] = state[6]; } -void H_32(double *state, double *unused, double *out_2439793506428604497) { - out_2439793506428604497[0] = 0; - out_2439793506428604497[1] = 0; - out_2439793506428604497[2] = 0; - out_2439793506428604497[3] = 1; - out_2439793506428604497[4] = 0; - out_2439793506428604497[5] = 0; - out_2439793506428604497[6] = 0; - out_2439793506428604497[7] = 0; - out_2439793506428604497[8] = 0; - out_2439793506428604497[9] = 0; - out_2439793506428604497[10] = 0; - out_2439793506428604497[11] = 0; - out_2439793506428604497[12] = 0; - out_2439793506428604497[13] = 0; - out_2439793506428604497[14] = 0; - out_2439793506428604497[15] = 0; - out_2439793506428604497[16] = 0; - out_2439793506428604497[17] = 0; - out_2439793506428604497[18] = 0; - out_2439793506428604497[19] = 0; - out_2439793506428604497[20] = 0; - out_2439793506428604497[21] = 0; - out_2439793506428604497[22] = 0; - out_2439793506428604497[23] = 0; - out_2439793506428604497[24] = 0; - out_2439793506428604497[25] = 0; - out_2439793506428604497[26] = 1; - out_2439793506428604497[27] = 0; - out_2439793506428604497[28] = 0; - out_2439793506428604497[29] = 0; - out_2439793506428604497[30] = 0; - out_2439793506428604497[31] = 0; - out_2439793506428604497[32] = 0; - out_2439793506428604497[33] = 0; - out_2439793506428604497[34] = 0; - out_2439793506428604497[35] = 0; - out_2439793506428604497[36] = 0; - out_2439793506428604497[37] = 0; - out_2439793506428604497[38] = 0; - out_2439793506428604497[39] = 0; - out_2439793506428604497[40] = 0; - out_2439793506428604497[41] = 0; - out_2439793506428604497[42] = 0; - out_2439793506428604497[43] = 0; - out_2439793506428604497[44] = 0; - out_2439793506428604497[45] = 0; - out_2439793506428604497[46] = 0; - out_2439793506428604497[47] = 0; - out_2439793506428604497[48] = 0; - out_2439793506428604497[49] = 1; - out_2439793506428604497[50] = 0; - out_2439793506428604497[51] = 0; - out_2439793506428604497[52] = 0; - out_2439793506428604497[53] = 0; - out_2439793506428604497[54] = 0; - out_2439793506428604497[55] = 0; - out_2439793506428604497[56] = 0; - out_2439793506428604497[57] = 0; - out_2439793506428604497[58] = 0; - out_2439793506428604497[59] = 0; - out_2439793506428604497[60] = 0; - out_2439793506428604497[61] = 0; - out_2439793506428604497[62] = 0; - out_2439793506428604497[63] = 0; - out_2439793506428604497[64] = 0; - out_2439793506428604497[65] = 0; - out_2439793506428604497[66] = 0; - out_2439793506428604497[67] = 0; - out_2439793506428604497[68] = 0; - out_2439793506428604497[69] = 0; - out_2439793506428604497[70] = 0; - out_2439793506428604497[71] = 0; - out_2439793506428604497[72] = 1; - out_2439793506428604497[73] = 0; - out_2439793506428604497[74] = 0; - out_2439793506428604497[75] = 0; - out_2439793506428604497[76] = 0; - out_2439793506428604497[77] = 0; - out_2439793506428604497[78] = 0; - out_2439793506428604497[79] = 0; - out_2439793506428604497[80] = 0; - out_2439793506428604497[81] = 0; - out_2439793506428604497[82] = 0; - out_2439793506428604497[83] = 0; - out_2439793506428604497[84] = 0; - out_2439793506428604497[85] = 0; - out_2439793506428604497[86] = 0; - out_2439793506428604497[87] = 0; +void H_32(double *state, double *unused, double *out_3774684674196869746) { + out_3774684674196869746[0] = 0; + out_3774684674196869746[1] = 0; + out_3774684674196869746[2] = 0; + out_3774684674196869746[3] = 1; + out_3774684674196869746[4] = 0; + out_3774684674196869746[5] = 0; + out_3774684674196869746[6] = 0; + out_3774684674196869746[7] = 0; + out_3774684674196869746[8] = 0; + out_3774684674196869746[9] = 0; + out_3774684674196869746[10] = 0; + out_3774684674196869746[11] = 0; + out_3774684674196869746[12] = 0; + out_3774684674196869746[13] = 0; + out_3774684674196869746[14] = 0; + out_3774684674196869746[15] = 0; + out_3774684674196869746[16] = 0; + out_3774684674196869746[17] = 0; + out_3774684674196869746[18] = 0; + out_3774684674196869746[19] = 0; + out_3774684674196869746[20] = 0; + out_3774684674196869746[21] = 0; + out_3774684674196869746[22] = 0; + out_3774684674196869746[23] = 0; + out_3774684674196869746[24] = 0; + out_3774684674196869746[25] = 0; + out_3774684674196869746[26] = 1; + out_3774684674196869746[27] = 0; + out_3774684674196869746[28] = 0; + out_3774684674196869746[29] = 0; + out_3774684674196869746[30] = 0; + out_3774684674196869746[31] = 0; + out_3774684674196869746[32] = 0; + out_3774684674196869746[33] = 0; + out_3774684674196869746[34] = 0; + out_3774684674196869746[35] = 0; + out_3774684674196869746[36] = 0; + out_3774684674196869746[37] = 0; + out_3774684674196869746[38] = 0; + out_3774684674196869746[39] = 0; + out_3774684674196869746[40] = 0; + out_3774684674196869746[41] = 0; + out_3774684674196869746[42] = 0; + out_3774684674196869746[43] = 0; + out_3774684674196869746[44] = 0; + out_3774684674196869746[45] = 0; + out_3774684674196869746[46] = 0; + out_3774684674196869746[47] = 0; + out_3774684674196869746[48] = 0; + out_3774684674196869746[49] = 1; + out_3774684674196869746[50] = 0; + out_3774684674196869746[51] = 0; + out_3774684674196869746[52] = 0; + out_3774684674196869746[53] = 0; + out_3774684674196869746[54] = 0; + out_3774684674196869746[55] = 0; + out_3774684674196869746[56] = 0; + out_3774684674196869746[57] = 0; + out_3774684674196869746[58] = 0; + out_3774684674196869746[59] = 0; + out_3774684674196869746[60] = 0; + out_3774684674196869746[61] = 0; + out_3774684674196869746[62] = 0; + out_3774684674196869746[63] = 0; + out_3774684674196869746[64] = 0; + out_3774684674196869746[65] = 0; + out_3774684674196869746[66] = 0; + out_3774684674196869746[67] = 0; + out_3774684674196869746[68] = 0; + out_3774684674196869746[69] = 0; + out_3774684674196869746[70] = 0; + out_3774684674196869746[71] = 0; + out_3774684674196869746[72] = 1; + out_3774684674196869746[73] = 0; + out_3774684674196869746[74] = 0; + out_3774684674196869746[75] = 0; + out_3774684674196869746[76] = 0; + out_3774684674196869746[77] = 0; + out_3774684674196869746[78] = 0; + out_3774684674196869746[79] = 0; + out_3774684674196869746[80] = 0; + out_3774684674196869746[81] = 0; + out_3774684674196869746[82] = 0; + out_3774684674196869746[83] = 0; + out_3774684674196869746[84] = 0; + out_3774684674196869746[85] = 0; + out_3774684674196869746[86] = 0; + out_3774684674196869746[87] = 0; } -void h_13(double *state, double *unused, double *out_8490099498842921417) { - out_8490099498842921417[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_8490099498842921417[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_8490099498842921417[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_1615263710325240669) { + out_1615263710325240669[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_1615263710325240669[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_1615263710325240669[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_8653375813311677152) { - out_8653375813311677152[0] = 0; - out_8653375813311677152[1] = 0; - out_8653375813311677152[2] = 0; - out_8653375813311677152[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_8653375813311677152[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_8653375813311677152[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; - out_8653375813311677152[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_8653375813311677152[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); - out_8653375813311677152[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; - out_8653375813311677152[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; - out_8653375813311677152[10] = 0; - out_8653375813311677152[11] = 0; - out_8653375813311677152[12] = 0; - out_8653375813311677152[13] = 0; - out_8653375813311677152[14] = 0; - out_8653375813311677152[15] = 0; - out_8653375813311677152[16] = 0; - out_8653375813311677152[17] = 0; - out_8653375813311677152[18] = 0; - out_8653375813311677152[19] = 0; - out_8653375813311677152[20] = 0; - out_8653375813311677152[21] = 0; - out_8653375813311677152[22] = 0; - out_8653375813311677152[23] = 0; - out_8653375813311677152[24] = 0; - out_8653375813311677152[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_8653375813311677152[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_8653375813311677152[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_8653375813311677152[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; - out_8653375813311677152[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; - out_8653375813311677152[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); - out_8653375813311677152[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; - out_8653375813311677152[32] = 0; - out_8653375813311677152[33] = 0; - out_8653375813311677152[34] = 0; - out_8653375813311677152[35] = 0; - out_8653375813311677152[36] = 0; - out_8653375813311677152[37] = 0; - out_8653375813311677152[38] = 0; - out_8653375813311677152[39] = 0; - out_8653375813311677152[40] = 0; - out_8653375813311677152[41] = 0; - out_8653375813311677152[42] = 0; - out_8653375813311677152[43] = 0; - out_8653375813311677152[44] = 0; - out_8653375813311677152[45] = 0; - out_8653375813311677152[46] = 0; - out_8653375813311677152[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_8653375813311677152[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; - out_8653375813311677152[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_8653375813311677152[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_8653375813311677152[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; - out_8653375813311677152[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; - out_8653375813311677152[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); - out_8653375813311677152[54] = 0; - out_8653375813311677152[55] = 0; - out_8653375813311677152[56] = 0; - out_8653375813311677152[57] = 0; - out_8653375813311677152[58] = 0; - out_8653375813311677152[59] = 0; - out_8653375813311677152[60] = 0; - out_8653375813311677152[61] = 0; - out_8653375813311677152[62] = 0; - out_8653375813311677152[63] = 0; - out_8653375813311677152[64] = 0; - out_8653375813311677152[65] = 0; +void H_13(double *state, double *unused, double *out_1846820156559909960) { + out_1846820156559909960[0] = 0; + out_1846820156559909960[1] = 0; + out_1846820156559909960[2] = 0; + out_1846820156559909960[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_1846820156559909960[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_1846820156559909960[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; + out_1846820156559909960[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_1846820156559909960[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); + out_1846820156559909960[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; + out_1846820156559909960[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; + out_1846820156559909960[10] = 0; + out_1846820156559909960[11] = 0; + out_1846820156559909960[12] = 0; + out_1846820156559909960[13] = 0; + out_1846820156559909960[14] = 0; + out_1846820156559909960[15] = 0; + out_1846820156559909960[16] = 0; + out_1846820156559909960[17] = 0; + out_1846820156559909960[18] = 0; + out_1846820156559909960[19] = 0; + out_1846820156559909960[20] = 0; + out_1846820156559909960[21] = 0; + out_1846820156559909960[22] = 0; + out_1846820156559909960[23] = 0; + out_1846820156559909960[24] = 0; + out_1846820156559909960[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_1846820156559909960[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_1846820156559909960[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_1846820156559909960[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; + out_1846820156559909960[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; + out_1846820156559909960[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); + out_1846820156559909960[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; + out_1846820156559909960[32] = 0; + out_1846820156559909960[33] = 0; + out_1846820156559909960[34] = 0; + out_1846820156559909960[35] = 0; + out_1846820156559909960[36] = 0; + out_1846820156559909960[37] = 0; + out_1846820156559909960[38] = 0; + out_1846820156559909960[39] = 0; + out_1846820156559909960[40] = 0; + out_1846820156559909960[41] = 0; + out_1846820156559909960[42] = 0; + out_1846820156559909960[43] = 0; + out_1846820156559909960[44] = 0; + out_1846820156559909960[45] = 0; + out_1846820156559909960[46] = 0; + out_1846820156559909960[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_1846820156559909960[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; + out_1846820156559909960[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_1846820156559909960[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_1846820156559909960[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; + out_1846820156559909960[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; + out_1846820156559909960[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); + out_1846820156559909960[54] = 0; + out_1846820156559909960[55] = 0; + out_1846820156559909960[56] = 0; + out_1846820156559909960[57] = 0; + out_1846820156559909960[58] = 0; + out_1846820156559909960[59] = 0; + out_1846820156559909960[60] = 0; + out_1846820156559909960[61] = 0; + out_1846820156559909960[62] = 0; + out_1846820156559909960[63] = 0; + out_1846820156559909960[64] = 0; + out_1846820156559909960[65] = 0; } -void h_14(double *state, double *unused, double *out_2388230207696517986) { - out_2388230207696517986[0] = state[10]; - out_2388230207696517986[1] = state[11]; - out_2388230207696517986[2] = state[12]; +void h_14(double *state, double *unused, double *out_7431485379286447551) { + out_7431485379286447551[0] = state[10]; + out_7431485379286447551[1] = state[11]; + out_7431485379286447551[2] = state[12]; } -void H_14(double *state, double *unused, double *out_6229185599379704122) { - out_6229185599379704122[0] = 0; - out_6229185599379704122[1] = 0; - out_6229185599379704122[2] = 0; - out_6229185599379704122[3] = 0; - out_6229185599379704122[4] = 0; - out_6229185599379704122[5] = 0; - out_6229185599379704122[6] = 0; - out_6229185599379704122[7] = 0; - out_6229185599379704122[8] = 0; - out_6229185599379704122[9] = 0; - out_6229185599379704122[10] = 1; - out_6229185599379704122[11] = 0; - out_6229185599379704122[12] = 0; - out_6229185599379704122[13] = 0; - out_6229185599379704122[14] = 0; - out_6229185599379704122[15] = 0; - out_6229185599379704122[16] = 0; - out_6229185599379704122[17] = 0; - out_6229185599379704122[18] = 0; - out_6229185599379704122[19] = 0; - out_6229185599379704122[20] = 0; - out_6229185599379704122[21] = 0; - out_6229185599379704122[22] = 0; - out_6229185599379704122[23] = 0; - out_6229185599379704122[24] = 0; - out_6229185599379704122[25] = 0; - out_6229185599379704122[26] = 0; - out_6229185599379704122[27] = 0; - out_6229185599379704122[28] = 0; - out_6229185599379704122[29] = 0; - out_6229185599379704122[30] = 0; - out_6229185599379704122[31] = 0; - out_6229185599379704122[32] = 0; - out_6229185599379704122[33] = 1; - out_6229185599379704122[34] = 0; - out_6229185599379704122[35] = 0; - out_6229185599379704122[36] = 0; - out_6229185599379704122[37] = 0; - out_6229185599379704122[38] = 0; - out_6229185599379704122[39] = 0; - out_6229185599379704122[40] = 0; - out_6229185599379704122[41] = 0; - out_6229185599379704122[42] = 0; - out_6229185599379704122[43] = 0; - out_6229185599379704122[44] = 0; - out_6229185599379704122[45] = 0; - out_6229185599379704122[46] = 0; - out_6229185599379704122[47] = 0; - out_6229185599379704122[48] = 0; - out_6229185599379704122[49] = 0; - out_6229185599379704122[50] = 0; - out_6229185599379704122[51] = 0; - out_6229185599379704122[52] = 0; - out_6229185599379704122[53] = 0; - out_6229185599379704122[54] = 0; - out_6229185599379704122[55] = 0; - out_6229185599379704122[56] = 1; - out_6229185599379704122[57] = 0; - out_6229185599379704122[58] = 0; - out_6229185599379704122[59] = 0; - out_6229185599379704122[60] = 0; - out_6229185599379704122[61] = 0; - out_6229185599379704122[62] = 0; - out_6229185599379704122[63] = 0; - out_6229185599379704122[64] = 0; - out_6229185599379704122[65] = 0; +void H_14(double *state, double *unused, double *out_7564076767147969371) { + out_7564076767147969371[0] = 0; + out_7564076767147969371[1] = 0; + out_7564076767147969371[2] = 0; + out_7564076767147969371[3] = 0; + out_7564076767147969371[4] = 0; + out_7564076767147969371[5] = 0; + out_7564076767147969371[6] = 0; + out_7564076767147969371[7] = 0; + out_7564076767147969371[8] = 0; + out_7564076767147969371[9] = 0; + out_7564076767147969371[10] = 1; + out_7564076767147969371[11] = 0; + out_7564076767147969371[12] = 0; + out_7564076767147969371[13] = 0; + out_7564076767147969371[14] = 0; + out_7564076767147969371[15] = 0; + out_7564076767147969371[16] = 0; + out_7564076767147969371[17] = 0; + out_7564076767147969371[18] = 0; + out_7564076767147969371[19] = 0; + out_7564076767147969371[20] = 0; + out_7564076767147969371[21] = 0; + out_7564076767147969371[22] = 0; + out_7564076767147969371[23] = 0; + out_7564076767147969371[24] = 0; + out_7564076767147969371[25] = 0; + out_7564076767147969371[26] = 0; + out_7564076767147969371[27] = 0; + out_7564076767147969371[28] = 0; + out_7564076767147969371[29] = 0; + out_7564076767147969371[30] = 0; + out_7564076767147969371[31] = 0; + out_7564076767147969371[32] = 0; + out_7564076767147969371[33] = 1; + out_7564076767147969371[34] = 0; + out_7564076767147969371[35] = 0; + out_7564076767147969371[36] = 0; + out_7564076767147969371[37] = 0; + out_7564076767147969371[38] = 0; + out_7564076767147969371[39] = 0; + out_7564076767147969371[40] = 0; + out_7564076767147969371[41] = 0; + out_7564076767147969371[42] = 0; + out_7564076767147969371[43] = 0; + out_7564076767147969371[44] = 0; + out_7564076767147969371[45] = 0; + out_7564076767147969371[46] = 0; + out_7564076767147969371[47] = 0; + out_7564076767147969371[48] = 0; + out_7564076767147969371[49] = 0; + out_7564076767147969371[50] = 0; + out_7564076767147969371[51] = 0; + out_7564076767147969371[52] = 0; + out_7564076767147969371[53] = 0; + out_7564076767147969371[54] = 0; + out_7564076767147969371[55] = 0; + out_7564076767147969371[56] = 1; + out_7564076767147969371[57] = 0; + out_7564076767147969371[58] = 0; + out_7564076767147969371[59] = 0; + out_7564076767147969371[60] = 0; + out_7564076767147969371[61] = 0; + out_7564076767147969371[62] = 0; + out_7564076767147969371[63] = 0; + out_7564076767147969371[64] = 0; + out_7564076767147969371[65] = 0; } -void h_33(double *state, double *unused, double *out_3386383232379514061) { - out_3386383232379514061[0] = state[16]; - out_3386383232379514061[1] = state[17]; - out_3386383232379514061[2] = state[18]; +void h_33(double *state, double *unused, double *out_4659271231748144567) { + out_4659271231748144567[0] = state[16]; + out_4659271231748144567[1] = state[17]; + out_4659271231748144567[2] = state[18]; } -void H_33(double *state, double *unused, double *out_5941529058947973159) { - out_5941529058947973159[0] = 0; - out_5941529058947973159[1] = 0; - out_5941529058947973159[2] = 0; - out_5941529058947973159[3] = 0; - out_5941529058947973159[4] = 0; - out_5941529058947973159[5] = 0; - out_5941529058947973159[6] = 0; - out_5941529058947973159[7] = 0; - out_5941529058947973159[8] = 0; - out_5941529058947973159[9] = 0; - out_5941529058947973159[10] = 0; - out_5941529058947973159[11] = 0; - out_5941529058947973159[12] = 0; - out_5941529058947973159[13] = 0; - out_5941529058947973159[14] = 0; - out_5941529058947973159[15] = 0; - out_5941529058947973159[16] = 1; - out_5941529058947973159[17] = 0; - out_5941529058947973159[18] = 0; - out_5941529058947973159[19] = 0; - out_5941529058947973159[20] = 0; - out_5941529058947973159[21] = 0; - out_5941529058947973159[22] = 0; - out_5941529058947973159[23] = 0; - out_5941529058947973159[24] = 0; - out_5941529058947973159[25] = 0; - out_5941529058947973159[26] = 0; - out_5941529058947973159[27] = 0; - out_5941529058947973159[28] = 0; - out_5941529058947973159[29] = 0; - out_5941529058947973159[30] = 0; - out_5941529058947973159[31] = 0; - out_5941529058947973159[32] = 0; - out_5941529058947973159[33] = 0; - out_5941529058947973159[34] = 0; - out_5941529058947973159[35] = 0; - out_5941529058947973159[36] = 0; - out_5941529058947973159[37] = 0; - out_5941529058947973159[38] = 0; - out_5941529058947973159[39] = 1; - out_5941529058947973159[40] = 0; - out_5941529058947973159[41] = 0; - out_5941529058947973159[42] = 0; - out_5941529058947973159[43] = 0; - out_5941529058947973159[44] = 0; - out_5941529058947973159[45] = 0; - out_5941529058947973159[46] = 0; - out_5941529058947973159[47] = 0; - out_5941529058947973159[48] = 0; - out_5941529058947973159[49] = 0; - out_5941529058947973159[50] = 0; - out_5941529058947973159[51] = 0; - out_5941529058947973159[52] = 0; - out_5941529058947973159[53] = 0; - out_5941529058947973159[54] = 0; - out_5941529058947973159[55] = 0; - out_5941529058947973159[56] = 0; - out_5941529058947973159[57] = 0; - out_5941529058947973159[58] = 0; - out_5941529058947973159[59] = 0; - out_5941529058947973159[60] = 0; - out_5941529058947973159[61] = 0; - out_5941529058947973159[62] = 1; - out_5941529058947973159[63] = 0; - out_5941529058947973159[64] = 0; - out_5941529058947973159[65] = 0; +void H_33(double *state, double *unused, double *out_4606637891179707910) { + out_4606637891179707910[0] = 0; + out_4606637891179707910[1] = 0; + out_4606637891179707910[2] = 0; + out_4606637891179707910[3] = 0; + out_4606637891179707910[4] = 0; + out_4606637891179707910[5] = 0; + out_4606637891179707910[6] = 0; + out_4606637891179707910[7] = 0; + out_4606637891179707910[8] = 0; + out_4606637891179707910[9] = 0; + out_4606637891179707910[10] = 0; + out_4606637891179707910[11] = 0; + out_4606637891179707910[12] = 0; + out_4606637891179707910[13] = 0; + out_4606637891179707910[14] = 0; + out_4606637891179707910[15] = 0; + out_4606637891179707910[16] = 1; + out_4606637891179707910[17] = 0; + out_4606637891179707910[18] = 0; + out_4606637891179707910[19] = 0; + out_4606637891179707910[20] = 0; + out_4606637891179707910[21] = 0; + out_4606637891179707910[22] = 0; + out_4606637891179707910[23] = 0; + out_4606637891179707910[24] = 0; + out_4606637891179707910[25] = 0; + out_4606637891179707910[26] = 0; + out_4606637891179707910[27] = 0; + out_4606637891179707910[28] = 0; + out_4606637891179707910[29] = 0; + out_4606637891179707910[30] = 0; + out_4606637891179707910[31] = 0; + out_4606637891179707910[32] = 0; + out_4606637891179707910[33] = 0; + out_4606637891179707910[34] = 0; + out_4606637891179707910[35] = 0; + out_4606637891179707910[36] = 0; + out_4606637891179707910[37] = 0; + out_4606637891179707910[38] = 0; + out_4606637891179707910[39] = 1; + out_4606637891179707910[40] = 0; + out_4606637891179707910[41] = 0; + out_4606637891179707910[42] = 0; + out_4606637891179707910[43] = 0; + out_4606637891179707910[44] = 0; + out_4606637891179707910[45] = 0; + out_4606637891179707910[46] = 0; + out_4606637891179707910[47] = 0; + out_4606637891179707910[48] = 0; + out_4606637891179707910[49] = 0; + out_4606637891179707910[50] = 0; + out_4606637891179707910[51] = 0; + out_4606637891179707910[52] = 0; + out_4606637891179707910[53] = 0; + out_4606637891179707910[54] = 0; + out_4606637891179707910[55] = 0; + out_4606637891179707910[56] = 0; + out_4606637891179707910[57] = 0; + out_4606637891179707910[58] = 0; + out_4606637891179707910[59] = 0; + out_4606637891179707910[60] = 0; + out_4606637891179707910[61] = 0; + out_4606637891179707910[62] = 1; + out_4606637891179707910[63] = 0; + out_4606637891179707910[64] = 0; + out_4606637891179707910[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_734965431798586088) { - H(in_vec, out_734965431798586088); +void live_H(double *in_vec, double *out_7275051445048872074) { + H(in_vec, out_7275051445048872074); } -void live_err_fun(double *nom_x, double *delta_x, double *out_7867135572176938343) { - err_fun(nom_x, delta_x, out_7867135572176938343); +void live_err_fun(double *nom_x, double *delta_x, double *out_900214999320880639) { + err_fun(nom_x, delta_x, out_900214999320880639); } -void live_inv_err_fun(double *nom_x, double *true_x, double *out_4469849344899012791) { - inv_err_fun(nom_x, true_x, out_4469849344899012791); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_6228497090895348531) { + inv_err_fun(nom_x, true_x, out_6228497090895348531); } -void live_H_mod_fun(double *state, double *out_482044005104989923) { - H_mod_fun(state, out_482044005104989923); +void live_H_mod_fun(double *state, double *out_6900568612264374751) { + H_mod_fun(state, out_6900568612264374751); } -void live_f_fun(double *state, double dt, double *out_5277401503139322236) { - f_fun(state, dt, out_5277401503139322236); +void live_f_fun(double *state, double dt, double *out_444317293709373841) { + f_fun(state, dt, out_444317293709373841); } -void live_F_fun(double *state, double dt, double *out_6716422747633413136) { - F_fun(state, dt, out_6716422747633413136); +void live_F_fun(double *state, double dt, double *out_833440091851189730) { + F_fun(state, dt, out_833440091851189730); } -void live_h_4(double *state, double *unused, double *out_7766204740505938751) { - h_4(state, unused, out_7766204740505938751); +void live_h_4(double *state, double *unused, double *out_5875214861579885541) { + h_4(state, unused, out_5875214861579885541); } -void live_H_4(double *state, double *unused, double *out_5987995952750113477) { - H_4(state, unused, out_5987995952750113477); +void live_H_4(double *state, double *unused, double *out_276857831883521901) { + H_4(state, unused, out_276857831883521901); } -void live_h_9(double *state, double *unused, double *out_2388230207696517986) { - h_9(state, unused, out_2388230207696517986); +void live_h_9(double *state, double *unused, double *out_7431485379286447551) { + h_9(state, unused, out_7431485379286447551); } -void live_H_9(double *state, double *unused, double *out_6229185599379704122) { - H_9(state, unused, out_6229185599379704122); +void live_H_9(double *state, double *unused, double *out_7564076767147969371) { + H_9(state, unused, out_7564076767147969371); } -void live_h_10(double *state, double *unused, double *out_9053893872496357561) { - h_10(state, unused, out_9053893872496357561); +void live_h_10(double *state, double *unused, double *out_8274293454775594883) { + h_10(state, unused, out_8274293454775594883); } -void live_H_10(double *state, double *unused, double *out_140518164600154776) { - H_10(state, unused, out_140518164600154776); +void live_H_10(double *state, double *unused, double *out_3646697484698039257) { + H_10(state, unused, out_3646697484698039257); } -void live_h_12(double *state, double *unused, double *out_835136029362175519) { - h_12(state, unused, out_835136029362175519); +void live_h_12(double *state, double *unused, double *out_7462563038781612366) { + h_12(state, unused, out_7462563038781612366); } -void live_H_12(double *state, double *unused, double *out_6609094977797707144) { - H_12(state, unused, out_6609094977797707144); +void live_H_12(double *state, double *unused, double *out_6104400545159211095) { + H_12(state, unused, out_6104400545159211095); } -void live_h_35(double *state, double *unused, double *out_93555897102822674) { - h_35(state, unused, out_93555897102822674); +void live_h_35(double *state, double *unused, double *out_3219025280718560296) { + h_35(state, unused, out_3219025280718560296); } -void live_H_35(double *state, double *unused, double *out_9092086063586830763) { - H_35(state, unused, out_9092086063586830763); +void live_H_35(double *state, double *unused, double *out_3358837512834197386) { + H_35(state, unused, out_3358837512834197386); } -void live_h_32(double *state, double *unused, double *out_6290965057558394135) { - h_32(state, unused, out_6290965057558394135); +void live_h_32(double *state, double *unused, double *out_5537109185631613612) { + h_32(state, unused, out_5537109185631613612); } -void live_H_32(double *state, double *unused, double *out_2439793506428604497) { - H_32(state, unused, out_2439793506428604497); +void live_H_32(double *state, double *unused, double *out_3774684674196869746) { + H_32(state, unused, out_3774684674196869746); } -void live_h_13(double *state, double *unused, double *out_8490099498842921417) { - h_13(state, unused, out_8490099498842921417); +void live_h_13(double *state, double *unused, double *out_1615263710325240669) { + h_13(state, unused, out_1615263710325240669); } -void live_H_13(double *state, double *unused, double *out_8653375813311677152) { - H_13(state, unused, out_8653375813311677152); +void live_H_13(double *state, double *unused, double *out_1846820156559909960) { + H_13(state, unused, out_1846820156559909960); } -void live_h_14(double *state, double *unused, double *out_2388230207696517986) { - h_14(state, unused, out_2388230207696517986); +void live_h_14(double *state, double *unused, double *out_7431485379286447551) { + h_14(state, unused, out_7431485379286447551); } -void live_H_14(double *state, double *unused, double *out_6229185599379704122) { - H_14(state, unused, out_6229185599379704122); +void live_H_14(double *state, double *unused, double *out_7564076767147969371) { + H_14(state, unused, out_7564076767147969371); } -void live_h_33(double *state, double *unused, double *out_3386383232379514061) { - h_33(state, unused, out_3386383232379514061); +void live_h_33(double *state, double *unused, double *out_4659271231748144567) { + h_33(state, unused, out_4659271231748144567); } -void live_H_33(double *state, double *unused, double *out_5941529058947973159) { - H_33(state, unused, out_5941529058947973159); +void live_H_33(double *state, double *unused, double *out_4606637891179707910) { + H_33(state, unused, out_4606637891179707910); } 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 ce14c6ac6..a3ce77a5a 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_734965431798586088); -void live_err_fun(double *nom_x, double *delta_x, double *out_7867135572176938343); -void live_inv_err_fun(double *nom_x, double *true_x, double *out_4469849344899012791); -void live_H_mod_fun(double *state, double *out_482044005104989923); -void live_f_fun(double *state, double dt, double *out_5277401503139322236); -void live_F_fun(double *state, double dt, double *out_6716422747633413136); -void live_h_4(double *state, double *unused, double *out_7766204740505938751); -void live_H_4(double *state, double *unused, double *out_5987995952750113477); -void live_h_9(double *state, double *unused, double *out_2388230207696517986); -void live_H_9(double *state, double *unused, double *out_6229185599379704122); -void live_h_10(double *state, double *unused, double *out_9053893872496357561); -void live_H_10(double *state, double *unused, double *out_140518164600154776); -void live_h_12(double *state, double *unused, double *out_835136029362175519); -void live_H_12(double *state, double *unused, double *out_6609094977797707144); -void live_h_35(double *state, double *unused, double *out_93555897102822674); -void live_H_35(double *state, double *unused, double *out_9092086063586830763); -void live_h_32(double *state, double *unused, double *out_6290965057558394135); -void live_H_32(double *state, double *unused, double *out_2439793506428604497); -void live_h_13(double *state, double *unused, double *out_8490099498842921417); -void live_H_13(double *state, double *unused, double *out_8653375813311677152); -void live_h_14(double *state, double *unused, double *out_2388230207696517986); -void live_H_14(double *state, double *unused, double *out_6229185599379704122); -void live_h_33(double *state, double *unused, double *out_3386383232379514061); -void live_H_33(double *state, double *unused, double *out_5941529058947973159); +void live_H(double *in_vec, double *out_7275051445048872074); +void live_err_fun(double *nom_x, double *delta_x, double *out_900214999320880639); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_6228497090895348531); +void live_H_mod_fun(double *state, double *out_6900568612264374751); +void live_f_fun(double *state, double dt, double *out_444317293709373841); +void live_F_fun(double *state, double dt, double *out_833440091851189730); +void live_h_4(double *state, double *unused, double *out_5875214861579885541); +void live_H_4(double *state, double *unused, double *out_276857831883521901); +void live_h_9(double *state, double *unused, double *out_7431485379286447551); +void live_H_9(double *state, double *unused, double *out_7564076767147969371); +void live_h_10(double *state, double *unused, double *out_8274293454775594883); +void live_H_10(double *state, double *unused, double *out_3646697484698039257); +void live_h_12(double *state, double *unused, double *out_7462563038781612366); +void live_H_12(double *state, double *unused, double *out_6104400545159211095); +void live_h_35(double *state, double *unused, double *out_3219025280718560296); +void live_H_35(double *state, double *unused, double *out_3358837512834197386); +void live_h_32(double *state, double *unused, double *out_5537109185631613612); +void live_H_32(double *state, double *unused, double *out_3774684674196869746); +void live_h_13(double *state, double *unused, double *out_1615263710325240669); +void live_H_13(double *state, double *unused, double *out_1846820156559909960); +void live_h_14(double *state, double *unused, double *out_7431485379286447551); +void live_H_14(double *state, double *unused, double *out_7564076767147969371); +void live_h_33(double *state, double *unused, double *out_4659271231748144567); +void live_H_33(double *state, double *unused, double *out_4606637891179707910); 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/ubloxd b/selfdrive/locationd/ubloxd index 8d4531736..8f69fae05 100755 Binary files a/selfdrive/locationd/ubloxd and b/selfdrive/locationd/ubloxd differ diff --git a/selfdrive/manager/build.py b/selfdrive/manager/build.py index 218ed7916..f9393c8af 100755 --- a/selfdrive/manager/build.py +++ b/selfdrive/manager/build.py @@ -16,7 +16,7 @@ from system.version import is_dirty MAX_CACHE_SIZE = 4e9 if "CI" in os.environ else 2e9 CACHE_DIR = Path("/data/scons_cache" if AGNOS else "/tmp/scons_cache") -TOTAL_SCONS_NODES = 2035 +TOTAL_SCONS_NODES = 2395 MAX_BUILD_PROGRESS = 100 PREBUILT = os.path.exists(os.path.join(BASEDIR, 'prebuilt')) diff --git a/selfdrive/manager/helpers.py b/selfdrive/manager/helpers.py index b07362dd4..983c7cc0b 100644 --- a/selfdrive/manager/helpers.py +++ b/selfdrive/manager/helpers.py @@ -33,6 +33,6 @@ def unblock_stdout() -> None: pass # os.wait() returns a tuple with the pid and a 16 bit value - # whose low byte is the signal number and whose high byte is the exit satus + # whose low byte is the signal number and whose high byte is the exit status exit_status = os.wait()[1] >> 8 os._exit(exit_status) diff --git a/selfdrive/manager/local_osm_install.py b/selfdrive/manager/local_osm_install.py new file mode 100755 index 000000000..ce369f51b --- /dev/null +++ b/selfdrive/manager/local_osm_install.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +import os +import subprocess +import shutil + +# NOTE: Do NOT import anything here that needs be built (e.g. params) +from common.basedir import BASEDIR +from common.spinner import Spinner +from selfdrive.hardware import TICI +from selfdrive.mapd.lib.helpers import is_local_osm_installed, timestamp_local_osm_db, is_osm_db_up_to_date +from selfdrive.manager.custom_dep import wait_for_internet_connection + + +MAX_BUILD_PROGRESS = 100 +INSTALL_OSM_STEPS = 1021 +INSTALL_DB_STEPS = 58 + + +def install_local_osm(spinner, steps=0, total_steps=INSTALL_OSM_STEPS + INSTALL_DB_STEPS): + osm_install = subprocess.Popen(['sh', './install_osm.sh'], cwd=os.path.join(BASEDIR, 'installer/custom/'), + stdout=subprocess.PIPE) + # Read progress from install script and update spinner + while True: + output = osm_install.stdout.readline() + if osm_install.poll() is not None: + break + if output: + steps += 1 + spinner.update_progress(MAX_BUILD_PROGRESS * min(1., steps / total_steps), 100.) + print(output.decode('utf8', 'replace')) + + +def install_osm_db(spinner, steps=0, total_steps=INSTALL_DB_STEPS): + # Fetch and get db + fetch_osm_db = subprocess.Popen(['sh', './install_osm_db.sh'], cwd=os.path.join(BASEDIR, 'installer/custom/'), + stdout=subprocess.PIPE) + #Read progress from install script and update spinner + while True: + output = fetch_osm_db.stdout.readline() + if fetch_osm_db.poll() is not None: + break + if output: + steps += 1 + spinner.update_progress(MAX_BUILD_PROGRESS * min(1., steps / total_steps), 100.) + print(output.decode('utf8', 'replace')) + + +if __name__ == "__main__" and TICI: + if wait_for_internet_connection(return_on_failure=True): + is_osm_installed = is_local_osm_installed() + is_db_updated = is_osm_db_up_to_date() + print(f'Local OSM Installer:\nOSM currently installed: {is_osm_installed}\nDB up to date: {is_db_updated}') + + if is_osm_installed and is_db_updated: + pass + else: + spinner = Spinner() + spinner.update_progress(0, 100) + + if is_osm_installed: + install_osm_db(spinner) + else: + install_local_osm(spinner) + install_osm_db(spinner, steps=INSTALL_OSM_STEPS, total_steps=INSTALL_OSM_STEPS + INSTALL_DB_STEPS) + + timestamp_local_osm_db() + + if not is_local_osm_installed(): + print("Local OSM was not setup successfully. Cleaning up.") + # /data only has 30gb on c3 and us-west is 50gb so move to /data/media/0/ + shutil.rmtree("/data/media/0/osm") diff --git a/selfdrive/manager/manager.py b/selfdrive/manager/manager.py index 6912e852b..aaf0987b4 100755 --- a/selfdrive/manager/manager.py +++ b/selfdrive/manager/manager.py @@ -41,12 +41,13 @@ def manager_init() -> None: ("CompletedTrainingVersion", "0"), ("DisengageOnAccelerator", "1"), ("HasAcceptedTerms", "0"), + ("LanguageSetting", "main_en"), ("OpenpilotEnabledToggle", "1"), ("ShowDebugUI", "0"), ("SpeedLimitControl", "0"), ("SpeedLimitPercOffset", "0"), ("TurnSpeedControl", "0"), - ("TurnVisionControl", "0"), + #("TurnVisionControl", "0"), ] if not PC: default_params.append(("LastUpdateTime", datetime.datetime.utcnow().isoformat().encode('utf8'))) @@ -54,9 +55,6 @@ def manager_init() -> None: if params.get_bool("RecordFrontLock"): params.put_bool("RecordFront", True) - if not params.get_bool("DisableRadar_Allow"): - params.remove("DisableRadar") - # set unset params for k, v in default_params: if params.get(k) is None: @@ -136,7 +134,7 @@ def manager_thread() -> None: # dp dp_otisserv = params.get_bool('dp_otisserv') ignore += ['dmonitoringmodeld', 'dmonitoringd', 'dpmonitoringd'] if params.get_bool('dp_jetson') else [] - ignore += ['otisserv'] if not dp_otisserv else [] + ignore += ['otisserv', 'navd'] if not dp_otisserv else [] dp_mapd = params.get_bool('dp_mapd') ignore += ['mapd'] if not dp_mapd else [] ignore += ['gpxd'] if not dp_otisserv and not dp_mapd and not params.get_bool('dp_gpxd') else [] diff --git a/selfdrive/manager/process_config.py b/selfdrive/manager/process_config.py index ad63ac6c7..2bba653db 100644 --- a/selfdrive/manager/process_config.py +++ b/selfdrive/manager/process_config.py @@ -44,7 +44,7 @@ procs = [ # PythonProcess("deleter", "selfdrive.loggerd.deleter", offroad=True), PythonProcess("dmonitoringd", "selfdrive.monitoring.dmonitoringd", enabled=dp_dm, callback=driverview), # PythonProcess("laikad", "selfdrive.locationd.laikad"), - # PythonProcess("navd", "selfdrive.navd.navd"), + PythonProcess("navd", "selfdrive.navd.navd"), PythonProcess("pandad", "selfdrive.boardd.pandad", offroad=True), PythonProcess("paramsd", "selfdrive.locationd.paramsd"), PythonProcess("pigeond", "selfdrive.sensord.pigeond", enabled=TICI), @@ -72,7 +72,7 @@ procs = [ PythonProcess("mapd", "selfdrive.mapd.mapd"), PythonProcess("systemd", "selfdrive.dragonpilot.systemd", offroad=True), PythonProcess("gpxd", "selfdrive.dragonpilot.gpxd"), - #PythonProcess("otisserv", "selfdrive.dragonpilot.otisserv", offroad=True), + PythonProcess("otisserv", "selfdrive.dragonpilot.otisserv", offroad=True), # PythonProcess("loggerd", "selfdrive.dragonpilot.loggerd"), ] diff --git a/selfdrive/mapd/assets/osm-3s_v0.7.57.tar.xz b/selfdrive/mapd/assets/osm-3s_v0.7.57.tar.xz new file mode 100644 index 000000000..880a40033 Binary files /dev/null and b/selfdrive/mapd/assets/osm-3s_v0.7.57.tar.xz differ diff --git a/selfdrive/mapd/lib/helpers.py b/selfdrive/mapd/lib/helpers.py new file mode 100644 index 000000000..50ca1fd54 --- /dev/null +++ b/selfdrive/mapd/lib/helpers.py @@ -0,0 +1,93 @@ +import overpy +import subprocess +import requests +import email.utils as eut +import time + + +S3_LOCAL_OSM_URL = "https://mkumard.synology.me/osm/us-west.txt" +OSM_DB_STAMP_FILE = "/data/media/0/osm/db_stamp" + + +def get_current_s3_osm_db_timestamp(): + r = requests.head(S3_LOCAL_OSM_URL) + if r.status_code != 200: + print(f'Failed to fetch HEAD for S3 OSM db.\n\n{r.status_code}') + return None + + timestamp_string = r.headers.get('Last-Modified', None) + if timestamp_string is None: + print(f'HEAD for S3 OSM db contained no "Last-Modified" value.\n\n{r.headers}') + return None + + try: + parsed_date = eut.parsedate(timestamp_string) + return time.mktime(parsed_date) + except Exception as e: + print(f'Could not parse last modified timestamp for S3 local osm db.\n\n{e}') + return None + + +def persist_s3_osm_db_timestamp(timestamp): + try: + with open(OSM_DB_STAMP_FILE, 'w') as file: + file.write(f'{timestamp}') + except Exception as e: + print(f'Failed to timestamp local OSM db.\n\n{e}') + + +def get_local_osm_timestamp(): + try: + with open(OSM_DB_STAMP_FILE, 'r') as file: + return float(file.readline()) + except Exception as e: + print(f'Failed to read timestamp for local OSM db.\n\n{e}') + return None + + +def is_osm_db_up_to_date(): + current_osm_ts = get_local_osm_timestamp() + if current_osm_ts is None: + return False + + current_s3_osm_ts = get_current_s3_osm_db_timestamp() + if current_s3_osm_ts is None: + return True + + return current_osm_ts == current_s3_osm_ts + + +def timestamp_local_osm_db(): + current_s3_osm_ts = get_current_s3_osm_db_timestamp() + if current_s3_osm_ts is not None: + persist_s3_osm_db_timestamp(current_s3_osm_ts) + + +def is_local_osm_installed(): + api = overpy.Overpass() + q = """ + way(30023440); + (._;>;); + out; + """ + + try: + completion = subprocess.run(["/data/media/0/osm/v0.7.57/bin/osm3s_query", "--db-dir=/data/media/0/osm/db", f'--request={q}'], + check=True, capture_output=True) + print(f'OSM local query returned with exit code: {completion.returncode}') + + if completion.returncode != 0: + return False + + print(f'OSM Local query returned:\n\n{completion.stdout}') + + ways = api.parse_xml(completion.stdout).ways + success = len(ways) == 1 + print(f"Test osm script returned {len(ways)} ways") + print(f'OSM local server query {"succeeded" if success else "failed"}') + + return success + + except Exception as e: + print(e) + return False diff --git a/selfdrive/mapd/lib/osm.py b/selfdrive/mapd/lib/osm.py index 04c8163bc..359580195 100644 --- a/selfdrive/mapd/lib/osm.py +++ b/selfdrive/mapd/lib/osm.py @@ -1,6 +1,11 @@ import overpy +import subprocess import numpy as np from selfdrive.mapd.lib.geo import R +from selfdrive.mapd.lib.helpers import is_local_osm_installed + + +_LOCAL_OSM = is_local_osm_installed() def create_way(way_id, node_ids, from_way): @@ -29,7 +34,13 @@ class OSM(): out; """ try: - ways = self.api.query(q).ways + if _LOCAL_OSM: + print("Query OSM from Local Server") + completion = subprocess.run(["/data/media/0/osm/v0.7.57/bin/osm3s_query", "--db-dir=/data/media/0/osm/db", f'--request={q}'], check=True, capture_output=True) + ways = self.api.parse_xml(completion.stdout).ways + else: + print("Query OSM from remote Server") + ways = self.api.query(q).ways except Exception as e: print(f'Exception while querying OSM:\n{e}') ways = [] diff --git a/selfdrive/mapd/mapd.py b/selfdrive/mapd/mapd.py index e487e323c..8718744ca 100644 --- a/selfdrive/mapd/mapd.py +++ b/selfdrive/mapd/mapd.py @@ -12,7 +12,6 @@ from selfdrive.mapd.config import QUERY_RADIUS, MIN_DISTANCE_FOR_NEW_QUERY, FULL from system.swaglog import cloudlog # dp -import math from common.params import Params import json @@ -87,47 +86,18 @@ class MapD(): log = sm[sock] self.last_gps = log - skip_gps_query = False - location_valid = False # ignore the message if the fix is invalid if log.flags % 2 == 0: - skip_gps_query = True - - if not skip_gps_query: - self.last_gps_fix_timestamp = log.unixTimestampMillis # Unix TS. Milliseconds since January 1, 1970. - self.location_rad = np.radians(np.array([log.latitude, log.longitude], dtype=float)) - self.location_deg = (log.latitude, log.longitude) - self.bearing_rad = np.radians(log.bearingDeg, dtype=float) - self.gps_speed = log.speed - self.location_stdev = log.accuracy # log accuracies are presumably 1 standard deviation. - - sock = 'liveLocationKalman' - if sm.updated[sock] and sm.valid[sock]: - location = sm[sock] - location_valid = location.positionGeodetic.valid - - if location_valid: - _debug("Mapd: Using liveLocationKalman") - lat = float(location.positionGeodetic.value[0]) - lon = float(location.positionGeodetic.value[1]) - bearing = math.degrees(location.calibratedOrientationNED.value[2]) - - self.last_gps_fix_timestamp = location.unixTimestampMillis # Unix TS. Milliseconds since January 1, 1970. - self.location_rad = np.radians(np.array([lat, lon], dtype=float)) - self.location_deg = (lat, lon) - self.bearing_rad = np.radians(bearing, dtype=float) - self.gps_speed = sm['carState'].vEgo - self.location_stdev = 1.0 if log.accuracy > 5 else log.accuracy - - # self.last_gps.latitude = lat - # self.last_gps.longitude = lon - # self.last_gps.speed = self.gps_speed - # self.last_gps.bearingDeg = bearing - - if skip_gps_query and not location_valid: return + self.last_gps_fix_timestamp = log.unixTimestampMillis # Unix TS. Milliseconds since January 1, 1970. + self.location_rad = np.radians(np.array([log.latitude, log.longitude], dtype=float)) + self.location_deg = (log.latitude, log.longitude) + self.bearing_rad = np.radians(log.bearingDeg, dtype=float) + self.gps_speed = log.speed + self.location_stdev = log.accuracy # log accuracies are presumably 1 standard deviation. + _debug('Mapd: ********* Got GPS fix' + f'Pos: {self.location_deg} +/- {self.location_stdev * 2.} mts.\n' + f'Bearing: {log.bearingDeg} +/- {log.bearingAccuracyDeg * 2.} deg.\n' @@ -305,7 +275,7 @@ def mapd_thread(sm=None, pm=None): # *** setup messaging if sm is None: - sm = messaging.SubMaster(['gpsLocationExternal', 'controlsState', 'liveLocationKalman', 'carState']) + sm = messaging.SubMaster(['gpsLocationExternal', 'controlsState']) if pm is None: pm = messaging.PubMaster(['liveMapData']) diff --git a/selfdrive/modeld/_dmonitoringmodeld b/selfdrive/modeld/_dmonitoringmodeld index a0248d76b..ee32b4e73 100755 Binary files a/selfdrive/modeld/_dmonitoringmodeld and b/selfdrive/modeld/_dmonitoringmodeld differ diff --git a/selfdrive/modeld/_modeld b/selfdrive/modeld/_modeld index a76024135..8048efa57 100755 Binary files a/selfdrive/modeld/_modeld and b/selfdrive/modeld/_modeld differ diff --git a/selfdrive/modeld/models/supercombo.thneed b/selfdrive/modeld/models/supercombo.thneed index 1a4ff267d..a392473fe 100644 Binary files a/selfdrive/modeld/models/supercombo.thneed and b/selfdrive/modeld/models/supercombo.thneed differ diff --git a/selfdrive/navd/navd.py b/selfdrive/navd/navd.py index 1c86e53ce..adab23c23 100755 --- a/selfdrive/navd/navd.py +++ b/selfdrive/navd/navd.py @@ -138,7 +138,7 @@ class RouteEngine: url = self.mapbox_host + f'/directions/v5/mapbox/driving-traffic/{self.last_position.longitude},{self.last_position.latitude};{destination.longitude},{destination.latitude}' try: - resp = requests.get(url, params=params) + resp = requests.get(url, params=params, timeout=10) resp.raise_for_status() r = resp.json() @@ -197,10 +197,10 @@ class RouteEngine: parse_banner_instructions(msg.navInstruction, step['bannerInstructions'], distance_to_maneuver_along_geometry) # Compute total remaining time and distance - remaning = 1.0 - along_geometry / max(step['distance'], 1) - total_distance = step['distance'] * remaning - total_time = step['duration'] * remaning - total_time_typical = step['duration_typical'] * remaning + remaining = 1.0 - along_geometry / max(step['distance'], 1) + total_distance = step['distance'] * remaining + total_time = step['duration'] * remaining + total_time_typical = step['duration_typical'] * remaining # Add up totals for future steps for i in range(self.step_idx + 1, len(self.route)): diff --git a/selfdrive/sensord/_sensord b/selfdrive/sensord/_sensord index 958c6208d..e354dd950 100755 Binary files a/selfdrive/sensord/_sensord and b/selfdrive/sensord/_sensord differ diff --git a/selfdrive/sensord/pigeond.py b/selfdrive/sensord/pigeond.py index 95a27189d..e38e2d4c3 100755 --- a/selfdrive/sensord/pigeond.py +++ b/selfdrive/sensord/pigeond.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - import sys import time import signal @@ -8,6 +7,7 @@ import struct import requests import urllib.parse from datetime import datetime +from typing import List, Optional from cereal import messaging from common.params import Params @@ -25,7 +25,7 @@ UBLOX_SOS_NACK = b"\xb5\x62\x09\x14\x08\x00\x02\x00\x00\x00\x00\x00\x00\x00" UBLOX_BACKUP_RESTORE_MSG = b"\xb5\x62\x09\x14\x08\x00\x03" UBLOX_ASSIST_ACK = b"\xb5\x62\x13\x60\x08\x00" -def set_power(enabled): +def set_power(enabled: bool) -> None: gpio_init(GPIO.UBLOX_SAFEBOOT_N, True) gpio_init(GPIO.UBLOX_PWR_EN, True) gpio_init(GPIO.UBLOX_RST_N, True) @@ -35,14 +35,14 @@ def set_power(enabled): gpio_set(GPIO.UBLOX_RST_N, enabled) -def add_ubx_checksum(msg): +def add_ubx_checksum(msg: bytes) -> bytes: A = B = 0 for b in msg[2:]: A = (A + b) % 256 B = (B + A) % 256 return msg + bytes([A, B]) -def get_assistnow_messages(token): +def get_assistnow_messages(token: bytes) -> List[bytes]: # make request # TODO: implement adding the last known location r = requests.get("https://online-live2.services.u-blox.com/GetOnlineData.ashx", params=urllib.parse.urlencode({ @@ -64,14 +64,13 @@ def get_assistnow_messages(token): class TTYPigeon(): - def __init__(self, path): - self.path = path + def __init__(self): self.tty = serial.VTIMESerial(UBLOX_TTY, baudrate=9600, timeout=0) - def send(self, dat): + def send(self, dat: bytes) -> None: self.tty.write(dat) - def receive(self): + def receive(self) -> bytes: dat = b'' while len(dat) < 0x1000: d = self.tty.read(0x40) @@ -80,10 +79,10 @@ class TTYPigeon(): break return dat - def set_baud(self, baud): + def set_baud(self, baud: int) -> None: self.tty.baudrate = baud - def wait_for_ack(self, ack=UBLOX_ACK, nack=UBLOX_NACK, timeout=0.5): + def wait_for_ack(self, ack: bytes = UBLOX_ACK, nack: bytes = UBLOX_NACK, timeout: float = 0.5) -> bool: dat = b'' st = time.monotonic() while True: @@ -99,11 +98,11 @@ class TTYPigeon(): raise TimeoutError('No response from ublox') time.sleep(0.001) - def send_with_ack(self, dat, ack=UBLOX_ACK, nack=UBLOX_NACK): + def send_with_ack(self, dat: bytes, ack: bytes = UBLOX_ACK, nack: bytes = UBLOX_NACK) -> None: self.send(dat) self.wait_for_ack(ack, nack) - def wait_for_backup_restore_status(self, timeout=1): + def wait_for_backup_restore_status(self, timeout: float = 1.) -> int: dat = b'' st = time.monotonic() while True: @@ -117,7 +116,7 @@ class TTYPigeon(): time.sleep(0.001) -def initialize_pigeon(pigeon): +def initialize_pigeon(pigeon: TTYPigeon) -> None: # try initializing a few times for _ in range(10): try: @@ -200,21 +199,22 @@ def initialize_pigeon(pigeon): except TimeoutError: cloudlog.warning("Initialization failed, trying again!") -def deinitialize_and_exit(pigeon): +def deinitialize_and_exit(pigeon: Optional[TTYPigeon]): cloudlog.warning("Storing almanac in ublox flash") - # controlled GNSS stop - pigeon.send(b"\xB5\x62\x06\x04\x04\x00\x00\x00\x08\x00\x16\x74") + if pigeon is not None: + # controlled GNSS stop + pigeon.send(b"\xB5\x62\x06\x04\x04\x00\x00\x00\x08\x00\x16\x74") - # store almanac in flash - pigeon.send(b"\xB5\x62\x09\x14\x04\x00\x00\x00\x00\x00\x21\xEC") - try: - if pigeon.wait_for_ack(ack=UBLOX_SOS_ACK, nack=UBLOX_SOS_NACK): - cloudlog.warning("Done storing almanac") - else: - cloudlog.error("Error storing almanac") - except TimeoutError: - pass + # store almanac in flash + pigeon.send(b"\xB5\x62\x09\x14\x04\x00\x00\x00\x00\x00\x21\xEC") + try: + if pigeon.wait_for_ack(ack=UBLOX_SOS_ACK, nack=UBLOX_SOS_NACK): + cloudlog.warning("Done storing almanac") + else: + cloudlog.error("Error storing almanac") + except TimeoutError: + pass # turn off power and exit cleanly set_power(False) @@ -223,6 +223,10 @@ def deinitialize_and_exit(pigeon): def main(): assert TICI, "unsupported hardware for pigeond" + # register exit handler + pigeon = None + signal.signal(signal.SIGINT, lambda sig, frame: deinitialize_and_exit(pigeon)) + pm = messaging.PubMaster(['ubloxRaw']) # power cycle ublox @@ -231,12 +235,9 @@ def main(): set_power(True) time.sleep(0.5) - pigeon = TTYPigeon(UBLOX_TTY) + pigeon = TTYPigeon() initialize_pigeon(pigeon) - # register exit handler - signal.signal(signal.SIGINT, lambda sig, frame: deinitialize_and_exit(pigeon)) - # start receiving data while True: dat = pigeon.receive() diff --git a/selfdrive/ui/.gitignore b/selfdrive/ui/.gitignore index 5f8a96edf..e5b27adce 100644 --- a/selfdrive/ui/.gitignore +++ b/selfdrive/ui/.gitignore @@ -4,8 +4,6 @@ moc_* _mui watch3 installer/installers/* -replay/replay -replay/tests/test_replay qt/text qt/spinner qt/setup/setup diff --git a/selfdrive/ui/_ui b/selfdrive/ui/_ui index 1a46a3005..985fce2bb 100755 Binary files a/selfdrive/ui/_ui and b/selfdrive/ui/_ui differ diff --git a/selfdrive/ui/qt/libpython_helpers.so b/selfdrive/ui/qt/libpython_helpers.so index e159489b5..48f208db0 100755 Binary files a/selfdrive/ui/qt/libpython_helpers.so and b/selfdrive/ui/qt/libpython_helpers.so differ diff --git a/selfdrive/ui/qt/spinner b/selfdrive/ui/qt/spinner index 93fb086d5..576d8e527 100755 Binary files a/selfdrive/ui/qt/spinner and b/selfdrive/ui/qt/spinner differ diff --git a/selfdrive/ui/qt/text b/selfdrive/ui/qt/text index e546e98e4..34a25d382 100755 Binary files a/selfdrive/ui/qt/text and b/selfdrive/ui/qt/text differ diff --git a/selfdrive/ui/soundd/_soundd b/selfdrive/ui/soundd/_soundd index 6d1add1da..230b1bd3a 100755 Binary files a/selfdrive/ui/soundd/_soundd and b/selfdrive/ui/soundd/_soundd differ diff --git a/selfdrive/ui/soundd/soundd b/selfdrive/ui/soundd/soundd index 66dda46d5..702c6b4db 100755 --- a/selfdrive/ui/soundd/soundd +++ b/selfdrive/ui/soundd/soundd @@ -1,5 +1,5 @@ #!/bin/sh cd "$(dirname "$0")" -export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH="/system/lib64:/data/openpilot/third_party/mapbox-gl-native-qt/aarch64:$LD_LIBRARY_PATH" export QT_QPA_PLATFORM="offscreen" exec ./_soundd diff --git a/selfdrive/ui/translations/main_en.ts b/selfdrive/ui/translations/main_en.ts index 3f9692e5f..42e30a59a 100644 --- a/selfdrive/ui/translations/main_en.ts +++ b/selfdrive/ui/translations/main_en.ts @@ -4,6 +4,7 @@ InputDialog + Need at least %n character(s)! Need at least %n character! @@ -14,6 +15,7 @@ QObject + %n minute(s) ago %n minute ago @@ -21,6 +23,7 @@ + %n hour(s) ago %n hour ago @@ -28,6 +31,7 @@ + %n day(s) ago %n day ago diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index c5e6a2359..d6bd9e74e 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -4,17 +4,17 @@ AbstractAlert - + Close 閉じる - + Snooze Update 更新の一時停止 - + Reboot and Update 再起動してアップデート @@ -22,745 +22,85 @@ AdvancedNetworking - + Back 戻る - + Enable Tethering テザリングを有効化 - + Tethering Password テザリングパスワード - - + + EDIT 編集 - + Enter new tethering password 新しいテザリングパスワードを入力 - + IP Address IP アドレス - + Enable Roaming ローミングを有効化 - + APN Setting APN 設定 - + Enter APN APN を入力 - + leave blank for automatic configuration 空白のままにして、自動設定にします - - C2NetworkPanel - - - Wi-Fi Settings - - - - - - OPEN - - - - - Tethering Settings - - - - - IP Address - IP アドレス - - ConfirmationDialog - - + + Ok OK - + Cancel キャンセル - - DPCarPanel - - - Override Speed When Below - - - - - Override feature will be enabled when set cruise speed is lower than this value. -1 km/h = 0.62 mph. - - - - - km/h - - - - - Turn On Cruise Speed Override - - - - - This feature will let you set your cruise speed below vehicle standard. (usually at 26~40 km/h) - - - - - Toyota / Lexus - - - - - Enable SnG Mod - - - - - Enable this to fix stop and go (SnG) issue on some models. -Reboot required. - - - - - Enable AM Physical Button Ctrl - - - - - Enable this to link Accel Mode (AM) control to the physical button (TSS2). -ONLY WORK ON SOME OF TSS1 VEHICLES. -Reboot required. - - - - - Enable Door Auto Lock - - - - - Enable this to lock doors when drive above 25 km/h. -ONLY WORK ON SOME VEHICLES. - - - - - Enable Door Auto Unlock - - - - - Enable this to unlock doors when shift to gear P. -ONLY WORK ON SOME VEHICLES. - - - - - Honda - - - - - Enable EPS Mod Mode - - - - - Enable this will increase steering, USE IT ONLY if you have a modded EPS firmware. -Reboot required. - - - - - Mazda - - - - - Display Below Steer Speed Alert - - - - - Enable this will show below steer speed alert. -Thanks to @TheCrowd - - - - - DPControlPanel - - - ALCA Delay - - - - - Once the vehicle meets all ALCA criteria, it will wait for the seconds set here before peforming lane change automatically. - - - - - secs - - - - - ALCA Min Speed - - - - - ALCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - - mph - - - - - LCA Min Speed - - - - - LCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - Lateral Ctrl Mode - - - - - 1 = Lane Change Assist (LCA) -2 = Auto Lane Change Assist (ALCA) - - - - - Longitudinal - - - - - Manually Control Accel Mode - - - - - Enable this if you wish to adjust openpilot's acceleration control. - - - - - Enable vision based turn control - - - - - Use vision path predictions to estimate the appropriate speed to drive through turns ahead. - - - - - Lateral - - - - - Use Lane Lines - - - - - Enable this if you wish to use lane lines mode. - - - - - Use LQR Controller - - - - - Enable this if you wish to use LQR instead of PID or INDI controller. -WORKS WELL ONLY ON SOME VEHICLES. -More linear steering experience. - - - - - Always On Lateral - - - - - Use at your own risk! -1 = Stock Long -2 = OP Long -Run Panda Recovery if Panda is not detected after reboot. -Reboot required. - - - - - Camera Offset - - - - - Adjust your camera position if your device is not mounted as per guidance. - - - - - DPGeneralPanel - - - Auto Shutdown In - - - - - Adjust your shutdown waiting period. -0 = shutdown immediately. - - - - - mins - - - - - Enable Auto Shutdown - - - - - Enable this if you wish to shutdown your device automatically. - - - - - Use Custom API Server - - - - - Enable this if you wish to connect to a custom API server. -Default to "https://api.retropilot.org/", change "dp_api_custom" if you want to change API server URL. -Reboot required. - - - - - Services - - - - - Enable On-Road Dashcam - - - - - Enable this if you wish to record screen, just like a dashcam. -Reboot required. - - - - - Enable GPS Logger - - - - - This will store your track in /data/media/0/gpx_logs/. -Reboot required. - - - - - Hardware - General - - - - - Enable Hotspot On Boot - - - - - Reboot required. - - - - - Miscellaneous - - - - - Enable Driver Monitor (Front Cam) - - - - - Enable this option if you wish to use front camera for driver monitoring. -On = Front Cam Monitor + Steering Monitor -Off = Steering Monitor only. -Enable this will increase device temp a lot, use at your own risk. -Reboot Required. - - - - - Enable Jetson Support - - - - - Enable this option if you intend to run dp on Nvidia Jetson. -Reboot required. - - - - - - Reboot recommended. -Reboot? - - - - - Flashing Panda Firmware - - - - - FLASH - - - - - Tap the button to update your panda firmware. -The device should reboot once if it finish updating. - - - - - Are you sure you want to flash the panda? - - - - - Are you sure delete all media? - - - - - Pandas Firmware Recovery - - - - - RECOVER - - - - - Tap the button ONLY if your panda ran into issue. - - - - - Are you sure you want to run recover panda script? - - - - - Reset dragonpilot conf - - - - - RESET - リセット - - - - Tap the button to reset all your dragonpilot congiration to default value. -Reboot required. - - - - - Are you sure you want to reset dp params? - - - - - Delete All Driving Log - - - - - DELETE - - - - - Tap the button to delete ALL your driving logs (including dashcam / gpx / driving logs). - - - - - DPMapsPanel - - - Show Full Screen Nav. - - - - - This will show navigation in full screen. -Please tap green boarder if you wish to switch back drive view. - - - - - Search Destination using Google Map - - - - - This will allow you to search destination in google map api. -You will need to apply your own google map api key.Enter your key detail in web interface once it's enabled. - - - - - Enable Nav. - - - - - This will let use the build in Navigation. -Use web interface to control it: *http://<device_ip>:8082*. -You will need to apply your own mapbox token at https://www.mapbox.com/. -Internet access from mobile phone (tethering) is required. -Reboot required. - - - - - Enable Speed Limit Control - - - - - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits. - - - - - Enable Speed Limit Offset - - - - - Set speed limit slightly higher than actual speed limit for a more natural drive. - - - - - Enable Map Data Turn Control - - - - - Use curvature info from map data to define speed limits to take turns ahead - - - - - Show debug UI elements - - - - - Show UI elements that aid debugging. - - - - - Enable MapD - - - - - Use OSM to assist lateral/longitudinal control. -Please note: -1. This feature will works only when your car support OP longitudinal. -2. MapD will contribute your route to OSM for future improvement automatically. -3. You can add your own offset for mapd just follow the readme under /selfdrive/mapd. -4. Not connecting to the internet for while might feel up device storage from all the gps traces. - - - - - DPUIPanel - - - Display Mode - - - - - 0 = Default -1 = Screen Off While Driving - - - - - Screen Brightness - - - - - Adjust your screen brightness. - - - - - - AUTO - - - - - Alert Volume - - - - - Adjust your alert volume. - - - - - Quiet Drive - - - - - Display alert and play important warning sound. Thanks @sunnyhaibin. - - - - - Display Speed - - - - - Enable this to display your current speed. - - - - - Display Event / Steer Icon - - - - - - Enable this to display the icon. - - - - - Display Driver Monitor Indicator - - - - - Display Side Info - - - - - Enable this to display steering angle / lead car distance / engine RPM. - - - - - Display Top Info - - - - - Enable this to display time / system temp / battery level. - - - DeclinePage - + You must accept the Terms and Conditions in order to use openpilot. openpilot をご利用される前に、利用規約に同意する必要があります。 - + Back 戻る - + Decline, uninstall %1 拒否して %1 をアンインストール @@ -768,152 +108,152 @@ Please note: DevicePanel - + Dongle ID ドングル番号 (Dongle ID) - + N/A N/A - + Serial シリアル番号 - + Driver Camera 車内カメラ - + PREVIEW 見る - + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) 車内カメラをプレビューして、ドライバー監視システムの視界を確認ができます。(車両の電源を切る必要があります) - + Reset Calibration キャリブレーションをリセット - + RESET リセット - + Are you sure you want to reset calibration? キャリブレーションをリセットしてもよろしいですか? - + Review Training Guide 入門書を見る - + REVIEW 見る - + Review the rules, features, and limitations of openpilot openpilot の特徴を見る - + Are you sure you want to review the training guide? 入門書を見てもよろしいですか? - + Regulatory 認証情報 - + VIEW 見る - + Change Language 言語を変更 - + CHANGE 変更 - + Select a language 言語を選択 - + Reboot 再起動 - + Power Off 電源を切る - + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. openpilot は、左または右の4°以内、上の5°または下の8°以内にデバイスを取付ける必要があります。キャリブレーションを引き続きます、リセットはほとんど必要ありません。 - + Your device is pointed %1° %2 and %3° %4. このデバイスは%2の%1°、%4の%3°に向けます。 - + down - + up - + left - + right - + Are you sure you want to reboot? 再起動してもよろしいですか? - + Disengage to Reboot openpilot をキャンセルして再起動ができます - + Are you sure you want to power off? シャットダウンしてもよろしいですか? - + Disengage to Power Off openpilot をキャンセルしてシャットダウンができます @@ -921,32 +261,32 @@ Please note: DriveStats - + Drives 運転履歴 - + Hours 時間 - + ALL TIME 累計 - + PAST WEEK 先週 - + KM km - + Miles マイル @@ -954,7 +294,7 @@ Please note: DriverViewScene - + camera starting カメラを起動しています @@ -962,12 +302,12 @@ Please note: InputDialog - + Cancel キャンセル - + Need at least %n character(s)! %n文字以上でお願いします! @@ -977,22 +317,22 @@ Please note: Installer - + Installing... インストールしています... - + Receiving objects: オブジェクトをダウンロードしています: - + Resolving deltas: デルタを解決しています: - + Updating files: ファイルを更新しています: @@ -1000,27 +340,27 @@ Please note: MapETA - + eta 予定到着時間 - + min - + hr 時間 - + km キロメートル - + mi マイル @@ -1028,22 +368,22 @@ Please note: MapInstructions - + km キロメートル - + m メートル - + mi マイル - + ft フィート @@ -1051,48 +391,48 @@ Please note: MapPanel - + Current Destination 現在の目的地 - + CLEAR 削除 - + Recent Destinations 最近の目的地 - + Try the Navigation Beta β版ナビゲーションを試す - + Get turn-by-turn directions displayed and more with a comma prime subscription. Sign up now: https://connect.comma.ai より詳細な案内情報を得ることができます。 詳しくはこちら:https://connect.comma.ai - + No home location set 自宅の住所はまだ 設定されていません - + No work location set 職場の住所はまだ 設定されていません - + no recent destinations 最近の目的地履歴がありません @@ -1100,12 +440,12 @@ location set MapWindow - + Map Loading マップを読み込んでいます - + Waiting for GPS GPS信号を探しています @@ -1113,12 +453,12 @@ location set MultiOptionDialog - + Select 選択 - + Cancel キャンセル @@ -1126,23 +466,23 @@ location set Networking - + Advanced 詳細 - + Enter password パスワードを入力 - - + + for "%1" ネットワーク名:%1 - + Wrong password パスワードが間違っています @@ -1150,88 +490,48 @@ location set NvgWindow - + km/h km/h - + mph mph - - + + MAX 最高速度 - - + + SPEED 速度 - - + + LIMIT 制限速度 - - - REAL STEER - - - - - RAM PER - - - - - OFF - - - - - ENG RPM - - - - - NOR - - - - - SPT - - - - - ECO - - - - - ACCEL - - OffroadHome - + UPDATE 更新 - + ALERTS 警告 - + ALERT 警告 @@ -1239,22 +539,22 @@ location set PairingPopup - + Pair your device to your comma account デバイスと comma アカウントを連携する - + Go to https://connect.comma.ai on your phone モバイルデバイスで「connect.comma.ai」にアクセスして - + Click "add new device" and scan the QR code on the right 「新しいデバイスを追加」を押すと、右側のQRコードをスキャンしてください - + Bookmark connect.comma.ai to your home screen to use it like an app 「connect.comma.ai」をホーム画面に追加して、アプリのように使うことができます @@ -1262,32 +562,32 @@ location set PrimeAdWidget - + Upgrade Now 今すぐアップグレート - + Become a comma prime member at connect.comma.ai connect.comma.ai でプライム会員に登録できます - + PRIME FEATURES: 特典: - + Remote access リモートアクセス - + 1 year of storage 一年間の保存期間 - + Developer perks 開発者向け特典 @@ -1295,22 +595,22 @@ location set PrimeUserWidget - + ✓ SUBSCRIBED ✓ 入会しました - + comma prime comma prime - + CONNECT.COMMA.AI CONNECT.COMMA.AI - + COMMA POINTS COMMA POINTS @@ -1318,39 +618,41 @@ location set QObject - + Reboot 再起動 - + Exit 閉じる + dashcam - ドライブレコーダー + ドライブレコーダー + openpilot - openpilot + openpilot - + %n minute(s) ago %n 分前 - + %n hour(s) ago %n 時間前 - + %n day(s) ago %n 日前 @@ -1360,47 +662,47 @@ location set Reset - + Reset failed. Reboot to try again. 初期化に失敗しました。再起動後に再試行してください。 - + Are you sure you want to reset your device? 初期化してもよろしいですか? - + Resetting device... デバイスが初期化されます... - + System Reset システムを初期化 - + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. システムの初期化をリクエストしました。「確認」ボタンを押すとデバイスが初期化されます。「キャンセル」ボタンを押すと起動を続行します。 - + Cancel キャンセル - + Reboot 再起動 - + Confirm 確認 - + Unable to mount data partition. Press confirm to reset your device. 「data」パーティションをマウントできません。「確認」ボタンを押すとデバイスが初期化されます。 @@ -1408,7 +710,7 @@ location set RichTextDialog - + Ok OK @@ -1416,168 +718,139 @@ location set SettingsWindow + × - × + × - - BACK - - - - + Device デバイス - - + + Network ネットワーク - + Toggles 切り替え - + Software ソフトウェア - + Navigation ナビゲーション - - - DP - General - - - - - DP - Controls - - - - - DP - UI - - - - - DP - Cars - - - - - DP - Maps - - Setup - + WARNING: Low Voltage 警告:低電圧 - + Power your device in a car with a harness or proceed at your own risk. 自己責任でハーネスから電源を供給してください。 - + Power off 電源を切る - - - + + + Continue 続ける - + Getting Started はじめに - + Before we get on the road, let’s finish installation and cover some details. その前に、インストールを完了し、いくつかの詳細を説明します。 - + Connect to Wi-Fi Wi-Fi に接続 - - + + Back 戻る - + Continue without Wi-Fi Wi-Fi に未接続で続行 - + Waiting for internet インターネット接続を待機中 - + Choose Software to Install インストールするソフトウェアを選びます - + Dashcam ドライブレコーダー - + Custom Software カスタムソフトウェア - + Enter URL URL を入力 - + for Custom Software カスタムソフトウェア - + Downloading... ダウンロード中... - + Download Failed ダウンロード失敗 - + Ensure the entered URL is valid, and the device’s internet connection is good. 入力された URL を確認し、デバイスがインターネットに接続されていることを確認してください。 - + Reboot device デバイスを再起動 - + Start over 最初からやり直す @@ -1585,17 +858,17 @@ location set SetupWidget - + Finish Setup セットアップ完了 - + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. デバイスを comma connect (connect.comma.ai)でペアリングし comma prime 特典を申請してください。 - + Pair device デバイスをペアリング @@ -1603,103 +876,106 @@ location set Sidebar - - + + CONNECT 接続 - + OFFLINE オフライン - - + + ONLINE オンライン - + ERROR エラー - - - + + + TEMP 温度 + HIGH - 高温 + 高温 + GOOD - 最適 + 最適 + OK - OK + OK - + VEHICLE 車両 - + NO NO - + PANDA PANDA - + GPS GPS - + SEARCH 検索 - + -- -- - + Wi-Fi Wi-Fi - + ETH ETH - + 2G 2G - + 3G 3G - + LTE LTE - + 5G 5G @@ -1707,89 +983,89 @@ location set SoftwarePanel - + Git Branch Git ブランチ - + Git Commit Git コミット - + OS Version OS バージョン - + Version バージョン - + Last Update Check 最終更新確認 - + The last time openpilot successfully checked for an update. The updater only runs while the car is off. openpilotが最後にアップデートの確認に成功してからの時間です。アップデート処理は、車の電源が切れているときのみ実行されます。 - + Check for Update 更新プログラムをチェック - + CHECKING 確認中 - + Switch Branch ブランチの切り替え - + ENTER 切替 - - + + The new branch will be pulled the next time the updater runs. updater を実行する時にブランチを切り替えます。 - + Enter branch name ブランチ名を入力 - + UNINSTALL アンインストール - + Uninstall %1 %1をアンインストール - + Are you sure you want to uninstall? アンインストールしてもよろしいですか? - + failed to fetch update 更新のダウンロードにエラーが発生しました - - + + CHECK 確認 @@ -1797,48 +1073,48 @@ location set SshControl - + SSH Keys SSH 鍵 - + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. 警告: これは、GitHub の設定にあるすべての公開鍵への SSH アクセスを許可するものです。自分以外の GitHub のユーザー名を入力しないでください。コンマのスタッフが GitHub のユーザー名を追加するようお願いすることはありません。 - - + + ADD 追加 - + Enter your GitHub username GitHub のユーザー名を入力してください - + LOADING ローディング - + REMOVE 削除 - + Username '%1' has no keys on GitHub ユーザー名 “%1” は GitHub に鍵がありません - + Request timed out リクエストタイムアウト - + Username '%1' doesn't exist on GitHub ユーザー名 '%1' は GitHub に存在しません @@ -1846,7 +1122,7 @@ location set SshToggle - + Enable SSH SSH を有効化 @@ -1854,22 +1130,22 @@ location set TermsPage - + Terms & Conditions 利用規約 - + Decline 拒否 - + Scroll to accept スクロールして同意 - + Agree 同意 @@ -1877,135 +1153,135 @@ location set TogglesPanel - + Enable openpilot openpilot を有効化 - + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. アダプティブクルーズコントロールとレーンキーピングドライバーアシスト(openpilotシステム)。この機能を使用するには、常に注意が必要です。この設定を変更すると、車の電源が切れたときに有効になります。 - + Enable Lane Departure Warnings 車線逸脱警報機能を有効化 - + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). 時速31マイル(50km)を超えるスピードで走行中、方向指示器を作動させずに検出された車線ライン上に車両が触れた場合、車線に戻るアラートを受信します。 - - Enable Right-Hand Drive - - - - - Allow openpilot to obey left-hand traffic conventions and perform driver monitoring on right driver seat. - - - - + Use Metric System メートル法を有効化 - + Display speed in km/h instead of mph. 速度は mph ではなく km/h で表示されます。 - + Record and Upload Driver Camera 車内カメラの録画とアップロード - + Upload data from the driver facing camera and help improve the driver monitoring algorithm. 車内カメラの映像をアップロードし、ドライバー監視システムのアルゴリズムの向上に役立てます。 - + + 🌮 End-to-end longitudinal (extremely alpha) 🌮 + + + + + Experimental openpilot longitudinal control + + + + + <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> + + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + + + + Disengage On Accelerator Pedal アクセル踏むと openpilot をキャンセル - + When enabled, pressing the accelerator pedal will disengage openpilot. 有効な場合は、アクセルを踏むと openpilot をキャンセルします。 - + Show ETA in 24h Format 24時間表示 - + Use 24h format instead of am/pm AM/PM の代わりに24時間形式を使用します - + Show Map on Left Side of UI ディスプレイの左側にマップを表示 - + Show map on left side when in split screen view. 分割画面表示の場合、ディスプレイの左側にマップを表示します。 - - - openpilot Longitudinal Control - openpilot 縦方向制御 - - - - openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! - openpilot は、車のレーダーを無効化し、アクセルとブレーキの制御を引き継ぎます。注意:AEB を無効化にします! - Updater - + Update Required 更新が必要です - + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. オペレーティングシステムのアップデートが必要です。Wi-Fi に接続することで、最速のアップデートを体験できます。ダウンロードサイズは約 1GB です。 - + Connect to Wi-Fi Wi-Fi に接続 - + Install インストール - + Back 戻る - + Loading... 読み込み中... - + Reboot 再起動 - + Update failed 更新失敗 @@ -2013,23 +1289,23 @@ location set WifiUI - - + + Scanning for networks... ネットワークをスキャン中... - + CONNECTING... 接続中... - + FORGET 削除 - + Forget Wi-Fi Network "%1"? Wi-Fiネットワーク%1を削除してもよろしいですか? diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 05d9eb854..5d7df2162 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -4,17 +4,17 @@ AbstractAlert - + Close 닫기 - + Snooze Update 업데이트 일시중지 - + Reboot and Update 업데이트 및 재부팅 @@ -22,745 +22,85 @@ AdvancedNetworking - + Back 뒤로 - + Enable Tethering 테더링 사용 - + Tethering Password 테더링 비밀번호 - - + + EDIT 편집 - + Enter new tethering password 새 테더링 비밀번호를 입력하세요 - + IP Address IP 주소 - + Enable Roaming 로밍 사용 - + APN Setting APN 설정 - + Enter APN APN 입력 - + leave blank for automatic configuration - 자동설정을 하려면 공백으로 두세요 - - - - C2NetworkPanel - - - Wi-Fi Settings - - - - - - OPEN - - - - - Tethering Settings - - - - - IP Address - IP 주소 + 자동설정하려면 공백으로 두세요 ConfirmationDialog - - + + Ok 확인 - + Cancel 취소 - - DPCarPanel - - - Override Speed When Below - - - - - Override feature will be enabled when set cruise speed is lower than this value. -1 km/h = 0.62 mph. - - - - - km/h - - - - - Turn On Cruise Speed Override - - - - - This feature will let you set your cruise speed below vehicle standard. (usually at 26~40 km/h) - - - - - Toyota / Lexus - - - - - Enable SnG Mod - - - - - Enable this to fix stop and go (SnG) issue on some models. -Reboot required. - - - - - Enable AM Physical Button Ctrl - - - - - Enable this to link Accel Mode (AM) control to the physical button (TSS2). -ONLY WORK ON SOME OF TSS1 VEHICLES. -Reboot required. - - - - - Enable Door Auto Lock - - - - - Enable this to lock doors when drive above 25 km/h. -ONLY WORK ON SOME VEHICLES. - - - - - Enable Door Auto Unlock - - - - - Enable this to unlock doors when shift to gear P. -ONLY WORK ON SOME VEHICLES. - - - - - Honda - - - - - Enable EPS Mod Mode - - - - - Enable this will increase steering, USE IT ONLY if you have a modded EPS firmware. -Reboot required. - - - - - Mazda - - - - - Display Below Steer Speed Alert - - - - - Enable this will show below steer speed alert. -Thanks to @TheCrowd - - - - - DPControlPanel - - - ALCA Delay - - - - - Once the vehicle meets all ALCA criteria, it will wait for the seconds set here before peforming lane change automatically. - - - - - secs - - - - - ALCA Min Speed - - - - - ALCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - - mph - - - - - LCA Min Speed - - - - - LCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - Lateral Ctrl Mode - - - - - 1 = Lane Change Assist (LCA) -2 = Auto Lane Change Assist (ALCA) - - - - - Longitudinal - - - - - Manually Control Accel Mode - - - - - Enable this if you wish to adjust openpilot's acceleration control. - - - - - Enable vision based turn control - - - - - Use vision path predictions to estimate the appropriate speed to drive through turns ahead. - - - - - Lateral - - - - - Use Lane Lines - - - - - Enable this if you wish to use lane lines mode. - - - - - Use LQR Controller - - - - - Enable this if you wish to use LQR instead of PID or INDI controller. -WORKS WELL ONLY ON SOME VEHICLES. -More linear steering experience. - - - - - Always On Lateral - - - - - Use at your own risk! -1 = Stock Long -2 = OP Long -Run Panda Recovery if Panda is not detected after reboot. -Reboot required. - - - - - Camera Offset - - - - - Adjust your camera position if your device is not mounted as per guidance. - - - - - DPGeneralPanel - - - Auto Shutdown In - - - - - Adjust your shutdown waiting period. -0 = shutdown immediately. - - - - - mins - - - - - Enable Auto Shutdown - - - - - Enable this if you wish to shutdown your device automatically. - - - - - Use Custom API Server - - - - - Enable this if you wish to connect to a custom API server. -Default to "https://api.retropilot.org/", change "dp_api_custom" if you want to change API server URL. -Reboot required. - - - - - Services - - - - - Enable On-Road Dashcam - - - - - Enable this if you wish to record screen, just like a dashcam. -Reboot required. - - - - - Enable GPS Logger - - - - - This will store your track in /data/media/0/gpx_logs/. -Reboot required. - - - - - Hardware - General - - - - - Enable Hotspot On Boot - - - - - Reboot required. - - - - - Miscellaneous - - - - - Enable Driver Monitor (Front Cam) - - - - - Enable this option if you wish to use front camera for driver monitoring. -On = Front Cam Monitor + Steering Monitor -Off = Steering Monitor only. -Enable this will increase device temp a lot, use at your own risk. -Reboot Required. - - - - - Enable Jetson Support - - - - - Enable this option if you intend to run dp on Nvidia Jetson. -Reboot required. - - - - - - Reboot recommended. -Reboot? - - - - - Flashing Panda Firmware - - - - - FLASH - - - - - Tap the button to update your panda firmware. -The device should reboot once if it finish updating. - - - - - Are you sure you want to flash the panda? - - - - - Are you sure delete all media? - - - - - Pandas Firmware Recovery - - - - - RECOVER - - - - - Tap the button ONLY if your panda ran into issue. - - - - - Are you sure you want to run recover panda script? - - - - - Reset dragonpilot conf - - - - - RESET - 재설정 - - - - Tap the button to reset all your dragonpilot congiration to default value. -Reboot required. - - - - - Are you sure you want to reset dp params? - - - - - Delete All Driving Log - - - - - DELETE - - - - - Tap the button to delete ALL your driving logs (including dashcam / gpx / driving logs). - - - - - DPMapsPanel - - - Show Full Screen Nav. - - - - - This will show navigation in full screen. -Please tap green boarder if you wish to switch back drive view. - - - - - Search Destination using Google Map - - - - - This will allow you to search destination in google map api. -You will need to apply your own google map api key.Enter your key detail in web interface once it's enabled. - - - - - Enable Nav. - - - - - This will let use the build in Navigation. -Use web interface to control it: *http://<device_ip>:8082*. -You will need to apply your own mapbox token at https://www.mapbox.com/. -Internet access from mobile phone (tethering) is required. -Reboot required. - - - - - Enable Speed Limit Control - - - - - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits. - - - - - Enable Speed Limit Offset - - - - - Set speed limit slightly higher than actual speed limit for a more natural drive. - - - - - Enable Map Data Turn Control - - - - - Use curvature info from map data to define speed limits to take turns ahead - - - - - Show debug UI elements - - - - - Show UI elements that aid debugging. - - - - - Enable MapD - - - - - Use OSM to assist lateral/longitudinal control. -Please note: -1. This feature will works only when your car support OP longitudinal. -2. MapD will contribute your route to OSM for future improvement automatically. -3. You can add your own offset for mapd just follow the readme under /selfdrive/mapd. -4. Not connecting to the internet for while might feel up device storage from all the gps traces. - - - - - DPUIPanel - - - Display Mode - - - - - 0 = Default -1 = Screen Off While Driving - - - - - Screen Brightness - - - - - Adjust your screen brightness. - - - - - - AUTO - - - - - Alert Volume - - - - - Adjust your alert volume. - - - - - Quiet Drive - - - - - Display alert and play important warning sound. Thanks @sunnyhaibin. - - - - - Display Speed - - - - - Enable this to display your current speed. - - - - - Display Event / Steer Icon - - - - - - Enable this to display the icon. - - - - - Display Driver Monitor Indicator - - - - - Display Side Info - - - - - Enable this to display steering angle / lead car distance / engine RPM. - - - - - Display Top Info - - - - - Enable this to display time / system temp / battery level. - - - DeclinePage - + You must accept the Terms and Conditions in order to use openpilot. - openpilot을 사용하려면 이용 약관에 동의해야 합니다. + openpilot을 사용하려면 이용약관에 동의해야 합니다. - + Back 뒤로 - + Decline, uninstall %1 거절, %1 제거 @@ -768,152 +108,152 @@ Please note: DevicePanel - + Dongle ID Dongle ID - + N/A N/A - + Serial Serial - + Driver Camera 운전자 카메라 - + PREVIEW 미리보기 - + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) 운전자 모니터링이 좋은 가시성을 갖도록 운전자를 향한 카메라를 미리 봅니다. (차량연결은 해제되어있어야 합니다) - + Reset Calibration - 캘리브레이션 재설정 + 캘리브레이션 - + RESET 재설정 - + Are you sure you want to reset calibration? 캘리브레이션을 재설정하시겠습니까? - + Review Training Guide - 트레이닝 가이드 다시보기 + 트레이닝 가이드 - + REVIEW 다시보기 - + Review the rules, features, and limitations of openpilot openpilot의 규칙, 기능 및 제한 다시보기 - + Are you sure you want to review the training guide? 트레이닝 가이드를 다시보시겠습니까? - + Regulatory 규제 - + VIEW 보기 - + Change Language 언어 변경 - + CHANGE 변경 - + Select a language 언어를 선택하세요 - + Reboot 재부팅 - + Power Off 전원 종료 - + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. - openpilot은 장치를 좌측 또는 우측은 4° 이내, 위쪽 5° 또는 아래쪽은 8° 이내로 설치해야 합니다. openpilot은 지속적으로 보정되므로 리셋이 거의 필요하지 않습니다. + openpilot은 좌우측은 4° 이내, 위쪽은 5° 아래쪽은 8° 이내로 장치를 설치해야 합니다. openpilot은 지속적으로 보정되므로 리셋은 거의 필요하지 않습니다. - + Your device is pointed %1° %2 and %3° %4. - 사용자의 장치가 %1° %2 및 %3° %4를 가리키고 있습니다. + 사용자의 장치가 %1° %2 및 %3° %4 위치에 설치되어있습니다. - + down 아래로 - + up 위로 - + left 좌측으로 - + right 우측으로 - + Are you sure you want to reboot? 재부팅 하시겠습니까? - + Disengage to Reboot 재부팅 하려면 해제하세요 - + Are you sure you want to power off? 전원을 종료하시겠습니까? - + Disengage to Power Off 전원을 종료하려면 해제하세요 @@ -921,32 +261,32 @@ Please note: DriveStats - + Drives 주행 - + Hours 시간 - + ALL TIME 전체 - + PAST WEEK 지난주 - + KM Km - + Miles Miles @@ -954,7 +294,7 @@ Please note: DriverViewScene - + camera starting 카메라 시작중 @@ -962,12 +302,12 @@ Please note: InputDialog - + Cancel 취소 - + Need at least %n character(s)! 최소 %n 자가 필요합니다! @@ -977,22 +317,22 @@ Please note: Installer - + Installing... 설치중... - + Receiving objects: 수신중: - + Resolving deltas: 델타병합: - + Updating files: 파일갱신: @@ -1000,27 +340,27 @@ Please note: MapETA - + eta 도착 - + min - + hr 시간 - + km km - + mi mi @@ -1028,22 +368,22 @@ Please note: MapInstructions - + km km - + m m - + mi mi - + ft ft @@ -1051,48 +391,48 @@ Please note: MapPanel - + Current Destination 현재 목적지 - + CLEAR 삭제 - + Recent Destinations 최근 목적지 - + Try the Navigation Beta 네비게이션(베타)를 사용해보세요 - + Get turn-by-turn directions displayed and more with a comma prime subscription. Sign up now: https://connect.comma.ai 자세한 경로안내를 원하시면 comma prime을 구독하세요. 등록:https://connect.comma.ai - + No home location set 집 설정되지않음 - + No work location set 회사 설정되지않음 - + no recent destinations 최근 목적지 없음 @@ -1100,12 +440,12 @@ location set MapWindow - + Map Loading 지도 로딩 - + Waiting for GPS GPS를 기다리는 중 @@ -1113,12 +453,12 @@ location set MultiOptionDialog - + Select 선택 - + Cancel 취소 @@ -1126,23 +466,23 @@ location set Networking - + Advanced 고급 설정 - + Enter password 비밀번호를 입력하세요 - - + + for "%1" - 하기위한 "%1" + "%1"에 접속하려면 인증이 필요합니다 - + Wrong password 비밀번호가 틀렸습니다 @@ -1150,88 +490,48 @@ location set NvgWindow - + km/h km/h - + mph mph - - + + MAX MAX - - + + SPEED SPEED - - + + LIMIT LIMIT - - - REAL STEER - - - - - RAM PER - - - - - OFF - - - - - ENG RPM - - - - - NOR - - - - - SPT - - - - - ECO - - - - - ACCEL - - OffroadHome - + UPDATE 업데이트 - + ALERTS 알림 - + ALERT 알림 @@ -1239,22 +539,22 @@ location set PairingPopup - + Pair your device to your comma account 장치를 콤마 계정과 페어링합니다 - + Go to https://connect.comma.ai on your phone https://connect.comma.ai에 접속하세요 - + Click "add new device" and scan the QR code on the right "새 장치 추가"를 클릭하고 오른쪽 QR 코드를 검색합니다 - + Bookmark connect.comma.ai to your home screen to use it like an app connect.comma.ai을 앱처럼 사용하려면 홈 화면에 바로가기를 만드십시오 @@ -1262,32 +562,32 @@ location set PrimeAdWidget - + Upgrade Now 지금 업그레이드 - + Become a comma prime member at connect.comma.ai connect.comma.ai에서 comma prime에 가입합니다 - + PRIME FEATURES: PRIME 기능: - + Remote access 원격 접속 - + 1 year of storage 1년간 저장 - + Developer perks 개발자 혜택 @@ -1295,22 +595,22 @@ location set PrimeUserWidget - + ✓ SUBSCRIBED ✓ 구독함 - + comma prime comma prime - + CONNECT.COMMA.AI CONNECT.COMMA.AI - + COMMA POINTS COMMA POINTS @@ -1318,39 +618,41 @@ location set QObject - + Reboot 재부팅 - + Exit 종료 + dashcam - dashcam + dashcam + openpilot - openpilot + openpilot - + %n minute(s) ago %n 분전 - + %n hour(s) ago %n 시간전 - + %n day(s) ago %n 일전 @@ -1360,47 +662,47 @@ location set Reset - + Reset failed. Reboot to try again. 초기화 실패. 재부팅후 다시 시도하세요. - + Are you sure you want to reset your device? 장치를 초기화 하시겠습니까? - + Resetting device... 장치 초기화중... - + System Reset 장치 초기화 - + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. - 장치를 초기화 합니다. 확인버튼을 누르면 모든 내용과 설정이 초기화됩니다. 취소를 누르면 다시 부팅합니다. + 장치를 초기화 합니다. 확인버튼을 누르면 모든 내용과 설정이 초기화됩니다. 부팅을 재개하려면 취소를 누르세요. - + Cancel 취소 - + Reboot 재부팅 - + Confirm 확인 - + Unable to mount data partition. Press confirm to reset your device. 데이터 파티션을 마운트할 수 없습니다. 확인 버튼을 눌러 장치를 리셋합니다. @@ -1408,7 +710,7 @@ location set RichTextDialog - + Ok 확인 @@ -1416,168 +718,139 @@ location set SettingsWindow + × - × + × - - BACK - - - - + Device 장치 - - + + Network 네트워크 - + Toggles 토글 - + Software 소프트웨어 - + Navigation 네비게이션 - - - DP - General - - - - - DP - Controls - - - - - DP - UI - - - - - DP - Cars - - - - - DP - Maps - - Setup - + WARNING: Low Voltage 경고: 전압이 낮습니다 - + Power your device in a car with a harness or proceed at your own risk. 하네스 보드에 차량의 전원을 연결하세요. - + Power off 전원 종료 - - - + + + Continue 계속 - + Getting Started 설정 시작 - + Before we get on the road, let’s finish installation and cover some details. 출발하기 전에 설정을 완료하고 몇 가지 세부 사항을 살펴보겠습니다. - + Connect to Wi-Fi wifi 연결 - - + + Back 뒤로 - + Continue without Wi-Fi - wifi 없이 계속 + wifi 연결없이 계속하기 - + Waiting for internet 네트워크 접속을 기다립니다 - + Choose Software to Install 설치할 소프트웨어를 선택하세요 - + Dashcam Dashcam - + Custom Software Custom Software - + Enter URL URL 입력 - + for Custom Software for Custom Software - + Downloading... 다운로드중... - + Download Failed 다운로드 실패 - + Ensure the entered URL is valid, and the device’s internet connection is good. - 입력된 URL이 유효하고 장치의 인터넷 연결이 잘 되어 있는지 확인합니다. + 입력된 URL이 유효하고 장치의 네트워크 연결이 잘 되어 있는지 확인하세요. - + Reboot device 재부팅 - + Start over 다시 시작 @@ -1585,17 +858,17 @@ location set SetupWidget - + Finish Setup 설정 완료 - + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. 장치를 (connect.comma.ai)에서 페어링하고 comma prime 오퍼를 청구합니다. - + Pair device 장치 페어링 @@ -1603,103 +876,106 @@ location set Sidebar - - + + CONNECT 연결 - + OFFLINE 오프라인 - - + + ONLINE 온라인 - + ERROR 오류 - - - + + + TEMP 온도 + HIGH - 높음 + 높음 + GOOD - 좋음 + 좋음 + OK - 경고 + 경고 - + VEHICLE 차량 - + NO NO - + PANDA PANDA - + GPS GPS - + SEARCH 검색중 - + -- -- - + Wi-Fi Wi-Fi - + ETH 이더넷 - + 2G 2G - + 3G 3G - + LTE LTE - + 5G 5G @@ -1707,89 +983,89 @@ location set SoftwarePanel - + Git Branch Git 브렌치 - + Git Commit Git 커밋 - + OS Version OS 버전 - + Version 버전 - + Last Update Check 최신 업데이트 검사 - + The last time openpilot successfully checked for an update. The updater only runs while the car is off. 최근에 openpilot이 업데이트를 성공적으로 확인했습니다. 업데이트 프로그램은 차량 연결이 해제되었을때만 작동합니다. - + Check for Update 업데이트 확인 - + CHECKING 확인중 - + Switch Branch 브랜치 변경 - + ENTER 입력하세요 - - + + The new branch will be pulled the next time the updater runs. 다음 업데이트 프로그램이 실행될 때 새 브랜치가 적용됩니다. - + Enter branch name 브랜치명 입력 - + UNINSTALL 제거 - + Uninstall %1 %1 제거 - + Are you sure you want to uninstall? 제거하시겠습니까? - + failed to fetch update 업데이트를 가져올수없습니다 - - + + CHECK 확인 @@ -1797,48 +1073,48 @@ location set SshControl - + SSH Keys SSH 키 - + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. - 경고:이렇게 하면 GitHub 설정의 모든 공용 키에 대한 SSH 액세스 권한이 부여됩니다. 자신의 사용자 이름이 아닌 GitHub 사용자 이름을 입력하지 마십시오. comma 직원은 GitHub 사용자 이름을 추가하도록 요청하지 않습니다. + 경고: 허용으로 설정하면 GitHub 설정의 모든 공용 키에 대한 SSH 액세스 권한이 부여됩니다. GitHub 사용자 ID 이외에는 입력하지 마십시오. comma에서는 GitHub ID를 추가하라는 요청을 하지 않습니다. - - + + ADD 추가 - + Enter your GitHub username GitHub 사용자 ID - + LOADING 로딩 - + REMOVE 제거 - + Username '%1' has no keys on GitHub '%1'의 키가 GitHub에 없습니다 - + Request timed out 요청 시간 초과 - + Username '%1' doesn't exist on GitHub '%1'은 GitHub에 없습니다 @@ -1846,7 +1122,7 @@ location set SshToggle - + Enable SSH SSH 사용 @@ -1854,22 +1130,22 @@ location set TermsPage - + Terms & Conditions 약관 - + Decline 거절 - + Scroll to accept 허용하려면 아래로 스크롤하세요 - + Agree 동의 @@ -1877,135 +1153,135 @@ location set TogglesPanel - + Enable openpilot openpilot 사용 - + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. - 어댑티브 크루즈 컨트롤 및 차선 유지 운전자 보조를 위해 openpilot 시스템을 사용하십시오. 이 기능을 사용하려면 항상 주의를 기울여야 합니다. 이 설정을 변경하면 차량 전원이 꺼질 때 적용됩니다. + 어댑티브 크루즈 컨트롤 및 차선 유지 운전자 보조를 위해 openpilot 시스템을 사용하십시오. 이 기능을 사용하려면 항상 주의를 기울여야 합니다. 설정변경은 장치 재부팅후 적용됩니다. - + Enable Lane Departure Warnings 차선 이탈 경고 사용 - + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). - 차량이 50km/h(31mph) 이상의 속도로 주행하는 동안 방향 지시등이 활성화되지 않은 상태에서 감지된 차선 위를 주행할 경우 차선이탈 경고를 사용합니다. + 차량이 50km/h(31mph) 이상의 속도로 주행하는 동안 방향지시등 없이 감지된 차선 위를 주행할 경우 차선이탈 경고를 표시합니다. - - Enable Right-Hand Drive - - - - - Allow openpilot to obey left-hand traffic conventions and perform driver monitoring on right driver seat. - - - - + Use Metric System 미터법 사용 - + Display speed in km/h instead of mph. mph 대신 km/h로 속도를 표시합니다. - + Record and Upload Driver Camera 운전자 카메라 녹화 및 업로드 - + Upload data from the driver facing camera and help improve the driver monitoring algorithm. 운전자 카메라에서 데이터를 업로드하고 운전자 모니터링 알고리즘을 개선합니다. - + + 🌮 End-to-end longitudinal (extremely alpha) 🌮 + 🌮 e2e 롱컨트롤 사용 (매우 실험적) 🌮 + + + + Experimental openpilot longitudinal control + openpilot 롱컨트롤 (실험적) + + + + <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> + <b>경고: openpilot 롱컨트롤은 실험적인 기능으로 차량의 AEB를 비활성화합니다.</b> + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + 주행모델이 가속과 감속을 제어하도록 하면 openpilot은 운전자가 생각하는것처럼 운전합니다. (매우 실험적) + + + Disengage On Accelerator Pedal 가속페달 조작시 해제 - + When enabled, pressing the accelerator pedal will disengage openpilot. 활성화된 경우 가속 페달을 누르면 openpilot이 해제됩니다. - + Show ETA in 24h Format 24시간 형식으로 도착예정시간 표시 - + Use 24h format instead of am/pm 오전/오후 대신 24시간 형식 사용 - + Show Map on Left Side of UI UI 왼쪽에 지도 표시 - + Show map on left side when in split screen view. 분할 화면 보기에서 지도를 왼쪽에 표시합니다. - - - openpilot Longitudinal Control - openpilot Longitudinal Control - - - - openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! - openpilot은 차량'의 레이더를 무력화시키고 가속페달과 브레이크의 제어를 인계받을 것이다. 경고: AEB를 비활성화합니다! - Updater - + Update Required 업데이트 필요 - + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. - OS 업데이트가 필요합니다. 장치를 wifi에 연결하여 가장 빠른 업데이트 경험을 제공합니다. 다운로드 크기는 약 1GB입니다. + OS 업데이트가 필요합니다. 장치를 wifi에 연결하면 가장 빠른 업데이트 경험을 제공합니다. 다운로드 크기는 약 1GB입니다. - + Connect to Wi-Fi wifi 연결 - + Install 설치 - + Back 뒤로 - + Loading... 로딩중... - + Reboot 재부팅 - + Update failed 업데이트 실패 @@ -2013,23 +1289,23 @@ location set WifiUI - - + + Scanning for networks... 네트워크 검색 중... - + CONNECTING... 연결중... - + FORGET 저장안함 - + Forget Wi-Fi Network "%1"? wifi 네트워크 저장안함 "%1"? diff --git a/selfdrive/ui/translations/main_nl.ts b/selfdrive/ui/translations/main_nl.ts new file mode 100644 index 000000000..99646ed74 --- /dev/null +++ b/selfdrive/ui/translations/main_nl.ts @@ -0,0 +1,1307 @@ + + + + + AbstractAlert + + + Close + Sluit + + + + Snooze Update + Update uitstellen + + + + Reboot and Update + Opnieuw Opstarten en Updaten + + + + AdvancedNetworking + + + Back + Terug + + + + Enable Tethering + Tethering Inschakelen + + + + Tethering Password + Tethering Wachtwoord + + + + + EDIT + AANPASSEN + + + + Enter new tethering password + Voer nieuw tethering wachtwoord in + + + + IP Address + IP Adres + + + + Enable Roaming + Roaming Inschakelen + + + + APN Setting + APN Instelling + + + + Enter APN + Voer APN in + + + + leave blank for automatic configuration + laat leeg voor automatische configuratie + + + + ConfirmationDialog + + + + Ok + Ok + + + + Cancel + Annuleren + + + + DeclinePage + + + You must accept the Terms and Conditions in order to use openpilot. + U moet de Algemene Voorwaarden accepteren om openpilot te gebruiken. + + + + Back + Terug + + + + Decline, uninstall %1 + Afwijzen, verwijder %1 + + + + DevicePanel + + + Dongle ID + Dongle ID + + + + N/A + Nvt + + + + Serial + Serienummer + + + + Driver Camera + Bestuurders Camera + + + + PREVIEW + BEKIJKEN + + + + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) + Bekijk de naar de bestuurder gerichte camera om ervoor te zorgen dat het monitoren van de bestuurder goed zicht heeft. (Voertuig moet uitgschakeld zijn) + + + + Reset Calibration + Kalibratie Resetten + + + + RESET + RESET + + + + Are you sure you want to reset calibration? + Weet u zeker dat u de kalibratie wilt resetten? + + + + Review Training Guide + Doorloop de Training Opnieuw + + + + REVIEW + BEKIJKEN + + + + Review the rules, features, and limitations of openpilot + Bekijk de regels, functies en beperkingen van openpilot + + + + Are you sure you want to review the training guide? + Weet u zeker dat u de training opnieuw wilt doorlopen? + + + + Regulatory + Regelgeving + + + + VIEW + BEKIJKEN + + + + Change Language + Taal Wijzigen + + + + CHANGE + WIJZIGEN + + + + Select a language + Selecteer een taal + + + + Reboot + Opnieuw Opstarten + + + + Power Off + Uitschakelen + + + + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. + openpilot vereist dat het apparaat binnen 4° links of rechts en binnen 5° omhoog of 8° omlaag wordt gemonteerd. openpilot kalibreert continu, resetten is zelden nodig. + + + + Your device is pointed %1° %2 and %3° %4. + Uw apparaat is gericht op %1° %2 en %3° %4. + + + + down + omlaag + + + + up + omhoog + + + + left + links + + + + right + rechts + + + + Are you sure you want to reboot? + Weet u zeker dat u opnieuw wilt opstarten? + + + + Disengage to Reboot + Deactiveer openpilot om opnieuw op te starten + + + + Are you sure you want to power off? + Weet u zeker dat u wilt uitschakelen? + + + + Disengage to Power Off + Deactiveer openpilot om uit te schakelen + + + + DriveStats + + + Drives + Ritten + + + + Hours + Uren + + + + ALL TIME + TOTAAL + + + + PAST WEEK + AFGELOPEN WEEK + + + + KM + Km + + + + Miles + Mijl + + + + DriverViewScene + + + camera starting + Camera wordt gestart + + + + InputDialog + + + Cancel + Annuleren + + + + Need at least %n character(s)! + + Heeft minstens %n karakter nodig! + Heeft minstens %n karakters nodig! + + + + + Installer + + + Installing... + Installeren... + + + + Receiving objects: + Objecten ontvangen: + + + + Resolving deltas: + Deltas verwerken: + + + + Updating files: + Bestanden bijwerken: + + + + MapETA + + + eta + eta + + + + min + min + + + + hr + uur + + + + km + km + + + + mi + mi + + + + MapInstructions + + + km + km + + + + m + m + + + + mi + mi + + + + ft + ft + + + + MapPanel + + + Current Destination + Huidige Bestemming + + + + CLEAR + LEEGMAKEN + + + + Recent Destinations + Recente Bestemmingen + + + + Try the Navigation Beta + Probeer de Navigatie Bèta + + + + Get turn-by-turn directions displayed and more with a comma +prime subscription. Sign up now: https://connect.comma.ai + Krijg stapsgewijze routebeschrijving en meer met een comma +prime abonnement. Meld u nu aan: https://connect.comma.ai + + + + No home +location set + Geen thuislocatie +ingesteld + + + + No work +location set + Geen werklocatie +ingesteld + + + + no recent destinations + geen recente bestemmingen + + + + MapWindow + + + Map Loading + Kaart wordt geladen + + + + Waiting for GPS + Wachten op GPS + + + + MultiOptionDialog + + + Select + Selecteer + + + + Cancel + Annuleren + + + + Networking + + + Advanced + Geavanceerd + + + + Enter password + Voer wachtwoord in + + + + + for "%1" + voor "%1" + + + + Wrong password + Verkeerd wachtwoord + + + + NvgWindow + + + km/h + km/u + + + + mph + mph + + + + + MAX + MAX + + + + + SPEED + SPEED + + + + + LIMIT + LIMIT + + + + OffroadHome + + + UPDATE + UPDATE + + + + ALERTS + WAARSCHUWINGEN + + + + ALERT + WAARSCHUWING + + + + PairingPopup + + + Pair your device to your comma account + Koppel uw apparaat aan uw comma-account + + + + Go to https://connect.comma.ai on your phone + Ga naar https://connect.comma.ai op uw telefoon + + + + Click "add new device" and scan the QR code on the right + Klik op "add new device" en scan de QR-code aan de rechterkant + + + + Bookmark connect.comma.ai to your home screen to use it like an app + Voeg connect.comma.ai toe op uw startscherm om het als een app te gebruiken + + + + PrimeAdWidget + + + Upgrade Now + Upgrade nu + + + + Become a comma prime member at connect.comma.ai + Word een comma prime lid op connect.comma.ai + + + + PRIME FEATURES: + PRIME BEVAT: + + + + Remote access + Toegang op afstand + + + + 1 year of storage + 1 jaar lang opslag + + + + Developer perks + Voordelen voor ontwikkelaars + + + + PrimeUserWidget + + + ✓ SUBSCRIBED + ✓ GEABONNEERD + + + + comma prime + comma prime + + + + CONNECT.COMMA.AI + CONNECT.COMMA.AI + + + + COMMA POINTS + COMMA PUNTEN + + + + QObject + + + Reboot + Opnieuw Opstarten + + + + Exit + Afsluiten + + + + dashcam + dashcam + + + + openpilot + openpilot + + + + %n minute(s) ago + + %n minuut geleden + %n minuten geleden + + + + + %n hour(s) ago + + %n uur geleden + %n uur geleden + + + + + %n day(s) ago + + %n dag geleden + %n dagen geleden + + + + + Reset + + + Reset failed. Reboot to try again. + Opnieuw instellen mislukt. Start opnieuw op om opnieuw te proberen. + + + + Are you sure you want to reset your device? + Weet u zeker dat u uw apparaat opnieuw wilt instellen? + + + + Resetting device... + Apparaat opnieuw instellen... + + + + System Reset + Systeemreset + + + + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. + Systeemreset geactiveerd. Druk op bevestigen om alle inhoud en instellingen te wissen. Druk op Annuleren om het opstarten te hervatten. + + + + Cancel + Annuleren + + + + Reboot + Opnieuw Opstarten + + + + Confirm + Bevestigen + + + + Unable to mount data partition. Press confirm to reset your device. + Kan gegevenspartitie niet koppelen. Druk op bevestigen om uw apparaat te resetten. + + + + RichTextDialog + + + Ok + Ok + + + + SettingsWindow + + + × + × + + + + Device + Apparaat + + + + + Network + Netwerk + + + + Toggles + Opties + + + + Software + Software + + + + Navigation + Navigatie + + + + Setup + + + WARNING: Low Voltage + WAARCHUWING: Lage Spanning + + + + Power your device in a car with a harness or proceed at your own risk. + Voorzie uw apparaat van stroom in een auto met een harnas (car harness) of ga op eigen risico verder. + + + + Power off + Uitschakelen + + + + + + Continue + Doorgaan + + + + Getting Started + Aan de slag + + + + Before we get on the road, let’s finish installation and cover some details. + Laten we, voordat we op pad gaan, de installatie afronden en enkele details bespreken. + + + + Connect to Wi-Fi + Maak verbinding met Wi-Fi + + + + + Back + Terug + + + + Continue without Wi-Fi + Doorgaan zonder Wi-Fi + + + + Waiting for internet + Wachten op internet + + + + Choose Software to Install + Kies Software om te Installeren + + + + Dashcam + Dashcam + + + + Custom Software + Andere Software + + + + Enter URL + Voer URL in + + + + for Custom Software + voor Andere Software + + + + Downloading... + Downloaden... + + + + Download Failed + Downloaden Mislukt + + + + Ensure the entered URL is valid, and the device’s internet connection is good. + Zorg ervoor dat de ingevoerde URL geldig is en dat de internetverbinding van het apparaat goed is. + + + + Reboot device + Apparaat opnieuw opstarten + + + + Start over + Begin opnieuw + + + + SetupWidget + + + Finish Setup + Installatie voltooien + + + + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. + Koppel uw apparaat met comma connect (connect.comma.ai) en claim uw comma prime-aanbieding. + + + + Pair device + Apparaat koppelen + + + + Sidebar + + + + CONNECT + VERBINDING + + + + OFFLINE + OFFLINE + + + + + ONLINE + ONLINE + + + + ERROR + FOUT + + + + + + TEMP + TEMP + + + + HIGH + HOOG + + + + GOOD + GOED + + + + OK + OK + + + + VEHICLE + VOERTUIG + + + + NO + GEEN + + + + PANDA + PANDA + + + + GPS + GPS + + + + SEARCH + ZOEKEN + + + + -- + -- + + + + Wi-Fi + Wi-Fi + + + + ETH + ETH + + + + 2G + 2G + + + + 3G + 3G + + + + LTE + 4G + + + + 5G + 5G + + + + SoftwarePanel + + + Git Branch + Git Branch + + + + Git Commit + Git Commit + + + + OS Version + OS Versie + + + + Version + Versie + + + + Last Update Check + Laatste Updatecontrole + + + + The last time openpilot successfully checked for an update. The updater only runs while the car is off. + De laatste keer dat openpilot met succes heeft gecontroleerd op een update. De updater werkt alleen als de auto is uitgeschakeld. + + + + Check for Update + Controleer op Updates + + + + CHECKING + CONTROLEER + + + + Switch Branch + Branch Verwisselen + + + + ENTER + INVOEREN + + + + + The new branch will be pulled the next time the updater runs. + Tijdens de volgende update wordt de nieuwe branch opgehaald. + + + + Enter branch name + Voer branch naam in + + + + Uninstall %1 + Verwijder %1 + + + + UNINSTALL + VERWIJDER + + + + Are you sure you want to uninstall? + Weet u zeker dat u de installatie ongedaan wilt maken? + + + + failed to fetch update + ophalen van update mislukt + + + + + CHECK + CONTROLEER + + + + SshControl + + + SSH Keys + SSH Sleutels + + + + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. + Waarschuwing: dit geeft SSH toegang tot alle openbare sleutels in uw GitHub-instellingen. Voer nooit een andere GitHub-gebruikersnaam in dan die van uzelf. Een medewerker van comma zal u NOOIT vragen om zijn GitHub-gebruikersnaam toe te voegen. + + + + + ADD + TOEVOEGEN + + + + Enter your GitHub username + Voer uw GitHub gebruikersnaam in + + + + LOADING + LADEN + + + + REMOVE + VERWIJDEREN + + + + Username '%1' has no keys on GitHub + Gebruikersnaam '%1' heeft geen SSH sleutels op GitHub + + + + Request timed out + Time-out van aanvraag + + + + Username '%1' doesn't exist on GitHub + Gebruikersnaam '%1' bestaat niet op GitHub + + + + SshToggle + + + Enable SSH + SSH Inschakelen + + + + TermsPage + + + Terms & Conditions + Algemene Voorwaarden + + + + Decline + Afwijzen + + + + Scroll to accept + Scroll om te accepteren + + + + Agree + Akkoord + + + + TogglesPanel + + + Enable openpilot + openpilot Inschakelen + + + + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. + Gebruik het openpilot-systeem voor adaptieve cruisecontrol en rijstrookassistentie. Uw aandacht is te allen tijde vereist om deze functie te gebruiken. Het wijzigen van deze instelling wordt van kracht wanneer de auto wordt uitgeschakeld. + + + + Enable Lane Departure Warnings + Waarschuwingen bij Verlaten Rijstrook Inschakelen + + + + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). + Ontvang waarschuwingen om terug naar de rijstrook te sturen wanneer uw voertuig over een gedetecteerde rijstrookstreep drijft zonder dat de richtingaanwijzer wordt geactiveerd terwijl u harder rijdt dan 50 km/u (31 mph). + + + + Use Metric System + Gebruik Metrisch Systeem + + + + Display speed in km/h instead of mph. + Geef snelheid weer in km/u in plaats van mph. + + + + Record and Upload Driver Camera + Opnemen en Uploaden van de Bestuurders Camera + + + + Upload data from the driver facing camera and help improve the driver monitoring algorithm. + Upload gegevens van de bestuurders camera en help het algoritme voor het monitoren van de bestuurder te verbeteren. + + + + Disengage On Accelerator Pedal + Deactiveren Met Gaspedaal + + + + When enabled, pressing the accelerator pedal will disengage openpilot. + Indien ingeschakeld, zal het indrukken van het gaspedaal openpilot deactiveren. + + + + Show ETA in 24h Format + Toon verwachte aankomsttijd in 24-uurs formaat + + + + Use 24h format instead of am/pm + Gebruik 24-uurs formaat in plaats van AM en PM + + + + Show Map on Left Side of UI + Toon kaart aan linkerkant van het scherm + + + + Show map on left side when in split screen view. + Toon kaart links in gesplitste schermweergave. + + + + openpilot Longitudinal Control + openpilot Longitudinale Controle + + + + openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! + openpilot zal de radar van de auto uitschakelen en de controle over gas en remmen overnemen. Waarschuwing: hierdoor wordt AEB (automatische noodrem) uitgeschakeld! + + + + Updater + + + Update Required + Update Vereist + + + + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. + Een update van het besturingssysteem is vereist. Verbind je apparaat met Wi-Fi voor de snelste update-ervaring. De downloadgrootte is ongeveer 1 GB. + + + + Connect to Wi-Fi + Maak verbinding met Wi-Fi + + + + Install + Installeer + + + + Back + Terug + + + + Loading... + Aan het laden... + + + + Reboot + Opnieuw Opstarten + + + + Update failed + Update mislukt + + + + WifiUI + + + + Scanning for networks... + Scannen naar netwerken... + + + + CONNECTING... + VERBINDEN... + + + + FORGET + VERGETEN + + + + Forget Wi-Fi Network "%1"? + Vergeet Wi-Fi Netwerk "%1"? + + + diff --git a/selfdrive/ui/translations/main_pl.ts b/selfdrive/ui/translations/main_pl.ts new file mode 100644 index 000000000..8593d6826 --- /dev/null +++ b/selfdrive/ui/translations/main_pl.ts @@ -0,0 +1,1311 @@ + + + + + AbstractAlert + + + Close + Zamknij + + + + Snooze Update + Zaktualizuj później + + + + Reboot and Update + Uruchom ponownie i zaktualizuj + + + + AdvancedNetworking + + + Back + Wróć + + + + Enable Tethering + Włącz hotspot osobisty + + + + Tethering Password + Hasło do hotspotu + + + + + EDIT + EDYTUJ + + + + Enter new tethering password + Wprowadź nowe hasło do hotspotu + + + + IP Address + Adres IP + + + + Enable Roaming + Włącz roaming danych + + + + APN Setting + Ustawienia APN + + + + Enter APN + Wprowadź APN + + + + leave blank for automatic configuration + Pozostaw puste, aby użyć domyślnej konfiguracji + + + + ConfirmationDialog + + + + Ok + Ok + + + + Cancel + Anuluj + + + + DeclinePage + + + You must accept the Terms and Conditions in order to use openpilot. + Aby korzystać z openpilota musisz zaakceptować regulamin. + + + + Back + Wróć + + + + Decline, uninstall %1 + Odrzuć, odinstaluj %1 + + + + DevicePanel + + + Dongle ID + ID adaptera + + + + N/A + N/A + + + + Serial + Numer seryjny + + + + Driver Camera + Kamera kierowcy + + + + PREVIEW + PODGLĄD + + + + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) + Wyświetl podgląd z kamery skierowanej na kierowcę, aby upewnić się, że monitoring kierowcy ma dobry zakres widzenia. (pojazd musi być wyłączony) + + + + Reset Calibration + Zresetuj kalibrację + + + + RESET + ZRESETUJ + + + + Are you sure you want to reset calibration? + Czy na pewno chcesz zresetować kalibrację? + + + + Review Training Guide + Zapoznaj się z samouczkiem + + + + REVIEW + ZAPOZNAJ SIĘ + + + + Review the rules, features, and limitations of openpilot + Zapoznaj się z zasadami, funkcjami i ograniczeniami openpilota + + + + Are you sure you want to review the training guide? + Czy na pewno chcesz się zapoznać z samouczkiem? + + + + Regulatory + Regulacja + + + + VIEW + WIDOK + + + + Change Language + Zmień język + + + + CHANGE + ZMIEŃ + + + + Select a language + Wybierz język + + + + Reboot + Uruchom ponownie + + + + Power Off + Wyłącz + + + + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. + openpilot wymaga, aby urządzenie było zamontowane z maksymalnym odchyłem 4° poziomo, 5° w górę oraz 8° w dół. openpilot jest ciągle kalibrowany, rzadko konieczne jest resetowania urządzenia. + + + + Your device is pointed %1° %2 and %3° %4. + Twoje urządzenie jest skierowane %1° %2 oraz %3° %4. + + + + down + w dół + + + + up + w górę + + + + left + w lewo + + + + right + w prawo + + + + Are you sure you want to reboot? + Czy na pewno chcesz uruchomić ponownie urządzenie? + + + + Disengage to Reboot + Aby uruchomić ponownie, odłącz sterowanie + + + + Are you sure you want to power off? + Czy na pewno chcesz wyłączyć urządzenie? + + + + Disengage to Power Off + Aby wyłączyć urządzenie, odłącz sterowanie + + + + DriveStats + + + Drives + Przejazdy + + + + Hours + Godziny + + + + ALL TIME + CAŁKOWICIE + + + + PAST WEEK + OSTATNI TYDZIEŃ + + + + KM + KM + + + + Miles + Mile + + + + DriverViewScene + + + camera starting + uruchamianie kamery + + + + InputDialog + + + Cancel + Anuluj + + + + Need at least %n character(s)! + + Wpisana wartość powinna składać się przynajmniej z %n znaku! + Wpisana wartość powinna skłądać się przynajmniej z %n znaków! + Wpisana wartość powinna skłądać się przynajmniej z %n znaków! + + + + + Installer + + + Installing... + Instalowanie... + + + + Receiving objects: + Odbieranie obiektów: + + + + Resolving deltas: + Rozwiązywanie różnic: + + + + Updating files: + Aktualizacja plików: + + + + MapETA + + + eta + przewidywany czas + + + + min + min + + + + hr + godz + + + + km + km + + + + mi + mi + + + + MapInstructions + + + km + km + + + + m + m + + + + mi + mi + + + + ft + ft + + + + MapPanel + + + Current Destination + Miejsce docelowe + + + + CLEAR + WYCZYŚĆ + + + + Recent Destinations + Ostatnie miejsca docelowe + + + + Try the Navigation Beta + Wypróbuj nawigację w wersji beta + + + + Get turn-by-turn directions displayed and more with a comma +prime subscription. Sign up now: https://connect.comma.ai + Odblokuj nawigację zakręt po zakęcie i wiele więcej subskrybując +comma prime. Zarejestruj się teraz: https://connect.comma.ai + + + + No home +location set + Lokalizacja domu +nie została ustawiona + + + + No work +location set + Miejsce pracy +nie zostało ustawione + + + + no recent destinations + brak ostatnich miejsc docelowych + + + + MapWindow + + + Map Loading + Ładowanie Mapy + + + + Waiting for GPS + Oczekiwanie na sygnał GPS + + + + MultiOptionDialog + + + Select + Wybierz + + + + Cancel + Anuluj + + + + Networking + + + Advanced + Zaawansowane + + + + Enter password + Wprowadź hasło + + + + + for "%1" + do "%1" + + + + Wrong password + Niepoprawne hasło + + + + NvgWindow + + + km/h + km/h + + + + mph + mph + + + + + MAX + MAX + + + + + SPEED + PRĘDKOŚĆ + + + + + LIMIT + OGRANICZENIE + + + + OffroadHome + + + UPDATE + UAKTUALNIJ + + + + ALERTS + ALERTY + + + + ALERT + ALERT + + + + PairingPopup + + + Pair your device to your comma account + Sparuj swoje urzadzenie ze swoim kontem comma + + + + Go to https://connect.comma.ai on your phone + Wejdź na stronę https://connect.comma.ai na swoim telefonie + + + + Click "add new device" and scan the QR code on the right + Kliknij "add new device" i zeskanuj kod QR znajdujący się po prawej stronie + + + + Bookmark connect.comma.ai to your home screen to use it like an app + Dodaj connect.comma.ai do zakładek na swoim ekranie początkowym, aby korzystać z niej jak z aplikacji + + + + PrimeAdWidget + + + Upgrade Now + Uaktualnij teraz + + + + Become a comma prime member at connect.comma.ai + Zostań członkiem comma prime na connect.comma.ai + + + + PRIME FEATURES: + FUNKCJE PRIME: + + + + Remote access + Zdalny dostęp + + + + 1 year of storage + 1 rok przechowywania danych + + + + Developer perks + Udogodnienia dla programistów + + + + PrimeUserWidget + + + ✓ SUBSCRIBED + ✓ ZASUBSKRYBOWANO + + + + comma prime + comma prime + + + + CONNECT.COMMA.AI + CONNECT.COMMA.AI + + + + COMMA POINTS + COMMA POINTS + + + + QObject + + + Reboot + Uruchom Ponownie + + + + Exit + Wyjdź + + + + dashcam + wideorejestrator + + + + openpilot + openpilot + + + + %n minute(s) ago + + %n minutę temu + %n minuty temu + %n minut temu + + + + + %n hour(s) ago + + % godzinę temu + %n godziny temu + %n godzin temu + + + + + %n day(s) ago + + %n dzień temu + %n dni temu + %n dni temu + + + + + Reset + + + Reset failed. Reboot to try again. + Wymazywanie zakończone niepowodzeniem. Aby spróbować ponownie, uruchom ponownie urządzenie. + + + + Are you sure you want to reset your device? + Czy na pewno chcesz wymazać urządzenie? + + + + Resetting device... + Wymazywanie urządzenia... + + + + System Reset + Przywróć do ustawień fabrycznych + + + + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. + Przywracanie do ustawień fabrycznych. Wciśnij potwierdź, aby usunąć wszystkie dane oraz ustawienia. Wciśnij anuluj, aby wznowić uruchamianie. + + + + Cancel + Anuluj + + + + Reboot + Uruchom ponownie + + + + Confirm + Potwiedź + + + + Unable to mount data partition. Press confirm to reset your device. + Partycja nie została zamontowana poprawnie. Wciśnij potwierdź, aby uruchomić ponownie urządzenie. + + + + RichTextDialog + + + Ok + Ok + + + + SettingsWindow + + + × + x + + + + Device + Urządzenie + + + + + Network + Sieć + + + + Toggles + Przełączniki + + + + Software + Oprogramowanie + + + + Navigation + Nawigacja + + + + Setup + + + WARNING: Low Voltage + OSTRZEŻENIE: Niskie Napięcie + + + + Power your device in a car with a harness or proceed at your own risk. + Podłącz swoje urządzenie do zasilania poprzez podłączenienie go do pojazdu lub kontynuuj na własną odpowiedzialność. + + + + Power off + Wyłącz + + + + + + Continue + Kontynuuj + + + + Getting Started + Zacznij + + + + Before we get on the road, let’s finish installation and cover some details. + Zanim ruszysz w drogę, dokończ instalację i podaj kilka szczegółów. + + + + Connect to Wi-Fi + Połącz z Wi-Fi + + + + + Back + Wróć + + + + Continue without Wi-Fi + Kontynuuj bez połączenia z Wif-Fi + + + + Waiting for internet + Oczekiwanie na połączenie sieciowe + + + + Choose Software to Install + Wybierz oprogramowanie do instalacji + + + + Dashcam + Wideorejestrator + + + + Custom Software + Własne oprogramowanie + + + + Enter URL + Wprowadź adres URL + + + + for Custom Software + do własnego oprogramowania + + + + Downloading... + Pobieranie... + + + + Download Failed + Pobieranie nie powiodło się + + + + Ensure the entered URL is valid, and the device’s internet connection is good. + Upewnij się, że wpisany adres URL jest poprawny, a połączenie internetowe działa poprawnie. + + + + Reboot device + Uruchom ponownie + + + + Start over + Zacznij od początku + + + + SetupWidget + + + Finish Setup + Zakończ konfigurację + + + + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. + Sparuj swoje urządzenie z comma connect (connect.comma.ai) i wybierz swoją ofertę comma prime. + + + + Pair device + Sparuj urządzenie + + + + Sidebar + + + + CONNECT + POŁĄCZENIE + + + + OFFLINE + OFFLINE + + + + + ONLINE + ONLINE + + + + ERROR + BŁĄD + + + + + + TEMP + TEMP + + + + HIGH + WYSOKA + + + + GOOD + DOBRA + + + + OK + OK + + + + VEHICLE + POJAZD + + + + NO + BRAK + + + + PANDA + PANDA + + + + GPS + GPS + + + + SEARCH + SZUKAJ + + + + -- + -- + + + + Wi-Fi + Wi-FI + + + + ETH + ETH + + + + 2G + 2G + + + + 3G + 3G + + + + LTE + LTE + + + + 5G + 5G + + + + SoftwarePanel + + + Git Branch + Gałąź Git + + + + Git Commit + Git commit + + + + OS Version + Wersja systemu + + + + Version + Wersja + + + + Last Update Check + Ostatnie sprawdzenie aktualizacji + + + + The last time openpilot successfully checked for an update. The updater only runs while the car is off. + Ostatni raz kiedy openpilot znalazł aktualizację. Aktualizator może być uruchomiony wyłącznie wtedy, kiedy pojazd jest wyłączony. + + + + Check for Update + Sprawdź uaktualnienia + + + + CHECKING + SPRAWDZANIE + + + + Switch Branch + Zmień gąłąź + + + + ENTER + WPROWADŹ + + + + + The new branch will be pulled the next time the updater runs. + Nowa gałąź będzie pobrana przy następnym uruchomieniu aktualizatora. + + + + Enter branch name + Wprowadź nazwę gałęzi + + + + Uninstall %1 + Odinstaluj %1 + + + + UNINSTALL + ODINSTALUJ + + + + Are you sure you want to uninstall? + Czy na pewno chcesz odinstalować? + + + + failed to fetch update + pobieranie aktualizacji zakończone niepowodzeniem + + + + + CHECK + SPRAWDŹ + + + + SshControl + + + SSH Keys + Klucze SSH + + + + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. + Ostrzeżenie: To spowoduje przekazanie dostępu do wszystkich Twoich publicznych kuczy z ustawień GitHuba. Nigdy nie wprowadzaj nazwy użytkownika innej niż swoja. Pracownik comma NIGDY nie poprosi o dodanie swojej nazwy uzytkownika. + + + + + ADD + DODAJ + + + + Enter your GitHub username + Wpisz swoją nazwę użytkownika GitHub + + + + LOADING + ŁADOWANIE + + + + REMOVE + USUŃ + + + + Username '%1' has no keys on GitHub + Użytkownik '%1' nie posiada żadnych kluczy na GitHubie + + + + Request timed out + Limit czasu rządania + + + + Username '%1' doesn't exist on GitHub + Użytkownik '%1' nie istnieje na GitHubie + + + + SshToggle + + + Enable SSH + Włącz SSH + + + + TermsPage + + + Terms & Conditions + Regulamin + + + + Decline + Odrzuć + + + + Scroll to accept + Przewiń w dół, aby zaakceptować + + + + Agree + Zaakceptuj + + + + TogglesPanel + + + Enable openpilot + Włącz openpilota + + + + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. + Użyj openpilota do zachowania bezpiecznego odstępu między pojazdami i do asystowania w utrzymywaniu pasa ruchu. Twoja pełna uwaga jest wymagana przez cały czas korzystania z tej funkcji. Ustawienie to może być wdrożone wyłącznie wtedy, gdy pojazd jest wyłączony. + + + + Enable Lane Departure Warnings + Włącz ostrzeganie przed zmianą pasa ruchu + + + + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). + Otrzymuj alerty o powrocie na właściwy pas, kiedy Twój pojazd przekroczy linię bez włączonego kierunkowskazu jadąc powyżej 50 km/h (31 mph). + + + + Use Metric System + Korzystaj z systemu metrycznego + + + + Display speed in km/h instead of mph. + Wyświetl prędkość w km/h zamiast mph. + + + + Record and Upload Driver Camera + Nagraj i prześlij nagranie z kamery kierowcy + + + + Upload data from the driver facing camera and help improve the driver monitoring algorithm. + Prześlij dane z kamery skierowanej na kierowcę i pomóż poprawiać algorytm monitorowania kierowcy. + + + + Disengage On Accelerator Pedal + Odłącz poprzez naciśnięcie gazu + + + + When enabled, pressing the accelerator pedal will disengage openpilot. + Po włączeniu, naciśnięcie na pedał gazu odłączy openpilota. + + + + Show ETA in 24h Format + Pokaż oczekiwany czas dojazdu w formacie 24-godzinnym + + + + Use 24h format instead of am/pm + Korzystaj z formatu 24-godzinnego zamiast 12-godzinnego + + + + Show Map on Left Side of UI + Pokaż mapę po lewej stronie ekranu + + + + Show map on left side when in split screen view. + Pokaż mapę po lewej stronie kiedy ekran jest podzielony. + + + + openpilot Longitudinal Control + Kontrola wzdłużna openpilota + + + + openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! + openpilot wyłączy radar samochodu i przejmie kontrolę nad gazem i hamulcem. Ostrzeżenie: wyłączony zostanie system AEB! + + + + Updater + + + Update Required + Wymagana Aktualizacja + + + + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. + Wymagana aktualizacja systemu operacyjnego. Aby przyspieszyć proces aktualizacji połącz swoje urzeądzenie do Wi-Fi. Rozmiar pobieranej paczki wynosi około 1GB. + + + + Connect to Wi-Fi + Połącz się z Wi-Fi + + + + Install + Zainstaluj + + + + Back + Wróć + + + + Loading... + Ładowanie... + + + + Reboot + Uruchom ponownie + + + + Update failed + Aktualizacja nie powiodła się + + + + WifiUI + + + + Scanning for networks... + Wyszukiwanie sieci... + + + + CONNECTING... + ŁĄCZENIE... + + + + FORGET + ZAPOMNIJ + + + + Forget Wi-Fi Network "%1"? + Czy chcesz zapomnieć sieć "%1"? + + + diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index d8741a4c7..2b3acb369 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -4,17 +4,17 @@ AbstractAlert - + Close Fechar - + Snooze Update Adiar Atualização - + Reboot and Update Reiniciar e Atualizar @@ -22,745 +22,85 @@ AdvancedNetworking - + Back Voltar - + Enable Tethering - Ativar Theter + Ativar Tether - + Tethering Password - Senha Thetering + Senha Tethering - - + + EDIT EDITAR - + Enter new tethering password - Insira nova senha thetering + Insira nova senha tethering - + IP Address - IP Endereço + Endereço IP - + Enable Roaming Ativar Roaming - + APN Setting APN Config - + Enter APN Insira APN - + leave blank for automatic configuration deixe em branco para configuração automática - - C2NetworkPanel - - - Wi-Fi Settings - - - - - - OPEN - - - - - Tethering Settings - - - - - IP Address - IP Endereço - - ConfirmationDialog - - + + Ok OK - + Cancel Cancelar - - DPCarPanel - - - Override Speed When Below - - - - - Override feature will be enabled when set cruise speed is lower than this value. -1 km/h = 0.62 mph. - - - - - km/h - - - - - Turn On Cruise Speed Override - - - - - This feature will let you set your cruise speed below vehicle standard. (usually at 26~40 km/h) - - - - - Toyota / Lexus - - - - - Enable SnG Mod - - - - - Enable this to fix stop and go (SnG) issue on some models. -Reboot required. - - - - - Enable AM Physical Button Ctrl - - - - - Enable this to link Accel Mode (AM) control to the physical button (TSS2). -ONLY WORK ON SOME OF TSS1 VEHICLES. -Reboot required. - - - - - Enable Door Auto Lock - - - - - Enable this to lock doors when drive above 25 km/h. -ONLY WORK ON SOME VEHICLES. - - - - - Enable Door Auto Unlock - - - - - Enable this to unlock doors when shift to gear P. -ONLY WORK ON SOME VEHICLES. - - - - - Honda - - - - - Enable EPS Mod Mode - - - - - Enable this will increase steering, USE IT ONLY if you have a modded EPS firmware. -Reboot required. - - - - - Mazda - - - - - Display Below Steer Speed Alert - - - - - Enable this will show below steer speed alert. -Thanks to @TheCrowd - - - - - DPControlPanel - - - ALCA Delay - - - - - Once the vehicle meets all ALCA criteria, it will wait for the seconds set here before peforming lane change automatically. - - - - - secs - - - - - ALCA Min Speed - - - - - ALCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - - mph - - - - - LCA Min Speed - - - - - LCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - Lateral Ctrl Mode - - - - - 1 = Lane Change Assist (LCA) -2 = Auto Lane Change Assist (ALCA) - - - - - Longitudinal - - - - - Manually Control Accel Mode - - - - - Enable this if you wish to adjust openpilot's acceleration control. - - - - - Enable vision based turn control - - - - - Use vision path predictions to estimate the appropriate speed to drive through turns ahead. - - - - - Lateral - - - - - Use Lane Lines - - - - - Enable this if you wish to use lane lines mode. - - - - - Use LQR Controller - - - - - Enable this if you wish to use LQR instead of PID or INDI controller. -WORKS WELL ONLY ON SOME VEHICLES. -More linear steering experience. - - - - - Always On Lateral - - - - - Use at your own risk! -1 = Stock Long -2 = OP Long -Run Panda Recovery if Panda is not detected after reboot. -Reboot required. - - - - - Camera Offset - - - - - Adjust your camera position if your device is not mounted as per guidance. - - - - - DPGeneralPanel - - - Auto Shutdown In - - - - - Adjust your shutdown waiting period. -0 = shutdown immediately. - - - - - mins - - - - - Enable Auto Shutdown - - - - - Enable this if you wish to shutdown your device automatically. - - - - - Use Custom API Server - - - - - Enable this if you wish to connect to a custom API server. -Default to "https://api.retropilot.org/", change "dp_api_custom" if you want to change API server URL. -Reboot required. - - - - - Services - - - - - Enable On-Road Dashcam - - - - - Enable this if you wish to record screen, just like a dashcam. -Reboot required. - - - - - Enable GPS Logger - - - - - This will store your track in /data/media/0/gpx_logs/. -Reboot required. - - - - - Hardware - General - - - - - Enable Hotspot On Boot - - - - - Reboot required. - - - - - Miscellaneous - - - - - Enable Driver Monitor (Front Cam) - - - - - Enable this option if you wish to use front camera for driver monitoring. -On = Front Cam Monitor + Steering Monitor -Off = Steering Monitor only. -Enable this will increase device temp a lot, use at your own risk. -Reboot Required. - - - - - Enable Jetson Support - - - - - Enable this option if you intend to run dp on Nvidia Jetson. -Reboot required. - - - - - - Reboot recommended. -Reboot? - - - - - Flashing Panda Firmware - - - - - FLASH - - - - - Tap the button to update your panda firmware. -The device should reboot once if it finish updating. - - - - - Are you sure you want to flash the panda? - - - - - Are you sure delete all media? - - - - - Pandas Firmware Recovery - - - - - RECOVER - - - - - Tap the button ONLY if your panda ran into issue. - - - - - Are you sure you want to run recover panda script? - - - - - Reset dragonpilot conf - - - - - RESET - RESET - - - - Tap the button to reset all your dragonpilot congiration to default value. -Reboot required. - - - - - Are you sure you want to reset dp params? - - - - - Delete All Driving Log - - - - - DELETE - - - - - Tap the button to delete ALL your driving logs (including dashcam / gpx / driving logs). - - - - - DPMapsPanel - - - Show Full Screen Nav. - - - - - This will show navigation in full screen. -Please tap green boarder if you wish to switch back drive view. - - - - - Search Destination using Google Map - - - - - This will allow you to search destination in google map api. -You will need to apply your own google map api key.Enter your key detail in web interface once it's enabled. - - - - - Enable Nav. - - - - - This will let use the build in Navigation. -Use web interface to control it: *http://<device_ip>:8082*. -You will need to apply your own mapbox token at https://www.mapbox.com/. -Internet access from mobile phone (tethering) is required. -Reboot required. - - - - - Enable Speed Limit Control - - - - - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits. - - - - - Enable Speed Limit Offset - - - - - Set speed limit slightly higher than actual speed limit for a more natural drive. - - - - - Enable Map Data Turn Control - - - - - Use curvature info from map data to define speed limits to take turns ahead - - - - - Show debug UI elements - - - - - Show UI elements that aid debugging. - - - - - Enable MapD - - - - - Use OSM to assist lateral/longitudinal control. -Please note: -1. This feature will works only when your car support OP longitudinal. -2. MapD will contribute your route to OSM for future improvement automatically. -3. You can add your own offset for mapd just follow the readme under /selfdrive/mapd. -4. Not connecting to the internet for while might feel up device storage from all the gps traces. - - - - - DPUIPanel - - - Display Mode - - - - - 0 = Default -1 = Screen Off While Driving - - - - - Screen Brightness - - - - - Adjust your screen brightness. - - - - - - AUTO - - - - - Alert Volume - - - - - Adjust your alert volume. - - - - - Quiet Drive - - - - - Display alert and play important warning sound. Thanks @sunnyhaibin. - - - - - Display Speed - - - - - Enable this to display your current speed. - - - - - Display Event / Steer Icon - - - - - - Enable this to display the icon. - - - - - Display Driver Monitor Indicator - - - - - Display Side Info - - - - - Enable this to display steering angle / lead car distance / engine RPM. - - - - - Display Top Info - - - - - Enable this to display time / system temp / battery level. - - - DeclinePage - + You must accept the Terms and Conditions in order to use openpilot. Você precisa aceitar os Termos e Condições para utilizar openpilot. - + Back Voltar - + Decline, uninstall %1 Rejeitar, desintalar %1 @@ -768,152 +108,152 @@ Please note: DevicePanel - + Dongle ID Dongle ID - + N/A N/A - + Serial Serial - + Driver Camera - Câmera Motorista + Câmera voltada para o Motorista - + PREVIEW PREVISUAL - + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) Pré-visualizar a câmera voltada para o motorista para garantir que monitor tem uma boa visibilidade (veículo precisa estar desligado) - + Reset Calibration - Limpar Calibragem + Resetar Calibragem - + RESET RESET - + Are you sure you want to reset calibration? - Tem certeza que quer limpar calibragem? + Tem certeza que quer resetar a calibragem? - + Review Training Guide - Revisar o Treinamento + Revisar Guia de Treinamento - + REVIEW REVISAR - + Review the rules, features, and limitations of openpilot - Revisar regras, features e limitações do openpilot + Revisar regras, aprimoramentos e limitações do openpilot - + Are you sure you want to review the training guide? Tem certeza que quer rever o treinamento? - + Regulatory Regulatório - + VIEW VER - + Change Language - Mudar Língua + Alterar Idioma - + CHANGE - MUDAR + ALTERAR - + Select a language - Selecione uma linguagem + Selecione o Idioma - + Reboot Reiniciar - + Power Off Desligar - + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. - o openpilot requer que o dispositivo seja montado dentro de 4° esquerda ou direita e dentro de 5° para cima ou 8° para baixo. o openpilot está continuamente calibrando, a redefinição raramente é necessária. + o openpilot requer que o dispositivo seja montado dentro de 4° esquerda ou direita e dentro de 5° para cima ou 8° para baixo. o openpilot está continuamente calibrando, resetar raramente é necessário. - + Your device is pointed %1° %2 and %3° %4. Seu dispositivo está montado %1° %2 e %3° %4. - + down baixo - + up cima - + left esquerda - + right direita - + Are you sure you want to reboot? Tem certeza que quer reiniciar? - + Disengage to Reboot Desacione para Reiniciar - + Are you sure you want to power off? Tem certeza que quer desligar? - + Disengage to Power Off Desacione para Desligar @@ -921,32 +261,32 @@ Please note: DriveStats - + Drives Dirigidas - + Hours Horas - + ALL TIME TOTAL - + PAST WEEK SEMANA PASSADA - + KM KM - + Miles Milhas @@ -954,20 +294,20 @@ Please note: DriverViewScene - + camera starting - camera iniciando + câmera iniciando InputDialog - + Cancel Cancelar - + Need at least %n character(s)! Necessita no mínimo %n caractere! @@ -978,22 +318,22 @@ Please note: Installer - + Installing... Instalando... - + Receiving objects: Recebendo objetos: - + Resolving deltas: Resolvendo deltas: - + Updating files: Atualizando arquivos: @@ -1001,27 +341,27 @@ Please note: MapETA - + eta eta - + min min - + hr hr - + km km - + mi mi @@ -1029,22 +369,22 @@ Please note: MapInstructions - + km km - + m m - + mi milha - + ft pés @@ -1052,48 +392,48 @@ Please note: MapPanel - + Current Destination Destino Atual - + CLEAR LIMPAR - + Recent Destinations Destinos Recentes - + Try the Navigation Beta Experimente a Navegação Beta - + Get turn-by-turn directions displayed and more with a comma prime subscription. Sign up now: https://connect.comma.ai Obtenha instruções passo a passo exibidas e muito mais com -uma assinatura prime Increva-se agora:https://connect.comma.ai +uma assinatura prime Inscreva-se agora: https://connect.comma.ai - + No home location set Sem local residência definido - + No work location set - Sem local + Sem local de trabalho definido - + no recent destinations sem destinos recentes @@ -1101,12 +441,12 @@ trabalho definido MapWindow - + Map Loading Carregando Mapa - + Waiting for GPS Esperando por GPS @@ -1114,12 +454,12 @@ trabalho definido MultiOptionDialog - + Select Selecione - + Cancel Cancelar @@ -1127,23 +467,23 @@ trabalho definido Networking - + Advanced Avançado - + Enter password Insira a senha - - + + for "%1" para "%1" - + Wrong password Senha incorreta @@ -1151,88 +491,48 @@ trabalho definido NvgWindow - + km/h km/h - + mph mph - - + + MAX LIMITE - - + + SPEED MAX - - + + LIMIT VELO - - - REAL STEER - - - - - RAM PER - - - - - OFF - - - - - ENG RPM - - - - - NOR - - - - - SPT - - - - - ECO - - - - - ACCEL - - OffroadHome - + UPDATE ATUALIZAÇÃO - + ALERTS ALERTAS - + ALERT ALERTA @@ -1240,55 +540,55 @@ trabalho definido PairingPopup - + Pair your device to your comma account - Pareie seu dispositivo a sua conta comma + Pareie seu dispositivo à sua conta comma - + Go to https://connect.comma.ai on your phone navegue até https://connect.comma.ai no seu telefone - + Click "add new device" and scan the QR code on the right Clique "add new device" e escaneie o QR code a seguir - + Bookmark connect.comma.ai to your home screen to use it like an app - Salve connect.comma.ai como sua página inicial para utilizar com um app + Salve connect.comma.ai como sua página inicial para utilizar como um app PrimeAdWidget - + Upgrade Now Atualizar Agora - + Become a comma prime member at connect.comma.ai Torne-se um membro comma prime em connect.comma.ai - + PRIME FEATURES: - PRIME FEATURES: + APRIMORAMENTOS PRIME: - + Remote access Acesso remoto - + 1 year of storage 1 ano de armazenamento - + Developer perks Benefícios para desenvolvedor @@ -1296,22 +596,22 @@ trabalho definido PrimeUserWidget - + ✓ SUBSCRIBED ✓ INSCRITO - + comma prime comma prime - + CONNECT.COMMA.AI CONNECT.COMMA.AI - + COMMA POINTS PONTOS COMMA @@ -1319,25 +619,27 @@ trabalho definido QObject - + Reboot Reiniciar - + Exit Sair + dashcam - dashcam + dashcam + openpilot - openpilot + openpilot - + %n minute(s) ago há %n minuto @@ -1345,7 +647,7 @@ trabalho definido - + %n hour(s) ago há %n hora @@ -1353,7 +655,7 @@ trabalho definido - + %n day(s) ago há %n dia @@ -1364,47 +666,47 @@ trabalho definido Reset - + Reset failed. Reboot to try again. Reset falhou. Reinicie para tentar novamente. - + Are you sure you want to reset your device? Tem certeza que quer resetar seu dispositivo? - + Resetting device... Resetando dispositivo... - + System Reset Resetar Sistema - + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. Solicitado reset do sistema. Confirme para apagar todo conteúdo e configurações. Aperte cancelar para continuar boot. - + Cancel Cancelar - + Reboot Reiniciar - + Confirm Confirmar - + Unable to mount data partition. Press confirm to reset your device. Não foi possível montar a partição de dados. Pressione confirmar para resetar seu dispositivo. @@ -1412,7 +714,7 @@ trabalho definido RichTextDialog - + Ok Ok @@ -1420,168 +722,139 @@ trabalho definido SettingsWindow + × - × + × - - BACK - - - - + Device Dispositivo - - + + Network Rede - + Toggles Ajustes - + Software Software - + Navigation Navegação - - - DP - General - - - - - DP - Controls - - - - - DP - UI - - - - - DP - Cars - - - - - DP - Maps - - Setup - + WARNING: Low Voltage ALERTA: Baixa Voltagem - + Power your device in a car with a harness or proceed at your own risk. Ligue seu dispositivo em um carro com um chicote ou prossiga por sua conta e risco. - + Power off Desligar - - - + + + Continue Continuar - + Getting Started Começando - + Before we get on the road, let’s finish installation and cover some details. Antes de pegarmos a estrada, vamos terminar a instalação e cobrir alguns detalhes. - + Connect to Wi-Fi Conectar ao Wi-Fi - - + + Back Voltar - + Continue without Wi-Fi Continuar sem Wi-Fi - + Waiting for internet Esperando pela internet - + Choose Software to Install Escolher Software para Instalar - + Dashcam Dashcam - + Custom Software Sofware Customizado - + Enter URL Preencher URL - + for Custom Software para o Software Customizado - + Downloading... Baixando... - + Download Failed Download Falhou - + Ensure the entered URL is valid, and the device’s internet connection is good. Garanta que a URL inserida é valida, e uma boa conexão à internet. - + Reboot device Reiniciar Dispositivo - + Start over Inicializar @@ -1589,17 +862,17 @@ trabalho definido SetupWidget - + Finish Setup - Terminar Configuração + Concluir - + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. Pareie seu dispositivo com comma connect (connect.comma.ai) e reivindique sua oferta de comma prime. - + Pair device Parear dispositivo @@ -1607,103 +880,106 @@ trabalho definido Sidebar - - + + CONNECT CONEXÃO - + OFFLINE DESCONEC - - + + ONLINE CONECTADO - + ERROR ERRO - - - + + + TEMP TEMP + HIGH - ALTA + ALTA + GOOD - BOA + BOA + OK - OK + OK - + VEHICLE VEÍCULO - + NO SEM - + PANDA PANDA - + GPS GPS - + SEARCH PROCURA - + -- -- - + Wi-Fi Wi-Fi - + ETH ETH - + 2G 2G - + 3G 3G - + LTE LTE - + 5G 5G @@ -1711,89 +987,89 @@ trabalho definido SoftwarePanel - + Git Branch - Ramo Git + Git Branch - + Git Commit - Commit Git + Último Commit - + OS Version Versão do Sistema - + Version Versão - + Last Update Check Verificação da última atualização - + The last time openpilot successfully checked for an update. The updater only runs while the car is off. A última vez que o openpilot verificou com sucesso uma atualização. O atualizador só funciona com o carro desligado. - + Check for Update Verifique atualizações - + CHECKING VERIFICANDO - + Switch Branch - Trocar Ramo + Alterar Branch - + ENTER INSERIR - - + + The new branch will be pulled the next time the updater runs. - O novo ramo será aplicado na próxima execução do atualizador. + A nova branch será aplicada ao verificar atualizações. - + Enter branch name - Inserir o nome do ramo + Inserir o nome da branch - + UNINSTALL DESINSTALAR - + Uninstall %1 - Desintalando %1 + Desintalar o %1 - + Are you sure you want to uninstall? Tem certeza que quer desinstalar? - + failed to fetch update falha ao buscar atualização - - + + CHECK VERIFICAR @@ -1801,48 +1077,48 @@ trabalho definido SshControl - + SSH Keys Chave SSH - + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. Aviso: isso concede acesso SSH a todas as chaves públicas nas configurações do GitHub. Nunca insira um nome de usuário do GitHub que não seja o seu. Um funcionário da comma NUNCA pedirá que você adicione seu nome de usuário do GitHub. - - + + ADD ADICIONAR - + Enter your GitHub username Insira seu nome de usuário do GitHub - + LOADING CARREGANDO - + REMOVE REMOVER - + Username '%1' has no keys on GitHub Usuário "%1” não possui chaves no GitHub - + Request timed out A solicitação expirou - + Username '%1' doesn't exist on GitHub Usuário '%1' não existe no GitHub @@ -1850,7 +1126,7 @@ trabalho definido SshToggle - + Enable SSH Habilitar SSH @@ -1858,22 +1134,22 @@ trabalho definido TermsPage - + Terms & Conditions Termos & Condições - + Decline Declinar - + Scroll to accept - Role para aceitar + Role a tela para aceitar - + Agree Concordo @@ -1881,135 +1157,135 @@ trabalho definido TogglesPanel - + Enable openpilot Ativar openpilot - + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. Use o sistema openpilot para controle de cruzeiro adaptativo e assistência ao motorista de manutenção de faixa. Sua atenção é necessária o tempo todo para usar esse recurso. A alteração desta configuração tem efeito quando o carro é desligado. - + Enable Lane Departure Warnings Ativar Avisos de Saída de Faixa - + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). Receba alertas para voltar para a pista se o seu veículo sair da faixa e a seta não tiver sido acionada previamente quando em velocidades superiores a 50 km/h. - - Enable Right-Hand Drive - - - - - Allow openpilot to obey left-hand traffic conventions and perform driver monitoring on right driver seat. - - - - + Use Metric System Usar Sistema Métrico - + Display speed in km/h instead of mph. Exibir velocidade em km/h invés de mph. - + Record and Upload Driver Camera Gravar e Upload Câmera Motorista - + Upload data from the driver facing camera and help improve the driver monitoring algorithm. Upload dados da câmera voltada para o motorista e ajude a melhorar o algoritmo de monitoramentor. - + + 🌮 End-to-end longitudinal (extremely alpha) 🌮 + 🌮 End-to-end longitudinal (experimental) 🌮 + + + + Experimental openpilot longitudinal control + + + + + <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> + + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + + + + Disengage On Accelerator Pedal Desacionar Com Pedal Do Acelerador - + When enabled, pressing the accelerator pedal will disengage openpilot. Quando ativado, pressionar o pedal do acelerador desacionará o openpilot. - + Show ETA in 24h Format Mostrar ETA em formato 24h - + Use 24h format instead of am/pm Use o formato 24h em vez de am/pm - + Show Map on Left Side of UI Exibir Mapa no Lado Esquerdo - + Show map on left side when in split screen view. Exibir mapa do lado esquerdo quando a tela for dividida. - - - openpilot Longitudinal Control - openpilot Controle Longitudinal - - - - openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! - openpilot desativará o radar do carro e assumirá o controle do acelerador e freios. Atenção: isso desativa AEB! - Updater - + Update Required Atualização Necessária - + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. Uma atualização do sistema operacional é necessária. Conecte seu dispositivo ao Wi-Fi para a experiência de atualização mais rápida. O tamanho do download é de aproximadamente 1GB. - + Connect to Wi-Fi Conecte-se ao Wi-Fi - + Install Instalar - + Back Voltar - + Loading... Carregando... - + Reboot Reiniciar - + Update failed Falha na atualização @@ -2017,23 +1293,23 @@ trabalho definido WifiUI - - + + Scanning for networks... Procurando redes... - + CONNECTING... CONECTANDO... - + FORGET ESQUECER - + Forget Wi-Fi Network "%1"? Esquecer Rede Wi-Fi "%1"? diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts index 3277f5374..7e7fcf278 100644 --- a/selfdrive/ui/translations/main_th.ts +++ b/selfdrive/ui/translations/main_th.ts @@ -754,7 +754,7 @@ location set WARNING: Low Voltage - คำเตือน: แรงดันไฟฟ้าต่ำ + คำเตือน: แรงดันแบตเตอรี่ต่ำ diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 6fb39ee15..d6afbf589 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -4,17 +4,17 @@ AbstractAlert - + Close 关闭 - + Snooze Update 暂停更新 - + Reboot and Update 重启并更新 @@ -22,745 +22,85 @@ AdvancedNetworking - + Back 返回 - + Enable Tethering 启用WiFi热点 - + Tethering Password WiFi热点密码 - - + + EDIT 编辑 - + Enter new tethering password 输入新的WiFi热点密码 - + IP Address IP地址 - + Enable Roaming 启用数据漫游 - + APN Setting APN设置 - + Enter APN 输入APN - + leave blank for automatic configuration 留空以自动配置 - - C2NetworkPanel - - - Wi-Fi Settings - - - - - - OPEN - - - - - Tethering Settings - - - - - IP Address - IP地址 - - ConfirmationDialog - - + + Ok 好的 - + Cancel 取消 - - DPCarPanel - - - Override Speed When Below - - - - - Override feature will be enabled when set cruise speed is lower than this value. -1 km/h = 0.62 mph. - - - - - km/h - - - - - Turn On Cruise Speed Override - - - - - This feature will let you set your cruise speed below vehicle standard. (usually at 26~40 km/h) - - - - - Toyota / Lexus - - - - - Enable SnG Mod - - - - - Enable this to fix stop and go (SnG) issue on some models. -Reboot required. - - - - - Enable AM Physical Button Ctrl - - - - - Enable this to link Accel Mode (AM) control to the physical button (TSS2). -ONLY WORK ON SOME OF TSS1 VEHICLES. -Reboot required. - - - - - Enable Door Auto Lock - - - - - Enable this to lock doors when drive above 25 km/h. -ONLY WORK ON SOME VEHICLES. - - - - - Enable Door Auto Unlock - - - - - Enable this to unlock doors when shift to gear P. -ONLY WORK ON SOME VEHICLES. - - - - - Honda - - - - - Enable EPS Mod Mode - - - - - Enable this will increase steering, USE IT ONLY if you have a modded EPS firmware. -Reboot required. - - - - - Mazda - - - - - Display Below Steer Speed Alert - - - - - Enable this will show below steer speed alert. -Thanks to @TheCrowd - - - - - DPControlPanel - - - ALCA Delay - - - - - Once the vehicle meets all ALCA criteria, it will wait for the seconds set here before peforming lane change automatically. - - - - - secs - - - - - ALCA Min Speed - - - - - ALCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - - mph - - - - - LCA Min Speed - - - - - LCA minimum engage speed in mph. -1 mph = 1.61 km/h. - - - - - Lateral Ctrl Mode - - - - - 1 = Lane Change Assist (LCA) -2 = Auto Lane Change Assist (ALCA) - - - - - Longitudinal - - - - - Manually Control Accel Mode - - - - - Enable this if you wish to adjust openpilot's acceleration control. - - - - - Enable vision based turn control - - - - - Use vision path predictions to estimate the appropriate speed to drive through turns ahead. - - - - - Lateral - - - - - Use Lane Lines - - - - - Enable this if you wish to use lane lines mode. - - - - - Use LQR Controller - - - - - Enable this if you wish to use LQR instead of PID or INDI controller. -WORKS WELL ONLY ON SOME VEHICLES. -More linear steering experience. - - - - - Always On Lateral - - - - - Use at your own risk! -1 = Stock Long -2 = OP Long -Run Panda Recovery if Panda is not detected after reboot. -Reboot required. - - - - - Camera Offset - - - - - Adjust your camera position if your device is not mounted as per guidance. - - - - - DPGeneralPanel - - - Auto Shutdown In - - - - - Adjust your shutdown waiting period. -0 = shutdown immediately. - - - - - mins - - - - - Enable Auto Shutdown - - - - - Enable this if you wish to shutdown your device automatically. - - - - - Use Custom API Server - - - - - Enable this if you wish to connect to a custom API server. -Default to "https://api.retropilot.org/", change "dp_api_custom" if you want to change API server URL. -Reboot required. - - - - - Services - - - - - Enable On-Road Dashcam - - - - - Enable this if you wish to record screen, just like a dashcam. -Reboot required. - - - - - Enable GPS Logger - - - - - This will store your track in /data/media/0/gpx_logs/. -Reboot required. - - - - - Hardware - General - - - - - Enable Hotspot On Boot - - - - - Reboot required. - - - - - Miscellaneous - - - - - Enable Driver Monitor (Front Cam) - - - - - Enable this option if you wish to use front camera for driver monitoring. -On = Front Cam Monitor + Steering Monitor -Off = Steering Monitor only. -Enable this will increase device temp a lot, use at your own risk. -Reboot Required. - - - - - Enable Jetson Support - - - - - Enable this option if you intend to run dp on Nvidia Jetson. -Reboot required. - - - - - - Reboot recommended. -Reboot? - - - - - Flashing Panda Firmware - - - - - FLASH - - - - - Tap the button to update your panda firmware. -The device should reboot once if it finish updating. - - - - - Are you sure you want to flash the panda? - - - - - Are you sure delete all media? - - - - - Pandas Firmware Recovery - - - - - RECOVER - - - - - Tap the button ONLY if your panda ran into issue. - - - - - Are you sure you want to run recover panda script? - - - - - Reset dragonpilot conf - - - - - RESET - 重置 - - - - Tap the button to reset all your dragonpilot congiration to default value. -Reboot required. - - - - - Are you sure you want to reset dp params? - - - - - Delete All Driving Log - - - - - DELETE - - - - - Tap the button to delete ALL your driving logs (including dashcam / gpx / driving logs). - - - - - DPMapsPanel - - - Show Full Screen Nav. - - - - - This will show navigation in full screen. -Please tap green boarder if you wish to switch back drive view. - - - - - Search Destination using Google Map - - - - - This will allow you to search destination in google map api. -You will need to apply your own google map api key.Enter your key detail in web interface once it's enabled. - - - - - Enable Nav. - - - - - This will let use the build in Navigation. -Use web interface to control it: *http://<device_ip>:8082*. -You will need to apply your own mapbox token at https://www.mapbox.com/. -Internet access from mobile phone (tethering) is required. -Reboot required. - - - - - Enable Speed Limit Control - - - - - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits. - - - - - Enable Speed Limit Offset - - - - - Set speed limit slightly higher than actual speed limit for a more natural drive. - - - - - Enable Map Data Turn Control - - - - - Use curvature info from map data to define speed limits to take turns ahead - - - - - Show debug UI elements - - - - - Show UI elements that aid debugging. - - - - - Enable MapD - - - - - Use OSM to assist lateral/longitudinal control. -Please note: -1. This feature will works only when your car support OP longitudinal. -2. MapD will contribute your route to OSM for future improvement automatically. -3. You can add your own offset for mapd just follow the readme under /selfdrive/mapd. -4. Not connecting to the internet for while might feel up device storage from all the gps traces. - - - - - DPUIPanel - - - Display Mode - - - - - 0 = Default -1 = Screen Off While Driving - - - - - Screen Brightness - - - - - Adjust your screen brightness. - - - - - - AUTO - - - - - Alert Volume - - - - - Adjust your alert volume. - - - - - Quiet Drive - - - - - Display alert and play important warning sound. Thanks @sunnyhaibin. - - - - - Display Speed - - - - - Enable this to display your current speed. - - - - - Display Event / Steer Icon - - - - - - Enable this to display the icon. - - - - - Display Driver Monitor Indicator - - - - - Display Side Info - - - - - Enable this to display steering angle / lead car distance / engine RPM. - - - - - Display Top Info - - - - - Enable this to display time / system temp / battery level. - - - DeclinePage - + You must accept the Terms and Conditions in order to use openpilot. 您必须接受条款和条件以使用openpilot。 - + Back 返回 - + Decline, uninstall %1 拒绝并卸载%1 @@ -768,152 +108,152 @@ Please note: DevicePanel - + Dongle ID 设备ID(Dongle ID) - + N/A N/A - + Serial 序列号 - + Driver Camera 驾驶员摄像头 - + PREVIEW 预览 - + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) 打开并预览驾驶员摄像头,以确保驾驶员监控具有良好视野。仅熄火时可用。 - + Reset Calibration 重置设备校准 - + RESET 重置 - + Are you sure you want to reset calibration? 您确定要重置设备校准吗? - + Review Training Guide 新手指南 - + REVIEW 查看 - + Review the rules, features, and limitations of openpilot 查看openpilot的使用规则,以及其功能和限制。 - + Are you sure you want to review the training guide? 您确定要查看新手指南吗? - + Regulatory 监管信息 - + VIEW 查看 - + Change Language 切换语言 - + CHANGE 切换 - + Select a language 选择语言 - + Reboot 重启 - + Power Off 关机 - + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. openpilot要求设备安装的偏航角在左4°和右4°之间,俯仰角在上5°和下8°之间。一般来说,openpilot会持续更新校准,很少需要重置。 - + Your device is pointed %1° %2 and %3° %4. 您的设备校准为%1° %2、%3° %4。 - + down 朝下 - + up 朝上 - + left 朝左 - + right 朝右 - + Are you sure you want to reboot? 您确定要重新启动吗? - + Disengage to Reboot 取消openpilot以重新启动 - + Are you sure you want to power off? 您确定要关机吗? - + Disengage to Power Off 取消openpilot以关机 @@ -921,32 +261,32 @@ Please note: DriveStats - + Drives 旅程数 - + Hours 小时 - + ALL TIME 全部 - + PAST WEEK 过去一周 - + KM 公里 - + Miles 英里 @@ -954,7 +294,7 @@ Please note: DriverViewScene - + camera starting 正在启动相机 @@ -962,12 +302,12 @@ Please note: InputDialog - + Cancel 取消 - + Need at least %n character(s)! 至少需要 %n 个字符! @@ -977,22 +317,22 @@ Please note: Installer - + Installing... 正在安装…… - + Receiving objects: 正在接收: - + Resolving deltas: 正在处理: - + Updating files: 正在更新文件: @@ -1000,27 +340,27 @@ Please note: MapETA - + eta 埃塔 - + min 分钟 - + hr 小时 - + km km - + mi mi @@ -1028,22 +368,22 @@ Please note: MapInstructions - + km km - + m m - + mi mi - + ft ft @@ -1051,46 +391,46 @@ Please note: MapPanel - + Current Destination 当前目的地 - + CLEAR 清空 - + Recent Destinations 最近目的地 - + Try the Navigation Beta 试用导航测试版 - + Get turn-by-turn directions displayed and more with a comma prime subscription. Sign up now: https://connect.comma.ai - 订阅comma prime以获取导航。 + 订阅comma prime以获取导航。 立即注册:https://connect.comma.ai - + No home location set 家:未设定 - + No work location set 工作:未设定 - + no recent destinations 无最近目的地 @@ -1098,12 +438,12 @@ location set MapWindow - + Map Loading 地图加载中 - + Waiting for GPS 等待 GPS @@ -1111,12 +451,12 @@ location set MultiOptionDialog - + Select 选择 - + Cancel 取消 @@ -1124,23 +464,23 @@ location set Networking - + Advanced 高级 - + Enter password 输入密码 - - + + for "%1" 网络名称:"%1" - + Wrong password 密码错误 @@ -1148,88 +488,48 @@ location set NvgWindow - + km/h km/h - + mph mph - - + + MAX 最高定速 - - + + SPEED SPEED - - + + LIMIT LIMIT - - - REAL STEER - - - - - RAM PER - - - - - OFF - - - - - ENG RPM - - - - - NOR - - - - - SPT - - - - - ECO - - - - - ACCEL - - OffroadHome - + UPDATE 更新 - + ALERTS 警报 - + ALERT 警报 @@ -1237,22 +537,22 @@ location set PairingPopup - + Pair your device to your comma account 将您的设备与comma账号配对 - + Go to https://connect.comma.ai on your phone 在手机上访问 https://connect.comma.ai - + Click "add new device" and scan the QR code on the right 点击“添加新设备”,扫描右侧二维码 - + Bookmark connect.comma.ai to your home screen to use it like an app 将 connect.comma.ai 收藏到您的主屏幕,以便像应用程序一样使用它 @@ -1260,32 +560,32 @@ location set PrimeAdWidget - + Upgrade Now 现在升级 - + Become a comma prime member at connect.comma.ai 打开connect.comma.ai以注册comma prime会员 - + PRIME FEATURES: comma prime特权: - + Remote access 远程访问 - + 1 year of storage 1年数据存储 - + Developer perks 开发者福利 @@ -1293,22 +593,22 @@ location set PrimeUserWidget - + ✓ SUBSCRIBED ✓ 已订阅 - + comma prime comma prime - + CONNECT.COMMA.AI CONNECT.COMMA.AI - + COMMA POINTS COMMA POINTS点数 @@ -1316,39 +616,41 @@ location set QObject - + Reboot 重启 - + Exit 退出 + dashcam - 行车记录仪 + 行车记录仪 + openpilot - openpilot + openpilot - + %n minute(s) ago %n 分钟前 - + %n hour(s) ago %n 小时前 - + %n day(s) ago %n 天前 @@ -1358,47 +660,47 @@ location set Reset - + Reset failed. Reboot to try again. 重置失败。 重新启动以重试。 - + Are you sure you want to reset your device? 您确定要重置您的设备吗? - + Resetting device... 正在重置设备…… - + System Reset 恢复出厂设置 - + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. 已触发系统重置:确认以删除所有内容和设置。取消以正常启动设备。 - + Cancel 取消 - + Reboot 重启 - + Confirm 确认 - + Unable to mount data partition. Press confirm to reset your device. 无法挂载数据分区。 确认以重置您的设备。 @@ -1406,7 +708,7 @@ location set RichTextDialog - + Ok 好的 @@ -1414,168 +716,139 @@ location set SettingsWindow + × - × + × - - BACK - - - - + Device 设备 - - + + Network 网络 - + Toggles 设定 - + Software 软件 - + Navigation 导航 - - - DP - General - - - - - DP - Controls - - - - - DP - UI - - - - - DP - Cars - - - - - DP - Maps - - Setup - + WARNING: Low Voltage 警告:低电压 - + Power your device in a car with a harness or proceed at your own risk. 请使用car harness线束为您的设备供电,或自行承担风险。 - + Power off 关机 - - - + + + Continue 继续 - + Getting Started 开始设置 - + Before we get on the road, let’s finish installation and cover some details. 开始旅程之前,让我们完成安装并介绍一些细节。 - + Connect to Wi-Fi 连接到WiFi - - + + Back 返回 - + Continue without Wi-Fi 不连接WiFi并继续 - + Waiting for internet 等待网络连接 - + Choose Software to Install 选择要安装的软件 - + Dashcam Dashcam(行车记录仪) - + Custom Software 自定义软件 - + Enter URL 输入网址 - + for Custom Software 以下载自定义软件 - + Downloading... 正在下载…… - + Download Failed 下载失败 - + Ensure the entered URL is valid, and the device’s internet connection is good. 请确保互联网连接良好且输入的URL有效。 - + Reboot device 重启设备 - + Start over 重来 @@ -1583,17 +856,17 @@ location set SetupWidget - + Finish Setup 完成设置 - + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. 将您的设备与comma connect (connect.comma.ai)配对并领取您的comma prime优惠。 - + Pair device 配对设备 @@ -1601,103 +874,106 @@ location set Sidebar - - + + CONNECT CONNECT - + OFFLINE 离线 - - + + ONLINE 在线 - + ERROR 连接出错 - - - + + + TEMP 设备温度 + HIGH - 过热 + 过热 + GOOD - 良好 + 良好 + OK - 一般 + 一般 - + VEHICLE 车辆连接 - + NO - + PANDA PANDA - + GPS GPS - + SEARCH 搜索中 - + -- -- - + Wi-Fi Wi-Fi - + ETH 以太网 - + 2G 2G - + 3G 3G - + LTE LTE - + 5G 5G @@ -1705,89 +981,89 @@ location set SoftwarePanel - + Git Branch Git Branch - + Git Commit Git Commit - + OS Version 系统版本 - + Version 软件版本 - + Last Update Check 上次检查更新 - + The last time openpilot successfully checked for an update. The updater only runs while the car is off. 上一次成功检查更新的时间。更新程序仅在汽车熄火时运行。 - + Check for Update 检查更新 - + CHECKING 正在检查更新 - + Switch Branch 切换分支 - + ENTER 输入 - - + + The new branch will be pulled the next time the updater runs. 分支将在更新服务下次启动时自动切换。 - + Enter branch name 输入分支名称 - + UNINSTALL 卸载 - + Uninstall %1 卸载 %1 - + Are you sure you want to uninstall? 您确定要卸载吗? - + failed to fetch update 获取更新失败 - - + + CHECK 查看 @@ -1795,48 +1071,48 @@ location set SshControl - + SSH Keys SSH密钥 - + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. 警告:这将授予SSH访问权限给您GitHub设置中的所有公钥。切勿输入您自己以外的GitHub用户名。comma员工永远不会要求您添加他们的GitHub用户名。 - - + + ADD 添加 - + Enter your GitHub username 输入您的GitHub用户名 - + LOADING 正在加载 - + REMOVE 删除 - + Username '%1' has no keys on GitHub 用户名“%1”在GitHub上没有密钥 - + Request timed out 请求超时 - + Username '%1' doesn't exist on GitHub GitHub上不存在用户名“%1” @@ -1844,7 +1120,7 @@ location set SshToggle - + Enable SSH 启用SSH @@ -1852,22 +1128,22 @@ location set TermsPage - + Terms & Conditions 条款和条件 - + Decline 拒绝 - + Scroll to accept 滑动以接受 - + Agree 同意 @@ -1875,135 +1151,135 @@ location set TogglesPanel - + Enable openpilot 启用openpilot - + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. 使用openpilot进行自适应巡航和车道保持辅助。使用此功能时您必须时刻保持注意力。该设置的更改在熄火时生效。 - + Enable Lane Departure Warnings 启用车道偏离警告 - + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). 车速超过31mph(50km/h)时,若检测到车辆越过车道线且未打转向灯,系统将发出警告以提醒您返回车道。 - - Enable Right-Hand Drive - - - - - Allow openpilot to obey left-hand traffic conventions and perform driver monitoring on right driver seat. - - - - + Use Metric System 使用公制单位 - + Display speed in km/h instead of mph. 显示车速时,以km/h代替mph。 - + Record and Upload Driver Camera 录制并上传驾驶员摄像头 - + Upload data from the driver facing camera and help improve the driver monitoring algorithm. 上传驾驶员摄像头的数据,帮助改进驾驶员监控算法。 - + + 🌮 End-to-end longitudinal (extremely alpha) 🌮 + + + + + Experimental openpilot longitudinal control + + + + + <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> + + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + + + + Disengage On Accelerator Pedal 踩油门时取消控制 - + When enabled, pressing the accelerator pedal will disengage openpilot. 启用后,踩下油门踏板将取消openpilot。 - + Show ETA in 24h Format 以24小时格式显示预计到达时间 - + Use 24h format instead of am/pm 使用24小时制代替am/pm - + Show Map on Left Side of UI 在介面左侧显示地图 - + Show map on left side when in split screen view. 在分屏模式中,将地图置于屏幕左侧。 - - - openpilot Longitudinal Control - openpilot纵向控制 - - - - openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! - openpilot将禁用车辆的雷达并接管油门和刹车的控制。警告:AEB将被禁用! - Updater - + Update Required 需要更新 - + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. 操作系统需要更新。请将您的设备连接到WiFi以获取更快的更新体验。下载大小约为1GB。 - + Connect to Wi-Fi 连接到WiFi - + Install 安装 - + Back 返回 - + Loading... 正在加载…… - + Reboot 重启 - + Update failed 更新失败 @@ -2011,23 +1287,23 @@ location set WifiUI - - + + Scanning for networks... 正在扫描网络…… - + CONNECTING... 正在连接…… - + FORGET 忘记 - + Forget Wi-Fi Network "%1"? 忘记WiFi网络 "%1"? diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 33562f090..52bd30136 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -4,17 +4,17 @@ AbstractAlert - + Close 關閉 - + Snooze Update 暫停更新 - + Reboot and Update 重啟並更新 @@ -22,789 +22,85 @@ AdvancedNetworking - + Back 回上頁 - + Enable Tethering 啟用網路分享 - + Tethering Password 網路分享密碼 - - + + EDIT 編輯 - + Enter new tethering password 輸入新的網路分享密碼 - + IP Address IP 地址 - + Enable Roaming 啟用漫遊 - + APN Setting APN 設置 - + Enter APN 輸入 APN - + leave blank for automatic configuration 留空白將自動配置 - - C2NetworkPanel - - - Wi-Fi Settings - 無線網路設定 - - - - - OPEN - 開啟 - - - - Tethering Settings - 熱點設定 - - - - IP Address - IP 地址 - - ConfirmationDialog - - + + Ok 確定 - + Cancel 取消 - - DPCarPanel - - - Override Speed When Below - 改寫定速當定速值低於: - - - - Override feature will be enabled when set cruise speed is lower than this value. -1 km/h = 0.62 mph. - 系統將會改寫定速值當低於此指定的值。 -1 km/h = 0.62 mph。 - - - - km/h - 公里 - - - - Turn On Cruise Speed Override - 啟用巡航速度改寫 - - - - This feature will let you set your cruise speed below vehicle standard. (usually at 26~40 km/h) - 開啟這個選項後,您將可以把定速至最低 5km/hr (一般最低為 26~40km/h) - - - - Toyota / Lexus - - - - - Enable SnG Mod - 啟用 SnG 協助 - - - - Enable this to fix stop and go (SnG) issue on some models. -Reboot required. - 開啟這個選項可以解決某些車型無法跟車到停後再啟動(SnG)的問題 -需要重新啟動。 - - - - Enable AM Physical Button Ctrl - 啟用加速模式和方向盤實體按鈕關聯 - - - - Enable this to link Accel Mode (AM) control to the physical button (TSS2). -ONLY WORK ON SOME OF TSS1 VEHICLES. -Reboot required. - 開啟這個選項,將加速模式的選擇和方向盤實體按鈕進行關聯,主要使用於TSS2車型, -在某些TSS1車型上也可以使用。 -需重新啟動。 - - - - Enable Door Auto Lock - 啟用車門自動上鎖 - - - - Enable this to lock doors when drive above 25 km/h. -ONLY WORK ON SOME VEHICLES. - 開啟這個選項後,車子在行駛超過 25 km/h 時會自動上鎖。 -並不適用所有的車型。 - - - - Enable Door Auto Unlock - 啟用車門自動解鎖 - - - - Enable this to unlock doors when shift to gear P. -ONLY WORK ON SOME VEHICLES. - 開啟這個選項後,車子在打入 P 檔時會自動解鎖。 -並不適用所有的車型。 - - - - Honda - - - - - Enable EPS Mod Mode - 啟用 EPS 破解支持 - - - - Enable this will increase steering, USE IT ONLY if you have a modded EPS firmware. -Reboot required. - 啟用這個選項後 openpilot 將可以使用更廣的方向盤控制值。註:您的方向盤需要刷過修改過的 EPS 固件。 -需重新啟動。 - - - - Mazda - - - - - Display Below Steer Speed Alert - 顯示低速轉向失效提示 - - - - Enable this will show below steer speed alert. -Thanks to @TheCrowd - 啟用這個選項後,將在車速低於可輔助轉向的速度時,顯示提示 - - - - DPControlPanel - - - ALCA Delay - 設置自動換道延遲時間 - - - - Once the vehicle meets all ALCA criteria, it will wait for the seconds set here before peforming lane change automatically. - 一旦車輛滿足所有自動換道的啟動需求,它將會等待設定的秒數後再執行換道。 - - - - secs - - - - - ALCA Min Speed - 自動換道最低啟用速度 - - - - ALCA minimum engage speed in mph. -1 mph = 1.61 km/h. - 自動換道啟用速度 (單位為每小時英里)。 -1 英里 (mph) 約等於 1.61 公里 (km/h)。 - - - - - mph - 英里 - - - - LCA Min Speed - 輔助換道最低啟用速度 - - - - LCA minimum engage speed in mph. -1 mph = 1.61 km/h. - 輔助換道啟用速度 (單位為每小時英里)。 -1 英里 (mph) 約等於 1.61 公里 (km/h)。 - - - - Lateral Ctrl Mode - 橫向控制模式 - - - - 1 = Lane Change Assist (LCA) -2 = Auto Lane Change Assist (ALCA) - 1 = 輔助換道 (LCA) -2 = 自動換道 (ALCA) - - - - Longitudinal - 縱向控制 (油門/剎車) - - - - Manually Control Accel Mode - 手動控制加速模式 - - - - Enable this if you wish to adjust openpilot's acceleration control. - 啟用這個選項後您可以調整 openpilot 的加速模式 (節能、一般、運動)。 - - - - Enable vision based turn control - 啟用視覺模型路徑控制車速 - - - - Use vision path predictions to estimate the appropriate speed to drive through turns ahead. - 使用視覺模型預測的路徑來判斷前方的過彎速度。 - - - - Lateral - 橫向控制 (方向盤) - - - - Use Lane Lines - 使用車道線 - - - - Enable this if you wish to use lane lines mode. - 啟用這個選項後,模型將會以車道線判斷行駛路線。 - - - - Use LQR Controller - 使用 LQR 控制器 - - - - Enable this if you wish to use LQR instead of PID or INDI controller. -WORKS WELL ONLY ON SOME VEHICLES. -More linear steering experience. - 開啟這個選項後,系統將會強制使用 LQR 橫向控制器。 -只有在某些車型上會有更好的體驗。 -LQR 提供比 PID、INDI 更線性的控制。 - - - - Always On Lateral - 全時置中 - - - - Use at your own risk! -1 = Stock Long -2 = OP Long -Run Panda Recovery if Panda is not detected after reboot. -Reboot required. - 使用風險自負。 -1 = 使用原車 ACC -2 = 使用 op ACC -需重新啟動,如果遇到不能連線問題請使用恢復恢復 Panda 韌體功能。 - - - - Camera Offset - 相機偏移 - - - - Adjust your camera position if your device is not mounted as per guidance. - 如果您的裝置並非依照安裝說明安裝,您可以用這個設定來微調您裝置的相機與 ADAS 相機的間距。 - - - - DPGeneralPanel - - - Auto Shutdown In - 熄火後自動關機: - - - - Adjust your shutdown waiting period. -0 = shutdown immediately. - 調整自動關機時間。0 = 馬上關機 - - - - mins - 分鐘 - - - - Enable Auto Shutdown - 啟用自動關機 - - - - Enable this if you wish to shutdown your device automatically. - 啟用這個選項後,您的設備將會自動關機。 - - - - Use Custom API Server - 使用定制的 API 服務器 - - - - Enable this if you wish to connect to a custom API server. -Default to "https://api.retropilot.org/", change "dp_api_custom" if you want to change API server URL. -Reboot required. - 開啟這個選項,可以讓你鏈接到定製dp的API服務器 -默認地址"https://api.retropilot.org/", 修改為 "dp_api_custom" 如果您想要修改 API 服務器的網址. -需要重新啟動。 - - - - Services - 服務 - - - - Enable On-Road Dashcam - 啟用行車記錄功能 - - - - Enable this if you wish to record screen, just like a dashcam. -Reboot required. - 開啟這個選項錄制目前的行車畫面。 -需重新啟動。 - - - - Enable GPS Logger - 啟用 GPS 記錄服務 - - - - This will store your track in /data/media/0/gpx_logs/. -Reboot required. - 啟用這個選項後將會把您的 GPS 行車路徑記錄至 /data/media/0/gpx_logs/ 裡。 -需重新啟動。 - - - - Hardware - General - 硬體 - 一般 - - - - Enable Hotspot On Boot - 啟用開機自動開啟熱點 - - - - Reboot required. - 需要重新啟動。 - - - - Miscellaneous - 其它 - - - - Enable Driver Monitor (Front Cam) - 啟用駕駛監控 (相機) - - - - Enable this option if you wish to use front camera for driver monitoring. -On = Front Cam Monitor + Steering Monitor -Off = Steering Monitor only. -Enable this will increase device temp a lot, use at your own risk. -Reboot Required. - 開啟這個選項後,您將可以使用前方鏡頭做駕駛監控。 -開啟 = 鏡頭監控 + 方向盤監控 -關閉 = 方向盤監控 -使用這個功能設備可能會過熱,請小心使用,後過自負。 -需重新開機。 - - - - Enable Jetson Support - 啟用 Jetson 支持 - - - - Enable this option if you intend to run dp on Nvidia Jetson. -Reboot required. - 如果您打算在 Nvidia Jetson NX 上跑 dp,請開啟這選項。 -需重新啟動。 - - - - - Reboot recommended. -Reboot? - 我們建議您重新啟動。 -要重新啟動嗎? - - - - Flashing Panda Firmware - 刷新 Panda 韌體 - - - - FLASH - 刷寫 - - - - Tap the button to update your panda firmware. -The device should reboot once if it finish updating. - 點擊右方按鈕來刷寫更新 Panda 的韌體。 -你的裝置將在刷寫完成後自動重新開機。 - - - - Are you sure you want to flash the panda? - 您確定要刷寫 Panda 嗎? - - - - Are you sure delete all media? - 您確定要刪除所有的行車記錄嗎? - - - Are you sure? - 您確定嗎? - - - - Pandas Firmware Recovery - 恢復 Panda 韌體 - - - - RECOVER - 恢復 - - - - Tap the button ONLY if your panda ran into issue. - 僅當您的 Panda 遇到問題時才點擊按鈕。 - - - - Are you sure you want to run recover panda script? - 您確定要執行 Panda 恢復的動作嗎? - - - - Reset dragonpilot conf - 重置所有 dragonpilot 的設定值 - - - - RESET - 重置 - - - - Tap the button to reset all your dragonpilot congiration to default value. -Reboot required. - 點擊右方按鈕來重置所有的 dragonpilot 相關的設定值。 -需重新啟動。 - - - - Are you sure you want to reset dp params? - 您確定要重置嗎? - - - - Delete All Driving Log - 刪除所有的行駛記錄 - - - - DELETE - 刪除 - - - - Tap the button to delete ALL your driving logs (including dashcam / gpx / driving logs). - 點擊按鈕來清空您所有的行駛記錄(包含 dashcam / gpx 等等)。 - - - - DPMapsPanel - - - Show Full Screen Nav. - 啟用全螢幕道航 - - - - This will show navigation in full screen. -Please tap green boarder if you wish to switch back drive view. - 這將會把導航畫面擴展至全螢幕。 -如果想切換回行車畫面,請點擊或滑動綠色邊框區域。 - - - - Search Destination using Google Map - 使用 Google Map 搜尋目的地 - - - - This will allow you to search destination in google map api. -You will need to apply your own google map api key.Enter your key detail in web interface once it's enabled. - 這將讓您使用 google map API 來搜尋目的地。 -您將需要申請自已的 google map api 密鑰,申請完後進入網頁介面輸入即可。 - - - - Enable Nav. - 啟用導航服務 - - - - This will let use the build in Navigation. -Use web interface to control it: *http://<device_ip>:8082*. -You will need to apply your own mapbox token at https://www.mapbox.com/. -Internet access from mobile phone (tethering) is required. -Reboot required. - 啟用這個功能將可以讓您使用內建的導航系統。 -請掃描二維碼或是連至 http://[設備 IP]:8082 網頁介面控制它。 -請至 mapbox (https://www.mapbox.com) 申請您自已的密鑰。 -您的裝置需要有個人熱點連線。 -需要重新開機。 - - - - Enable Speed Limit Control - 啟用速限控制 - - - - Use speed limit signs information from map data and car interface to automatically adapt cruise speed to road limits. - 依照圖資上的速限控制您的車速。 - - - - Enable Speed Limit Offset - 啟用限速控制偏移 - - - - Set speed limit slightly higher than actual speed limit for a more natural drive. - 將速度限製設置為略高於實際速度限制,實現更自然的駕駛。 - - - - Enable Map Data Turn Control - 啟用圖資路徑控制車速 - - - - Use curvature info from map data to define speed limits to take turns ahead - 使用圖資上的路徑來判斷前方的過彎速度 -使用速度顯示為UI中左下方三角形內數值 - - - - Show debug UI elements - 顯示除錯用圖示 - - - - Show UI elements that aid debugging. - 於右上方顯示除錯用訊息 - - - - Enable MapD - 啟用 MapD 服務 - - - - Use OSM to assist lateral/longitudinal control. -Please note: -1. This feature will works only when your car support OP longitudinal. -2. MapD will contribute your route to OSM for future improvement automatically. -3. You can add your own offset for mapd just follow the readme under /selfdrive/mapd. -4. Not connecting to the internet for while might feel up device storage from all the gps traces. - 使用 OpenStreetMap (OSM) 圖資來協助縱向控制。 -請注意: -1. 您的車需要 OP 縱向控制的支援。 -2. MapD 將會把您的行車路線貢獻給 OSM 以供日後改進。 -3. 若有需要,請按照 /selfdrive/mapd/ 下的自述文件調整修改參數。 -4. 在沒有連上網的情況下儲存的 gpx 行車路線記錄有可能會塞滿存儲空間。 - - - - DPUIPanel - - - Display Mode - 顯示模式 - - - - 0 = Default -1 = Screen Off While Driving - 0 = 預設 -1 = 行駛時關閉畫面 - - - - Screen Brightness - 螢幕亮度 - - - - Adjust your screen brightness. - 調整螢幕的亮度。 - - - - - AUTO - 自動 - - - - Alert Volume - 提示音量 - - - - Adjust your alert volume. - 調整設備的提示音量。 - - - - Quiet Drive - 靜音模式 - - - - Display alert and play important warning sound. Thanks @sunnyhaibin. - 開啟這個選項後,設備只會在重要的警示時顯示和發出聲響。謝謝 @sunnyhaibin. - - - - Display Speed - 顯示車速 - - - - Enable this to display your current speed. - 啟用這個選項來顯示目前車速。 - - - - Display Event / Steer Icon - 顯示事件圖示 - - - - - Enable this to display the icon. - 啟用UI右上角顯示事件/轉向圖標。 - - - - Display Driver Monitor Indicator - 顯示駕駛監控圖示 - - - - Display Side Info - 顯示側邊資訊欄 - - - - Enable this to display steering angle / lead car distance / engine RPM. - 開啟這個選項後,畫面側邊將會顯示額外的訊息。 - - - - Display Top Info - 顯示上方資訊欄 - - - - Enable this to display time / system temp / battery level. - 開啟這個選項後,畫面將會顯示額外的訊息。 - - DeclinePage - + You must accept the Terms and Conditions in order to use openpilot. 您必須先接受條款和條件才能使用 openpilot。 - + Back 回上頁 - + Decline, uninstall %1 拒絕並卸載 %1 @@ -812,152 +108,152 @@ Please note: DevicePanel - + Dongle ID Dongle ID - + N/A 無法使用 - + Serial 序號 - + Driver Camera 駕駛員攝像頭 - + PREVIEW 預覽 - + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) 預覽駕駛員監控鏡頭畫面,以確保其具有良好視野。(僅在熄火時可用) - + Reset Calibration 重置校準 - + RESET 重置 - + Are you sure you want to reset calibration? 您確定要重置校準嗎? - + Review Training Guide 觀看使用教學 - + REVIEW 觀看 - + Review the rules, features, and limitations of openpilot 觀看 openpilot 的使用規則、功能和限制 - + Are you sure you want to review the training guide? 您確定要觀看使用教學嗎? - + Regulatory 法規/監管 - + VIEW 觀看 - + Change Language 更改語言 - + CHANGE 更改 - + Select a language 選擇語言 - + Reboot 重新啟動 - + Power Off 關機 - + openpilot requires the device to be mounted within 4° left or right and within 5° up or 8° down. openpilot is continuously calibrating, resetting is rarely required. openpilot 需要將裝置固定在左右偏差 4° 以內,朝上偏差 5° 以内或朝下偏差 8° 以内。鏡頭在後台會持續自動校準,很少有需要重置的情况。 - + Your device is pointed %1° %2 and %3° %4. 你的設備目前朝%2 %1° 以及朝%4 %3° 。 - + down - + up - + left - + right - + Are you sure you want to reboot? 您確定要重新啟動嗎? - + Disengage to Reboot 請先取消控車才能重新啟動 - + Are you sure you want to power off? 您確定您要關機嗎? - + Disengage to Power Off 請先取消控車才能關機 @@ -965,32 +261,32 @@ Please note: DriveStats - + Drives 旅程 - + Hours 小時 - + ALL TIME 總共 - + PAST WEEK 上周 - + KM 公里 - + Miles 英里 @@ -998,7 +294,7 @@ Please note: DriverViewScene - + camera starting 開啟相機中 @@ -1006,12 +302,12 @@ Please note: InputDialog - + Cancel 取消 - + Need at least %n character(s)! 需要至少 %n 個字元! @@ -1021,22 +317,22 @@ Please note: Installer - + Installing... 安裝中… - + Receiving objects: 接收對象: - + Resolving deltas: 分析差異: - + Updating files: 更新檔案: @@ -1044,27 +340,27 @@ Please note: MapETA - + eta 抵達 - + min 分鐘 - + hr 小時 - + km km - + mi mi @@ -1072,22 +368,22 @@ Please note: MapInstructions - + km km - + m m - + mi mi - + ft ft @@ -1095,48 +391,48 @@ Please note: MapPanel - + Current Destination 當前目的地 - + CLEAR 清除 - + Recent Destinations 最近目的地 - + Try the Navigation Beta 試用導航功能 - + Get turn-by-turn directions displayed and more with a comma prime subscription. Sign up now: https://connect.comma.ai 成為 comma 高級會員來使用導航功能 立即註冊:https://connect.comma.ai - + No home location set 未設定 住家位置 - + No work location set 未設定 工作位置 - + no recent destinations 沒有最近的導航記錄 @@ -1144,12 +440,12 @@ location set MapWindow - + Map Loading 地圖加載中 - + Waiting for GPS 等待 GPS @@ -1157,12 +453,12 @@ location set MultiOptionDialog - + Select 選擇 - + Cancel 取消 @@ -1170,23 +466,23 @@ location set Networking - + Advanced 進階 - + Enter password 輸入密碼 - - + + for "%1" 給 "%1" - + Wrong password 密碼錯誤 @@ -1194,88 +490,48 @@ location set NvgWindow - + km/h km/h - + mph mph - - + + MAX 最高 - - + + SPEED 速度 - - + + LIMIT 速限 - - - REAL STEER - 實際轉角 - - - - RAM PER - 記憶體用量 - - - - OFF - 停止 - - - - ENG RPM - 引擎轉速 - - - - NOR - 一般 - - - - SPT - 運動 - - - - ECO - 節能 - - - - ACCEL - 加速 - OffroadHome - + UPDATE 更新 - + ALERTS 提醒 - + ALERT 提醒 @@ -1283,22 +539,22 @@ location set PairingPopup - + Pair your device to your comma account 將設備與您的 comma 帳號配對 - + Go to https://connect.comma.ai on your phone 用手機連至 https://connect.comma.ai - + Click "add new device" and scan the QR code on the right 點選 "add new device" 後掃描右邊的二維碼 - + Bookmark connect.comma.ai to your home screen to use it like an app 將 connect.comma.ai 加入您的主屏幕,以便像手機 App 一樣使用它 @@ -1306,32 +562,32 @@ location set PrimeAdWidget - + Upgrade Now 馬上升級 - + Become a comma prime member at connect.comma.ai 成為 connect.comma.ai 的高級會員 - + PRIME FEATURES: 高級會員特點: - + Remote access 遠程訪問 - + 1 year of storage 一年的雲端行車記錄 - + Developer perks 開發者福利 @@ -1339,22 +595,22 @@ location set PrimeUserWidget - + ✓ SUBSCRIBED ✓ 已訂閱 - + comma prime comma 高級會員 - + CONNECT.COMMA.AI CONNECT.COMMA.AI - + COMMA POINTS COMMA 積分 @@ -1362,39 +618,41 @@ location set QObject - + Reboot 重新啟動 - + Exit 離開 + dashcam - 行車記錄器 + 行車記錄器 + openpilot - openpilot + openpilot - + %n minute(s) ago %n 分鐘前 - + %n hour(s) ago %n 小時前 - + %n day(s) ago %n 天前 @@ -1404,47 +662,47 @@ location set Reset - + Reset failed. Reboot to try again. 重置失敗。請重新啟動後再試。 - + Are you sure you want to reset your device? 您確定要重置你的設備嗎? - + Resetting device... 重置設備中… - + System Reset 系統重置 - + System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot. 系統重置已觸發。請按確認刪除所有內容和設置。按取消恢復啟動。 - + Cancel 取消 - + Reboot 重新啟動 - + Confirm 確認 - + Unable to mount data partition. Press confirm to reset your device. 無法掛載數據分區。請按確認重置您的設備。 @@ -1452,7 +710,7 @@ location set RichTextDialog - + Ok 確定 @@ -1460,168 +718,139 @@ location set SettingsWindow + × - × + × - - BACK - 回上頁 - - - + Device 設備 - - + + Network 網路 - + Toggles 設定 - + Software 軟體 - + Navigation 導航 - - - DP - General - DP - 一般 - - - - DP - Controls - DP - 控制 - - - - DP - UI - DP - 畫面 - - - - DP - Cars - DP - 車型 - - - - DP - Maps - DP - 地圖 - Setup - + WARNING: Low Voltage 警告:電壓過低 - + Power your device in a car with a harness or proceed at your own risk. 請使用車上 harness 提供的電源,若繼續的話您需要自擔風險。 - + Power off 關機 - - - + + + Continue 繼續 - + Getting Started 入門 - + Before we get on the road, let’s finish installation and cover some details. 在我們上路之前,讓我們完成安裝並介紹一些細節。 - + Connect to Wi-Fi 連接到無線網絡 - - + + Back 回上頁 - + Continue without Wi-Fi 在沒有 Wi-Fi 的情況下繼續 - + Waiting for internet 連接至網路中 - + Choose Software to Install 選擇要安裝的軟體 - + Dashcam 行車記錄器 - + Custom Software 定制的軟體 - + Enter URL 輸入網址 - + for Custom Software 定制的軟體 - + Downloading... 下載中… - + Download Failed 下載失敗 - + Ensure the entered URL is valid, and the device’s internet connection is good. 請確定您輸入的是有效的安裝網址,並且確定設備的網路連線狀態良好。 - + Reboot device 重新啟動 - + Start over 重新開始 @@ -1629,17 +858,17 @@ location set SetupWidget - + Finish Setup 完成設置 - + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. 將您的設備與 comma connect (connect.comma.ai) 配對並領取您的 comma 高級會員優惠。 - + Pair device 配對設備 @@ -1647,103 +876,106 @@ location set Sidebar - - + + CONNECT 雲端服務 - + OFFLINE 已離線 - - + + ONLINE 已連線 - + ERROR 錯誤 - - - + + + TEMP 溫度 + HIGH - 偏高 + 偏高 + GOOD - 正常 + 正常 + OK - 一般 + 一般 - + VEHICLE 車輛通訊 - + NO 未連線 - + PANDA 車輛通訊 - + GPS GPS - + SEARCH 車輛通訊 - + -- -- - + Wi-Fi - + ETH - + 2G - + 3G - + LTE - + 5G @@ -1751,89 +983,89 @@ location set SoftwarePanel - + Git Branch Git 分支 - + Git Commit Git 提交 - + OS Version 系統版本 - + Version 版本 - + Last Update Check 上次檢查時間 - + The last time openpilot successfully checked for an update. The updater only runs while the car is off. 上次成功檢查更新的時間。更新系統只會在車子熄火時執行。 - + Check for Update 檢查更新 - + CHECKING 檢查中 - + Switch Branch 切換分支 - + ENTER 切換 - - + + The new branch will be pulled the next time the updater runs. 新的分支將會在下次檢查更新時切換過去。 - + Enter branch name 輸入分支名稱 - + UNINSTALL 卸載 - + Uninstall %1 卸載 %1 - + Are you sure you want to uninstall? 您確定您要卸載嗎? - + failed to fetch update 下載更新失敗 - - + + CHECK 檢查 @@ -1841,48 +1073,48 @@ location set SshControl - + SSH Keys SSH 密鑰 - + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. 警告:這將授權給 GitHub 帳號中所有公鑰 SSH 訪問權限。切勿輸入非您自己的 GitHub 用戶名。comma 員工「永遠不會」要求您添加他們的 GitHub 用戶名。 - - + + ADD 新增 - + Enter your GitHub username 請輸入您 GitHub 的用戶名 - + LOADING 載入中 - + REMOVE 移除 - + Username '%1' has no keys on GitHub GitHub 用戶 '%1' 沒有設定任何密鑰 - + Request timed out 請求超時 - + Username '%1' doesn't exist on GitHub GitHub 用戶 '%1' 不存在 @@ -1890,7 +1122,7 @@ location set SshToggle - + Enable SSH 啟用 SSH 服務 @@ -1898,22 +1130,22 @@ location set TermsPage - + Terms & Conditions 條款和條件 - + Decline 拒絕 - + Scroll to accept 滑動至頁尾接受條款 - + Agree 接受 @@ -1921,135 +1153,135 @@ location set TogglesPanel - + Enable openpilot 啟用 openpilot - + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. 使用 openpilot 的主動式巡航和車道保持功能,開啟後您需要持續集中注意力,設定變更在重新啟動車輛後生效。 - + Enable Lane Departure Warnings 啟用車道偏離警告 - + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). 車速在時速 50 公里 (31 英里) 以上且未打方向燈的情況下,如果偵測到車輛駛出目前車道線時,發出車道偏離警告。 - - Enable Right-Hand Drive - 啟用右駕模式 - - - - Allow openpilot to obey left-hand traffic conventions and perform driver monitoring on right driver seat. - openpilot 將對右側駕駛進行監控 (但仍遵守靠左駕的交通慣例)。 - - - + Use Metric System 使用公制單位 - + Display speed in km/h instead of mph. 啟用後,速度單位顯示將從 mp/h 改為 km/h。 - + Record and Upload Driver Camera 記錄並上傳駕駛監控影像 - + Upload data from the driver facing camera and help improve the driver monitoring algorithm. 上傳駕駛監控的錄像來協助我們提升駕駛監控的準確率。 - + + 🌮 End-to-end longitudinal (extremely alpha) 🌮 + + + + + Experimental openpilot longitudinal control + + + + + <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> + + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + + + + Disengage On Accelerator Pedal 油門取消控車 - + When enabled, pressing the accelerator pedal will disengage openpilot. 啟用後,踩踏油門將會取消 openpilot 控制。 - + Show ETA in 24h Format 預計到達時間單位改用 24 小時制 - + Use 24h format instead of am/pm 使用 24 小時制。(預設值為 12 小時制) - + Show Map on Left Side of UI 將地圖顯示在畫面的左側 - + Show map on left side when in split screen view. 進入分割畫面後,地圖將會顯示在畫面的左側。 - - - openpilot Longitudinal Control - openpilot 縱向控制 - - - - openpilot will disable the car's radar and will take over control of gas and brakes. Warning: this disables AEB! - openpilot 將會關閉雷達訊號並接管油門和剎車的控制。注意:這也會關閉自動緊急煞車 (AEB) 系統! - Updater - + Update Required 系統更新 - + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. 設備的操作系統需要更新。請將您的設備連接到 Wi-Fi 以獲得最快的更新體驗。下載大小約為 1GB。 - + Connect to Wi-Fi 連接到無線網絡 - + Install 安裝 - + Back 回上頁 - + Loading... 載入中… - + Reboot 重新啟動 - + Update failed 更新失敗 @@ -2057,23 +1289,23 @@ location set WifiUI - - + + Scanning for networks... 掃描無線網路中... - + CONNECTING... 連線中... - + FORGET 清除 - + Forget Wi-Fi Network "%1"? 清除 Wi-Fi 網路 "%1"? diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui index c9f81c053..c0744ade9 100755 --- a/selfdrive/ui/ui +++ b/selfdrive/ui/ui @@ -1,5 +1,5 @@ #!/bin/sh cd "$(dirname "$0")" -export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH="/system/lib64:/data/openpilot/third_party/mapbox-gl-native-qt/aarch64:$LD_LIBRARY_PATH" export QT_DBL_CLICK_DIST=150 exec ./_ui diff --git a/system/camerad/camerad b/system/camerad/camerad index e13e5efd2..ad87df9e4 100755 Binary files a/system/camerad/camerad and b/system/camerad/camerad differ diff --git a/system/camerad/cameras/camera_common.h b/system/camerad/cameras/camera_common.h index ee1310104..1a0f6cc0e 100644 --- a/system/camerad/cameras/camera_common.h +++ b/system/camerad/cameras/camera_common.h @@ -49,6 +49,7 @@ const bool env_disable_wide_road = getenv("DISABLE_WIDE_ROAD") != NULL; const bool env_disable_driver = getenv("DISABLE_DRIVER") != NULL; const bool env_debug_frames = getenv("DEBUG_FRAMES") != NULL; const bool env_log_raw_frames = getenv("LOG_RAW_FRAMES") != NULL; +const bool env_ctrl_exp_from_params = getenv("CTRL_EXP_FROM_PARAMS") != NULL; typedef void (*release_cb)(void *cookie, int buf_idx); diff --git a/system/clocksd/clocksd b/system/clocksd/clocksd index eee71f6e8..d124c32fd 100755 Binary files a/system/clocksd/clocksd and b/system/clocksd/clocksd differ diff --git a/system/hardware/tici/agnos.py b/system/hardware/tici/agnos.py index ca2498a00..51998bf8b 100755 --- a/system/hardware/tici/agnos.py +++ b/system/hardware/tici/agnos.py @@ -20,7 +20,7 @@ class StreamingDecompressor: def __init__(self, url: str) -> None: self.buf = b"" - self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None}) # type: ignore + self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None}) # type: ignore # pylint: disable=missing-timeout self.it = self.req.iter_content(chunk_size=1024 * 1024) self.decompressor = lzma.LZMADecompressor(format=lzma.FORMAT_AUTO) self.eof = False @@ -241,7 +241,7 @@ def flash_partition(target_slot_number: int, partition: dict, cloudlog, standalo else: extract_compressed_image(target_slot_number, partition, cloudlog) - # Write hash after successfull flash + # Write hash after successful flash if not full_check: with open(path, 'wb+') as out: out.seek(partition['size']) @@ -257,7 +257,7 @@ def swap(manifest_path: str, target_slot_number: int, cloudlog) -> None: while True: out = subprocess.check_output(f"abctl --set_active {target_slot_number}", shell=True, stderr=subprocess.STDOUT, encoding='utf8') if ("No such file or directory" not in out) and ("lun as boot lun" in out): - cloudlog.info(f"Swap successfull {out}") + cloudlog.info(f"Swap successful {out}") break else: cloudlog.error(f"Swap failed {out}") diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index c3f8c7f82..14a7101c6 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -287,7 +287,7 @@ class Tici(HardwareBase): ] upload = [ - # Create root Hierarchy Token Bucket that sends all trafic to 1:20 + # Create root Hierarchy Token Bucket that sends all traffic to 1:20 (True, tc + ["qdisc", "add", "dev", adapter, "root", "handle", "1:", "htb", "default", "20"]), # Create class 1:20 with specified rate limit diff --git a/third_party/mapbox-gl-native-qt/aarch64/libqmapboxgl.so b/third_party/mapbox-gl-native-qt/aarch64/libqmapboxgl.so new file mode 100755 index 000000000..aa5642eb7 Binary files /dev/null and b/third_party/mapbox-gl-native-qt/aarch64/libqmapboxgl.so differ diff --git a/third_party/mapbox-gl-native-qt/include/QMapbox b/third_party/mapbox-gl-native-qt/include/QMapbox new file mode 100644 index 000000000..a8479c09a --- /dev/null +++ b/third_party/mapbox-gl-native-qt/include/QMapbox @@ -0,0 +1 @@ +#include "qmapbox.hpp" diff --git a/third_party/mapbox-gl-native-qt/include/QMapboxGL b/third_party/mapbox-gl-native-qt/include/QMapboxGL new file mode 100644 index 000000000..15b55a9ab --- /dev/null +++ b/third_party/mapbox-gl-native-qt/include/QMapboxGL @@ -0,0 +1 @@ +#include "qmapboxgl.hpp" diff --git a/third_party/mapbox-gl-native-qt/include/qmapbox.hpp b/third_party/mapbox-gl-native-qt/include/qmapbox.hpp new file mode 100644 index 000000000..3acc9d55e --- /dev/null +++ b/third_party/mapbox-gl-native-qt/include/qmapbox.hpp @@ -0,0 +1,147 @@ +#ifndef QMAPBOX_H +#define QMAPBOX_H + +#include +#include +#include +#include +#include + +// This header follows the Qt coding style: https://wiki.qt.io/Qt_Coding_Style + +#if !defined(QT_MAPBOXGL_STATIC) +# if defined(QT_BUILD_MAPBOXGL_LIB) +# define Q_MAPBOXGL_EXPORT Q_DECL_EXPORT +# else +# define Q_MAPBOXGL_EXPORT Q_DECL_IMPORT +# endif +#else +# define Q_MAPBOXGL_EXPORT +#endif + +namespace QMapbox { + +typedef QPair Coordinate; +typedef QPair CoordinateZoom; +typedef QPair ProjectedMeters; + +typedef QVector Coordinates; +typedef QVector CoordinatesCollection; + +typedef QVector CoordinatesCollections; + +struct Q_MAPBOXGL_EXPORT Feature { + enum Type { + PointType = 1, + LineStringType, + PolygonType + }; + + /*! Class constructor. */ + Feature(Type type_ = PointType, const CoordinatesCollections& geometry_ = CoordinatesCollections(), + const QVariantMap& properties_ = QVariantMap(), const QVariant& id_ = QVariant()) + : type(type_), geometry(geometry_), properties(properties_), id(id_) {} + + Type type; + CoordinatesCollections geometry; + QVariantMap properties; + QVariant id; +}; + +struct Q_MAPBOXGL_EXPORT ShapeAnnotationGeometry { + enum Type { + LineStringType = 1, + PolygonType, + MultiLineStringType, + MultiPolygonType + }; + + /*! Class constructor. */ + ShapeAnnotationGeometry(Type type_ = LineStringType, const CoordinatesCollections& geometry_ = CoordinatesCollections()) + : type(type_), geometry(geometry_) {} + + Type type; + CoordinatesCollections geometry; +}; + +struct Q_MAPBOXGL_EXPORT SymbolAnnotation { + Coordinate geometry; + QString icon; +}; + +struct Q_MAPBOXGL_EXPORT LineAnnotation { + /*! Class constructor. */ + LineAnnotation(const ShapeAnnotationGeometry& geometry_ = ShapeAnnotationGeometry(), float opacity_ = 1.0f, + float width_ = 1.0f, const QColor& color_ = Qt::black) + : geometry(geometry_), opacity(opacity_), width(width_), color(color_) {} + + ShapeAnnotationGeometry geometry; + float opacity; + float width; + QColor color; +}; + +struct Q_MAPBOXGL_EXPORT FillAnnotation { + /*! Class constructor. */ + FillAnnotation(const ShapeAnnotationGeometry& geometry_ = ShapeAnnotationGeometry(), float opacity_ = 1.0f, + const QColor& color_ = Qt::black, const QVariant& outlineColor_ = QVariant()) + : geometry(geometry_), opacity(opacity_), color(color_), outlineColor(outlineColor_) {} + + ShapeAnnotationGeometry geometry; + float opacity; + QColor color; + QVariant outlineColor; +}; + +typedef QVariant Annotation; +typedef quint32 AnnotationID; +typedef QVector AnnotationIDs; + +enum NetworkMode { + Online, // Default + Offline, +}; + +Q_MAPBOXGL_EXPORT QVector >& defaultStyles(); + +Q_MAPBOXGL_EXPORT NetworkMode networkMode(); +Q_MAPBOXGL_EXPORT void setNetworkMode(NetworkMode); + +// This struct is a 1:1 copy of mbgl::CustomLayerRenderParameters. +struct Q_MAPBOXGL_EXPORT CustomLayerRenderParameters { + double width; + double height; + double latitude; + double longitude; + double zoom; + double bearing; + double pitch; + double fieldOfView; +}; + +class Q_MAPBOXGL_EXPORT CustomLayerHostInterface { +public: + virtual ~CustomLayerHostInterface() = default; + virtual void initialize() = 0; + virtual void render(const CustomLayerRenderParameters&) = 0; + virtual void deinitialize() = 0; +}; + +Q_MAPBOXGL_EXPORT double metersPerPixelAtLatitude(double latitude, double zoom); +Q_MAPBOXGL_EXPORT ProjectedMeters projectedMetersForCoordinate(const Coordinate &); +Q_MAPBOXGL_EXPORT Coordinate coordinateForProjectedMeters(const ProjectedMeters &); + +} // namespace QMapbox + +Q_DECLARE_METATYPE(QMapbox::Coordinate); +Q_DECLARE_METATYPE(QMapbox::Coordinates); +Q_DECLARE_METATYPE(QMapbox::CoordinatesCollection); +Q_DECLARE_METATYPE(QMapbox::CoordinatesCollections); +Q_DECLARE_METATYPE(QMapbox::Feature); + +Q_DECLARE_METATYPE(QMapbox::SymbolAnnotation); +Q_DECLARE_METATYPE(QMapbox::ShapeAnnotationGeometry); +Q_DECLARE_METATYPE(QMapbox::LineAnnotation); +Q_DECLARE_METATYPE(QMapbox::FillAnnotation); + +#endif // QMAPBOX_H diff --git a/third_party/mapbox-gl-native-qt/include/qmapboxgl.hpp b/third_party/mapbox-gl-native-qt/include/qmapboxgl.hpp new file mode 100644 index 000000000..337991aa1 --- /dev/null +++ b/third_party/mapbox-gl-native-qt/include/qmapboxgl.hpp @@ -0,0 +1,277 @@ +#ifndef QMAPBOXGL_H +#define QMAPBOXGL_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class QMapboxGLPrivate; + +// This header follows the Qt coding style: https://wiki.qt.io/Qt_Coding_Style + +class Q_MAPBOXGL_EXPORT QMapboxGLSettings +{ +public: + QMapboxGLSettings(); + + enum GLContextMode { + UniqueGLContext = 0, + SharedGLContext + }; + + enum MapMode { + Continuous = 0, + Static + }; + + enum ConstrainMode { + NoConstrain = 0, + ConstrainHeightOnly, + ConstrainWidthAndHeight + }; + + enum ViewportMode { + DefaultViewport = 0, + FlippedYViewport + }; + + GLContextMode contextMode() const; + void setContextMode(GLContextMode); + + MapMode mapMode() const; + void setMapMode(MapMode); + + ConstrainMode constrainMode() const; + void setConstrainMode(ConstrainMode); + + ViewportMode viewportMode() const; + void setViewportMode(ViewportMode); + + unsigned cacheDatabaseMaximumSize() const; + void setCacheDatabaseMaximumSize(unsigned); + + QString cacheDatabasePath() const; + void setCacheDatabasePath(const QString &); + + QString assetPath() const; + void setAssetPath(const QString &); + + QString accessToken() const; + void setAccessToken(const QString &); + + QString apiBaseUrl() const; + void setApiBaseUrl(const QString &); + + QString localFontFamily() const; + void setLocalFontFamily(const QString &); + + std::function resourceTransform() const; + void setResourceTransform(const std::function &); + +private: + GLContextMode m_contextMode; + MapMode m_mapMode; + ConstrainMode m_constrainMode; + ViewportMode m_viewportMode; + + unsigned m_cacheMaximumSize; + QString m_cacheDatabasePath; + QString m_assetPath; + QString m_accessToken; + QString m_apiBaseUrl; + QString m_localFontFamily; + std::function m_resourceTransform; +}; + +struct Q_MAPBOXGL_EXPORT QMapboxGLCameraOptions { + QVariant center; // Coordinate + QVariant anchor; // QPointF + QVariant zoom; // double + QVariant bearing; // double + QVariant pitch; // double +}; + +class Q_MAPBOXGL_EXPORT QMapboxGL : public QObject +{ + Q_OBJECT + Q_PROPERTY(double latitude READ latitude WRITE setLatitude) + Q_PROPERTY(double longitude READ longitude WRITE setLongitude) + Q_PROPERTY(double zoom READ zoom WRITE setZoom) + Q_PROPERTY(double bearing READ bearing WRITE setBearing) + Q_PROPERTY(double pitch READ pitch WRITE setPitch) + Q_PROPERTY(QString styleJson READ styleJson WRITE setStyleJson) + Q_PROPERTY(QString styleUrl READ styleUrl WRITE setStyleUrl) + Q_PROPERTY(double scale READ scale WRITE setScale) + Q_PROPERTY(QMapbox::Coordinate coordinate READ coordinate WRITE setCoordinate) + Q_PROPERTY(QMargins margins READ margins WRITE setMargins) + +public: + enum MapChange { + MapChangeRegionWillChange = 0, + MapChangeRegionWillChangeAnimated, + MapChangeRegionIsChanging, + MapChangeRegionDidChange, + MapChangeRegionDidChangeAnimated, + MapChangeWillStartLoadingMap, + MapChangeDidFinishLoadingMap, + MapChangeDidFailLoadingMap, + MapChangeWillStartRenderingFrame, + MapChangeDidFinishRenderingFrame, + MapChangeDidFinishRenderingFrameFullyRendered, + MapChangeWillStartRenderingMap, + MapChangeDidFinishRenderingMap, + MapChangeDidFinishRenderingMapFullyRendered, + MapChangeDidFinishLoadingStyle, + MapChangeSourceDidChange + }; + + enum MapLoadingFailure { + StyleParseFailure, + StyleLoadFailure, + NotFoundFailure, + UnknownFailure + }; + + // Determines the orientation of the map. + enum NorthOrientation { + NorthUpwards, // Default + NorthRightwards, + NorthDownwards, + NorthLeftwards, + }; + + QMapboxGL(QObject* parent = 0, + const QMapboxGLSettings& = QMapboxGLSettings(), + const QSize& size = QSize(), + qreal pixelRatio = 1); + virtual ~QMapboxGL(); + + QString styleJson() const; + QString styleUrl() const; + + void setStyleJson(const QString &); + void setStyleUrl(const QString &); + + double latitude() const; + void setLatitude(double latitude); + + double longitude() const; + void setLongitude(double longitude); + + double scale() const; + void setScale(double scale, const QPointF ¢er = QPointF()); + + double zoom() const; + void setZoom(double zoom); + + double minimumZoom() const; + double maximumZoom() const; + + double bearing() const; + void setBearing(double degrees); + void setBearing(double degrees, const QPointF ¢er); + + double pitch() const; + void setPitch(double pitch); + void pitchBy(double pitch); + + NorthOrientation northOrientation() const; + void setNorthOrientation(NorthOrientation); + + QMapbox::Coordinate coordinate() const; + void setCoordinate(const QMapbox::Coordinate &); + void setCoordinateZoom(const QMapbox::Coordinate &, double zoom); + + void jumpTo(const QMapboxGLCameraOptions&); + + void setGestureInProgress(bool inProgress); + + void setTransitionOptions(qint64 duration, qint64 delay = 0); + + void addAnnotationIcon(const QString &name, const QImage &sprite); + + QMapbox::AnnotationID addAnnotation(const QMapbox::Annotation &); + void updateAnnotation(QMapbox::AnnotationID, const QMapbox::Annotation &); + void removeAnnotation(QMapbox::AnnotationID); + + bool setLayoutProperty(const QString &layer, const QString &property, const QVariant &value); + bool setPaintProperty(const QString &layer, const QString &property, const QVariant &value); + + bool isFullyLoaded() const; + + void moveBy(const QPointF &offset); + void scaleBy(double scale, const QPointF ¢er = QPointF()); + void rotateBy(const QPointF &first, const QPointF &second); + + void resize(const QSize &size); + + double metersPerPixelAtLatitude(double latitude, double zoom) const; + QMapbox::ProjectedMeters projectedMetersForCoordinate(const QMapbox::Coordinate &) const; + QMapbox::Coordinate coordinateForProjectedMeters(const QMapbox::ProjectedMeters &) const; + QPointF pixelForCoordinate(const QMapbox::Coordinate &) const; + QMapbox::Coordinate coordinateForPixel(const QPointF &) const; + + QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne) const; + QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne, double bearing, double pitch); + + void setMargins(const QMargins &margins); + QMargins margins() const; + + void addSource(const QString &sourceID, const QVariantMap& params); + bool sourceExists(const QString &sourceID); + void updateSource(const QString &sourceID, const QVariantMap& params); + void removeSource(const QString &sourceID); + + void addImage(const QString &name, const QImage &sprite); + void removeImage(const QString &name); + + void addCustomLayer(const QString &id, + QScopedPointer& host, + const QString& before = QString()); + void addLayer(const QVariantMap ¶ms, const QString& before = QString()); + bool layerExists(const QString &id); + void removeLayer(const QString &id); + + QVector layerIds() const; + + void setFilter(const QString &layer, const QVariant &filter); + QVariant getFilter(const QString &layer) const; + // When rendering on a different thread, + // should be called on the render thread. + void createRenderer(); + void destroyRenderer(); + void setFramebufferObject(quint32 fbo, const QSize &size); + +public slots: + void render(); + void connectionEstablished(); + + // Commit changes, load all the resources + // and renders the map when completed. + void startStaticRender(); + +signals: + void needsRendering(); + void mapChanged(QMapboxGL::MapChange); + void mapLoadingFailed(QMapboxGL::MapLoadingFailure, const QString &reason); + void copyrightsChanged(const QString ©rightsHtml); + + void staticRenderFinished(const QString &error); + +private: + Q_DISABLE_COPY(QMapboxGL) + + QMapboxGLPrivate *d_ptr; +}; + +Q_DECLARE_METATYPE(QMapboxGL::MapChange); +Q_DECLARE_METATYPE(QMapboxGL::MapLoadingFailure); + +#endif // QMAPBOXGL_H diff --git a/tools/joystick/joystickd.py b/tools/joystick/joystickd.py index 35ecca351..8374cf8a7 100755 --- a/tools/joystick/joystickd.py +++ b/tools/joystick/joystickd.py @@ -77,7 +77,7 @@ def send_thread(joystick): print('\n' + ', '.join(f'{name}: {round(v, 3)}' for name, v in joystick.axes_values.items())) if "WEB" in os.environ: import requests - requests.get("http://"+os.environ["WEB"]+":5000/control/%f/%f" % tuple([joystick.axes_values[a] for a in joystick.axes_order][::-1])) + requests.get("http://"+os.environ["WEB"]+":5000/control/%f/%f" % tuple([joystick.axes_values[a] for a in joystick.axes_order][::-1]), timeout=None) rk.keep_time() def joystick_thread(use_keyboard): diff --git a/tools/lib/README.md b/tools/lib/README.md index 241232eae..3cf239d2d 100644 --- a/tools/lib/README.md +++ b/tools/lib/README.md @@ -1,6 +1,6 @@ ## LogReader -Route is a class for conviently accessing all the [logs](/selfdrive/loggerd/) from your routes. The LogReader class reads the non-video logs, i.e. rlog.bz2 and qlog.bz2. There's also a matching FrameReader class for reading the videos. +Route is a class for conveniently accessing all the [logs](/selfdrive/loggerd/) from your routes. The LogReader class reads the non-video logs, i.e. rlog.bz2 and qlog.bz2. There's also a matching FrameReader class for reading the videos. ```python from tools.lib.route import Route diff --git a/tools/lib/filereader.py b/tools/lib/filereader.py index 4ea9ad429..215f7b218 100644 --- a/tools/lib/filereader.py +++ b/tools/lib/filereader.py @@ -1,7 +1,7 @@ import os from tools.lib.url_file import URLFile -DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.internal/") +DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.comma.internal/") def FileReader(fn, debug=False): if fn.startswith("cd:/"): diff --git a/tools/lib/tests/test_readers.py b/tools/lib/tests/test_readers.py index 1d8918ba5..6efa0dc35 100755 --- a/tools/lib/tests/test_readers.py +++ b/tools/lib/tests/test_readers.py @@ -10,7 +10,7 @@ from tools.lib.logreader import LogReader class TestReaders(unittest.TestCase): - @unittest.skip("skip for bandwith reasons") + @unittest.skip("skip for bandwidth reasons") def test_logreader(self): def _check_data(lr): hist = defaultdict(int) @@ -21,7 +21,7 @@ class TestReaders(unittest.TestCase): self.assertEqual(hist['logMessage'], 6857) with tempfile.NamedTemporaryFile(suffix=".bz2") as fp: - r = requests.get("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/raw_log.bz2?raw=true") + r = requests.get("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/raw_log.bz2?raw=true", timeout=10) fp.write(r.content) fp.flush() @@ -31,7 +31,7 @@ class TestReaders(unittest.TestCase): lr_url = LogReader("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/raw_log.bz2?raw=true") _check_data(lr_url) - @unittest.skip("skip for bandwith reasons") + @unittest.skip("skip for bandwidth reasons") def test_framereader(self): def _check_data(f): self.assertEqual(f.frame_count, 1200) @@ -53,7 +53,7 @@ class TestReaders(unittest.TestCase): assert np.all(frame_first_30[15] == frame_15[0]) with tempfile.NamedTemporaryFile(suffix=".hevc") as fp: - r = requests.get("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/video.hevc?raw=true") + r = requests.get("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/video.hevc?raw=true", timeout=10) fp.write(r.content) fp.flush() diff --git a/tools/replay/replay.h b/tools/replay/replay.h index 86d609683..e86c453f7 100644 --- a/tools/replay/replay.h +++ b/tools/replay/replay.h @@ -26,6 +26,9 @@ enum class FindFlag { nextEngagement, nextDisEngagement, nextUserFlag, + nextInfo, + nextWarning, + nextCritical }; enum class TimelineType { None, Engaged, AlertInfo, AlertWarning, AlertCritical, UserFlag }; @@ -61,7 +64,7 @@ signals: void streamStarted(); protected slots: - void segmentLoadFinished(bool sucess); + void segmentLoadFinished(bool success); protected: typedef std::map> SegmentMap;