Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot] 81d7957c0a sunnypilot v2026.003.000
version: sunnypilot v2026.003.000 (staging)
date: 2026-09-18T23:38:18
master commit: a5f44653d7
2026-09-18 23:38:18 +00:00
37 changed files with 3086 additions and 3647 deletions
@@ -130,7 +130,6 @@ class CarHarness(EnumBase):
hyundai_p = BaseCarHarness("Hyundai P connector")
hyundai_q = BaseCarHarness("Hyundai Q connector")
hyundai_r = BaseCarHarness("Hyundai R connector")
hyundai_s = BaseCarHarness("Hyundai S connector")
custom = BaseCarHarness("Developer connector")
obd_ii = BaseCarHarness("OBD-II connector", parts=[Cable.long_obdc_cable], has_connector=False)
gm = BaseCarHarness("GM connector", parts=[Accessory.harness_box])
@@ -200,7 +200,6 @@ class CarController(CarControllerBase, EsccCarController, LeadDataCarController,
lka_steering = self.CP.flags & HyundaiFlags.CANFD_LKA_STEER_MSG
lka_steering_long = lka_steering and self.CP.openpilotLongitudinalControl
ccnc_non_hda2 = self.CP.flags & HyundaiFlags.CCNC and not lka_steering
# steering control
can_sends.extend(hyundaicanfd.create_steering_messages(self.packer, self.CP, self.CAN, CC.enabled, apply_steer_req, apply_torque, self.lkas_icon))
@@ -212,12 +211,7 @@ class CarController(CarControllerBase, EsccCarController, LeadDataCarController,
# LFA and HDA icons
if self.frame % 5 == 0 and (not lka_steering or lka_steering_long):
if ccnc_non_hda2:
can_sends.extend(hyundaicanfd.create_ccnc(self.packer, self.CAN, self.CP.openpilotLongitudinalControl, CC.enabled, CC.hudControl, CC.leftBlinker,
CC.rightBlinker, CS.msg_161, CS.msg_162, CS.msg_1b5, CS.is_metric, CS.out, CS.main_cruise_enabled,
self.lfa_icon))
else:
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled, self.lfa_icon))
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled, self.lfa_icon))
# blinkers
if lka_steering and self.CP.flags & HyundaiFlags.CANFD_ENABLE_BLINKERS:
@@ -226,12 +220,11 @@ class CarController(CarControllerBase, EsccCarController, LeadDataCarController,
if self.CP.openpilotLongitudinalControl:
if lka_steering:
can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame))
elif not ccnc_non_hda2:
else:
can_sends.extend(hyundaicanfd.create_fca_warning_light(self.packer, self.CAN, self.frame))
if self.frame % 2 == 0:
can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
set_speed_in_units, hud_control, self.lead_data, CS.main_cruise_enabled, self.tuning,
CS.cruise_info if ccnc_non_hda2 else None))
set_speed_in_units, hud_control, self.lead_data, CS.main_cruise_enabled, self.tuning))
self.accel_last = accel
else:
# button presses
+1 -5
View File
@@ -64,7 +64,6 @@ class CarState(CarStateBase, EsccCarStateBase, MadsCarState, CarStateExt):
self.buttons_counter = 0
self.cruise_info = {}
self.msg_161, self.msg_162, self.msg_1b5 = {}, {}, {}
# On some cars, CLU15->CF_Clu_VehicleSpeed can oscillate faster than the dash updates. Sample at 5 Hz
self.cluster_speed = 0
@@ -259,11 +258,8 @@ class CarState(CarStateBase, EsccCarStateBase, MadsCarState, CarStateExt):
# TODO: alt signal usage may be described by cp.vl['BLINKERS']['USE_ALT_LAMP']
left_blinker_sig, right_blinker_sig = "LEFT_LAMP", "RIGHT_LAMP"
if self.CP.flags & HyundaiFlags.CCNC:
if self.CP.carFingerprint == CAR.HYUNDAI_KONA_EV_2ND_GEN:
left_blinker_sig, right_blinker_sig = "LEFT_LAMP_ALT", "RIGHT_LAMP_ALT"
if not self.CP.flags & HyundaiFlags.CANFD_LKA_STEER_MSG:
self.msg_161, self.msg_162, self.msg_1b5 = map(copy.copy, (cp_cam.vl["CCNC_0x161"], cp_cam.vl["CCNC_0x162"], cp_cam.vl["FR_CMR_03_50ms"]))
self.cruise_info = copy.copy((cp_cam if self.CP.flags & HyundaiFlags.CANFD_CAMERA_SCC else cp).vl["SCC_CONTROL"])
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["BLINKERS"][left_blinker_sig],
cp.vl["BLINKERS"][right_blinker_sig])
if self.CP.enableBsm:
@@ -220,16 +220,6 @@ FW_VERSIONS = {
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.07 99211-L1000 211223',
],
},
CAR.HYUNDAI_SONATA_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DN8 MFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.02 99211-L1800 250613',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
],
},
CAR.HYUNDAI_SONATA_LF: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00LF__ SCC F-CUP 1.00 1.00 96401-C2200 ',
@@ -580,16 +570,6 @@ FW_VERSIONS = {
b'\xf1\x00OS9 LKAS AT USA LHD 1.00 1.00 95740-J9300 g21',
],
},
CAR.HYUNDAI_KONA_2ND_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.03 99211-BE000 230517',
b'\xf1\x00SX2 MFC AT USA LHD 1.00 1.07 99211-BE000 240611',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE000 ',
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE500 ',
],
},
CAR.KIA_CEED: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00CD__ SCC F-CUP 1.00 1.00 99110-J7500 ',
@@ -625,17 +605,6 @@ FW_VERSIONS = {
b'\xf1\x00BD__ SCC H-CUP 1.00 1.02 99110-M6000 ',
],
},
CAR.KIA_K4_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00CL4 MFC AT CAN LHD 1.00 1.02 99210-GG000 240708',
b'\xf1\x00CL4 MFC AT USA LHD 1.00 1.02 99210-GG000 240708',
b'\xf1\x00CL4 MFC AT USA LHD 1.00 1.04 99210-GG100 251205',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00CL4_ RDR ----- 1.00 1.01 99110-GG000 ',
b'\xf1\x00CL4_ RDR ----- 1.00 1.01 99110-GG100 ',
],
},
CAR.KIA_K5_2021: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DL3_ SCC F-CUP 1.00 1.03 99110-L2100 ',
@@ -668,14 +637,6 @@ FW_VERSIONS = {
b'\xf1\x00DL ESC \t 102"\x08\x10 58910-L3800',
],
},
CAR.KIA_K5_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DL3 MFC AT USA LHD 1.00 1.04 99210-L2500 240117',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DL3_ RDR ----- 1.00 1.01 99110-L2500 ',
],
},
CAR.KIA_K5_HEV_2020: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DLhe SCC FHCUP 1.00 1.02 99110-L7000 ',
@@ -762,7 +723,6 @@ FW_VERSIONS = {
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00SX2EMFC AT KOR LHD 1.00 1.00 99211-BF000 230410',
b'\xf1\x00SX2EMFC AT USA LHD 1.00 1.02 99211-BF000 230823',
],
},
CAR.KIA_NIRO_EV: {
@@ -1021,18 +981,6 @@ FW_VERSIONS = {
b'\xf1\x00OSH LKAS AT KOR LHD 1.00 1.01 95740-CM000 l31',
],
},
CAR.HYUNDAI_KONA_HEV_2ND_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00SX2HMFC AT AUS RHD 1.00 1.00 99211-BE001 241015',
b'\xf1\x00SX2HMFC AT AUS RHD 1.00 1.01 99211-BE001 250117',
b'\xf1\x00SX2HMFC AT EUR LHD 1.00 1.01 99211-BE001 250117',
b'\xf1\x00SX2HMFC AT EUR RHD 1.00 1.04 99211-BE000 231010',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE000 ',
b'\xf1\x00SX2_ RDR ----- 1.00 1.02 99110-BE500 ',
],
},
CAR.HYUNDAI_SONATA_HYBRID: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DNhe SCC F-CUP 1.00 1.02 99110-L5000 ',
@@ -1054,16 +1002,6 @@ FW_VERSIONS = {
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.07 99211-L1000 211223',
],
},
CAR.HYUNDAI_SONATA_HEV_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DN8HMFC AT KOR LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.01 99211-L1800 230512',
b'\xf1\x00DN8HMFC AT USA LHD 1.00 1.02 99211-L1800 250613',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DN8_ RDR ----- 1.00 1.00 99110-L1800 ',
],
},
CAR.KIA_SORENTO: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00UMP LKAS AT AUS RHD 1.00 1.00 96400-C6550 S30',
@@ -1131,17 +1069,6 @@ FW_VERSIONS = {
b'\xf1\x00NE1 MFC AT USA LHD 1.00 1.06 99211-GI010 230110',
],
},
CAR.HYUNDAI_IONIQ_5_N: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00NE1N RDR ----- 1.00 1.00 99110-NI000 ',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NE1NMFC AT KOR LHD 1.00 1.04 99211-NI000 231219',
b'\xf1\x00NE1NMFC AT KOR LHD 1.00 1.00 99211-NI010 240712',
b'\xf1\x00NE1NMFC AT USA LHD 1.00 1.04 99211-NI000 231219',
b'\xf1\x00NE1NMFC AT USA LHD 1.00 1.00 99211-NI110 250404',
],
},
CAR.HYUNDAI_IONIQ_6: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00CE__ RDR ----- 1.00 1.01 99110-KL000 ',
@@ -1180,38 +1107,6 @@ FW_VERSIONS = {
b'\xf1\x00NX4__ 1.01 1.02 99110-N9000 ',
],
},
CAR.HYUNDAI_TUCSON_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NX4 FR_CMR AT GEN LHD 1.00 1.00 99211-N7030 C55',
b'\xf1\x00NX4 FR_CMR AT GEN LHD 1.00 1.00 99211-N7035 C5C',
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.01 99211-N7050 C5A',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00NX4__ 1.00 1.02 99110N7000 ',
b'\xf1\x00NX4__ 1.00 1.03 99110N7100 ',
],
},
CAR.HYUNDAI_TUCSON_HEV_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NX4 FR_CMR AT EUR LHD 1.00 1.00 99211-N7030 C55',
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7030 C55',
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7035 C5C',
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7060 C5B',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00NX4__ 1.00 1.02 99110N7000 ',
b'\xf1\x00NX4__ 1.00 1.02 99110N7100 ',
b'\xf1\x00NX4__ 1.00 1.03 99110N7100 ',
],
},
CAR.HYUNDAI_TUCSON_PHEV_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NX4 FR_CMR AT CAN LHD 1.00 1.00 99211-N7030 C55',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00NX4__ 1.00 1.02 99110N7100 ',
],
},
CAR.HYUNDAI_SANTA_CRUZ_1ST_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-CW000 14M',
@@ -1223,14 +1118,6 @@ FW_VERSIONS = {
b'\xf1\x00NX4__ 1.01 1.00 99110-K5000 ',
],
},
CAR.HYUNDAI_SANTA_CRUZ_2025: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N7030 C55',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00NX4__ 1.00 1.00 99110K5500 ',
],
},
CAR.KIA_SPORTAGE_5TH_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00NQ5 FR_CMR AT AUS RHD 1.00 1.00 99211-P1040 663',
@@ -1303,16 +1190,6 @@ FW_VERSIONS = {
b'\xf1\x00MQ4_ SCC FHCUP 1.00 1.08 99110-P2000 ',
],
},
CAR.KIA_SORENTO_2024: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00MQ4 MFC AT AUS RHD 1.01 1.04 99210-P2550 231127',
b'\xf1\x00MQ4 MFC AT USA LHD 1.01 1.04 99210-R5500 231127',
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00MQ4_ RDR ----- 1.00 1.01 99110-P2500 ',
b'\xf1\x00MQ4_ RDR ----- 1.00 1.01 99110-R5500 ',
],
},
CAR.KIA_SORENTO_HEV_4TH_GEN: {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00MQ4HMFC AT KOR LHD 1.00 1.04 99210-P2000 200330',
@@ -1,6 +1,5 @@
import numpy as np
from opendbc.car import CanBusBase
from opendbc.car.common.conversions import Conversions as CV
from opendbc.car.crc import CRC16_XMODEM
from opendbc.car.hyundai.values import HyundaiFlags
from opendbc.sunnypilot.car.hyundai.lead_data_ext import CanFdLeadData
@@ -126,106 +125,8 @@ def create_lfahda_cluster(packer, CAN, enabled, lfa_icon):
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)
def create_ccnc(packer, CAN, openpilot_longitudinal_control, enabled, hud, left_blinker, right_blinker, msg_161, msg_162, msg_1b5,
is_metric, out, main_cruise_enabled, lfa_icon):
for f in {"FAULT_LSS", "FAULT_HDA", "FAULT_DAS", "FAULT_LFA", "FAULT_DAW", "FAULT_ESS"}:
msg_162[f] = 0
if msg_161["ALERTS_2"] == 5:
msg_161.update({"ALERTS_2": 0, "SOUNDS_2": 0})
if msg_161["ALERTS_3"] == 17:
msg_161["ALERTS_3"] = 0
if msg_161["ALERTS_5"] in (2, 5):
msg_161["ALERTS_5"] = 0
if msg_161["SOUNDS_4"] == 2 and msg_161["LFA_ICON"] in (0, 3):
msg_161["SOUNDS_4"] = 0
LANE_CHANGE_SPEED_MIN = 8.9408 # 20 mph
any_blinker = left_blinker or right_blinker
curvature = {i: (31 if i == -1 else 13 - abs(i + 15)) if i < 0 else 15 + i for i in range(-15, 16)}
msg_161.update({
"DAW_ICON": 0,
"LKA_ICON": 0,
"LFA_ICON": 2 if lfa_icon else 0,
"CENTERLINE": 1 if lfa_icon else 0,
"LANELINE_CURVATURE": curvature[max(-15, min(int(out.steeringAngleDeg / 4.5), 15))] if lfa_icon and not any_blinker else 15,
"LANELINE_LEFT": (0 if not lfa_icon else 1 if not hud.leftLaneVisible else 4 if hud.leftLaneDepart else 6 if any_blinker else 2),
"LANELINE_RIGHT": (0 if not lfa_icon else 1 if not hud.rightLaneVisible else 4 if hud.rightLaneDepart else 6 if any_blinker else 2),
"LCA_LEFT_ICON": (0 if not lfa_icon or out.vEgo < LANE_CHANGE_SPEED_MIN else 1 if out.leftBlindspot else 2 if any_blinker else 4),
"LCA_RIGHT_ICON": (0 if not lfa_icon or out.vEgo < LANE_CHANGE_SPEED_MIN else 1 if out.rightBlindspot else 2 if any_blinker else 4),
"LCA_LEFT_ARROW": 2 if left_blinker else 0,
"LCA_RIGHT_ARROW": 2 if right_blinker else 0,
})
if lfa_icon and any_blinker:
left_lane_raw, right_lane_raw = msg_1b5["Info_LftLnPosVal"], msg_1b5["Info_RtLnPosVal"]
scale_per_m = 15 / 1.7
left_lane = abs(int(round(15 + (left_lane_raw - 1.7) * scale_per_m)))
right_lane = abs(int(round(15 + (right_lane_raw - 1.7) * scale_per_m)))
if msg_1b5["Info_LftLnQualSta"] not in (2, 3):
left_lane = 0
if msg_1b5["Info_RtLnQualSta"] not in (2, 3):
right_lane = 0
if left_lane_raw == -2.0248375:
left_lane = 30 - right_lane
if right_lane_raw == 2.0248375:
right_lane = 30 - left_lane
if left_lane_raw == right_lane_raw == 0:
left_lane = right_lane = 15
elif left_lane_raw == 0:
left_lane = 30 - right_lane
elif right_lane_raw == 0:
right_lane = 30 - left_lane
total = left_lane + right_lane
if total == 0:
left_lane = right_lane = 15
else:
left_lane = round((left_lane / total) * 30)
right_lane = 30 - left_lane
msg_161["LANELINE_LEFT_POSITION"] = left_lane
msg_161["LANELINE_RIGHT_POSITION"] = right_lane
if hud.leftLaneDepart or hud.rightLaneDepart:
msg_162["VIBRATE"] = 1
if openpilot_longitudinal_control:
if msg_161["ALERTS_3"] in (1, 2, 3, 4, 7, 8, 9, 10):
msg_161["ALERTS_3"] = 0
if msg_161["ALERTS_5"] == 4:
msg_161["ALERTS_5"] = 0
if msg_161["SOUNDS_3"] == 5:
msg_161["SOUNDS_3"] = 0
msg_161.update({
"SETSPEED": 3 if enabled else 1,
"SETSPEED_HUD": 0 if not main_cruise_enabled else 2 if enabled else 1,
"SETSPEED_SPEED": (
255 if not main_cruise_enabled else
(40 if is_metric else 25) if (s := round(out.vCruiseCluster * (1 if is_metric else CV.KPH_TO_MPH))) > (145 if is_metric else 90) else s
),
"DISTANCE": hud.leadDistanceBars,
"DISTANCE_SPACING": 0 if not main_cruise_enabled else 1 if enabled else 3,
"DISTANCE_LEAD": 0 if not main_cruise_enabled else 2 if enabled and hud.leadVisible else 1 if hud.leadVisible else 0,
"DISTANCE_CAR": 0 if not main_cruise_enabled else 2 if enabled else 1,
"SLA_ICON": 0,
"NAV_ICON": 0,
"TARGET": 0,
})
msg_162["LEAD"] = 0 if not main_cruise_enabled else 2 if enabled else 1
msg_162["LEAD_DISTANCE"] = msg_1b5["Longitudinal_Distance"]
return [packer.make_can_msg(msg, CAN.ECAN, data) for msg, data in [("CCNC_0x161", msg_161), ("CCNC_0x162", msg_162)]]
def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_override, set_speed, hud_control,
lead_data: CanFdLeadData, main_cruise_enabled, tuning, cruise_info=None):
lead_data: CanFdLeadData, main_cruise_enabled, tuning):
jerk = 5
jn = jerk / 50
if not enabled or gas_override:
@@ -253,8 +154,6 @@ def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_ov
"SET_ME_TMP_64": 0x64,
"DISTANCE_SETTING": hud_control.leadDistanceBars,
}
if cruise_info:
values.update({s: cruise_info[s] for s in ["ACC_ObjDist", "ACC_ObjRelSpd"]})
return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values)
@@ -85,8 +85,6 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[-1].safetyParam |= HyundaiSafetyFlags.CANFD_ALT_BUTTONS.value
if ret.flags & HyundaiFlags.CANFD_CAMERA_SCC:
ret.safetyConfigs[-1].safetyParam |= HyundaiSafetyFlags.CAMERA_SCC.value
if ret.flags & HyundaiFlags.CCNC and not ret.flags & HyundaiFlags.CANFD_LKA_STEER_MSG:
ret.safetyConfigs[-1].safetyParam |= HyundaiSafetyFlags.CCNC.value
else:
# Shared configuration for non CAN-FD cars
@@ -22,11 +22,7 @@ NO_DATES_PLATFORMS = {
# CAN FD
CAR.KIA_SPORTAGE_5TH_GEN,
CAR.HYUNDAI_SANTA_CRUZ_1ST_GEN,
CAR.HYUNDAI_SANTA_CRUZ_2025,
CAR.HYUNDAI_TUCSON_4TH_GEN,
CAR.HYUNDAI_TUCSON_2025,
CAR.HYUNDAI_TUCSON_HEV_2025,
CAR.HYUNDAI_TUCSON_PHEV_2025,
# CAN
CAR.HYUNDAI_ELANTRA,
CAR.HYUNDAI_ELANTRA_GT_I30,
+3 -72
View File
@@ -68,7 +68,6 @@ class HyundaiSafetyFlags(IntFlag):
CANFD_LKA_STEER_MSG_ALT = 128
FCEV_GAS = 256
ALT_LIMITS_2 = 512
CCNC = 1024
# Hyundai/Kia/Genesis SCC (Smart Cruise Control) and steering architecture:
@@ -150,8 +149,6 @@ class HyundaiFlags(IntFlag):
ALT_LIMITS_2 = 2 ** 26
CCNC = 2 ** 27
@dataclass
class HyundaiCarDocs(CarDocs):
@@ -288,16 +285,6 @@ class CAR(Platforms):
CarSpecs(mass=1491, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CAMERA_SCC | HyundaiFlags.ALT_LIMITS_2,
)
HYUNDAI_KONA_2ND_GEN = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Kona (without HDA II) 2024-25", car_parts=CarParts.common([CarHarness.hyundai_l]))],
CarSpecs(mass=1590, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_KONA_HEV_2ND_GEN = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Hybrid (without HDA II) 2024-26", car_parts=CarParts.common([CarHarness.hyundai_l]))],
CarSpecs(mass=1590, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_KONA_EV = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Electric 2018-21", car_parts=CarParts.common([CarHarness.hyundai_g]))],
CarSpecs(mass=1685, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385),
@@ -309,13 +296,10 @@ class CAR(Platforms):
flags=HyundaiFlags.CAMERA_SCC | HyundaiFlags.EV | HyundaiFlags.ALT_LIMITS,
)
HYUNDAI_KONA_EV_2ND_GEN = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Hyundai Kona Electric (with HDA II, Korea only) 2023", video="https://www.youtube.com/watch?v=U2fOCmcQ8hw",
car_parts=CarParts.common([CarHarness.hyundai_r])),
HyundaiCarDocs("Hyundai Kona Electric (without HDA II) 2024", car_parts=CarParts.common([CarHarness.hyundai_a])),
],
[HyundaiCarDocs("Hyundai Kona Electric (with HDA II, Korea only) 2023", video="https://www.youtube.com/watch?v=U2fOCmcQ8hw",
car_parts=CarParts.common([CarHarness.hyundai_r]))],
CarSpecs(mass=1740, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385),
flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE | HyundaiFlags.CCNC,
flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE,
)
HYUNDAI_KONA_HEV = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Hybrid 2020", car_parts=CarParts.common([CarHarness.hyundai_i]))], # TODO: check packages,
@@ -355,11 +339,6 @@ class CAR(Platforms):
CarSpecs(mass=1513, wheelbase=2.84, steerRatio=13.27 * 1.15, tireStiffnessFactor=0.65), # 15% higher at the center seems reasonable
flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8,
)
HYUNDAI_SONATA_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata (without HDA II) 2024-26", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=1556, wheelbase=2.84, steerRatio=12.81),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_SONATA_LF = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata 2018-19", car_parts=CarParts.common([CarHarness.hyundai_e]))],
CarSpecs(mass=1536, wheelbase=2.804, steerRatio=13.27 * 1.15), # 15% higher at the center seems reasonable
@@ -395,11 +374,6 @@ class CAR(Platforms):
HYUNDAI_SONATA.specs,
flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID,
)
HYUNDAI_SONATA_HEV_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Sonata Hybrid (without HDA II) 2024-26", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=1616, wheelbase=2.84, steerRatio=13.27),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_IONIQ_5 = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Hyundai Ioniq 5 (Southeast Asia and Europe only) 2022-24", "All", car_parts=CarParts.common([CarHarness.hyundai_q])),
@@ -409,11 +383,6 @@ class CAR(Platforms):
CarSpecs(mass=1948, wheelbase=2.97, steerRatio=14.26, tireStiffnessFactor=0.65),
flags=HyundaiFlags.EV,
)
HYUNDAI_IONIQ_5_N = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Ioniq 5 N (with HDA II) 2024", car_parts=CarParts.common([CarHarness.hyundai_s]))],
CarSpecs(mass=2205, wheelbase=3.00, steerRatio=14.26, tireStiffnessFactor=1.3),
flags=HyundaiFlags.EV | HyundaiFlags.CCNC,
)
HYUNDAI_IONIQ_6 = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Hyundai Ioniq 6 (without HDA II) 2023-24", "Highway Driving Assist", car_parts=CarParts.common([CarHarness.hyundai_l])),
@@ -431,31 +400,11 @@ class CAR(Platforms):
],
CarSpecs(mass=1630, wheelbase=2.756, steerRatio=13.7, tireStiffnessFactor=0.385),
)
HYUNDAI_TUCSON_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Tucson (without HDA II) 2025-26", car_parts=CarParts.common([CarHarness.hyundai_n]))],
CarSpecs(mass=1630, wheelbase=2.756, steerRatio=13.7, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_TUCSON_HEV_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Tucson Hybrid (without HDA II) 2025-26", car_parts=CarParts.common([CarHarness.hyundai_n]))],
CarSpecs(mass=1630, wheelbase=2.756, steerRatio=13.7, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_TUCSON_PHEV_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Tucson Plug-in Hybrid (without HDA II) 2025", car_parts=CarParts.common([CarHarness.hyundai_n]))],
CarSpecs(mass=1630, wheelbase=2.756, steerRatio=13.7, tireStiffnessFactor=0.385),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_SANTA_CRUZ_1ST_GEN = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Santa Cruz 2022-24", car_parts=CarParts.common([CarHarness.hyundai_n]))],
# weight from Limited trim - the only supported trim, steering ratio according to Hyundai News https://www.hyundainews.com/assets/documents/original/48035-2022SantaCruzProductGuideSpecsv2081521.pdf
CarSpecs(mass=1870, wheelbase=3, steerRatio=14.2),
)
HYUNDAI_SANTA_CRUZ_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Hyundai Santa Cruz (without HDA II) 2025", car_parts=CarParts.common([CarHarness.hyundai_n]))],
CarSpecs(mass=1920, wheelbase=3, steerRatio=14.2),
flags=HyundaiFlags.CCNC,
)
HYUNDAI_CUSTIN_1ST_GEN = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Custin 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k]))],
CarSpecs(mass=1690, wheelbase=3.055, steerRatio=17), # mass: from https://www.hyundai-motor.com.tw/clicktobuy/custin#spec_0, steerRatio: from learner
@@ -470,24 +419,11 @@ class CAR(Platforms):
],
CarSpecs(mass=2878 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75, tireStiffnessFactor=0.5)
)
KIA_K4_2025 = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Kia K4 (without HDA II) 2025-26", car_parts=CarParts.common([CarHarness.hyundai_a])),
HyundaiCarDocs("Kia K4 (with HDA II) 2025", car_parts=CarParts.common([CarHarness.hyundai_r])),
],
CarSpecs(mass=2987 * CV.LB_TO_KG, wheelbase=2.72, steerRatio=13.4),
flags=HyundaiFlags.CCNC,
)
KIA_K5_2021 = HyundaiPlatformConfig(
[HyundaiCarDocs("Kia K5 2021-24", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=3381 * CV.LB_TO_KG, wheelbase=2.85, steerRatio=13.27, tireStiffnessFactor=0.5), # 2021 Kia K5 Steering Ratio (all trims)
flags=HyundaiFlags.CHECKSUM_CRC8,
)
KIA_K5_2025 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Kia K5 (without HDA II) 2025-26", car_parts=CarParts.common([CarHarness.hyundai_m]))],
CarSpecs(mass=3230 * CV.LB_TO_KG, wheelbase=2.85, steerRatio=13.27),
flags=HyundaiFlags.CCNC,
)
KIA_K5_HEV_2020 = HyundaiPlatformConfig(
[HyundaiCarDocs("Kia K5 Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_a]))],
KIA_K5_2021.specs,
@@ -598,11 +534,6 @@ class CAR(Platforms):
CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms
flags=HyundaiFlags.CANFD_RADAR_SCC,
)
KIA_SORENTO_2024 = HyundaiCanFDPlatformConfig(
[HyundaiCarDocs("Kia Sorento (without HDA II) 2024-25", car_parts=CarParts.common([CarHarness.hyundai_a]))],
CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5),
flags=HyundaiFlags.CCNC,
)
KIA_SORENTO_HEV_4TH_GEN = HyundaiCanFDPlatformConfig(
[
HyundaiCarDocs("Kia Sorento Hybrid 2021-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])),
-12
View File
@@ -29,9 +29,6 @@ non_tested_cars = [
SUBARU.SUBARU_FORESTER_HYBRID,
VOLKSWAGEN.PORSCHE_MACAN_MK1,
HONDA.ACURA_TLX_2G,
HYUNDAI.KIA_SORENTO_2024,
HYUNDAI.HYUNDAI_IONIQ_5_N,
HYUNDAI.HYUNDAI_TUCSON_PHEV_2025,
# These had their DSUs unplugged, need new routes
# TOYOTA.LEXUS_ES # hybrid
@@ -169,7 +166,6 @@ routes = [
CarTestRoute("66eaa6c3b6b2afc6/00000009--3a5199aabe", HYUNDAI.GENESIS_G80_2ND_GEN_FL), # LKA steering
CarTestRoute("0bbe367c98fa1538/2023-09-16--00-16-49", HYUNDAI.HYUNDAI_CUSTIN_1ST_GEN),
CarTestRoute("f0709d2bc6ca451f/2022-10-15--08-13-54", HYUNDAI.HYUNDAI_SANTA_CRUZ_1ST_GEN),
CarTestRoute("6e7904b03a4aafc2/00000010--31034184b6", HYUNDAI.HYUNDAI_SANTA_CRUZ_2025),
CarTestRoute("4dbd55df87507948/2022-03-01--09-45-38", HYUNDAI.HYUNDAI_SANTA_FE),
CarTestRoute("bf43d9df2b660eb0/2021-09-23--14-16-37", HYUNDAI.HYUNDAI_SANTA_FE_2022),
CarTestRoute("37398f32561a23ad/2021-11-18--00-11-35", HYUNDAI.HYUNDAI_SANTA_FE_HEV_2022),
@@ -183,14 +179,11 @@ routes = [
CarTestRoute("6a42c1197b2a8179/2023-09-21--10-23-44", HYUNDAI.KIA_OPTIMA_H_G4_FL),
CarTestRoute("c75a59efa0ecd502/2021-03-11--20-52-55", HYUNDAI.KIA_SELTOS),
CarTestRoute("5b7c365c50084530/2020-04-15--16-13-24", HYUNDAI.HYUNDAI_SONATA),
CarTestRoute("4267ea8a353cdb36/00000262--8a427003c7", HYUNDAI.HYUNDAI_SONATA_2024, segment=34),
CarTestRoute("b2a38c712dcf90bd/2020-05-18--18-12-48", HYUNDAI.HYUNDAI_SONATA_LF),
CarTestRoute("c344fd2492c7a9d2/2023-12-11--09-03-23", HYUNDAI.HYUNDAI_STARIA_4TH_GEN),
CarTestRoute("fb3fd42f0baaa2f8/2022-03-30--15-25-05", HYUNDAI.HYUNDAI_TUCSON),
CarTestRoute("db68bbe12250812c/2022-12-05--00-54-12", HYUNDAI.HYUNDAI_TUCSON_4TH_GEN), # 2023
CarTestRoute("36e10531feea61a4/2022-07-25--13-37-42", HYUNDAI.HYUNDAI_TUCSON_4TH_GEN), # hybrid
CarTestRoute("a01ca5d4f394c812/00000000--e98b7e4414", HYUNDAI.HYUNDAI_TUCSON_2025),
CarTestRoute("22f9090014364a87/00000002--4cc739c0b2", HYUNDAI.HYUNDAI_TUCSON_HEV_2025),
CarTestRoute("5875672fc1d4bf57/2020-07-23--21-33-28", HYUNDAI.KIA_SORENTO),
CarTestRoute("1d0d000db3370fd0/2023-01-04--22-28-42", HYUNDAI.KIA_SORENTO_4TH_GEN, segment=5),
CarTestRoute("fc19648042eb6896/2023-08-16--11-43-27", HYUNDAI.KIA_SORENTO_HEV_4TH_GEN, segment=14),
@@ -208,8 +201,6 @@ routes = [
CarTestRoute("ab59fe909f626921/2021-10-18--18-34-28", HYUNDAI.HYUNDAI_IONIQ_HEV_2022),
CarTestRoute("22d955b2cd499c22/2020-08-10--19-58-21", HYUNDAI.HYUNDAI_KONA),
CarTestRoute("0099bdb24d82951b/00000005--c38d940b04", HYUNDAI.HYUNDAI_KONA_2022),
CarTestRoute("32025f26789d8fab/00000022--a499e8ffa3", HYUNDAI.HYUNDAI_KONA_2ND_GEN),
CarTestRoute("97ca61196eb73e0d/00000052--4555329470", HYUNDAI.HYUNDAI_KONA_HEV_2ND_GEN),
CarTestRoute("efc48acf44b1e64d/2021-05-28--21-05-04", HYUNDAI.HYUNDAI_KONA_EV),
CarTestRoute("f90d3cd06caeb6fa/2023-09-06--17-15-47", HYUNDAI.HYUNDAI_KONA_EV), # openpilot longitudinal enabled
CarTestRoute("ff973b941a69366f/2022-07-28--22-01-19", HYUNDAI.HYUNDAI_KONA_EV_2022, segment=11),
@@ -223,9 +214,7 @@ routes = [
CarTestRoute("d545129f3ca90f28/2022-10-19--09-22-54", HYUNDAI.KIA_EV6), # LKA steering
CarTestRoute("68d6a96e703c00c9/2022-09-10--16-09-39", HYUNDAI.KIA_EV6), # LFA steering
CarTestRoute("9b25e8c1484a1b67/2023-04-13--10-41-45", HYUNDAI.KIA_EV6),
CarTestRoute("baf39eeaba1217ca/00000002--b36e3fa031", HYUNDAI.KIA_K4_2025),
CarTestRoute("007d5e4ad9f86d13/2021-09-30--15-09-23", HYUNDAI.KIA_K5_2021),
CarTestRoute("c4a804b067623789/0000007c--163f831540", HYUNDAI.KIA_K5_2025),
CarTestRoute("c58dfc9fc16590e0/2023-01-14--13-51-48", HYUNDAI.KIA_K5_HEV_2020),
CarTestRoute("74fbff45aa20fe9e/00000010--6f173d5799", HYUNDAI.KIA_K7_2017),
CarTestRoute("78ad5150de133637/2023-09-13--16-15-57", HYUNDAI.KIA_K8_HEV_1ST_GEN),
@@ -244,7 +233,6 @@ routes = [
CarTestRoute("82e9cdd3f43bf83e/2021-05-15--02-42-51", HYUNDAI.HYUNDAI_ELANTRA_2021),
CarTestRoute("715ac05b594e9c59/2021-06-20--16-21-07", HYUNDAI.HYUNDAI_ELANTRA_HEV_2021),
CarTestRoute("7120aa90bbc3add7/2021-08-02--07-12-31", HYUNDAI.HYUNDAI_SONATA_HYBRID),
CarTestRoute("bc40c72b728178f2/00000006--ee76ae8c42", HYUNDAI.HYUNDAI_SONATA_HEV_2024),
CarTestRoute("715ac05b594e9c59/2021-10-27--23-24-56", HYUNDAI.GENESIS_G70_2020),
CarTestRoute("6b0d44d22df18134/2023-05-06--10-36-55", HYUNDAI.GENESIS_GV80),
@@ -105,13 +105,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"JEEP_CHEROKEE_5TH_GEN" = [1.5, 1.5, 0.15]
"ACURA_MDX_4G" = [1.4, 1.4, 0.17]
"ACURA_RDX_3G_MMR" = [1.5, 1.5, 0.16]
"HYUNDAI_KONA_2ND_GEN" = [2.5, 2.5, 0.1]
"HYUNDAI_KONA_HEV_2ND_GEN" = [2.5, 2.5, 0.1]
"KIA_SORENTO_2024" = [2.5, 2.5, 0.1]
"KIA_K5_2025" = [2.5, 2.5, 0.1]
"KIA_K4_2025" = [2.5, 2.5, 0.1]
"HYUNDAI_SANTA_CRUZ_2025" = [2.5, 2.5, 0.1]
"HYUNDAI_IONIQ_5_N" = [2.5, 2.5, 0.005]
# Dashcam or fallback configured as ideal car
"MOCK" = [10.0, 10, 0.0]
@@ -45,11 +45,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"GENESIS_G90" = "GENESIS_G70"
"GENESIS_G80" = "GENESIS_G70"
"GENESIS_G70_2020" = "HYUNDAI_SONATA"
"HYUNDAI_SONATA_2024" = "HYUNDAI_SONATA"
"HYUNDAI_SONATA_HEV_2024" = "HYUNDAI_SONATA_HYBRID"
"HYUNDAI_TUCSON_2025" = "HYUNDAI_TUCSON_4TH_GEN"
"HYUNDAI_TUCSON_HEV_2025" = "HYUNDAI_TUCSON_4TH_GEN"
"HYUNDAI_TUCSON_PHEV_2025" = "HYUNDAI_TUCSON_4TH_GEN"
"HONDA_FREED" = "HONDA_ODYSSEY"
"HONDA_CRV_EU" = "HONDA_CRV"
@@ -951,7 +951,7 @@ CM_ SG_ 1041 COUNTER_ALT "only increments on change";
CM_ BO_ 1043 "Lamp signals do not seem universal on cars that use LKAS_ALT, but stalk signals do.";
CM_ SG_ 1043 COUNTER_ALT "only increments on change";
CM_ SG_ 1043 USE_ALT_LAMP "likely 1 on cars that use alt lamp signals";
VAL_ 53 GEAR 0 "P" 4 "S" 5 "D" 6 "N" 7 "R";
VAL_ 53 GEAR 0 "P" 5 "D" 6 "N" 7 "R";
VAL_ 64 GEAR 0 "P" 5 "D" 6 "N" 7 "R";
VAL_ 69 GEAR 0 "P" 5 "D" 6 "N" 7 "R";
VAL_ 96 TRACTION_AND_STABILITY_CONTROL 0 "On" 5 "Limited" 1 "Off";
@@ -227,7 +227,6 @@ static bool hyundai_canfd_tx_hook(const CANPacket_t *msg) {
static safety_config hyundai_canfd_init(uint16_t param) {
const uint16_t HYUNDAI_PARAM_CANFD_LKA_STEER_MSG_ALT = 128;
const uint16_t HYUNDAI_PARAM_CANFD_ALT_BUTTONS = 32;
const uint16_t HYUNDAI_PARAM_CCNC = 1024;
static const CanMsg HYUNDAI_CANFD_LKA_STEER_MSG_TX_MSGS[] = {
HYUNDAI_CANFD_LKA_STEER_MSG_COMMON_TX_MSGS(0, 1)
@@ -272,21 +271,11 @@ static safety_config hyundai_canfd_init(uint16_t param) {
HYUNDAI_CANFD_SCC_CONTROL_COMMON_TX_MSGS(0, (longitudinal)) \
{0x160, 0, 16, .check_relay = (longitudinal)}, /* ADRV_0x160 */ \
#define HYUNDAI_CANFD_LFA_STEERING_CAMERA_SCC_CCNC_TX_MSGS(longitudinal) \
HYUNDAI_CANFD_CRUISE_BUTTON_TX_MSGS(2) \
HYUNDAI_CANFD_LFA_STEERING_COMMON_TX_MSGS(0) \
HYUNDAI_CANFD_SCC_CONTROL_COMMON_TX_MSGS(0, (longitudinal)) \
{0x161, 0, 32, .check_relay = true}, /* CCNC_0x161 */ \
{0x162, 0, 32, .check_relay = true}, /* CCNC_0x162 */ \
{0x7C4, 2, 8, .check_relay = true}, /* 0x7C4 */ \
{0xEA, 2, 24, .check_relay = true}, /* MDPS */ \
hyundai_common_init(param);
gen_crc_lookup_table_16(0x1021, hyundai_canfd_crc_lut);
hyundai_canfd_alt_buttons = GET_FLAG(param, HYUNDAI_PARAM_CANFD_ALT_BUTTONS);
hyundai_canfd_lka_steer_msg_alt = GET_FLAG(param, HYUNDAI_PARAM_CANFD_LKA_STEER_MSG_ALT);
const bool hyundai_ccnc = GET_FLAG(param, HYUNDAI_PARAM_CCNC);
safety_config ret;
if (hyundai_longitudinal) {
@@ -311,10 +300,6 @@ static safety_config hyundai_canfd_init(uint16_t param) {
HYUNDAI_CANFD_LFA_STEERING_CAMERA_SCC_TX_MSGS(true)
};
static CanMsg hyundai_canfd_lfa_steering_camera_scc_ccnc_tx_msgs[] = {
HYUNDAI_CANFD_LFA_STEERING_CAMERA_SCC_CCNC_TX_MSGS(true)
};
if (hyundai_canfd_alt_buttons) {
SET_RX_CHECKS(hyundai_canfd_alt_buttons_long_rx_checks, ret);
} else {
@@ -322,11 +307,7 @@ static safety_config hyundai_canfd_init(uint16_t param) {
}
if (hyundai_camera_scc) {
if (hyundai_ccnc) {
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_ccnc_tx_msgs, ret);
} else {
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_tx_msgs, ret);
}
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_tx_msgs, ret);
} else {
SET_TX_MSGS(HYUNDAI_CANFD_LFA_STEERING_LONG_TX_MSGS, ret);
}
@@ -387,15 +368,7 @@ static safety_config hyundai_canfd_init(uint16_t param) {
HYUNDAI_CANFD_LFA_STEERING_CAMERA_SCC_TX_MSGS(false)
};
static CanMsg hyundai_canfd_lfa_steering_camera_scc_ccnc_tx_msgs[] = {
HYUNDAI_CANFD_LFA_STEERING_CAMERA_SCC_CCNC_TX_MSGS(false)
};
if (hyundai_ccnc) {
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_ccnc_tx_msgs, ret);
} else {
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_tx_msgs, ret);
}
SET_TX_MSGS(hyundai_canfd_lfa_steering_camera_scc_tx_msgs, ret);
if (hyundai_canfd_alt_buttons) {
SET_RX_CHECKS(hyundai_canfd_alt_buttons_rx_checks, ret);
@@ -1019,8 +1019,6 @@ class SafetyTest(SafetyTestBase):
continue
if attr.startswith('TestHyundaiCanfd') and current_test.startswith('TestHyundaiCanfd'):
continue
if attr == 'TestElm327' and current_test.startswith(('TestHyundaiCanfdLFASteeringCCNC', 'TestHyundaiCanfdLFASteeringLongCCNC')):
tx = list(filter(lambda m: m[0] != 0x7C4, tx))
if {attr, current_test}.issubset({'TestHyundaiLongitudinalSafety', 'TestHyundaiLongitudinalSafetyCameraSCC', 'TestHyundaiSafetyFCEVLong'}):
continue
base_tests = {'TestHyundaiLongitudinalSafety', 'TestHyundaiLongitudinalSafetyCameraSCC', 'TestHyundaiSafetyFCEVLong',
@@ -21,8 +21,6 @@ ALL_GAS_EV_HYBRID_COMBOS = [
{"GAS_MSG": ("ACCELERATOR_ALT", "ACCELERATOR_PEDAL"), "SCC_BUS": 2, "SAFETY_PARAM": HyundaiSafetyFlags.HYBRID_GAS | HyundaiSafetyFlags.CAMERA_SCC},
]
CAMERA_SCC_COMBOS = ALL_GAS_EV_HYBRID_COMBOS[3:]
class TestHyundaiCanfdBase(HyundaiButtonBase, common.CarSafetyTest, common.DriverTorqueSteeringSafetyTest, common.SteerRequestCutSafetyTest):
@@ -310,48 +308,5 @@ class TestHyundaiCanfdLFASteeringLongAltButtons(TestHyundaiCanfdLFASteeringLongB
pass
class HyundaiCanfdCCNCTest:
CCNC_SAFETY_PARAM = HyundaiSafetyFlags.CCNC
@classmethod
def setUpClass(cls):
if cls.__name__ in (
"TestHyundaiCanfdLFASteeringCCNC",
"TestHyundaiCanfdLFASteeringLongCCNC",
):
cls.safety = None
raise unittest.SkipTest
def setUp(self):
self.packer = CANPackerSafety("hyundai_canfd_generated")
self.safety = libsafety_py.libsafety
self.safety.set_safety_hooks(CarParams.SafetyModel.hyundaiCanfd, self.CCNC_SAFETY_PARAM | self.SAFETY_PARAM)
self.safety.init_tests()
def test_ccnc_tx_msgs(self):
for msg, bus in (("CCNC_0x161", 0), ("CCNC_0x162", 0), ("MDPS", 2)):
self.assertTrue(self._tx(self.packer.make_can_msg_safety(msg, bus, {})))
self.assertTrue(self._tx(common.make_msg(2, 0x7C4)))
@parameterized_class(CAMERA_SCC_COMBOS)
class TestHyundaiCanfdLFASteeringCCNC(HyundaiCanfdCCNCTest, TestHyundaiCanfdLFASteeringBase):
TX_MSGS = [[0x12A, 0], [0x1E0, 0], [0x1CF, 2], [0x7C4, 2]]
RELAY_MALFUNCTION_ADDRS = {0: (0x12A, 0x1E0, 0x161, 0x162), 2: (0x7C4, 0xEA)}
FWD_BLACKLISTED_ADDRS = {2: [0x12A, 0x1E0, 0x161, 0x162], 0: [0x7C4, 0xEA]}
@parameterized_class(CAMERA_SCC_COMBOS)
class TestHyundaiCanfdLFASteeringLongCCNC(HyundaiCanfdCCNCTest, TestHyundaiCanfdLFASteeringLongBase):
CCNC_SAFETY_PARAM = HyundaiSafetyFlags.CCNC | HyundaiSafetyFlags.LONG
TX_MSGS = [[0x12A, 0], [0x1E0, 0], [0x1CF, 2], [0x7C4, 2], [0x1A0, 0]]
RELAY_MALFUNCTION_ADDRS = {0: (0x12A, 0x1E0, 0x161, 0x162, 0x1A0), 2: (0x7C4, 0xEA)}
FWD_BLACKLISTED_ADDRS = {2: [0x12A, 0x1E0, 0x161, 0x162, 0x1A0], 0: [0x7C4, 0xEA]}
if __name__ == "__main__":
unittest.main()
@@ -1620,16 +1620,6 @@
],
"package": "Highway Driving Assist"
},
"Hyundai Ioniq 5 N (with HDA II) 2024": {
"platform": "HYUNDAI_IONIQ_5_N",
"make": "Hyundai",
"brand": "hyundai",
"model": "Ioniq 5 N (with HDA II)",
"year": [
"2024"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Ioniq 6 (with HDA II) 2023-24": {
"platform": "HYUNDAI_IONIQ_6",
"make": "Hyundai",
@@ -1739,17 +1729,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona (without HDA II) 2024-25": {
"platform": "HYUNDAI_KONA_2ND_GEN",
"make": "Hyundai",
"brand": "hyundai",
"model": "Kona (without HDA II)",
"year": [
"2024",
"2025"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona Electric 2018-21": {
"platform": "HYUNDAI_KONA_EV",
"make": "Hyundai",
@@ -1784,16 +1763,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona Electric (without HDA II) 2024": {
"platform": "HYUNDAI_KONA_EV_2ND_GEN",
"make": "Hyundai",
"brand": "hyundai",
"model": "Kona Electric (without HDA II)",
"year": [
"2024"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona Electric Non-SCC 2019": {
"platform": "HYUNDAI_KONA_EV_NON_SCC",
"make": "Hyundai",
@@ -1814,18 +1783,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona Hybrid (without HDA II) 2024-26": {
"platform": "HYUNDAI_KONA_HEV_2ND_GEN",
"make": "Hyundai",
"brand": "hyundai",
"model": "Kona Hybrid (without HDA II)",
"year": [
"2024",
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Kona Non-SCC 2019": {
"platform": "HYUNDAI_KONA_NON_SCC",
"make": "Hyundai",
@@ -1870,16 +1827,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Santa Cruz (without HDA II) 2025": {
"platform": "HYUNDAI_SANTA_CRUZ_2025",
"make": "Hyundai",
"brand": "hyundai",
"model": "Santa Cruz (without HDA II)",
"year": [
"2025"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Santa Fe 2019-20": {
"platform": "HYUNDAI_SANTA_FE",
"make": "Hyundai",
@@ -1949,18 +1896,6 @@
],
"package": "All"
},
"Hyundai Sonata (without HDA II) 2024-26": {
"platform": "HYUNDAI_SONATA_2024",
"make": "Hyundai",
"brand": "hyundai",
"model": "Sonata (without HDA II)",
"year": [
"2024",
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Sonata Hybrid 2020-23": {
"platform": "HYUNDAI_SONATA_HYBRID",
"make": "Hyundai",
@@ -1974,18 +1909,6 @@
],
"package": "All"
},
"Hyundai Sonata Hybrid (without HDA II) 2024-26": {
"platform": "HYUNDAI_SONATA_HEV_2024",
"make": "Hyundai",
"brand": "hyundai",
"model": "Sonata Hybrid (without HDA II)",
"year": [
"2024",
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Staria 2023": {
"platform": "HYUNDAI_STARIA_4TH_GEN",
"make": "Hyundai",
@@ -2027,17 +1950,6 @@
],
"package": "All"
},
"Hyundai Tucson (without HDA II) 2025-26": {
"platform": "HYUNDAI_TUCSON_2025",
"make": "Hyundai",
"brand": "hyundai",
"model": "Tucson (without HDA II)",
"year": [
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Tucson Diesel 2019": {
"platform": "HYUNDAI_TUCSON",
"make": "Hyundai",
@@ -2060,17 +1972,6 @@
],
"package": "All"
},
"Hyundai Tucson Hybrid (without HDA II) 2025-26": {
"platform": "HYUNDAI_TUCSON_HEV_2025",
"make": "Hyundai",
"brand": "hyundai",
"model": "Tucson Hybrid (without HDA II)",
"year": [
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Tucson Plug-in Hybrid 2024": {
"platform": "HYUNDAI_TUCSON_4TH_GEN",
"make": "Hyundai",
@@ -2081,16 +1982,6 @@
],
"package": "All"
},
"Hyundai Tucson Plug-in Hybrid (without HDA II) 2025": {
"platform": "HYUNDAI_TUCSON_PHEV_2025",
"make": "Hyundai",
"brand": "hyundai",
"model": "Tucson Plug-in Hybrid (without HDA II)",
"year": [
"2025"
],
"package": "Smart Cruise Control (SCC)"
},
"Hyundai Veloster 2019-20": {
"platform": "HYUNDAI_VELOSTER",
"make": "Hyundai",
@@ -2239,27 +2130,6 @@
],
"package": "No Smart Cruise Control (Non-SCC)"
},
"Kia K4 (with HDA II) 2025": {
"platform": "KIA_K4_2025",
"make": "Kia",
"brand": "hyundai",
"model": "K4 (with HDA II)",
"year": [
"2025"
],
"package": "Smart Cruise Control (SCC)"
},
"Kia K4 (without HDA II) 2025-26": {
"platform": "KIA_K4_2025",
"make": "Kia",
"brand": "hyundai",
"model": "K4 (without HDA II)",
"year": [
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Kia K5 2021-24": {
"platform": "KIA_K5_2021",
"make": "Kia",
@@ -2273,17 +2143,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Kia K5 (without HDA II) 2025-26": {
"platform": "KIA_K5_2025",
"make": "Kia",
"brand": "hyundai",
"model": "K5 (without HDA II)",
"year": [
"2025",
"2026"
],
"package": "Smart Cruise Control (SCC)"
},
"Kia K5 Hybrid 2020-22": {
"platform": "KIA_K5_HEV_2020",
"make": "Kia",
@@ -2534,17 +2393,6 @@
],
"package": "Smart Cruise Control (SCC)"
},
"Kia Sorento (without HDA II) 2024-25": {
"platform": "KIA_SORENTO_2024",
"make": "Kia",
"brand": "hyundai",
"model": "Sorento (without HDA II)",
"year": [
"2024",
"2025"
],
"package": "Smart Cruise Control (SCC)"
},
"Kia Sorento Hybrid 2021-23": {
"platform": "KIA_SORENTO_HEV_4TH_GEN",
"make": "Kia",
@@ -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_5070392900769873758) {
out_5070392900769873758[0] = delta_x[0] + nom_x[0];
out_5070392900769873758[1] = delta_x[1] + nom_x[1];
out_5070392900769873758[2] = delta_x[2] + nom_x[2];
out_5070392900769873758[3] = delta_x[3] + nom_x[3];
out_5070392900769873758[4] = delta_x[4] + nom_x[4];
out_5070392900769873758[5] = delta_x[5] + nom_x[5];
out_5070392900769873758[6] = delta_x[6] + nom_x[6];
out_5070392900769873758[7] = delta_x[7] + nom_x[7];
out_5070392900769873758[8] = delta_x[8] + nom_x[8];
void err_fun(double *nom_x, double *delta_x, double *out_2496243277963511837) {
out_2496243277963511837[0] = delta_x[0] + nom_x[0];
out_2496243277963511837[1] = delta_x[1] + nom_x[1];
out_2496243277963511837[2] = delta_x[2] + nom_x[2];
out_2496243277963511837[3] = delta_x[3] + nom_x[3];
out_2496243277963511837[4] = delta_x[4] + nom_x[4];
out_2496243277963511837[5] = delta_x[5] + nom_x[5];
out_2496243277963511837[6] = delta_x[6] + nom_x[6];
out_2496243277963511837[7] = delta_x[7] + nom_x[7];
out_2496243277963511837[8] = delta_x[8] + nom_x[8];
}
void inv_err_fun(double *nom_x, double *true_x, double *out_3742760733154016051) {
out_3742760733154016051[0] = -nom_x[0] + true_x[0];
out_3742760733154016051[1] = -nom_x[1] + true_x[1];
out_3742760733154016051[2] = -nom_x[2] + true_x[2];
out_3742760733154016051[3] = -nom_x[3] + true_x[3];
out_3742760733154016051[4] = -nom_x[4] + true_x[4];
out_3742760733154016051[5] = -nom_x[5] + true_x[5];
out_3742760733154016051[6] = -nom_x[6] + true_x[6];
out_3742760733154016051[7] = -nom_x[7] + true_x[7];
out_3742760733154016051[8] = -nom_x[8] + true_x[8];
void inv_err_fun(double *nom_x, double *true_x, double *out_8723072931307095264) {
out_8723072931307095264[0] = -nom_x[0] + true_x[0];
out_8723072931307095264[1] = -nom_x[1] + true_x[1];
out_8723072931307095264[2] = -nom_x[2] + true_x[2];
out_8723072931307095264[3] = -nom_x[3] + true_x[3];
out_8723072931307095264[4] = -nom_x[4] + true_x[4];
out_8723072931307095264[5] = -nom_x[5] + true_x[5];
out_8723072931307095264[6] = -nom_x[6] + true_x[6];
out_8723072931307095264[7] = -nom_x[7] + true_x[7];
out_8723072931307095264[8] = -nom_x[8] + true_x[8];
}
void H_mod_fun(double *state, double *out_5758456641177717920) {
out_5758456641177717920[0] = 1.0;
out_5758456641177717920[1] = 0.0;
out_5758456641177717920[2] = 0.0;
out_5758456641177717920[3] = 0.0;
out_5758456641177717920[4] = 0.0;
out_5758456641177717920[5] = 0.0;
out_5758456641177717920[6] = 0.0;
out_5758456641177717920[7] = 0.0;
out_5758456641177717920[8] = 0.0;
out_5758456641177717920[9] = 0.0;
out_5758456641177717920[10] = 1.0;
out_5758456641177717920[11] = 0.0;
out_5758456641177717920[12] = 0.0;
out_5758456641177717920[13] = 0.0;
out_5758456641177717920[14] = 0.0;
out_5758456641177717920[15] = 0.0;
out_5758456641177717920[16] = 0.0;
out_5758456641177717920[17] = 0.0;
out_5758456641177717920[18] = 0.0;
out_5758456641177717920[19] = 0.0;
out_5758456641177717920[20] = 1.0;
out_5758456641177717920[21] = 0.0;
out_5758456641177717920[22] = 0.0;
out_5758456641177717920[23] = 0.0;
out_5758456641177717920[24] = 0.0;
out_5758456641177717920[25] = 0.0;
out_5758456641177717920[26] = 0.0;
out_5758456641177717920[27] = 0.0;
out_5758456641177717920[28] = 0.0;
out_5758456641177717920[29] = 0.0;
out_5758456641177717920[30] = 1.0;
out_5758456641177717920[31] = 0.0;
out_5758456641177717920[32] = 0.0;
out_5758456641177717920[33] = 0.0;
out_5758456641177717920[34] = 0.0;
out_5758456641177717920[35] = 0.0;
out_5758456641177717920[36] = 0.0;
out_5758456641177717920[37] = 0.0;
out_5758456641177717920[38] = 0.0;
out_5758456641177717920[39] = 0.0;
out_5758456641177717920[40] = 1.0;
out_5758456641177717920[41] = 0.0;
out_5758456641177717920[42] = 0.0;
out_5758456641177717920[43] = 0.0;
out_5758456641177717920[44] = 0.0;
out_5758456641177717920[45] = 0.0;
out_5758456641177717920[46] = 0.0;
out_5758456641177717920[47] = 0.0;
out_5758456641177717920[48] = 0.0;
out_5758456641177717920[49] = 0.0;
out_5758456641177717920[50] = 1.0;
out_5758456641177717920[51] = 0.0;
out_5758456641177717920[52] = 0.0;
out_5758456641177717920[53] = 0.0;
out_5758456641177717920[54] = 0.0;
out_5758456641177717920[55] = 0.0;
out_5758456641177717920[56] = 0.0;
out_5758456641177717920[57] = 0.0;
out_5758456641177717920[58] = 0.0;
out_5758456641177717920[59] = 0.0;
out_5758456641177717920[60] = 1.0;
out_5758456641177717920[61] = 0.0;
out_5758456641177717920[62] = 0.0;
out_5758456641177717920[63] = 0.0;
out_5758456641177717920[64] = 0.0;
out_5758456641177717920[65] = 0.0;
out_5758456641177717920[66] = 0.0;
out_5758456641177717920[67] = 0.0;
out_5758456641177717920[68] = 0.0;
out_5758456641177717920[69] = 0.0;
out_5758456641177717920[70] = 1.0;
out_5758456641177717920[71] = 0.0;
out_5758456641177717920[72] = 0.0;
out_5758456641177717920[73] = 0.0;
out_5758456641177717920[74] = 0.0;
out_5758456641177717920[75] = 0.0;
out_5758456641177717920[76] = 0.0;
out_5758456641177717920[77] = 0.0;
out_5758456641177717920[78] = 0.0;
out_5758456641177717920[79] = 0.0;
out_5758456641177717920[80] = 1.0;
void H_mod_fun(double *state, double *out_2432465619939465173) {
out_2432465619939465173[0] = 1.0;
out_2432465619939465173[1] = 0.0;
out_2432465619939465173[2] = 0.0;
out_2432465619939465173[3] = 0.0;
out_2432465619939465173[4] = 0.0;
out_2432465619939465173[5] = 0.0;
out_2432465619939465173[6] = 0.0;
out_2432465619939465173[7] = 0.0;
out_2432465619939465173[8] = 0.0;
out_2432465619939465173[9] = 0.0;
out_2432465619939465173[10] = 1.0;
out_2432465619939465173[11] = 0.0;
out_2432465619939465173[12] = 0.0;
out_2432465619939465173[13] = 0.0;
out_2432465619939465173[14] = 0.0;
out_2432465619939465173[15] = 0.0;
out_2432465619939465173[16] = 0.0;
out_2432465619939465173[17] = 0.0;
out_2432465619939465173[18] = 0.0;
out_2432465619939465173[19] = 0.0;
out_2432465619939465173[20] = 1.0;
out_2432465619939465173[21] = 0.0;
out_2432465619939465173[22] = 0.0;
out_2432465619939465173[23] = 0.0;
out_2432465619939465173[24] = 0.0;
out_2432465619939465173[25] = 0.0;
out_2432465619939465173[26] = 0.0;
out_2432465619939465173[27] = 0.0;
out_2432465619939465173[28] = 0.0;
out_2432465619939465173[29] = 0.0;
out_2432465619939465173[30] = 1.0;
out_2432465619939465173[31] = 0.0;
out_2432465619939465173[32] = 0.0;
out_2432465619939465173[33] = 0.0;
out_2432465619939465173[34] = 0.0;
out_2432465619939465173[35] = 0.0;
out_2432465619939465173[36] = 0.0;
out_2432465619939465173[37] = 0.0;
out_2432465619939465173[38] = 0.0;
out_2432465619939465173[39] = 0.0;
out_2432465619939465173[40] = 1.0;
out_2432465619939465173[41] = 0.0;
out_2432465619939465173[42] = 0.0;
out_2432465619939465173[43] = 0.0;
out_2432465619939465173[44] = 0.0;
out_2432465619939465173[45] = 0.0;
out_2432465619939465173[46] = 0.0;
out_2432465619939465173[47] = 0.0;
out_2432465619939465173[48] = 0.0;
out_2432465619939465173[49] = 0.0;
out_2432465619939465173[50] = 1.0;
out_2432465619939465173[51] = 0.0;
out_2432465619939465173[52] = 0.0;
out_2432465619939465173[53] = 0.0;
out_2432465619939465173[54] = 0.0;
out_2432465619939465173[55] = 0.0;
out_2432465619939465173[56] = 0.0;
out_2432465619939465173[57] = 0.0;
out_2432465619939465173[58] = 0.0;
out_2432465619939465173[59] = 0.0;
out_2432465619939465173[60] = 1.0;
out_2432465619939465173[61] = 0.0;
out_2432465619939465173[62] = 0.0;
out_2432465619939465173[63] = 0.0;
out_2432465619939465173[64] = 0.0;
out_2432465619939465173[65] = 0.0;
out_2432465619939465173[66] = 0.0;
out_2432465619939465173[67] = 0.0;
out_2432465619939465173[68] = 0.0;
out_2432465619939465173[69] = 0.0;
out_2432465619939465173[70] = 1.0;
out_2432465619939465173[71] = 0.0;
out_2432465619939465173[72] = 0.0;
out_2432465619939465173[73] = 0.0;
out_2432465619939465173[74] = 0.0;
out_2432465619939465173[75] = 0.0;
out_2432465619939465173[76] = 0.0;
out_2432465619939465173[77] = 0.0;
out_2432465619939465173[78] = 0.0;
out_2432465619939465173[79] = 0.0;
out_2432465619939465173[80] = 1.0;
}
void f_fun(double *state, double dt, double *out_730595102125265078) {
out_730595102125265078[0] = state[0];
out_730595102125265078[1] = state[1];
out_730595102125265078[2] = state[2];
out_730595102125265078[3] = state[3];
out_730595102125265078[4] = state[4];
out_730595102125265078[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8100000000000005*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_730595102125265078[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_730595102125265078[7] = state[7];
out_730595102125265078[8] = state[8];
void f_fun(double *state, double dt, double *out_433459712136092591) {
out_433459712136092591[0] = state[0];
out_433459712136092591[1] = state[1];
out_433459712136092591[2] = state[2];
out_433459712136092591[3] = state[3];
out_433459712136092591[4] = state[4];
out_433459712136092591[5] = dt*((-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]))*state[6] - 9.8100000000000005*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_433459712136092591[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_433459712136092591[7] = state[7];
out_433459712136092591[8] = state[8];
}
void F_fun(double *state, double dt, double *out_7198115545780111359) {
out_7198115545780111359[0] = 1;
out_7198115545780111359[1] = 0;
out_7198115545780111359[2] = 0;
out_7198115545780111359[3] = 0;
out_7198115545780111359[4] = 0;
out_7198115545780111359[5] = 0;
out_7198115545780111359[6] = 0;
out_7198115545780111359[7] = 0;
out_7198115545780111359[8] = 0;
out_7198115545780111359[9] = 0;
out_7198115545780111359[10] = 1;
out_7198115545780111359[11] = 0;
out_7198115545780111359[12] = 0;
out_7198115545780111359[13] = 0;
out_7198115545780111359[14] = 0;
out_7198115545780111359[15] = 0;
out_7198115545780111359[16] = 0;
out_7198115545780111359[17] = 0;
out_7198115545780111359[18] = 0;
out_7198115545780111359[19] = 0;
out_7198115545780111359[20] = 1;
out_7198115545780111359[21] = 0;
out_7198115545780111359[22] = 0;
out_7198115545780111359[23] = 0;
out_7198115545780111359[24] = 0;
out_7198115545780111359[25] = 0;
out_7198115545780111359[26] = 0;
out_7198115545780111359[27] = 0;
out_7198115545780111359[28] = 0;
out_7198115545780111359[29] = 0;
out_7198115545780111359[30] = 1;
out_7198115545780111359[31] = 0;
out_7198115545780111359[32] = 0;
out_7198115545780111359[33] = 0;
out_7198115545780111359[34] = 0;
out_7198115545780111359[35] = 0;
out_7198115545780111359[36] = 0;
out_7198115545780111359[37] = 0;
out_7198115545780111359[38] = 0;
out_7198115545780111359[39] = 0;
out_7198115545780111359[40] = 1;
out_7198115545780111359[41] = 0;
out_7198115545780111359[42] = 0;
out_7198115545780111359[43] = 0;
out_7198115545780111359[44] = 0;
out_7198115545780111359[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_7198115545780111359[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2));
out_7198115545780111359[47] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_7198115545780111359[48] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_7198115545780111359[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_7198115545780111359[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1;
out_7198115545780111359[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]));
out_7198115545780111359[52] = dt*stiffness_front*state[0]/(mass*state[1]);
out_7198115545780111359[53] = -9.8100000000000005*dt;
out_7198115545780111359[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_7198115545780111359[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
out_7198115545780111359[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_7198115545780111359[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_7198115545780111359[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_7198115545780111359[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
out_7198115545780111359[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_7198115545780111359[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_7198115545780111359[62] = 0;
out_7198115545780111359[63] = 0;
out_7198115545780111359[64] = 0;
out_7198115545780111359[65] = 0;
out_7198115545780111359[66] = 0;
out_7198115545780111359[67] = 0;
out_7198115545780111359[68] = 0;
out_7198115545780111359[69] = 0;
out_7198115545780111359[70] = 1;
out_7198115545780111359[71] = 0;
out_7198115545780111359[72] = 0;
out_7198115545780111359[73] = 0;
out_7198115545780111359[74] = 0;
out_7198115545780111359[75] = 0;
out_7198115545780111359[76] = 0;
out_7198115545780111359[77] = 0;
out_7198115545780111359[78] = 0;
out_7198115545780111359[79] = 0;
out_7198115545780111359[80] = 1;
void F_fun(double *state, double dt, double *out_2989085374181927005) {
out_2989085374181927005[0] = 1;
out_2989085374181927005[1] = 0;
out_2989085374181927005[2] = 0;
out_2989085374181927005[3] = 0;
out_2989085374181927005[4] = 0;
out_2989085374181927005[5] = 0;
out_2989085374181927005[6] = 0;
out_2989085374181927005[7] = 0;
out_2989085374181927005[8] = 0;
out_2989085374181927005[9] = 0;
out_2989085374181927005[10] = 1;
out_2989085374181927005[11] = 0;
out_2989085374181927005[12] = 0;
out_2989085374181927005[13] = 0;
out_2989085374181927005[14] = 0;
out_2989085374181927005[15] = 0;
out_2989085374181927005[16] = 0;
out_2989085374181927005[17] = 0;
out_2989085374181927005[18] = 0;
out_2989085374181927005[19] = 0;
out_2989085374181927005[20] = 1;
out_2989085374181927005[21] = 0;
out_2989085374181927005[22] = 0;
out_2989085374181927005[23] = 0;
out_2989085374181927005[24] = 0;
out_2989085374181927005[25] = 0;
out_2989085374181927005[26] = 0;
out_2989085374181927005[27] = 0;
out_2989085374181927005[28] = 0;
out_2989085374181927005[29] = 0;
out_2989085374181927005[30] = 1;
out_2989085374181927005[31] = 0;
out_2989085374181927005[32] = 0;
out_2989085374181927005[33] = 0;
out_2989085374181927005[34] = 0;
out_2989085374181927005[35] = 0;
out_2989085374181927005[36] = 0;
out_2989085374181927005[37] = 0;
out_2989085374181927005[38] = 0;
out_2989085374181927005[39] = 0;
out_2989085374181927005[40] = 1;
out_2989085374181927005[41] = 0;
out_2989085374181927005[42] = 0;
out_2989085374181927005[43] = 0;
out_2989085374181927005[44] = 0;
out_2989085374181927005[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_2989085374181927005[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2));
out_2989085374181927005[47] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_2989085374181927005[48] = -dt*stiffness_front*state[0]/(mass*state[1]);
out_2989085374181927005[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_2989085374181927005[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1;
out_2989085374181927005[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4]));
out_2989085374181927005[52] = dt*stiffness_front*state[0]/(mass*state[1]);
out_2989085374181927005[53] = -9.8100000000000005*dt;
out_2989085374181927005[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_2989085374181927005[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2));
out_2989085374181927005[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_2989085374181927005[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_2989085374181927005[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_2989085374181927005[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]);
out_2989085374181927005[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_2989085374181927005[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]);
out_2989085374181927005[62] = 0;
out_2989085374181927005[63] = 0;
out_2989085374181927005[64] = 0;
out_2989085374181927005[65] = 0;
out_2989085374181927005[66] = 0;
out_2989085374181927005[67] = 0;
out_2989085374181927005[68] = 0;
out_2989085374181927005[69] = 0;
out_2989085374181927005[70] = 1;
out_2989085374181927005[71] = 0;
out_2989085374181927005[72] = 0;
out_2989085374181927005[73] = 0;
out_2989085374181927005[74] = 0;
out_2989085374181927005[75] = 0;
out_2989085374181927005[76] = 0;
out_2989085374181927005[77] = 0;
out_2989085374181927005[78] = 0;
out_2989085374181927005[79] = 0;
out_2989085374181927005[80] = 1;
}
void h_25(double *state, double *unused, double *out_5441109048213736058) {
out_5441109048213736058[0] = state[6];
void h_25(double *state, double *unused, double *out_7779026555707581006) {
out_7779026555707581006[0] = state[6];
}
void H_25(double *state, double *unused, double *out_4766949399557973891) {
out_4766949399557973891[0] = 0;
out_4766949399557973891[1] = 0;
out_4766949399557973891[2] = 0;
out_4766949399557973891[3] = 0;
out_4766949399557973891[4] = 0;
out_4766949399557973891[5] = 0;
out_4766949399557973891[6] = 1;
out_4766949399557973891[7] = 0;
out_4766949399557973891[8] = 0;
void H_25(double *state, double *unused, double *out_7597270765006040550) {
out_7597270765006040550[0] = 0;
out_7597270765006040550[1] = 0;
out_7597270765006040550[2] = 0;
out_7597270765006040550[3] = 0;
out_7597270765006040550[4] = 0;
out_7597270765006040550[5] = 0;
out_7597270765006040550[6] = 1;
out_7597270765006040550[7] = 0;
out_7597270765006040550[8] = 0;
}
void h_24(double *state, double *unused, double *out_2797667639827089179) {
out_2797667639827089179[0] = state[4];
out_2797667639827089179[1] = state[5];
void h_24(double *state, double *unused, double *out_1363944844356195076) {
out_1363944844356195076[0] = state[4];
out_1363944844356195076[1] = state[5];
}
void H_24(double *state, double *unused, double *out_4461115786511221334) {
out_4461115786511221334[0] = 0;
out_4461115786511221334[1] = 0;
out_4461115786511221334[2] = 0;
out_4461115786511221334[3] = 0;
out_4461115786511221334[4] = 1;
out_4461115786511221334[5] = 0;
out_4461115786511221334[6] = 0;
out_4461115786511221334[7] = 0;
out_4461115786511221334[8] = 0;
out_4461115786511221334[9] = 0;
out_4461115786511221334[10] = 0;
out_4461115786511221334[11] = 0;
out_4461115786511221334[12] = 0;
out_4461115786511221334[13] = 0;
out_4461115786511221334[14] = 1;
out_4461115786511221334[15] = 0;
out_4461115786511221334[16] = 0;
out_4461115786511221334[17] = 0;
void H_24(double *state, double *unused, double *out_4648440628852349640) {
out_4648440628852349640[0] = 0;
out_4648440628852349640[1] = 0;
out_4648440628852349640[2] = 0;
out_4648440628852349640[3] = 0;
out_4648440628852349640[4] = 1;
out_4648440628852349640[5] = 0;
out_4648440628852349640[6] = 0;
out_4648440628852349640[7] = 0;
out_4648440628852349640[8] = 0;
out_4648440628852349640[9] = 0;
out_4648440628852349640[10] = 0;
out_4648440628852349640[11] = 0;
out_4648440628852349640[12] = 0;
out_4648440628852349640[13] = 0;
out_4648440628852349640[14] = 1;
out_4648440628852349640[15] = 0;
out_4648440628852349640[16] = 0;
out_4648440628852349640[17] = 0;
}
void h_30(double *state, double *unused, double *out_1188271489450022901) {
out_1188271489450022901[0] = state[4];
void h_30(double *state, double *unused, double *out_7936213224058710151) {
out_7936213224058710151[0] = state[4];
}
void H_30(double *state, double *unused, double *out_9152098344023969527) {
out_9152098344023969527[0] = 0;
out_9152098344023969527[1] = 0;
out_9152098344023969527[2] = 0;
out_9152098344023969527[3] = 0;
out_9152098344023969527[4] = 1;
out_9152098344023969527[5] = 0;
out_9152098344023969527[6] = 0;
out_9152098344023969527[7] = 0;
out_9152098344023969527[8] = 0;
void H_30(double *state, double *unused, double *out_7726609712149280620) {
out_7726609712149280620[0] = 0;
out_7726609712149280620[1] = 0;
out_7726609712149280620[2] = 0;
out_7726609712149280620[3] = 0;
out_7726609712149280620[4] = 1;
out_7726609712149280620[5] = 0;
out_7726609712149280620[6] = 0;
out_7726609712149280620[7] = 0;
out_7726609712149280620[8] = 0;
}
void h_26(double *state, double *unused, double *out_6530138725336053464) {
out_6530138725336053464[0] = state[7];
void h_26(double *state, double *unused, double *out_1537171706644861005) {
out_1537171706644861005[0] = state[7];
}
void H_26(double *state, double *unused, double *out_8508452718432030115) {
out_8508452718432030115[0] = 0;
out_8508452718432030115[1] = 0;
out_8508452718432030115[2] = 0;
out_8508452718432030115[3] = 0;
out_8508452718432030115[4] = 0;
out_8508452718432030115[5] = 0;
out_8508452718432030115[6] = 0;
out_8508452718432030115[7] = 1;
out_8508452718432030115[8] = 0;
void H_26(double *state, double *unused, double *out_6940416700895728646) {
out_6940416700895728646[0] = 0;
out_6940416700895728646[1] = 0;
out_6940416700895728646[2] = 0;
out_6940416700895728646[3] = 0;
out_6940416700895728646[4] = 0;
out_6940416700895728646[5] = 0;
out_6940416700895728646[6] = 0;
out_6940416700895728646[7] = 1;
out_6940416700895728646[8] = 0;
}
void h_27(double *state, double *unused, double *out_8003961757834969913) {
out_8003961757834969913[0] = state[3];
void h_27(double *state, double *unused, double *out_3232574083573269797) {
out_3232574083573269797[0] = state[3];
}
void H_27(double *state, double *unused, double *out_6977335032223544616) {
out_6977335032223544616[0] = 0;
out_6977335032223544616[1] = 0;
out_6977335032223544616[2] = 0;
out_6977335032223544616[3] = 1;
out_6977335032223544616[4] = 0;
out_6977335032223544616[5] = 0;
out_6977335032223544616[6] = 0;
out_6977335032223544616[7] = 0;
out_6977335032223544616[8] = 0;
void H_27(double *state, double *unused, double *out_8545371049759846085) {
out_8545371049759846085[0] = 0;
out_8545371049759846085[1] = 0;
out_8545371049759846085[2] = 0;
out_8545371049759846085[3] = 1;
out_8545371049759846085[4] = 0;
out_8545371049759846085[5] = 0;
out_8545371049759846085[6] = 0;
out_8545371049759846085[7] = 0;
out_8545371049759846085[8] = 0;
}
void h_29(double *state, double *unused, double *out_1416133831358674750) {
out_1416133831358674750[0] = state[1];
void h_29(double *state, double *unused, double *out_3538261142777081139) {
out_3538261142777081139[0] = state[1];
}
void H_29(double *state, double *unused, double *out_8784414385371189905) {
out_8784414385371189905[0] = 0;
out_8784414385371189905[1] = 1;
out_8784414385371189905[2] = 0;
out_8784414385371189905[3] = 0;
out_8784414385371189905[4] = 0;
out_8784414385371189905[5] = 0;
out_8784414385371189905[6] = 0;
out_8784414385371189905[7] = 0;
out_8784414385371189905[8] = 0;
void H_29(double *state, double *unused, double *out_7216378367834888436) {
out_7216378367834888436[0] = 0;
out_7216378367834888436[1] = 1;
out_7216378367834888436[2] = 0;
out_7216378367834888436[3] = 0;
out_7216378367834888436[4] = 0;
out_7216378367834888436[5] = 0;
out_7216378367834888436[6] = 0;
out_7216378367834888436[7] = 0;
out_7216378367834888436[8] = 0;
}
void h_28(double *state, double *unused, double *out_7400645873158492396) {
out_7400645873158492396[0] = state[0];
void h_28(double *state, double *unused, double *out_2289064230671607362) {
out_2289064230671607362[0] = state[0];
}
void H_28(double *state, double *unused, double *out_6820784113805863654) {
out_6820784113805863654[0] = 1;
out_6820784113805863654[1] = 0;
out_6820784113805863654[2] = 0;
out_6820784113805863654[3] = 0;
out_6820784113805863654[4] = 0;
out_6820784113805863654[5] = 0;
out_6820784113805863654[6] = 0;
out_6820784113805863654[7] = 0;
out_6820784113805863654[8] = 0;
void H_28(double *state, double *unused, double *out_5252748096269562185) {
out_5252748096269562185[0] = 1;
out_5252748096269562185[1] = 0;
out_5252748096269562185[2] = 0;
out_5252748096269562185[3] = 0;
out_5252748096269562185[4] = 0;
out_5252748096269562185[5] = 0;
out_5252748096269562185[6] = 0;
out_5252748096269562185[7] = 0;
out_5252748096269562185[8] = 0;
}
void h_31(double *state, double *unused, double *out_1803659519959713708) {
out_1803659519959713708[0] = state[8];
void h_31(double *state, double *unused, double *out_8054220617992086895) {
out_8054220617992086895[0] = state[8];
}
void H_31(double *state, double *unused, double *out_9134660820665381591) {
out_9134660820665381591[0] = 0;
out_9134660820665381591[1] = 0;
out_9134660820665381591[2] = 0;
out_9134660820665381591[3] = 0;
out_9134660820665381591[4] = 0;
out_9134660820665381591[5] = 0;
out_9134660820665381591[6] = 0;
out_9134660820665381591[7] = 0;
out_9134660820665381591[8] = 1;
void H_31(double *state, double *unused, double *out_7566624803129080122) {
out_7566624803129080122[0] = 0;
out_7566624803129080122[1] = 0;
out_7566624803129080122[2] = 0;
out_7566624803129080122[3] = 0;
out_7566624803129080122[4] = 0;
out_7566624803129080122[5] = 0;
out_7566624803129080122[6] = 0;
out_7566624803129080122[7] = 0;
out_7566624803129080122[8] = 1;
}
#include <eigen3/Eigen/Dense>
#include <iostream>
@@ -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_5070392900769873758) {
err_fun(nom_x, delta_x, out_5070392900769873758);
void car_err_fun(double *nom_x, double *delta_x, double *out_2496243277963511837) {
err_fun(nom_x, delta_x, out_2496243277963511837);
}
void car_inv_err_fun(double *nom_x, double *true_x, double *out_3742760733154016051) {
inv_err_fun(nom_x, true_x, out_3742760733154016051);
void car_inv_err_fun(double *nom_x, double *true_x, double *out_8723072931307095264) {
inv_err_fun(nom_x, true_x, out_8723072931307095264);
}
void car_H_mod_fun(double *state, double *out_5758456641177717920) {
H_mod_fun(state, out_5758456641177717920);
void car_H_mod_fun(double *state, double *out_2432465619939465173) {
H_mod_fun(state, out_2432465619939465173);
}
void car_f_fun(double *state, double dt, double *out_730595102125265078) {
f_fun(state, dt, out_730595102125265078);
void car_f_fun(double *state, double dt, double *out_433459712136092591) {
f_fun(state, dt, out_433459712136092591);
}
void car_F_fun(double *state, double dt, double *out_7198115545780111359) {
F_fun(state, dt, out_7198115545780111359);
void car_F_fun(double *state, double dt, double *out_2989085374181927005) {
F_fun(state, dt, out_2989085374181927005);
}
void car_h_25(double *state, double *unused, double *out_5441109048213736058) {
h_25(state, unused, out_5441109048213736058);
void car_h_25(double *state, double *unused, double *out_7779026555707581006) {
h_25(state, unused, out_7779026555707581006);
}
void car_H_25(double *state, double *unused, double *out_4766949399557973891) {
H_25(state, unused, out_4766949399557973891);
void car_H_25(double *state, double *unused, double *out_7597270765006040550) {
H_25(state, unused, out_7597270765006040550);
}
void car_h_24(double *state, double *unused, double *out_2797667639827089179) {
h_24(state, unused, out_2797667639827089179);
void car_h_24(double *state, double *unused, double *out_1363944844356195076) {
h_24(state, unused, out_1363944844356195076);
}
void car_H_24(double *state, double *unused, double *out_4461115786511221334) {
H_24(state, unused, out_4461115786511221334);
void car_H_24(double *state, double *unused, double *out_4648440628852349640) {
H_24(state, unused, out_4648440628852349640);
}
void car_h_30(double *state, double *unused, double *out_1188271489450022901) {
h_30(state, unused, out_1188271489450022901);
void car_h_30(double *state, double *unused, double *out_7936213224058710151) {
h_30(state, unused, out_7936213224058710151);
}
void car_H_30(double *state, double *unused, double *out_9152098344023969527) {
H_30(state, unused, out_9152098344023969527);
void car_H_30(double *state, double *unused, double *out_7726609712149280620) {
H_30(state, unused, out_7726609712149280620);
}
void car_h_26(double *state, double *unused, double *out_6530138725336053464) {
h_26(state, unused, out_6530138725336053464);
void car_h_26(double *state, double *unused, double *out_1537171706644861005) {
h_26(state, unused, out_1537171706644861005);
}
void car_H_26(double *state, double *unused, double *out_8508452718432030115) {
H_26(state, unused, out_8508452718432030115);
void car_H_26(double *state, double *unused, double *out_6940416700895728646) {
H_26(state, unused, out_6940416700895728646);
}
void car_h_27(double *state, double *unused, double *out_8003961757834969913) {
h_27(state, unused, out_8003961757834969913);
void car_h_27(double *state, double *unused, double *out_3232574083573269797) {
h_27(state, unused, out_3232574083573269797);
}
void car_H_27(double *state, double *unused, double *out_6977335032223544616) {
H_27(state, unused, out_6977335032223544616);
void car_H_27(double *state, double *unused, double *out_8545371049759846085) {
H_27(state, unused, out_8545371049759846085);
}
void car_h_29(double *state, double *unused, double *out_1416133831358674750) {
h_29(state, unused, out_1416133831358674750);
void car_h_29(double *state, double *unused, double *out_3538261142777081139) {
h_29(state, unused, out_3538261142777081139);
}
void car_H_29(double *state, double *unused, double *out_8784414385371189905) {
H_29(state, unused, out_8784414385371189905);
void car_H_29(double *state, double *unused, double *out_7216378367834888436) {
H_29(state, unused, out_7216378367834888436);
}
void car_h_28(double *state, double *unused, double *out_7400645873158492396) {
h_28(state, unused, out_7400645873158492396);
void car_h_28(double *state, double *unused, double *out_2289064230671607362) {
h_28(state, unused, out_2289064230671607362);
}
void car_H_28(double *state, double *unused, double *out_6820784113805863654) {
H_28(state, unused, out_6820784113805863654);
void car_H_28(double *state, double *unused, double *out_5252748096269562185) {
H_28(state, unused, out_5252748096269562185);
}
void car_h_31(double *state, double *unused, double *out_1803659519959713708) {
h_31(state, unused, out_1803659519959713708);
void car_h_31(double *state, double *unused, double *out_8054220617992086895) {
h_31(state, unused, out_8054220617992086895);
}
void car_H_31(double *state, double *unused, double *out_9134660820665381591) {
H_31(state, unused, out_9134660820665381591);
void car_H_31(double *state, double *unused, double *out_7566624803129080122) {
H_31(state, unused, out_7566624803129080122);
}
void car_predict(double *in_x, double *in_P, double *in_Q, double dt) {
predict(in_x, in_P, in_Q, dt);
@@ -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_5070392900769873758);
void car_inv_err_fun(double *nom_x, double *true_x, double *out_3742760733154016051);
void car_H_mod_fun(double *state, double *out_5758456641177717920);
void car_f_fun(double *state, double dt, double *out_730595102125265078);
void car_F_fun(double *state, double dt, double *out_7198115545780111359);
void car_h_25(double *state, double *unused, double *out_5441109048213736058);
void car_H_25(double *state, double *unused, double *out_4766949399557973891);
void car_h_24(double *state, double *unused, double *out_2797667639827089179);
void car_H_24(double *state, double *unused, double *out_4461115786511221334);
void car_h_30(double *state, double *unused, double *out_1188271489450022901);
void car_H_30(double *state, double *unused, double *out_9152098344023969527);
void car_h_26(double *state, double *unused, double *out_6530138725336053464);
void car_H_26(double *state, double *unused, double *out_8508452718432030115);
void car_h_27(double *state, double *unused, double *out_8003961757834969913);
void car_H_27(double *state, double *unused, double *out_6977335032223544616);
void car_h_29(double *state, double *unused, double *out_1416133831358674750);
void car_H_29(double *state, double *unused, double *out_8784414385371189905);
void car_h_28(double *state, double *unused, double *out_7400645873158492396);
void car_H_28(double *state, double *unused, double *out_6820784113805863654);
void car_h_31(double *state, double *unused, double *out_1803659519959713708);
void car_H_31(double *state, double *unused, double *out_9134660820665381591);
void car_err_fun(double *nom_x, double *delta_x, double *out_2496243277963511837);
void car_inv_err_fun(double *nom_x, double *true_x, double *out_8723072931307095264);
void car_H_mod_fun(double *state, double *out_2432465619939465173);
void car_f_fun(double *state, double dt, double *out_433459712136092591);
void car_F_fun(double *state, double dt, double *out_2989085374181927005);
void car_h_25(double *state, double *unused, double *out_7779026555707581006);
void car_H_25(double *state, double *unused, double *out_7597270765006040550);
void car_h_24(double *state, double *unused, double *out_1363944844356195076);
void car_H_24(double *state, double *unused, double *out_4648440628852349640);
void car_h_30(double *state, double *unused, double *out_7936213224058710151);
void car_H_30(double *state, double *unused, double *out_7726609712149280620);
void car_h_26(double *state, double *unused, double *out_1537171706644861005);
void car_H_26(double *state, double *unused, double *out_6940416700895728646);
void car_h_27(double *state, double *unused, double *out_3232574083573269797);
void car_H_27(double *state, double *unused, double *out_8545371049759846085);
void car_h_29(double *state, double *unused, double *out_3538261142777081139);
void car_H_29(double *state, double *unused, double *out_7216378367834888436);
void car_h_28(double *state, double *unused, double *out_2289064230671607362);
void car_H_28(double *state, double *unused, double *out_5252748096269562185);
void car_h_31(double *state, double *unused, double *out_8054220617992086895);
void car_H_31(double *state, double *unused, double *out_7566624803129080122);
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);
File diff suppressed because it is too large Load Diff
@@ -5,18 +5,18 @@ void pose_update_4(double *in_x, double *in_P, double *in_z, double *in_R, doubl
void pose_update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
void pose_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
void pose_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea);
void pose_err_fun(double *nom_x, double *delta_x, double *out_8299703332077589328);
void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4608058237383429265);
void pose_H_mod_fun(double *state, double *out_7885453398379249088);
void pose_f_fun(double *state, double dt, double *out_1688144950946873165);
void pose_F_fun(double *state, double dt, double *out_4851283621730691038);
void pose_h_4(double *state, double *unused, double *out_2329133011647763937);
void pose_H_4(double *state, double *unused, double *out_8639614400433961695);
void pose_h_10(double *state, double *unused, double *out_3294648635274985008);
void pose_H_10(double *state, double *unused, double *out_3780608178453222524);
void pose_h_13(double *state, double *unused, double *out_8905113933939181200);
void pose_H_13(double *state, double *unused, double *out_6594855847943257120);
void pose_h_14(double *state, double *unused, double *out_8324071568749841126);
void pose_H_14(double *state, double *unused, double *out_5843888816936105392);
void pose_err_fun(double *nom_x, double *delta_x, double *out_7117000844039973656);
void pose_inv_err_fun(double *nom_x, double *true_x, double *out_5738271447995775317);
void pose_H_mod_fun(double *state, double *out_4131332949940298666);
void pose_f_fun(double *state, double dt, double *out_6388120990768684370);
void pose_F_fun(double *state, double dt, double *out_7678082896540462195);
void pose_h_4(double *state, double *unused, double *out_285865806461862263);
void pose_H_4(double *state, double *unused, double *out_2311634224034001805);
void pose_h_10(double *state, double *unused, double *out_3345721551474225191);
void pose_H_10(double *state, double *unused, double *out_7600016663620136720);
void pose_h_13(double *state, double *unused, double *out_3239845409590022619);
void pose_H_13(double *state, double *unused, double *out_5523908049366334606);
void pose_h_14(double *state, double *unused, double *out_8238467406184066972);
void pose_H_14(double *state, double *unused, double *out_6274875080373486334);
void pose_predict(double *in_x, double *in_P, double *in_Q, double dt);
}
+1 -1
View File
@@ -1 +1 @@
#define SUNNYPILOT_VERSION "2026.09.28-4914"
#define SUNNYPILOT_VERSION "2026.003.000"
File diff suppressed because it is too large Load Diff
@@ -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_5926322025614992030);
void live_err_fun(double *nom_x, double *delta_x, double *out_5043251176595415602);
void live_inv_err_fun(double *nom_x, double *true_x, double *out_3360739843129809304);
void live_H_mod_fun(double *state, double *out_8279386211598339514);
void live_f_fun(double *state, double dt, double *out_6890687714462639744);
void live_F_fun(double *state, double dt, double *out_7621965816561569981);
void live_h_4(double *state, double *unused, double *out_3851734767229128263);
void live_H_4(double *state, double *unused, double *out_5878769767090540838);
void live_h_9(double *state, double *unused, double *out_2694197172040937469);
void live_H_9(double *state, double *unused, double *out_1408449168173906632);
void live_h_10(double *state, double *unused, double *out_7033125878671447195);
void live_H_10(double *state, double *unused, double *out_65675330875969869);
void live_h_12(double *state, double *unused, double *out_8799002316774637565);
void live_H_12(double *state, double *unused, double *out_6186715929576277782);
void live_h_35(double *state, double *unused, double *out_2868906334315872882);
void live_H_35(double *state, double *unused, double *out_8932278961901291491);
void live_h_32(double *state, double *unused, double *out_9199462926327450350);
void live_H_32(double *state, double *unused, double *out_6730806947389842532);
void live_h_13(double *state, double *unused, double *out_3826583407417889778);
void live_H_13(double *state, double *unused, double *out_3672088104010170074);
void live_h_14(double *state, double *unused, double *out_2694197172040937469);
void live_H_14(double *state, double *unused, double *out_1408449168173906632);
void live_h_33(double *state, double *unused, double *out_6802426037572342548);
void live_H_33(double *state, double *unused, double *out_7684478583555780967);
void live_H(double *in_vec, double *out_5452829107469162780);
void live_err_fun(double *nom_x, double *delta_x, double *out_3220790007633989495);
void live_inv_err_fun(double *nom_x, double *true_x, double *out_4938944413096769859);
void live_H_mod_fun(double *state, double *out_3163350226954137755);
void live_f_fun(double *state, double dt, double *out_906380554342107344);
void live_F_fun(double *state, double dt, double *out_8771576855209840709);
void live_h_4(double *state, double *unused, double *out_5673006619389236486);
void live_H_4(double *state, double *unused, double *out_1461864924616712124);
void live_h_9(double *state, double *unused, double *out_2928313839239557547);
void live_H_9(double *state, double *unused, double *out_5825354010647735346);
void live_h_10(double *state, double *unused, double *out_4937947399891705567);
void live_H_10(double *state, double *unused, double *out_6853151491969528711);
void live_h_12(double *state, double *unused, double *out_8953356214902748655);
void live_H_12(double *state, double *unused, double *out_3557591483415249671);
void live_h_35(double *state, double *unused, double *out_2130568491963600512);
void live_H_35(double *state, double *unused, double *out_6303154515740263380);
void live_h_32(double *state, double *unused, double *out_1026443349713726609);
void live_H_32(double *state, double *unused, double *out_6342285185761675678);
void live_h_13(double *state, double *unused, double *out_5536550817418961602);
void live_H_13(double *state, double *unused, double *out_1205943401545293765);
void live_h_14(double *state, double *unused, double *out_2928313839239557547);
void live_H_14(double *state, double *unused, double *out_5825354010647735346);
void live_h_33(double *state, double *unused, double *out_4511517793756921927);
void live_H_33(double *state, double *unused, double *out_8993032553330430632);
void live_predict(double *in_x, double *in_P, double *in_Q, double dt);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -25845,7 +25845,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0);
(void)__Pyx_modinit_variable_import_code(__pyx_mstate);
(void)__Pyx_modinit_function_import_code(__pyx_mstate);
/*--- Execution code ---*/
__Pyx_TraceStartFunc("PyInit_ekf_sym_pyx", __pyx_f[0], 1, 1, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
__Pyx_TraceStartFunc("PyInit_ekf_sym_pyx", __pyx_f[0], 1, 0, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
/* "View.MemoryView":108
*
@@ -26644,7 +26644,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0);
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_TraceReturnValue(Py_None, 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
__Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
__Pyx_PyMonitoring_ExitScope(0);
/*--- Wrapped vars code ---*/
@@ -26654,7 +26654,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_TraceException(__pyx_lineno, 0, 0);
__Pyx_TraceExceptionUnwind(1, 0);
__Pyx_TraceExceptionUnwind(0, 0);
if (__pyx_m) {
if (__pyx_mstate->__pyx_d && stringtab_initialized) {
__Pyx_AddTraceback("init rednose.helpers.ekf_sym_pyx", __pyx_clineno, __pyx_lineno, __pyx_filename);