diff --git a/opendbc_repo/opendbc/car/hyundai/carstate.py b/opendbc_repo/opendbc/car/hyundai/carstate.py index 6a59143de1..2b30b8308d 100644 --- a/opendbc_repo/opendbc/car/hyundai/carstate.py +++ b/opendbc_repo/opendbc/car/hyundai/carstate.py @@ -8,7 +8,7 @@ from opendbc.car import Bus, create_button_events, structs from opendbc.car.common.conversions import Conversions as CV from opendbc.car.hyundai.hyundaicanfd import CanBus from opendbc.car.hyundai.values import HyundaiFlags, HyundaiStarPilotFlags, HyundaiStarPilotSafetyFlags, CAR, DBC, Buttons, CarControllerParams, \ - hyundai_cancel_button_enables_cruise, ALT_BUS_LDA_BUTTON_CARS + hyundai_cancel_button_enables_cruise, ALT_BUS_LDA_BUTTON_CARS, ALT_BUS_LDA_BUTTON_SWL_STAT_CARS from opendbc.car.interfaces import CarStateBase ButtonType = structs.CarState.ButtonEvent.Type @@ -175,8 +175,12 @@ class CarState(CarStateBase): return False def create_alt_bus_lda_button_events(self, cp_source: CANParser) -> list[structs.CarState.ButtonEvent]: - raw_lda_button = int(cp_source.vl["CLU13"]["CF_Clu_LdwsLkasSW"]) - raw_lda_button_ts_nanos = cp_source.ts_nanos["CLU13"]["CF_Clu_LdwsLkasSW"] + if self.CP.carFingerprint in ALT_BUS_LDA_BUTTON_SWL_STAT_CARS: + raw_lda_button = int(cp_source.vl["CLU13"]["CF_Clu_SWL_Stat"] == 4) + raw_lda_button_ts_nanos = cp_source.ts_nanos["CLU13"]["CF_Clu_SWL_Stat"] + else: + raw_lda_button = int(cp_source.vl["CLU13"]["CF_Clu_LdwsLkasSW"]) + raw_lda_button_ts_nanos = cp_source.ts_nanos["CLU13"]["CF_Clu_LdwsLkasSW"] button_events: list[structs.CarState.ButtonEvent] = [] # Some alt-bus LKAS button layouts pulse several times per physical press burst. diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index 2c4fe9b815..5a2100172b 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -629,6 +629,43 @@ class TestHyundaiFingerprint: ret = update(0, 3) assert any(be.type == ButtonType.lkas and not be.pressed for be in ret.buttonEvents) + def test_sonata_hybrid_uses_alt_bus_lkas_parser(self): + toggles = get_test_toggles() + fingerprint = gen_empty_fingerprint() + fingerprint[0][0x391] = 8 + fingerprint[1][0x50C] = 8 + CP = CarInterface.get_params(CAR.HYUNDAI_SONATA_HYBRID, fingerprint, [], False, False, False, toggles) + FPCP = CarInterface.get_starpilot_params(CAR.HYUNDAI_SONATA_HYBRID, fingerprint, [], CP, toggles) + + car_state = CarState(CP, FPCP) + can_parsers = car_state.get_can_parsers(CP) + + assert Bus.alt in can_parsers + + def test_sonata_hybrid_alt_bus_clu13_lkas_button_event(self): + toggles = get_test_toggles() + fingerprint = gen_empty_fingerprint() + fingerprint[0][0x391] = 8 + fingerprint[1][0x50C] = 8 + CP = CarInterface.get_params(CAR.HYUNDAI_SONATA_HYBRID, fingerprint, [], False, False, False, toggles) + FPCP = CarInterface.get_starpilot_params(CAR.HYUNDAI_SONATA_HYBRID, fingerprint, [], CP, toggles) + + car_state = CarState(CP, FPCP) + can_parsers = car_state.get_can_parsers(CP) + packer = CANPacker(DBC[CP.carFingerprint][Bus.pt]) + + def update(lkas_button: int, frame: int): + msg = packer.make_can_msg("CLU13", 1, { + "CF_Clu_SWL_Stat": lkas_button, + }) + can_parsers[Bus.alt].update([(frame, [msg])]) + return car_state.update(can_parsers, toggles)[0] + + update(0, 1) + ret = update(4, 2) + assert any(be.type == ButtonType.lkas and be.pressed for be in ret.buttonEvents) + assert any(be.type == ButtonType.lkas and not be.pressed for be in ret.buttonEvents) + def test_genesis_g90_does_not_use_alt_bus_lkas_parser(self): toggles = get_test_toggles() CP = CarInterface.get_params(CAR.GENESIS_G90, gen_empty_fingerprint(), [], False, False, False, toggles) diff --git a/opendbc_repo/opendbc/car/hyundai/values.py b/opendbc_repo/opendbc/car/hyundai/values.py index f334595113..ccc2c96f1d 100644 --- a/opendbc_repo/opendbc/car/hyundai/values.py +++ b/opendbc_repo/opendbc/car/hyundai/values.py @@ -927,10 +927,20 @@ CANCEL_BUTTON_ENABLE_CARS = frozenset({ }) -# No classic HKG platforms are currently opted into the synthetic alt-bus LKAS -# button path. The G90 regression is mitigated by falling back to the standard -# Hyundai LKAS button handling until a route-proven alt-bus implementation is ready. -ALT_BUS_LDA_BUTTON_CARS = frozenset() +# These classic HKG platforms publish the LKAS button on CLU13 over the alt bus. +# Keep G90 excluded until its alt-bus path is route-proven without the recent +# engage/disengage regression. +ALT_BUS_LDA_BUTTON_CARS = frozenset({ + CAR.HYUNDAI_SONATA, + CAR.HYUNDAI_SONATA_HYBRID, +}) + +# On these Sonata layouts the alt-bus LKAS button pulses through the CLU13 +# steering-wheel-status field instead of the dedicated LKAS bit. +ALT_BUS_LDA_BUTTON_SWL_STAT_CARS = frozenset({ + CAR.HYUNDAI_SONATA, + CAR.HYUNDAI_SONATA_HYBRID, +}) def hyundai_cancel_button_enables_cruise(car_fingerprint) -> bool: diff --git a/panda/board/obj/body_h7.bin.signed b/panda/board/obj/body_h7.bin.signed index 976ddf1793..4a7a868913 100644 Binary files a/panda/board/obj/body_h7.bin.signed and b/panda/board/obj/body_h7.bin.signed differ diff --git a/panda/board/obj/body_h7/bootstub.elf b/panda/board/obj/body_h7/bootstub.elf index f2ae6d16ea..fb7eb54ea0 100755 Binary files a/panda/board/obj/body_h7/bootstub.elf and b/panda/board/obj/body_h7/bootstub.elf differ diff --git a/panda/board/obj/body_h7/main.bin b/panda/board/obj/body_h7/main.bin index 79f5c041ec..8bab6277af 100755 Binary files a/panda/board/obj/body_h7/main.bin and b/panda/board/obj/body_h7/main.bin differ diff --git a/panda/board/obj/body_h7/main.elf b/panda/board/obj/body_h7/main.elf index ab9472f266..8a63025173 100755 Binary files a/panda/board/obj/body_h7/main.elf and b/panda/board/obj/body_h7/main.elf differ diff --git a/panda/board/obj/bootstub.body_h7.bin b/panda/board/obj/bootstub.body_h7.bin index 43fbc800fd..e9fd1a0862 100755 Binary files a/panda/board/obj/bootstub.body_h7.bin and b/panda/board/obj/bootstub.body_h7.bin differ diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index f26b223737..3a48b4f4fc 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/bootstub.panda_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index 1b01b21647..594c65da1e 100755 Binary files a/panda/board/obj/bootstub.panda_h7.bin and b/panda/board/obj/bootstub.panda_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_h7_remote.bin b/panda/board/obj/bootstub.panda_h7_remote.bin index 1b01b21647..594c65da1e 100755 Binary files a/panda/board/obj/bootstub.panda_h7_remote.bin and b/panda/board/obj/bootstub.panda_h7_remote.bin differ diff --git a/panda/board/obj/bootstub.panda_jungle_h7.bin b/panda/board/obj/bootstub.panda_jungle_h7.bin index e899cf69a7..f7b1fa31da 100755 Binary files a/panda/board/obj/bootstub.panda_jungle_h7.bin and b/panda/board/obj/bootstub.panda_jungle_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_remote.bin b/panda/board/obj/bootstub.panda_remote.bin index f26b223737..3a48b4f4fc 100755 Binary files a/panda/board/obj/bootstub.panda_remote.bin and b/panda/board/obj/bootstub.panda_remote.bin differ diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index be7f4deb2a..ff25e0ffe3 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1,2 +1,2 @@ extern const uint8_t gitversion[19]; -const uint8_t gitversion[19] = "DEV-3de95a34-DEBUG"; +const uint8_t gitversion[19] = "DEV-6ca397b8-DEBUG"; diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index e309f0cb19..1edf4504a7 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/bootstub.elf b/panda/board/obj/panda/bootstub.elf index 81b0eccbf0..14f2ab4682 100755 Binary files a/panda/board/obj/panda/bootstub.elf and b/panda/board/obj/panda/bootstub.elf differ diff --git a/panda/board/obj/panda/main.bin b/panda/board/obj/panda/main.bin index 8f190dbce2..6af7e6dfe7 100755 Binary files a/panda/board/obj/panda/main.bin and b/panda/board/obj/panda/main.bin differ diff --git a/panda/board/obj/panda/main.elf b/panda/board/obj/panda/main.elf index 9ca705c1ad..75ffdd70ed 100755 Binary files a/panda/board/obj/panda/main.elf and b/panda/board/obj/panda/main.elf differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index cbc0c52b1f..28c3fcfd09 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/board/obj/panda_h7/bootstub.elf b/panda/board/obj/panda_h7/bootstub.elf index fd6944a3d9..10abf32864 100755 Binary files a/panda/board/obj/panda_h7/bootstub.elf and b/panda/board/obj/panda_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_h7/main.bin b/panda/board/obj/panda_h7/main.bin index 3fca14cbfb..f7928f5b6a 100755 Binary files a/panda/board/obj/panda_h7/main.bin and b/panda/board/obj/panda_h7/main.bin differ diff --git a/panda/board/obj/panda_h7/main.elf b/panda/board/obj/panda_h7/main.elf index bae5ad728f..ee946c43f7 100755 Binary files a/panda/board/obj/panda_h7/main.elf and b/panda/board/obj/panda_h7/main.elf differ diff --git a/panda/board/obj/panda_h7_remote.bin.signed b/panda/board/obj/panda_h7_remote.bin.signed index fec4dfe7ee..7ff7b44ed2 100644 Binary files a/panda/board/obj/panda_h7_remote.bin.signed and b/panda/board/obj/panda_h7_remote.bin.signed differ diff --git a/panda/board/obj/panda_h7_remote/bootstub.elf b/panda/board/obj/panda_h7_remote/bootstub.elf index 275ecc959d..fcf88312ce 100755 Binary files a/panda/board/obj/panda_h7_remote/bootstub.elf and b/panda/board/obj/panda_h7_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_h7_remote/main.bin b/panda/board/obj/panda_h7_remote/main.bin index bbab1bc37d..72a5d3cc8e 100755 Binary files a/panda/board/obj/panda_h7_remote/main.bin and b/panda/board/obj/panda_h7_remote/main.bin differ diff --git a/panda/board/obj/panda_h7_remote/main.elf b/panda/board/obj/panda_h7_remote/main.elf index fb09b119e7..83783ce10b 100755 Binary files a/panda/board/obj/panda_h7_remote/main.elf and b/panda/board/obj/panda_h7_remote/main.elf differ diff --git a/panda/board/obj/panda_jungle_h7.bin.signed b/panda/board/obj/panda_jungle_h7.bin.signed index e7da0f23a2..5f8aeb51dc 100644 Binary files a/panda/board/obj/panda_jungle_h7.bin.signed and b/panda/board/obj/panda_jungle_h7.bin.signed differ diff --git a/panda/board/obj/panda_jungle_h7/bootstub.elf b/panda/board/obj/panda_jungle_h7/bootstub.elf index 94b9d53836..7c4fc03671 100755 Binary files a/panda/board/obj/panda_jungle_h7/bootstub.elf and b/panda/board/obj/panda_jungle_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_jungle_h7/main.bin b/panda/board/obj/panda_jungle_h7/main.bin index c5b84b1810..47d51977c1 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.bin and b/panda/board/obj/panda_jungle_h7/main.bin differ diff --git a/panda/board/obj/panda_jungle_h7/main.elf b/panda/board/obj/panda_jungle_h7/main.elf index 75a9b5e2e5..9aac1142b5 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.elf and b/panda/board/obj/panda_jungle_h7/main.elf differ diff --git a/panda/board/obj/panda_remote.bin.signed b/panda/board/obj/panda_remote.bin.signed index 6b30b14661..e68c61b0d5 100644 Binary files a/panda/board/obj/panda_remote.bin.signed and b/panda/board/obj/panda_remote.bin.signed differ diff --git a/panda/board/obj/panda_remote/bootstub.elf b/panda/board/obj/panda_remote/bootstub.elf index 66f4e82063..9a92e44a57 100755 Binary files a/panda/board/obj/panda_remote/bootstub.elf and b/panda/board/obj/panda_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_remote/main.bin b/panda/board/obj/panda_remote/main.bin index 9af1c2caac..12b33fe694 100755 Binary files a/panda/board/obj/panda_remote/main.bin and b/panda/board/obj/panda_remote/main.bin differ diff --git a/panda/board/obj/panda_remote/main.elf b/panda/board/obj/panda_remote/main.elf index 6918338f55..144b460cfc 100755 Binary files a/panda/board/obj/panda_remote/main.elf and b/panda/board/obj/panda_remote/main.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index 706710468c..734ddc00a4 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-3de95a34-DEBUG \ No newline at end of file +DEV-6ca397b8-DEBUG \ No newline at end of file diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index c65489f9b0..b274b0d371 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -224,6 +224,18 @@ FAR_LEAD_COMFORT_BRAKE_CAP_FULL_HEADWAY_MARGIN = 1.00 FAR_LEAD_COMFORT_BRAKE_CAP_MIN_DECEL = 0.05 FAR_LEAD_COMFORT_BRAKE_CAP_MAX_DECEL = 0.18 FAR_LEAD_COMFORT_BRAKE_CAP_FULL_RELAX_DECEL = 0.05 +MATCHED_FOLLOW_TRANSITION_MIN_SPEED = 20.0 +MATCHED_FOLLOW_TRANSITION_MIN_HEADWAY_MARGIN = 0.25 +MATCHED_FOLLOW_TRANSITION_FULL_HEADWAY_MARGIN = 0.75 +MATCHED_FOLLOW_TRANSITION_MIN_MODEL_PROB = 0.9 +MATCHED_FOLLOW_TRANSITION_MAX_LEAD_BRAKE = 0.18 +MATCHED_FOLLOW_TRANSITION_MAX_CLOSING_SPEED = 1.75 +MATCHED_FOLLOW_TRANSITION_MIN_TTC = 12.0 +MATCHED_FOLLOW_TRANSITION_MIN_POSITIVE_STEP = 0.08 +MATCHED_FOLLOW_TRANSITION_MAX_POSITIVE_STEP = 0.18 +MATCHED_FOLLOW_TRANSITION_MIN_NEGATIVE_STEP = 0.08 +MATCHED_FOLLOW_TRANSITION_MAX_NEGATIVE_STEP = 0.16 +MATCHED_FOLLOW_TRANSITION_SIGN_CROSS_STEP = 0.10 TRACKED_VISION_MODEL_FLOOR_MIN_SPEED = 10.0 TRACKED_VISION_MODEL_FLOOR_MIN_MODEL_PROB = 0.95 TRACKED_VISION_MODEL_FLOOR_MIN_MODEL_DECEL = 0.80 @@ -1186,6 +1198,74 @@ class LongitudinalPlanner: )) return -max(0.0, cap_decel - relax_decel) + def get_matched_follow_transition_target(self, lead, v_ego, base_t_follow, prev_output_a_target, output_a_target): + if lead is None or not lead.status: + return None + if float(v_ego) < MATCHED_FOLLOW_TRANSITION_MIN_SPEED: + return None + + lead_prob = float(getattr(lead, "modelProb", 0.0)) + if lead_prob < MATCHED_FOLLOW_TRANSITION_MIN_MODEL_PROB: + return None + + lead_brake = max(0.0, -float(getattr(lead, "aLeadK", 0.0))) + if lead_brake > MATCHED_FOLLOW_TRANSITION_MAX_LEAD_BRAKE: + return None + + relative_speed = float(v_ego) - float(lead.vLead) + if not (STEADY_FOLLOW_BRAKE_CAP_MIN_REL_SPEED <= relative_speed <= STEADY_FOLLOW_SMOOTHING_MAX_CLOSING_SPEED): + return None + + closing_speed = max(0.0, relative_speed) + if closing_speed > MATCHED_FOLLOW_TRANSITION_MAX_CLOSING_SPEED: + return None + + ttc = float(lead.dRel) / max(closing_speed, 0.1) if closing_speed > 0.1 else float("inf") + if ttc < MATCHED_FOLLOW_TRANSITION_MIN_TTC: + return None + + actual_headway = float(lead.dRel) / max(float(v_ego), 1e-3) + headway_margin = actual_headway - float(base_t_follow) + if headway_margin < MATCHED_FOLLOW_TRANSITION_MIN_HEADWAY_MARGIN: + return None + if actual_headway > float(base_t_follow) + STEADY_FOLLOW_BRAKE_CAP_MAX_HEADWAY_ABOVE_TARGET: + return None + + target_delta = float(output_a_target) - float(prev_output_a_target) + if abs(target_delta) < 1e-3: + return None + + headway_factor = float(np.clip( + (headway_margin - MATCHED_FOLLOW_TRANSITION_MIN_HEADWAY_MARGIN) / + max(MATCHED_FOLLOW_TRANSITION_FULL_HEADWAY_MARGIN - MATCHED_FOLLOW_TRANSITION_MIN_HEADWAY_MARGIN, 1e-3), + 0.0, + 1.0, + )) + + positive_step = float(np.interp( + max(float(lead.vLead) - float(v_ego), 0.0), + [0.0, 1.0], + [MATCHED_FOLLOW_TRANSITION_MIN_POSITIVE_STEP, MATCHED_FOLLOW_TRANSITION_MAX_POSITIVE_STEP], + )) + negative_step = float(np.interp( + closing_speed, + [0.0, MATCHED_FOLLOW_TRANSITION_MAX_CLOSING_SPEED], + [MATCHED_FOLLOW_TRANSITION_MIN_NEGATIVE_STEP, MATCHED_FOLLOW_TRANSITION_MAX_NEGATIVE_STEP], + )) + + # The more space we still have, the less abrupt the comfort path should be. + positive_step = float(np.interp(headway_factor, [0.0, 1.0], [positive_step, MATCHED_FOLLOW_TRANSITION_MIN_POSITIVE_STEP])) + negative_step = float(np.interp(headway_factor, [0.0, 1.0], [negative_step, MATCHED_FOLLOW_TRANSITION_MIN_NEGATIVE_STEP])) + + if float(prev_output_a_target) * float(output_a_target) < 0.0: + positive_step = min(positive_step, MATCHED_FOLLOW_TRANSITION_SIGN_CROSS_STEP) + negative_step = min(negative_step, MATCHED_FOLLOW_TRANSITION_SIGN_CROSS_STEP) + + lower = float(prev_output_a_target) - negative_step + upper = float(prev_output_a_target) + positive_step + smoothed_target = float(np.clip(output_a_target, lower, upper)) + return smoothed_target if abs(smoothed_target - float(output_a_target)) > 1e-6 else None + def get_tracked_vision_model_brake_floor(self, lead, v_ego, accel_min, t_follow, model_desired): if lead is None or not lead.status or bool(getattr(lead, "radar", False)): return None @@ -1886,6 +1966,21 @@ class LongitudinalPlanner: self.a_desired = max(self.a_desired, tracked_vision_model_brake_cap) output_a_target = max(output_a_target, tracked_vision_model_brake_cap) + if optional_far_lead_comfort and follow_control_lead is not None and not panic_bypass and not output_should_stop and not vision_low_speed_stop_active: + matched_follow_transition_target = self.get_matched_follow_transition_target( + follow_control_lead, + scene_v_ego, + effective_t_follow, + prev_output_a_target, + output_a_target, + ) + if matched_follow_transition_target is not None: + if matched_follow_transition_target < output_a_target: + self.a_desired = min(self.a_desired, matched_follow_transition_target) + else: + self.a_desired = max(self.a_desired, matched_follow_transition_target) + output_a_target = matched_follow_transition_target + output_accel_max = no_throttle_output_max if not self.allow_throttle else accel_limits_turns[1] output_a_target = float(np.clip(output_a_target, output_accel_min, output_accel_max)) diff --git a/selfdrive/controls/tests/test_longitudinal_planner.py b/selfdrive/controls/tests/test_longitudinal_planner.py index 26335950e0..a777f4a008 100644 --- a/selfdrive/controls/tests/test_longitudinal_planner.py +++ b/selfdrive/controls/tests/test_longitudinal_planner.py @@ -1748,3 +1748,39 @@ def test_far_lead_soft_brake_cap_limits_high_confidence_distant_vision_lead(): assert cap is not None assert cap > -0.2 assert cap < -0.05 + + +def test_matched_follow_transition_target_damps_large_comfort_sign_flip(): + v_ego = 20.3 + CP = CarInterface.get_non_essential_params(CAR.HONDA_CIVIC) + planner = LongitudinalPlanner(CP, init_v=v_ego) + lead = make_lead(status=True, d_rel=45.6, v_lead=19.19, a_lead=0.0, radar=False, model_prob=0.99) + + smoothed = planner.get_matched_follow_transition_target( + lead, + v_ego, + 1.45, + prev_output_a_target=0.12, + output_a_target=-0.40, + ) + + assert smoothed is not None + assert smoothed > -0.05 + assert smoothed < 0.12 + + +def test_matched_follow_transition_target_skips_urgent_closure(): + v_ego = 31.5 + CP = CarInterface.get_non_essential_params(CAR.HONDA_CIVIC) + planner = LongitudinalPlanner(CP, init_v=v_ego) + lead = make_lead(status=True, d_rel=35.0, v_lead=28.0, a_lead=0.0, radar=False, model_prob=0.99) + + smoothed = planner.get_matched_follow_transition_target( + lead, + v_ego, + 1.45, + prev_output_a_target=0.10, + output_a_target=-0.60, + ) + + assert smoothed is None diff --git a/selfdrive/locationd/models/generated/car.cpp b/selfdrive/locationd/models/generated/car.cpp index db17b418e4..a8617b9e45 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_8206107047934752633) { - out_8206107047934752633[0] = delta_x[0] + nom_x[0]; - out_8206107047934752633[1] = delta_x[1] + nom_x[1]; - out_8206107047934752633[2] = delta_x[2] + nom_x[2]; - out_8206107047934752633[3] = delta_x[3] + nom_x[3]; - out_8206107047934752633[4] = delta_x[4] + nom_x[4]; - out_8206107047934752633[5] = delta_x[5] + nom_x[5]; - out_8206107047934752633[6] = delta_x[6] + nom_x[6]; - out_8206107047934752633[7] = delta_x[7] + nom_x[7]; - out_8206107047934752633[8] = delta_x[8] + nom_x[8]; +void err_fun(double *nom_x, double *delta_x, double *out_4770141140221383025) { + out_4770141140221383025[0] = delta_x[0] + nom_x[0]; + out_4770141140221383025[1] = delta_x[1] + nom_x[1]; + out_4770141140221383025[2] = delta_x[2] + nom_x[2]; + out_4770141140221383025[3] = delta_x[3] + nom_x[3]; + out_4770141140221383025[4] = delta_x[4] + nom_x[4]; + out_4770141140221383025[5] = delta_x[5] + nom_x[5]; + out_4770141140221383025[6] = delta_x[6] + nom_x[6]; + out_4770141140221383025[7] = delta_x[7] + nom_x[7]; + out_4770141140221383025[8] = delta_x[8] + nom_x[8]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_3582621965851683853) { - out_3582621965851683853[0] = -nom_x[0] + true_x[0]; - out_3582621965851683853[1] = -nom_x[1] + true_x[1]; - out_3582621965851683853[2] = -nom_x[2] + true_x[2]; - out_3582621965851683853[3] = -nom_x[3] + true_x[3]; - out_3582621965851683853[4] = -nom_x[4] + true_x[4]; - out_3582621965851683853[5] = -nom_x[5] + true_x[5]; - out_3582621965851683853[6] = -nom_x[6] + true_x[6]; - out_3582621965851683853[7] = -nom_x[7] + true_x[7]; - out_3582621965851683853[8] = -nom_x[8] + true_x[8]; +void inv_err_fun(double *nom_x, double *true_x, double *out_8267480455965364332) { + out_8267480455965364332[0] = -nom_x[0] + true_x[0]; + out_8267480455965364332[1] = -nom_x[1] + true_x[1]; + out_8267480455965364332[2] = -nom_x[2] + true_x[2]; + out_8267480455965364332[3] = -nom_x[3] + true_x[3]; + out_8267480455965364332[4] = -nom_x[4] + true_x[4]; + out_8267480455965364332[5] = -nom_x[5] + true_x[5]; + out_8267480455965364332[6] = -nom_x[6] + true_x[6]; + out_8267480455965364332[7] = -nom_x[7] + true_x[7]; + out_8267480455965364332[8] = -nom_x[8] + true_x[8]; } -void H_mod_fun(double *state, double *out_3381247545329584694) { - out_3381247545329584694[0] = 1.0; - out_3381247545329584694[1] = 0.0; - out_3381247545329584694[2] = 0.0; - out_3381247545329584694[3] = 0.0; - out_3381247545329584694[4] = 0.0; - out_3381247545329584694[5] = 0.0; - out_3381247545329584694[6] = 0.0; - out_3381247545329584694[7] = 0.0; - out_3381247545329584694[8] = 0.0; - out_3381247545329584694[9] = 0.0; - out_3381247545329584694[10] = 1.0; - out_3381247545329584694[11] = 0.0; - out_3381247545329584694[12] = 0.0; - out_3381247545329584694[13] = 0.0; - out_3381247545329584694[14] = 0.0; - out_3381247545329584694[15] = 0.0; - out_3381247545329584694[16] = 0.0; - out_3381247545329584694[17] = 0.0; - out_3381247545329584694[18] = 0.0; - out_3381247545329584694[19] = 0.0; - out_3381247545329584694[20] = 1.0; - out_3381247545329584694[21] = 0.0; - out_3381247545329584694[22] = 0.0; - out_3381247545329584694[23] = 0.0; - out_3381247545329584694[24] = 0.0; - out_3381247545329584694[25] = 0.0; - out_3381247545329584694[26] = 0.0; - out_3381247545329584694[27] = 0.0; - out_3381247545329584694[28] = 0.0; - out_3381247545329584694[29] = 0.0; - out_3381247545329584694[30] = 1.0; - out_3381247545329584694[31] = 0.0; - out_3381247545329584694[32] = 0.0; - out_3381247545329584694[33] = 0.0; - out_3381247545329584694[34] = 0.0; - out_3381247545329584694[35] = 0.0; - out_3381247545329584694[36] = 0.0; - out_3381247545329584694[37] = 0.0; - out_3381247545329584694[38] = 0.0; - out_3381247545329584694[39] = 0.0; - out_3381247545329584694[40] = 1.0; - out_3381247545329584694[41] = 0.0; - out_3381247545329584694[42] = 0.0; - out_3381247545329584694[43] = 0.0; - out_3381247545329584694[44] = 0.0; - out_3381247545329584694[45] = 0.0; - out_3381247545329584694[46] = 0.0; - out_3381247545329584694[47] = 0.0; - out_3381247545329584694[48] = 0.0; - out_3381247545329584694[49] = 0.0; - out_3381247545329584694[50] = 1.0; - out_3381247545329584694[51] = 0.0; - out_3381247545329584694[52] = 0.0; - out_3381247545329584694[53] = 0.0; - out_3381247545329584694[54] = 0.0; - out_3381247545329584694[55] = 0.0; - out_3381247545329584694[56] = 0.0; - out_3381247545329584694[57] = 0.0; - out_3381247545329584694[58] = 0.0; - out_3381247545329584694[59] = 0.0; - out_3381247545329584694[60] = 1.0; - out_3381247545329584694[61] = 0.0; - out_3381247545329584694[62] = 0.0; - out_3381247545329584694[63] = 0.0; - out_3381247545329584694[64] = 0.0; - out_3381247545329584694[65] = 0.0; - out_3381247545329584694[66] = 0.0; - out_3381247545329584694[67] = 0.0; - out_3381247545329584694[68] = 0.0; - out_3381247545329584694[69] = 0.0; - out_3381247545329584694[70] = 1.0; - out_3381247545329584694[71] = 0.0; - out_3381247545329584694[72] = 0.0; - out_3381247545329584694[73] = 0.0; - out_3381247545329584694[74] = 0.0; - out_3381247545329584694[75] = 0.0; - out_3381247545329584694[76] = 0.0; - out_3381247545329584694[77] = 0.0; - out_3381247545329584694[78] = 0.0; - out_3381247545329584694[79] = 0.0; - out_3381247545329584694[80] = 1.0; +void H_mod_fun(double *state, double *out_4700437164455479144) { + out_4700437164455479144[0] = 1.0; + out_4700437164455479144[1] = 0.0; + out_4700437164455479144[2] = 0.0; + out_4700437164455479144[3] = 0.0; + out_4700437164455479144[4] = 0.0; + out_4700437164455479144[5] = 0.0; + out_4700437164455479144[6] = 0.0; + out_4700437164455479144[7] = 0.0; + out_4700437164455479144[8] = 0.0; + out_4700437164455479144[9] = 0.0; + out_4700437164455479144[10] = 1.0; + out_4700437164455479144[11] = 0.0; + out_4700437164455479144[12] = 0.0; + out_4700437164455479144[13] = 0.0; + out_4700437164455479144[14] = 0.0; + out_4700437164455479144[15] = 0.0; + out_4700437164455479144[16] = 0.0; + out_4700437164455479144[17] = 0.0; + out_4700437164455479144[18] = 0.0; + out_4700437164455479144[19] = 0.0; + out_4700437164455479144[20] = 1.0; + out_4700437164455479144[21] = 0.0; + out_4700437164455479144[22] = 0.0; + out_4700437164455479144[23] = 0.0; + out_4700437164455479144[24] = 0.0; + out_4700437164455479144[25] = 0.0; + out_4700437164455479144[26] = 0.0; + out_4700437164455479144[27] = 0.0; + out_4700437164455479144[28] = 0.0; + out_4700437164455479144[29] = 0.0; + out_4700437164455479144[30] = 1.0; + out_4700437164455479144[31] = 0.0; + out_4700437164455479144[32] = 0.0; + out_4700437164455479144[33] = 0.0; + out_4700437164455479144[34] = 0.0; + out_4700437164455479144[35] = 0.0; + out_4700437164455479144[36] = 0.0; + out_4700437164455479144[37] = 0.0; + out_4700437164455479144[38] = 0.0; + out_4700437164455479144[39] = 0.0; + out_4700437164455479144[40] = 1.0; + out_4700437164455479144[41] = 0.0; + out_4700437164455479144[42] = 0.0; + out_4700437164455479144[43] = 0.0; + out_4700437164455479144[44] = 0.0; + out_4700437164455479144[45] = 0.0; + out_4700437164455479144[46] = 0.0; + out_4700437164455479144[47] = 0.0; + out_4700437164455479144[48] = 0.0; + out_4700437164455479144[49] = 0.0; + out_4700437164455479144[50] = 1.0; + out_4700437164455479144[51] = 0.0; + out_4700437164455479144[52] = 0.0; + out_4700437164455479144[53] = 0.0; + out_4700437164455479144[54] = 0.0; + out_4700437164455479144[55] = 0.0; + out_4700437164455479144[56] = 0.0; + out_4700437164455479144[57] = 0.0; + out_4700437164455479144[58] = 0.0; + out_4700437164455479144[59] = 0.0; + out_4700437164455479144[60] = 1.0; + out_4700437164455479144[61] = 0.0; + out_4700437164455479144[62] = 0.0; + out_4700437164455479144[63] = 0.0; + out_4700437164455479144[64] = 0.0; + out_4700437164455479144[65] = 0.0; + out_4700437164455479144[66] = 0.0; + out_4700437164455479144[67] = 0.0; + out_4700437164455479144[68] = 0.0; + out_4700437164455479144[69] = 0.0; + out_4700437164455479144[70] = 1.0; + out_4700437164455479144[71] = 0.0; + out_4700437164455479144[72] = 0.0; + out_4700437164455479144[73] = 0.0; + out_4700437164455479144[74] = 0.0; + out_4700437164455479144[75] = 0.0; + out_4700437164455479144[76] = 0.0; + out_4700437164455479144[77] = 0.0; + out_4700437164455479144[78] = 0.0; + out_4700437164455479144[79] = 0.0; + out_4700437164455479144[80] = 1.0; } -void f_fun(double *state, double dt, double *out_4828443839748202677) { - out_4828443839748202677[0] = state[0]; - out_4828443839748202677[1] = state[1]; - out_4828443839748202677[2] = state[2]; - out_4828443839748202677[3] = state[3]; - out_4828443839748202677[4] = state[4]; - out_4828443839748202677[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_4828443839748202677[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_4828443839748202677[7] = state[7]; - out_4828443839748202677[8] = state[8]; +void f_fun(double *state, double dt, double *out_2370248777466162255) { + out_2370248777466162255[0] = state[0]; + out_2370248777466162255[1] = state[1]; + out_2370248777466162255[2] = state[2]; + out_2370248777466162255[3] = state[3]; + out_2370248777466162255[4] = state[4]; + out_2370248777466162255[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_2370248777466162255[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_2370248777466162255[7] = state[7]; + out_2370248777466162255[8] = state[8]; } -void F_fun(double *state, double dt, double *out_3545622658498023447) { - out_3545622658498023447[0] = 1; - out_3545622658498023447[1] = 0; - out_3545622658498023447[2] = 0; - out_3545622658498023447[3] = 0; - out_3545622658498023447[4] = 0; - out_3545622658498023447[5] = 0; - out_3545622658498023447[6] = 0; - out_3545622658498023447[7] = 0; - out_3545622658498023447[8] = 0; - out_3545622658498023447[9] = 0; - out_3545622658498023447[10] = 1; - out_3545622658498023447[11] = 0; - out_3545622658498023447[12] = 0; - out_3545622658498023447[13] = 0; - out_3545622658498023447[14] = 0; - out_3545622658498023447[15] = 0; - out_3545622658498023447[16] = 0; - out_3545622658498023447[17] = 0; - out_3545622658498023447[18] = 0; - out_3545622658498023447[19] = 0; - out_3545622658498023447[20] = 1; - out_3545622658498023447[21] = 0; - out_3545622658498023447[22] = 0; - out_3545622658498023447[23] = 0; - out_3545622658498023447[24] = 0; - out_3545622658498023447[25] = 0; - out_3545622658498023447[26] = 0; - out_3545622658498023447[27] = 0; - out_3545622658498023447[28] = 0; - out_3545622658498023447[29] = 0; - out_3545622658498023447[30] = 1; - out_3545622658498023447[31] = 0; - out_3545622658498023447[32] = 0; - out_3545622658498023447[33] = 0; - out_3545622658498023447[34] = 0; - out_3545622658498023447[35] = 0; - out_3545622658498023447[36] = 0; - out_3545622658498023447[37] = 0; - out_3545622658498023447[38] = 0; - out_3545622658498023447[39] = 0; - out_3545622658498023447[40] = 1; - out_3545622658498023447[41] = 0; - out_3545622658498023447[42] = 0; - out_3545622658498023447[43] = 0; - out_3545622658498023447[44] = 0; - out_3545622658498023447[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_3545622658498023447[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); - out_3545622658498023447[47] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_3545622658498023447[48] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_3545622658498023447[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_3545622658498023447[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; - out_3545622658498023447[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); - out_3545622658498023447[52] = dt*stiffness_front*state[0]/(mass*state[1]); - out_3545622658498023447[53] = -9.8100000000000005*dt; - out_3545622658498023447[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_3545622658498023447[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); - out_3545622658498023447[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_3545622658498023447[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_3545622658498023447[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_3545622658498023447[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); - out_3545622658498023447[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_3545622658498023447[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_3545622658498023447[62] = 0; - out_3545622658498023447[63] = 0; - out_3545622658498023447[64] = 0; - out_3545622658498023447[65] = 0; - out_3545622658498023447[66] = 0; - out_3545622658498023447[67] = 0; - out_3545622658498023447[68] = 0; - out_3545622658498023447[69] = 0; - out_3545622658498023447[70] = 1; - out_3545622658498023447[71] = 0; - out_3545622658498023447[72] = 0; - out_3545622658498023447[73] = 0; - out_3545622658498023447[74] = 0; - out_3545622658498023447[75] = 0; - out_3545622658498023447[76] = 0; - out_3545622658498023447[77] = 0; - out_3545622658498023447[78] = 0; - out_3545622658498023447[79] = 0; - out_3545622658498023447[80] = 1; +void F_fun(double *state, double dt, double *out_7809506053810665802) { + out_7809506053810665802[0] = 1; + out_7809506053810665802[1] = 0; + out_7809506053810665802[2] = 0; + out_7809506053810665802[3] = 0; + out_7809506053810665802[4] = 0; + out_7809506053810665802[5] = 0; + out_7809506053810665802[6] = 0; + out_7809506053810665802[7] = 0; + out_7809506053810665802[8] = 0; + out_7809506053810665802[9] = 0; + out_7809506053810665802[10] = 1; + out_7809506053810665802[11] = 0; + out_7809506053810665802[12] = 0; + out_7809506053810665802[13] = 0; + out_7809506053810665802[14] = 0; + out_7809506053810665802[15] = 0; + out_7809506053810665802[16] = 0; + out_7809506053810665802[17] = 0; + out_7809506053810665802[18] = 0; + out_7809506053810665802[19] = 0; + out_7809506053810665802[20] = 1; + out_7809506053810665802[21] = 0; + out_7809506053810665802[22] = 0; + out_7809506053810665802[23] = 0; + out_7809506053810665802[24] = 0; + out_7809506053810665802[25] = 0; + out_7809506053810665802[26] = 0; + out_7809506053810665802[27] = 0; + out_7809506053810665802[28] = 0; + out_7809506053810665802[29] = 0; + out_7809506053810665802[30] = 1; + out_7809506053810665802[31] = 0; + out_7809506053810665802[32] = 0; + out_7809506053810665802[33] = 0; + out_7809506053810665802[34] = 0; + out_7809506053810665802[35] = 0; + out_7809506053810665802[36] = 0; + out_7809506053810665802[37] = 0; + out_7809506053810665802[38] = 0; + out_7809506053810665802[39] = 0; + out_7809506053810665802[40] = 1; + out_7809506053810665802[41] = 0; + out_7809506053810665802[42] = 0; + out_7809506053810665802[43] = 0; + out_7809506053810665802[44] = 0; + out_7809506053810665802[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_7809506053810665802[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); + out_7809506053810665802[47] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_7809506053810665802[48] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_7809506053810665802[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_7809506053810665802[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; + out_7809506053810665802[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); + out_7809506053810665802[52] = dt*stiffness_front*state[0]/(mass*state[1]); + out_7809506053810665802[53] = -9.8100000000000005*dt; + out_7809506053810665802[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_7809506053810665802[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); + out_7809506053810665802[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_7809506053810665802[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_7809506053810665802[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_7809506053810665802[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); + out_7809506053810665802[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_7809506053810665802[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_7809506053810665802[62] = 0; + out_7809506053810665802[63] = 0; + out_7809506053810665802[64] = 0; + out_7809506053810665802[65] = 0; + out_7809506053810665802[66] = 0; + out_7809506053810665802[67] = 0; + out_7809506053810665802[68] = 0; + out_7809506053810665802[69] = 0; + out_7809506053810665802[70] = 1; + out_7809506053810665802[71] = 0; + out_7809506053810665802[72] = 0; + out_7809506053810665802[73] = 0; + out_7809506053810665802[74] = 0; + out_7809506053810665802[75] = 0; + out_7809506053810665802[76] = 0; + out_7809506053810665802[77] = 0; + out_7809506053810665802[78] = 0; + out_7809506053810665802[79] = 0; + out_7809506053810665802[80] = 1; } -void h_25(double *state, double *unused, double *out_7855544973847125055) { - out_7855544973847125055[0] = state[6]; +void h_25(double *state, double *unused, double *out_2714863388055632273) { + out_2714863388055632273[0] = state[6]; } -void H_25(double *state, double *unused, double *out_5811940680582652543) { - out_5811940680582652543[0] = 0; - out_5811940680582652543[1] = 0; - out_5811940680582652543[2] = 0; - out_5811940680582652543[3] = 0; - out_5811940680582652543[4] = 0; - out_5811940680582652543[5] = 0; - out_5811940680582652543[6] = 1; - out_5811940680582652543[7] = 0; - out_5811940680582652543[8] = 0; +void H_25(double *state, double *unused, double *out_5824968876280212667) { + out_5824968876280212667[0] = 0; + out_5824968876280212667[1] = 0; + out_5824968876280212667[2] = 0; + out_5824968876280212667[3] = 0; + out_5824968876280212667[4] = 0; + out_5824968876280212667[5] = 0; + out_5824968876280212667[6] = 1; + out_5824968876280212667[7] = 0; + out_5824968876280212667[8] = 0; } -void h_24(double *state, double *unused, double *out_7215169173686495729) { - out_7215169173686495729[0] = state[4]; - out_7215169173686495729[1] = state[5]; +void h_24(double *state, double *unused, double *out_8643275185285187003) { + out_8643275185285187003[0] = state[4]; + out_8643275185285187003[1] = state[5]; } -void H_24(double *state, double *unused, double *out_7984590279588152109) { - out_7984590279588152109[0] = 0; - out_7984590279588152109[1] = 0; - out_7984590279588152109[2] = 0; - out_7984590279588152109[3] = 0; - out_7984590279588152109[4] = 1; - out_7984590279588152109[5] = 0; - out_7984590279588152109[6] = 0; - out_7984590279588152109[7] = 0; - out_7984590279588152109[8] = 0; - out_7984590279588152109[9] = 0; - out_7984590279588152109[10] = 0; - out_7984590279588152109[11] = 0; - out_7984590279588152109[12] = 0; - out_7984590279588152109[13] = 0; - out_7984590279588152109[14] = 1; - out_7984590279588152109[15] = 0; - out_7984590279588152109[16] = 0; - out_7984590279588152109[17] = 0; +void H_24(double *state, double *unused, double *out_3403096309788982558) { + out_3403096309788982558[0] = 0; + out_3403096309788982558[1] = 0; + out_3403096309788982558[2] = 0; + out_3403096309788982558[3] = 0; + out_3403096309788982558[4] = 1; + out_3403096309788982558[5] = 0; + out_3403096309788982558[6] = 0; + out_3403096309788982558[7] = 0; + out_3403096309788982558[8] = 0; + out_3403096309788982558[9] = 0; + out_3403096309788982558[10] = 0; + out_3403096309788982558[11] = 0; + out_3403096309788982558[12] = 0; + out_3403096309788982558[13] = 0; + out_3403096309788982558[14] = 1; + out_3403096309788982558[15] = 0; + out_3403096309788982558[16] = 0; + out_3403096309788982558[17] = 0; } -void h_30(double *state, double *unused, double *out_1700097778006464926) { - out_1700097778006464926[0] = state[4]; +void h_30(double *state, double *unused, double *out_4165494780684515440) { + out_4165494780684515440[0] = state[4]; } -void H_30(double *state, double *unused, double *out_1104749660908964212) { - out_1104749660908964212[0] = 0; - out_1104749660908964212[1] = 0; - out_1104749660908964212[2] = 0; - out_1104749660908964212[3] = 0; - out_1104749660908964212[4] = 1; - out_1104749660908964212[5] = 0; - out_1104749660908964212[6] = 0; - out_1104749660908964212[7] = 0; - out_1104749660908964212[8] = 0; +void H_30(double *state, double *unused, double *out_8094078867301730751) { + out_8094078867301730751[0] = 0; + out_8094078867301730751[1] = 0; + out_8094078867301730751[2] = 0; + out_8094078867301730751[3] = 0; + out_8094078867301730751[4] = 1; + out_8094078867301730751[5] = 0; + out_8094078867301730751[6] = 0; + out_8094078867301730751[7] = 0; + out_8094078867301730751[8] = 0; } -void h_26(double *state, double *unused, double *out_6125458693304696459) { - out_6125458693304696459[0] = state[7]; +void h_26(double *state, double *unused, double *out_749221491035445424) { + out_749221491035445424[0] = state[7]; } -void H_26(double *state, double *unused, double *out_8893300074252842849) { - out_8893300074252842849[0] = 0; - out_8893300074252842849[1] = 0; - out_8893300074252842849[2] = 0; - out_8893300074252842849[3] = 0; - out_8893300074252842849[4] = 0; - out_8893300074252842849[5] = 0; - out_8893300074252842849[6] = 0; - out_8893300074252842849[7] = 1; - out_8893300074252842849[8] = 0; +void H_26(double *state, double *unused, double *out_8880271878555282725) { + out_8880271878555282725[0] = 0; + out_8880271878555282725[1] = 0; + out_8880271878555282725[2] = 0; + out_8880271878555282725[3] = 0; + out_8880271878555282725[4] = 0; + out_8880271878555282725[5] = 0; + out_8880271878555282725[6] = 0; + out_8880271878555282725[7] = 1; + out_8880271878555282725[8] = 0; } -void h_27(double *state, double *unused, double *out_2212815102766168220) { - out_2212815102766168220[0] = state[3]; +void h_27(double *state, double *unused, double *out_8472848302049370229) { + out_8472848302049370229[0] = state[3]; } -void H_27(double *state, double *unused, double *out_1070013650891460699) { - out_1070013650891460699[0] = 0; - out_1070013650891460699[1] = 0; - out_1070013650891460699[2] = 0; - out_1070013650891460699[3] = 1; - out_1070013650891460699[4] = 0; - out_1070013650891460699[5] = 0; - out_1070013650891460699[6] = 0; - out_1070013650891460699[7] = 0; - out_1070013650891460699[8] = 0; +void H_27(double *state, double *unused, double *out_5919315555501305840) { + out_5919315555501305840[0] = 0; + out_5919315555501305840[1] = 0; + out_5919315555501305840[2] = 0; + out_5919315555501305840[3] = 1; + out_5919315555501305840[4] = 0; + out_5919315555501305840[5] = 0; + out_5919315555501305840[6] = 0; + out_5919315555501305840[7] = 0; + out_5919315555501305840[8] = 0; } -void h_29(double *state, double *unused, double *out_4304503098815162577) { - out_4304503098815162577[0] = state[1]; +void h_29(double *state, double *unused, double *out_836178486976330205) { + out_836178486976330205[0] = state[1]; } -void H_29(double *state, double *unused, double *out_2783376377761011732) { - out_2783376377761011732[0] = 0; - out_2783376377761011732[1] = 1; - out_2783376377761011732[2] = 0; - out_2783376377761011732[3] = 0; - out_2783376377761011732[4] = 0; - out_2783376377761011732[5] = 0; - out_2783376377761011732[6] = 0; - out_2783376377761011732[7] = 0; - out_2783376377761011732[8] = 0; +void H_29(double *state, double *unused, double *out_8604310211616122935) { + out_8604310211616122935[0] = 0; + out_8604310211616122935[1] = 1; + out_8604310211616122935[2] = 0; + out_8604310211616122935[3] = 0; + out_8604310211616122935[4] = 0; + out_8604310211616122935[5] = 0; + out_8604310211616122935[6] = 0; + out_8604310211616122935[7] = 0; + out_8604310211616122935[8] = 0; } -void h_28(double *state, double *unused, double *out_8381962881269050695) { - out_8381962881269050695[0] = state[0]; +void h_28(double *state, double *unused, double *out_5838057092722024830) { + out_5838057092722024830[0] = state[0]; } -void H_28(double *state, double *unused, double *out_7865775394830542306) { - out_7865775394830542306[0] = 1; - out_7865775394830542306[1] = 0; - out_7865775394830542306[2] = 0; - out_7865775394830542306[3] = 0; - out_7865775394830542306[4] = 0; - out_7865775394830542306[5] = 0; - out_7865775394830542306[6] = 0; - out_7865775394830542306[7] = 0; - out_7865775394830542306[8] = 0; +void H_28(double *state, double *unused, double *out_7878803590528102430) { + out_7878803590528102430[0] = 1; + out_7878803590528102430[1] = 0; + out_7878803590528102430[2] = 0; + out_7878803590528102430[3] = 0; + out_7878803590528102430[4] = 0; + out_7878803590528102430[5] = 0; + out_7878803590528102430[6] = 0; + out_7878803590528102430[7] = 0; + out_7878803590528102430[8] = 0; } -void h_31(double *state, double *unused, double *out_8130739036131630944) { - out_8130739036131630944[0] = state[8]; +void h_31(double *state, double *unused, double *out_5711256312889543433) { + out_5711256312889543433[0] = state[8]; } -void H_31(double *state, double *unused, double *out_5781294718705692115) { - out_5781294718705692115[0] = 0; - out_5781294718705692115[1] = 0; - out_5781294718705692115[2] = 0; - out_5781294718705692115[3] = 0; - out_5781294718705692115[4] = 0; - out_5781294718705692115[5] = 0; - out_5781294718705692115[6] = 0; - out_5781294718705692115[7] = 0; - out_5781294718705692115[8] = 1; +void H_31(double *state, double *unused, double *out_8254063776321931249) { + out_8254063776321931249[0] = 0; + out_8254063776321931249[1] = 0; + out_8254063776321931249[2] = 0; + out_8254063776321931249[3] = 0; + out_8254063776321931249[4] = 0; + out_8254063776321931249[5] = 0; + out_8254063776321931249[6] = 0; + out_8254063776321931249[7] = 0; + out_8254063776321931249[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_8206107047934752633) { - err_fun(nom_x, delta_x, out_8206107047934752633); +void car_err_fun(double *nom_x, double *delta_x, double *out_4770141140221383025) { + err_fun(nom_x, delta_x, out_4770141140221383025); } -void car_inv_err_fun(double *nom_x, double *true_x, double *out_3582621965851683853) { - inv_err_fun(nom_x, true_x, out_3582621965851683853); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_8267480455965364332) { + inv_err_fun(nom_x, true_x, out_8267480455965364332); } -void car_H_mod_fun(double *state, double *out_3381247545329584694) { - H_mod_fun(state, out_3381247545329584694); +void car_H_mod_fun(double *state, double *out_4700437164455479144) { + H_mod_fun(state, out_4700437164455479144); } -void car_f_fun(double *state, double dt, double *out_4828443839748202677) { - f_fun(state, dt, out_4828443839748202677); +void car_f_fun(double *state, double dt, double *out_2370248777466162255) { + f_fun(state, dt, out_2370248777466162255); } -void car_F_fun(double *state, double dt, double *out_3545622658498023447) { - F_fun(state, dt, out_3545622658498023447); +void car_F_fun(double *state, double dt, double *out_7809506053810665802) { + F_fun(state, dt, out_7809506053810665802); } -void car_h_25(double *state, double *unused, double *out_7855544973847125055) { - h_25(state, unused, out_7855544973847125055); +void car_h_25(double *state, double *unused, double *out_2714863388055632273) { + h_25(state, unused, out_2714863388055632273); } -void car_H_25(double *state, double *unused, double *out_5811940680582652543) { - H_25(state, unused, out_5811940680582652543); +void car_H_25(double *state, double *unused, double *out_5824968876280212667) { + H_25(state, unused, out_5824968876280212667); } -void car_h_24(double *state, double *unused, double *out_7215169173686495729) { - h_24(state, unused, out_7215169173686495729); +void car_h_24(double *state, double *unused, double *out_8643275185285187003) { + h_24(state, unused, out_8643275185285187003); } -void car_H_24(double *state, double *unused, double *out_7984590279588152109) { - H_24(state, unused, out_7984590279588152109); +void car_H_24(double *state, double *unused, double *out_3403096309788982558) { + H_24(state, unused, out_3403096309788982558); } -void car_h_30(double *state, double *unused, double *out_1700097778006464926) { - h_30(state, unused, out_1700097778006464926); +void car_h_30(double *state, double *unused, double *out_4165494780684515440) { + h_30(state, unused, out_4165494780684515440); } -void car_H_30(double *state, double *unused, double *out_1104749660908964212) { - H_30(state, unused, out_1104749660908964212); +void car_H_30(double *state, double *unused, double *out_8094078867301730751) { + H_30(state, unused, out_8094078867301730751); } -void car_h_26(double *state, double *unused, double *out_6125458693304696459) { - h_26(state, unused, out_6125458693304696459); +void car_h_26(double *state, double *unused, double *out_749221491035445424) { + h_26(state, unused, out_749221491035445424); } -void car_H_26(double *state, double *unused, double *out_8893300074252842849) { - H_26(state, unused, out_8893300074252842849); +void car_H_26(double *state, double *unused, double *out_8880271878555282725) { + H_26(state, unused, out_8880271878555282725); } -void car_h_27(double *state, double *unused, double *out_2212815102766168220) { - h_27(state, unused, out_2212815102766168220); +void car_h_27(double *state, double *unused, double *out_8472848302049370229) { + h_27(state, unused, out_8472848302049370229); } -void car_H_27(double *state, double *unused, double *out_1070013650891460699) { - H_27(state, unused, out_1070013650891460699); +void car_H_27(double *state, double *unused, double *out_5919315555501305840) { + H_27(state, unused, out_5919315555501305840); } -void car_h_29(double *state, double *unused, double *out_4304503098815162577) { - h_29(state, unused, out_4304503098815162577); +void car_h_29(double *state, double *unused, double *out_836178486976330205) { + h_29(state, unused, out_836178486976330205); } -void car_H_29(double *state, double *unused, double *out_2783376377761011732) { - H_29(state, unused, out_2783376377761011732); +void car_H_29(double *state, double *unused, double *out_8604310211616122935) { + H_29(state, unused, out_8604310211616122935); } -void car_h_28(double *state, double *unused, double *out_8381962881269050695) { - h_28(state, unused, out_8381962881269050695); +void car_h_28(double *state, double *unused, double *out_5838057092722024830) { + h_28(state, unused, out_5838057092722024830); } -void car_H_28(double *state, double *unused, double *out_7865775394830542306) { - H_28(state, unused, out_7865775394830542306); +void car_H_28(double *state, double *unused, double *out_7878803590528102430) { + H_28(state, unused, out_7878803590528102430); } -void car_h_31(double *state, double *unused, double *out_8130739036131630944) { - h_31(state, unused, out_8130739036131630944); +void car_h_31(double *state, double *unused, double *out_5711256312889543433) { + h_31(state, unused, out_5711256312889543433); } -void car_H_31(double *state, double *unused, double *out_5781294718705692115) { - H_31(state, unused, out_5781294718705692115); +void car_H_31(double *state, double *unused, double *out_8254063776321931249) { + H_31(state, unused, out_8254063776321931249); } 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 cc89cbf6e3..2056f7caaa 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_8206107047934752633); -void car_inv_err_fun(double *nom_x, double *true_x, double *out_3582621965851683853); -void car_H_mod_fun(double *state, double *out_3381247545329584694); -void car_f_fun(double *state, double dt, double *out_4828443839748202677); -void car_F_fun(double *state, double dt, double *out_3545622658498023447); -void car_h_25(double *state, double *unused, double *out_7855544973847125055); -void car_H_25(double *state, double *unused, double *out_5811940680582652543); -void car_h_24(double *state, double *unused, double *out_7215169173686495729); -void car_H_24(double *state, double *unused, double *out_7984590279588152109); -void car_h_30(double *state, double *unused, double *out_1700097778006464926); -void car_H_30(double *state, double *unused, double *out_1104749660908964212); -void car_h_26(double *state, double *unused, double *out_6125458693304696459); -void car_H_26(double *state, double *unused, double *out_8893300074252842849); -void car_h_27(double *state, double *unused, double *out_2212815102766168220); -void car_H_27(double *state, double *unused, double *out_1070013650891460699); -void car_h_29(double *state, double *unused, double *out_4304503098815162577); -void car_H_29(double *state, double *unused, double *out_2783376377761011732); -void car_h_28(double *state, double *unused, double *out_8381962881269050695); -void car_H_28(double *state, double *unused, double *out_7865775394830542306); -void car_h_31(double *state, double *unused, double *out_8130739036131630944); -void car_H_31(double *state, double *unused, double *out_5781294718705692115); +void car_err_fun(double *nom_x, double *delta_x, double *out_4770141140221383025); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_8267480455965364332); +void car_H_mod_fun(double *state, double *out_4700437164455479144); +void car_f_fun(double *state, double dt, double *out_2370248777466162255); +void car_F_fun(double *state, double dt, double *out_7809506053810665802); +void car_h_25(double *state, double *unused, double *out_2714863388055632273); +void car_H_25(double *state, double *unused, double *out_5824968876280212667); +void car_h_24(double *state, double *unused, double *out_8643275185285187003); +void car_H_24(double *state, double *unused, double *out_3403096309788982558); +void car_h_30(double *state, double *unused, double *out_4165494780684515440); +void car_H_30(double *state, double *unused, double *out_8094078867301730751); +void car_h_26(double *state, double *unused, double *out_749221491035445424); +void car_H_26(double *state, double *unused, double *out_8880271878555282725); +void car_h_27(double *state, double *unused, double *out_8472848302049370229); +void car_H_27(double *state, double *unused, double *out_5919315555501305840); +void car_h_29(double *state, double *unused, double *out_836178486976330205); +void car_H_29(double *state, double *unused, double *out_8604310211616122935); +void car_h_28(double *state, double *unused, double *out_5838057092722024830); +void car_H_28(double *state, double *unused, double *out_7878803590528102430); +void car_h_31(double *state, double *unused, double *out_5711256312889543433); +void car_H_31(double *state, double *unused, double *out_8254063776321931249); 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/pose.cpp b/selfdrive/locationd/models/generated/pose.cpp index 58c2f8f3e5..83d283799b 100644 --- a/selfdrive/locationd/models/generated/pose.cpp +++ b/selfdrive/locationd/models/generated/pose.cpp @@ -17,961 +17,961 @@ const static double MAHA_THRESH_14 = 7.814727903251177; * * * This file is part of 'ekf' * ******************************************************************************/ -void err_fun(double *nom_x, double *delta_x, double *out_3083751291667230086) { - out_3083751291667230086[0] = delta_x[0] + nom_x[0]; - out_3083751291667230086[1] = delta_x[1] + nom_x[1]; - out_3083751291667230086[2] = delta_x[2] + nom_x[2]; - out_3083751291667230086[3] = delta_x[3] + nom_x[3]; - out_3083751291667230086[4] = delta_x[4] + nom_x[4]; - out_3083751291667230086[5] = delta_x[5] + nom_x[5]; - out_3083751291667230086[6] = delta_x[6] + nom_x[6]; - out_3083751291667230086[7] = delta_x[7] + nom_x[7]; - out_3083751291667230086[8] = delta_x[8] + nom_x[8]; - out_3083751291667230086[9] = delta_x[9] + nom_x[9]; - out_3083751291667230086[10] = delta_x[10] + nom_x[10]; - out_3083751291667230086[11] = delta_x[11] + nom_x[11]; - out_3083751291667230086[12] = delta_x[12] + nom_x[12]; - out_3083751291667230086[13] = delta_x[13] + nom_x[13]; - out_3083751291667230086[14] = delta_x[14] + nom_x[14]; - out_3083751291667230086[15] = delta_x[15] + nom_x[15]; - out_3083751291667230086[16] = delta_x[16] + nom_x[16]; - out_3083751291667230086[17] = delta_x[17] + nom_x[17]; +void err_fun(double *nom_x, double *delta_x, double *out_2755267697534836281) { + out_2755267697534836281[0] = delta_x[0] + nom_x[0]; + out_2755267697534836281[1] = delta_x[1] + nom_x[1]; + out_2755267697534836281[2] = delta_x[2] + nom_x[2]; + out_2755267697534836281[3] = delta_x[3] + nom_x[3]; + out_2755267697534836281[4] = delta_x[4] + nom_x[4]; + out_2755267697534836281[5] = delta_x[5] + nom_x[5]; + out_2755267697534836281[6] = delta_x[6] + nom_x[6]; + out_2755267697534836281[7] = delta_x[7] + nom_x[7]; + out_2755267697534836281[8] = delta_x[8] + nom_x[8]; + out_2755267697534836281[9] = delta_x[9] + nom_x[9]; + out_2755267697534836281[10] = delta_x[10] + nom_x[10]; + out_2755267697534836281[11] = delta_x[11] + nom_x[11]; + out_2755267697534836281[12] = delta_x[12] + nom_x[12]; + out_2755267697534836281[13] = delta_x[13] + nom_x[13]; + out_2755267697534836281[14] = delta_x[14] + nom_x[14]; + out_2755267697534836281[15] = delta_x[15] + nom_x[15]; + out_2755267697534836281[16] = delta_x[16] + nom_x[16]; + out_2755267697534836281[17] = delta_x[17] + nom_x[17]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_8958923596036680453) { - out_8958923596036680453[0] = -nom_x[0] + true_x[0]; - out_8958923596036680453[1] = -nom_x[1] + true_x[1]; - out_8958923596036680453[2] = -nom_x[2] + true_x[2]; - out_8958923596036680453[3] = -nom_x[3] + true_x[3]; - out_8958923596036680453[4] = -nom_x[4] + true_x[4]; - out_8958923596036680453[5] = -nom_x[5] + true_x[5]; - out_8958923596036680453[6] = -nom_x[6] + true_x[6]; - out_8958923596036680453[7] = -nom_x[7] + true_x[7]; - out_8958923596036680453[8] = -nom_x[8] + true_x[8]; - out_8958923596036680453[9] = -nom_x[9] + true_x[9]; - out_8958923596036680453[10] = -nom_x[10] + true_x[10]; - out_8958923596036680453[11] = -nom_x[11] + true_x[11]; - out_8958923596036680453[12] = -nom_x[12] + true_x[12]; - out_8958923596036680453[13] = -nom_x[13] + true_x[13]; - out_8958923596036680453[14] = -nom_x[14] + true_x[14]; - out_8958923596036680453[15] = -nom_x[15] + true_x[15]; - out_8958923596036680453[16] = -nom_x[16] + true_x[16]; - out_8958923596036680453[17] = -nom_x[17] + true_x[17]; +void inv_err_fun(double *nom_x, double *true_x, double *out_4688414877314135206) { + out_4688414877314135206[0] = -nom_x[0] + true_x[0]; + out_4688414877314135206[1] = -nom_x[1] + true_x[1]; + out_4688414877314135206[2] = -nom_x[2] + true_x[2]; + out_4688414877314135206[3] = -nom_x[3] + true_x[3]; + out_4688414877314135206[4] = -nom_x[4] + true_x[4]; + out_4688414877314135206[5] = -nom_x[5] + true_x[5]; + out_4688414877314135206[6] = -nom_x[6] + true_x[6]; + out_4688414877314135206[7] = -nom_x[7] + true_x[7]; + out_4688414877314135206[8] = -nom_x[8] + true_x[8]; + out_4688414877314135206[9] = -nom_x[9] + true_x[9]; + out_4688414877314135206[10] = -nom_x[10] + true_x[10]; + out_4688414877314135206[11] = -nom_x[11] + true_x[11]; + out_4688414877314135206[12] = -nom_x[12] + true_x[12]; + out_4688414877314135206[13] = -nom_x[13] + true_x[13]; + out_4688414877314135206[14] = -nom_x[14] + true_x[14]; + out_4688414877314135206[15] = -nom_x[15] + true_x[15]; + out_4688414877314135206[16] = -nom_x[16] + true_x[16]; + out_4688414877314135206[17] = -nom_x[17] + true_x[17]; } -void H_mod_fun(double *state, double *out_3451746955233961922) { - out_3451746955233961922[0] = 1.0; - out_3451746955233961922[1] = 0.0; - out_3451746955233961922[2] = 0.0; - out_3451746955233961922[3] = 0.0; - out_3451746955233961922[4] = 0.0; - out_3451746955233961922[5] = 0.0; - out_3451746955233961922[6] = 0.0; - out_3451746955233961922[7] = 0.0; - out_3451746955233961922[8] = 0.0; - out_3451746955233961922[9] = 0.0; - out_3451746955233961922[10] = 0.0; - out_3451746955233961922[11] = 0.0; - out_3451746955233961922[12] = 0.0; - out_3451746955233961922[13] = 0.0; - out_3451746955233961922[14] = 0.0; - out_3451746955233961922[15] = 0.0; - out_3451746955233961922[16] = 0.0; - out_3451746955233961922[17] = 0.0; - out_3451746955233961922[18] = 0.0; - out_3451746955233961922[19] = 1.0; - out_3451746955233961922[20] = 0.0; - out_3451746955233961922[21] = 0.0; - out_3451746955233961922[22] = 0.0; - out_3451746955233961922[23] = 0.0; - out_3451746955233961922[24] = 0.0; - out_3451746955233961922[25] = 0.0; - out_3451746955233961922[26] = 0.0; - out_3451746955233961922[27] = 0.0; - out_3451746955233961922[28] = 0.0; - out_3451746955233961922[29] = 0.0; - out_3451746955233961922[30] = 0.0; - out_3451746955233961922[31] = 0.0; - out_3451746955233961922[32] = 0.0; - out_3451746955233961922[33] = 0.0; - out_3451746955233961922[34] = 0.0; - out_3451746955233961922[35] = 0.0; - out_3451746955233961922[36] = 0.0; - out_3451746955233961922[37] = 0.0; - out_3451746955233961922[38] = 1.0; - out_3451746955233961922[39] = 0.0; - out_3451746955233961922[40] = 0.0; - out_3451746955233961922[41] = 0.0; - out_3451746955233961922[42] = 0.0; - out_3451746955233961922[43] = 0.0; - out_3451746955233961922[44] = 0.0; - out_3451746955233961922[45] = 0.0; - out_3451746955233961922[46] = 0.0; - out_3451746955233961922[47] = 0.0; - out_3451746955233961922[48] = 0.0; - out_3451746955233961922[49] = 0.0; - out_3451746955233961922[50] = 0.0; - out_3451746955233961922[51] = 0.0; - out_3451746955233961922[52] = 0.0; - out_3451746955233961922[53] = 0.0; - out_3451746955233961922[54] = 0.0; - out_3451746955233961922[55] = 0.0; - out_3451746955233961922[56] = 0.0; - out_3451746955233961922[57] = 1.0; - out_3451746955233961922[58] = 0.0; - out_3451746955233961922[59] = 0.0; - out_3451746955233961922[60] = 0.0; - out_3451746955233961922[61] = 0.0; - out_3451746955233961922[62] = 0.0; - out_3451746955233961922[63] = 0.0; - out_3451746955233961922[64] = 0.0; - out_3451746955233961922[65] = 0.0; - out_3451746955233961922[66] = 0.0; - out_3451746955233961922[67] = 0.0; - out_3451746955233961922[68] = 0.0; - out_3451746955233961922[69] = 0.0; - out_3451746955233961922[70] = 0.0; - out_3451746955233961922[71] = 0.0; - out_3451746955233961922[72] = 0.0; - out_3451746955233961922[73] = 0.0; - out_3451746955233961922[74] = 0.0; - out_3451746955233961922[75] = 0.0; - out_3451746955233961922[76] = 1.0; - out_3451746955233961922[77] = 0.0; - out_3451746955233961922[78] = 0.0; - out_3451746955233961922[79] = 0.0; - out_3451746955233961922[80] = 0.0; - out_3451746955233961922[81] = 0.0; - out_3451746955233961922[82] = 0.0; - out_3451746955233961922[83] = 0.0; - out_3451746955233961922[84] = 0.0; - out_3451746955233961922[85] = 0.0; - out_3451746955233961922[86] = 0.0; - out_3451746955233961922[87] = 0.0; - out_3451746955233961922[88] = 0.0; - out_3451746955233961922[89] = 0.0; - out_3451746955233961922[90] = 0.0; - out_3451746955233961922[91] = 0.0; - out_3451746955233961922[92] = 0.0; - out_3451746955233961922[93] = 0.0; - out_3451746955233961922[94] = 0.0; - out_3451746955233961922[95] = 1.0; - out_3451746955233961922[96] = 0.0; - out_3451746955233961922[97] = 0.0; - out_3451746955233961922[98] = 0.0; - out_3451746955233961922[99] = 0.0; - out_3451746955233961922[100] = 0.0; - out_3451746955233961922[101] = 0.0; - out_3451746955233961922[102] = 0.0; - out_3451746955233961922[103] = 0.0; - out_3451746955233961922[104] = 0.0; - out_3451746955233961922[105] = 0.0; - out_3451746955233961922[106] = 0.0; - out_3451746955233961922[107] = 0.0; - out_3451746955233961922[108] = 0.0; - out_3451746955233961922[109] = 0.0; - out_3451746955233961922[110] = 0.0; - out_3451746955233961922[111] = 0.0; - out_3451746955233961922[112] = 0.0; - out_3451746955233961922[113] = 0.0; - out_3451746955233961922[114] = 1.0; - out_3451746955233961922[115] = 0.0; - out_3451746955233961922[116] = 0.0; - out_3451746955233961922[117] = 0.0; - out_3451746955233961922[118] = 0.0; - out_3451746955233961922[119] = 0.0; - out_3451746955233961922[120] = 0.0; - out_3451746955233961922[121] = 0.0; - out_3451746955233961922[122] = 0.0; - out_3451746955233961922[123] = 0.0; - out_3451746955233961922[124] = 0.0; - out_3451746955233961922[125] = 0.0; - out_3451746955233961922[126] = 0.0; - out_3451746955233961922[127] = 0.0; - out_3451746955233961922[128] = 0.0; - out_3451746955233961922[129] = 0.0; - out_3451746955233961922[130] = 0.0; - out_3451746955233961922[131] = 0.0; - out_3451746955233961922[132] = 0.0; - out_3451746955233961922[133] = 1.0; - out_3451746955233961922[134] = 0.0; - out_3451746955233961922[135] = 0.0; - out_3451746955233961922[136] = 0.0; - out_3451746955233961922[137] = 0.0; - out_3451746955233961922[138] = 0.0; - out_3451746955233961922[139] = 0.0; - out_3451746955233961922[140] = 0.0; - out_3451746955233961922[141] = 0.0; - out_3451746955233961922[142] = 0.0; - out_3451746955233961922[143] = 0.0; - out_3451746955233961922[144] = 0.0; - out_3451746955233961922[145] = 0.0; - out_3451746955233961922[146] = 0.0; - out_3451746955233961922[147] = 0.0; - out_3451746955233961922[148] = 0.0; - out_3451746955233961922[149] = 0.0; - out_3451746955233961922[150] = 0.0; - out_3451746955233961922[151] = 0.0; - out_3451746955233961922[152] = 1.0; - out_3451746955233961922[153] = 0.0; - out_3451746955233961922[154] = 0.0; - out_3451746955233961922[155] = 0.0; - out_3451746955233961922[156] = 0.0; - out_3451746955233961922[157] = 0.0; - out_3451746955233961922[158] = 0.0; - out_3451746955233961922[159] = 0.0; - out_3451746955233961922[160] = 0.0; - out_3451746955233961922[161] = 0.0; - out_3451746955233961922[162] = 0.0; - out_3451746955233961922[163] = 0.0; - out_3451746955233961922[164] = 0.0; - out_3451746955233961922[165] = 0.0; - out_3451746955233961922[166] = 0.0; - out_3451746955233961922[167] = 0.0; - out_3451746955233961922[168] = 0.0; - out_3451746955233961922[169] = 0.0; - out_3451746955233961922[170] = 0.0; - out_3451746955233961922[171] = 1.0; - out_3451746955233961922[172] = 0.0; - out_3451746955233961922[173] = 0.0; - out_3451746955233961922[174] = 0.0; - out_3451746955233961922[175] = 0.0; - out_3451746955233961922[176] = 0.0; - out_3451746955233961922[177] = 0.0; - out_3451746955233961922[178] = 0.0; - out_3451746955233961922[179] = 0.0; - out_3451746955233961922[180] = 0.0; - out_3451746955233961922[181] = 0.0; - out_3451746955233961922[182] = 0.0; - out_3451746955233961922[183] = 0.0; - out_3451746955233961922[184] = 0.0; - out_3451746955233961922[185] = 0.0; - out_3451746955233961922[186] = 0.0; - out_3451746955233961922[187] = 0.0; - out_3451746955233961922[188] = 0.0; - out_3451746955233961922[189] = 0.0; - out_3451746955233961922[190] = 1.0; - out_3451746955233961922[191] = 0.0; - out_3451746955233961922[192] = 0.0; - out_3451746955233961922[193] = 0.0; - out_3451746955233961922[194] = 0.0; - out_3451746955233961922[195] = 0.0; - out_3451746955233961922[196] = 0.0; - out_3451746955233961922[197] = 0.0; - out_3451746955233961922[198] = 0.0; - out_3451746955233961922[199] = 0.0; - out_3451746955233961922[200] = 0.0; - out_3451746955233961922[201] = 0.0; - out_3451746955233961922[202] = 0.0; - out_3451746955233961922[203] = 0.0; - out_3451746955233961922[204] = 0.0; - out_3451746955233961922[205] = 0.0; - out_3451746955233961922[206] = 0.0; - out_3451746955233961922[207] = 0.0; - out_3451746955233961922[208] = 0.0; - out_3451746955233961922[209] = 1.0; - out_3451746955233961922[210] = 0.0; - out_3451746955233961922[211] = 0.0; - out_3451746955233961922[212] = 0.0; - out_3451746955233961922[213] = 0.0; - out_3451746955233961922[214] = 0.0; - out_3451746955233961922[215] = 0.0; - out_3451746955233961922[216] = 0.0; - out_3451746955233961922[217] = 0.0; - out_3451746955233961922[218] = 0.0; - out_3451746955233961922[219] = 0.0; - out_3451746955233961922[220] = 0.0; - out_3451746955233961922[221] = 0.0; - out_3451746955233961922[222] = 0.0; - out_3451746955233961922[223] = 0.0; - out_3451746955233961922[224] = 0.0; - out_3451746955233961922[225] = 0.0; - out_3451746955233961922[226] = 0.0; - out_3451746955233961922[227] = 0.0; - out_3451746955233961922[228] = 1.0; - out_3451746955233961922[229] = 0.0; - out_3451746955233961922[230] = 0.0; - out_3451746955233961922[231] = 0.0; - out_3451746955233961922[232] = 0.0; - out_3451746955233961922[233] = 0.0; - out_3451746955233961922[234] = 0.0; - out_3451746955233961922[235] = 0.0; - out_3451746955233961922[236] = 0.0; - out_3451746955233961922[237] = 0.0; - out_3451746955233961922[238] = 0.0; - out_3451746955233961922[239] = 0.0; - out_3451746955233961922[240] = 0.0; - out_3451746955233961922[241] = 0.0; - out_3451746955233961922[242] = 0.0; - out_3451746955233961922[243] = 0.0; - out_3451746955233961922[244] = 0.0; - out_3451746955233961922[245] = 0.0; - out_3451746955233961922[246] = 0.0; - out_3451746955233961922[247] = 1.0; - out_3451746955233961922[248] = 0.0; - out_3451746955233961922[249] = 0.0; - out_3451746955233961922[250] = 0.0; - out_3451746955233961922[251] = 0.0; - out_3451746955233961922[252] = 0.0; - out_3451746955233961922[253] = 0.0; - out_3451746955233961922[254] = 0.0; - out_3451746955233961922[255] = 0.0; - out_3451746955233961922[256] = 0.0; - out_3451746955233961922[257] = 0.0; - out_3451746955233961922[258] = 0.0; - out_3451746955233961922[259] = 0.0; - out_3451746955233961922[260] = 0.0; - out_3451746955233961922[261] = 0.0; - out_3451746955233961922[262] = 0.0; - out_3451746955233961922[263] = 0.0; - out_3451746955233961922[264] = 0.0; - out_3451746955233961922[265] = 0.0; - out_3451746955233961922[266] = 1.0; - out_3451746955233961922[267] = 0.0; - out_3451746955233961922[268] = 0.0; - out_3451746955233961922[269] = 0.0; - out_3451746955233961922[270] = 0.0; - out_3451746955233961922[271] = 0.0; - out_3451746955233961922[272] = 0.0; - out_3451746955233961922[273] = 0.0; - out_3451746955233961922[274] = 0.0; - out_3451746955233961922[275] = 0.0; - out_3451746955233961922[276] = 0.0; - out_3451746955233961922[277] = 0.0; - out_3451746955233961922[278] = 0.0; - out_3451746955233961922[279] = 0.0; - out_3451746955233961922[280] = 0.0; - out_3451746955233961922[281] = 0.0; - out_3451746955233961922[282] = 0.0; - out_3451746955233961922[283] = 0.0; - out_3451746955233961922[284] = 0.0; - out_3451746955233961922[285] = 1.0; - out_3451746955233961922[286] = 0.0; - out_3451746955233961922[287] = 0.0; - out_3451746955233961922[288] = 0.0; - out_3451746955233961922[289] = 0.0; - out_3451746955233961922[290] = 0.0; - out_3451746955233961922[291] = 0.0; - out_3451746955233961922[292] = 0.0; - out_3451746955233961922[293] = 0.0; - out_3451746955233961922[294] = 0.0; - out_3451746955233961922[295] = 0.0; - out_3451746955233961922[296] = 0.0; - out_3451746955233961922[297] = 0.0; - out_3451746955233961922[298] = 0.0; - out_3451746955233961922[299] = 0.0; - out_3451746955233961922[300] = 0.0; - out_3451746955233961922[301] = 0.0; - out_3451746955233961922[302] = 0.0; - out_3451746955233961922[303] = 0.0; - out_3451746955233961922[304] = 1.0; - out_3451746955233961922[305] = 0.0; - out_3451746955233961922[306] = 0.0; - out_3451746955233961922[307] = 0.0; - out_3451746955233961922[308] = 0.0; - out_3451746955233961922[309] = 0.0; - out_3451746955233961922[310] = 0.0; - out_3451746955233961922[311] = 0.0; - out_3451746955233961922[312] = 0.0; - out_3451746955233961922[313] = 0.0; - out_3451746955233961922[314] = 0.0; - out_3451746955233961922[315] = 0.0; - out_3451746955233961922[316] = 0.0; - out_3451746955233961922[317] = 0.0; - out_3451746955233961922[318] = 0.0; - out_3451746955233961922[319] = 0.0; - out_3451746955233961922[320] = 0.0; - out_3451746955233961922[321] = 0.0; - out_3451746955233961922[322] = 0.0; - out_3451746955233961922[323] = 1.0; +void H_mod_fun(double *state, double *out_7837152669402150713) { + out_7837152669402150713[0] = 1.0; + out_7837152669402150713[1] = 0.0; + out_7837152669402150713[2] = 0.0; + out_7837152669402150713[3] = 0.0; + out_7837152669402150713[4] = 0.0; + out_7837152669402150713[5] = 0.0; + out_7837152669402150713[6] = 0.0; + out_7837152669402150713[7] = 0.0; + out_7837152669402150713[8] = 0.0; + out_7837152669402150713[9] = 0.0; + out_7837152669402150713[10] = 0.0; + out_7837152669402150713[11] = 0.0; + out_7837152669402150713[12] = 0.0; + out_7837152669402150713[13] = 0.0; + out_7837152669402150713[14] = 0.0; + out_7837152669402150713[15] = 0.0; + out_7837152669402150713[16] = 0.0; + out_7837152669402150713[17] = 0.0; + out_7837152669402150713[18] = 0.0; + out_7837152669402150713[19] = 1.0; + out_7837152669402150713[20] = 0.0; + out_7837152669402150713[21] = 0.0; + out_7837152669402150713[22] = 0.0; + out_7837152669402150713[23] = 0.0; + out_7837152669402150713[24] = 0.0; + out_7837152669402150713[25] = 0.0; + out_7837152669402150713[26] = 0.0; + out_7837152669402150713[27] = 0.0; + out_7837152669402150713[28] = 0.0; + out_7837152669402150713[29] = 0.0; + out_7837152669402150713[30] = 0.0; + out_7837152669402150713[31] = 0.0; + out_7837152669402150713[32] = 0.0; + out_7837152669402150713[33] = 0.0; + out_7837152669402150713[34] = 0.0; + out_7837152669402150713[35] = 0.0; + out_7837152669402150713[36] = 0.0; + out_7837152669402150713[37] = 0.0; + out_7837152669402150713[38] = 1.0; + out_7837152669402150713[39] = 0.0; + out_7837152669402150713[40] = 0.0; + out_7837152669402150713[41] = 0.0; + out_7837152669402150713[42] = 0.0; + out_7837152669402150713[43] = 0.0; + out_7837152669402150713[44] = 0.0; + out_7837152669402150713[45] = 0.0; + out_7837152669402150713[46] = 0.0; + out_7837152669402150713[47] = 0.0; + out_7837152669402150713[48] = 0.0; + out_7837152669402150713[49] = 0.0; + out_7837152669402150713[50] = 0.0; + out_7837152669402150713[51] = 0.0; + out_7837152669402150713[52] = 0.0; + out_7837152669402150713[53] = 0.0; + out_7837152669402150713[54] = 0.0; + out_7837152669402150713[55] = 0.0; + out_7837152669402150713[56] = 0.0; + out_7837152669402150713[57] = 1.0; + out_7837152669402150713[58] = 0.0; + out_7837152669402150713[59] = 0.0; + out_7837152669402150713[60] = 0.0; + out_7837152669402150713[61] = 0.0; + out_7837152669402150713[62] = 0.0; + out_7837152669402150713[63] = 0.0; + out_7837152669402150713[64] = 0.0; + out_7837152669402150713[65] = 0.0; + out_7837152669402150713[66] = 0.0; + out_7837152669402150713[67] = 0.0; + out_7837152669402150713[68] = 0.0; + out_7837152669402150713[69] = 0.0; + out_7837152669402150713[70] = 0.0; + out_7837152669402150713[71] = 0.0; + out_7837152669402150713[72] = 0.0; + out_7837152669402150713[73] = 0.0; + out_7837152669402150713[74] = 0.0; + out_7837152669402150713[75] = 0.0; + out_7837152669402150713[76] = 1.0; + out_7837152669402150713[77] = 0.0; + out_7837152669402150713[78] = 0.0; + out_7837152669402150713[79] = 0.0; + out_7837152669402150713[80] = 0.0; + out_7837152669402150713[81] = 0.0; + out_7837152669402150713[82] = 0.0; + out_7837152669402150713[83] = 0.0; + out_7837152669402150713[84] = 0.0; + out_7837152669402150713[85] = 0.0; + out_7837152669402150713[86] = 0.0; + out_7837152669402150713[87] = 0.0; + out_7837152669402150713[88] = 0.0; + out_7837152669402150713[89] = 0.0; + out_7837152669402150713[90] = 0.0; + out_7837152669402150713[91] = 0.0; + out_7837152669402150713[92] = 0.0; + out_7837152669402150713[93] = 0.0; + out_7837152669402150713[94] = 0.0; + out_7837152669402150713[95] = 1.0; + out_7837152669402150713[96] = 0.0; + out_7837152669402150713[97] = 0.0; + out_7837152669402150713[98] = 0.0; + out_7837152669402150713[99] = 0.0; + out_7837152669402150713[100] = 0.0; + out_7837152669402150713[101] = 0.0; + out_7837152669402150713[102] = 0.0; + out_7837152669402150713[103] = 0.0; + out_7837152669402150713[104] = 0.0; + out_7837152669402150713[105] = 0.0; + out_7837152669402150713[106] = 0.0; + out_7837152669402150713[107] = 0.0; + out_7837152669402150713[108] = 0.0; + out_7837152669402150713[109] = 0.0; + out_7837152669402150713[110] = 0.0; + out_7837152669402150713[111] = 0.0; + out_7837152669402150713[112] = 0.0; + out_7837152669402150713[113] = 0.0; + out_7837152669402150713[114] = 1.0; + out_7837152669402150713[115] = 0.0; + out_7837152669402150713[116] = 0.0; + out_7837152669402150713[117] = 0.0; + out_7837152669402150713[118] = 0.0; + out_7837152669402150713[119] = 0.0; + out_7837152669402150713[120] = 0.0; + out_7837152669402150713[121] = 0.0; + out_7837152669402150713[122] = 0.0; + out_7837152669402150713[123] = 0.0; + out_7837152669402150713[124] = 0.0; + out_7837152669402150713[125] = 0.0; + out_7837152669402150713[126] = 0.0; + out_7837152669402150713[127] = 0.0; + out_7837152669402150713[128] = 0.0; + out_7837152669402150713[129] = 0.0; + out_7837152669402150713[130] = 0.0; + out_7837152669402150713[131] = 0.0; + out_7837152669402150713[132] = 0.0; + out_7837152669402150713[133] = 1.0; + out_7837152669402150713[134] = 0.0; + out_7837152669402150713[135] = 0.0; + out_7837152669402150713[136] = 0.0; + out_7837152669402150713[137] = 0.0; + out_7837152669402150713[138] = 0.0; + out_7837152669402150713[139] = 0.0; + out_7837152669402150713[140] = 0.0; + out_7837152669402150713[141] = 0.0; + out_7837152669402150713[142] = 0.0; + out_7837152669402150713[143] = 0.0; + out_7837152669402150713[144] = 0.0; + out_7837152669402150713[145] = 0.0; + out_7837152669402150713[146] = 0.0; + out_7837152669402150713[147] = 0.0; + out_7837152669402150713[148] = 0.0; + out_7837152669402150713[149] = 0.0; + out_7837152669402150713[150] = 0.0; + out_7837152669402150713[151] = 0.0; + out_7837152669402150713[152] = 1.0; + out_7837152669402150713[153] = 0.0; + out_7837152669402150713[154] = 0.0; + out_7837152669402150713[155] = 0.0; + out_7837152669402150713[156] = 0.0; + out_7837152669402150713[157] = 0.0; + out_7837152669402150713[158] = 0.0; + out_7837152669402150713[159] = 0.0; + out_7837152669402150713[160] = 0.0; + out_7837152669402150713[161] = 0.0; + out_7837152669402150713[162] = 0.0; + out_7837152669402150713[163] = 0.0; + out_7837152669402150713[164] = 0.0; + out_7837152669402150713[165] = 0.0; + out_7837152669402150713[166] = 0.0; + out_7837152669402150713[167] = 0.0; + out_7837152669402150713[168] = 0.0; + out_7837152669402150713[169] = 0.0; + out_7837152669402150713[170] = 0.0; + out_7837152669402150713[171] = 1.0; + out_7837152669402150713[172] = 0.0; + out_7837152669402150713[173] = 0.0; + out_7837152669402150713[174] = 0.0; + out_7837152669402150713[175] = 0.0; + out_7837152669402150713[176] = 0.0; + out_7837152669402150713[177] = 0.0; + out_7837152669402150713[178] = 0.0; + out_7837152669402150713[179] = 0.0; + out_7837152669402150713[180] = 0.0; + out_7837152669402150713[181] = 0.0; + out_7837152669402150713[182] = 0.0; + out_7837152669402150713[183] = 0.0; + out_7837152669402150713[184] = 0.0; + out_7837152669402150713[185] = 0.0; + out_7837152669402150713[186] = 0.0; + out_7837152669402150713[187] = 0.0; + out_7837152669402150713[188] = 0.0; + out_7837152669402150713[189] = 0.0; + out_7837152669402150713[190] = 1.0; + out_7837152669402150713[191] = 0.0; + out_7837152669402150713[192] = 0.0; + out_7837152669402150713[193] = 0.0; + out_7837152669402150713[194] = 0.0; + out_7837152669402150713[195] = 0.0; + out_7837152669402150713[196] = 0.0; + out_7837152669402150713[197] = 0.0; + out_7837152669402150713[198] = 0.0; + out_7837152669402150713[199] = 0.0; + out_7837152669402150713[200] = 0.0; + out_7837152669402150713[201] = 0.0; + out_7837152669402150713[202] = 0.0; + out_7837152669402150713[203] = 0.0; + out_7837152669402150713[204] = 0.0; + out_7837152669402150713[205] = 0.0; + out_7837152669402150713[206] = 0.0; + out_7837152669402150713[207] = 0.0; + out_7837152669402150713[208] = 0.0; + out_7837152669402150713[209] = 1.0; + out_7837152669402150713[210] = 0.0; + out_7837152669402150713[211] = 0.0; + out_7837152669402150713[212] = 0.0; + out_7837152669402150713[213] = 0.0; + out_7837152669402150713[214] = 0.0; + out_7837152669402150713[215] = 0.0; + out_7837152669402150713[216] = 0.0; + out_7837152669402150713[217] = 0.0; + out_7837152669402150713[218] = 0.0; + out_7837152669402150713[219] = 0.0; + out_7837152669402150713[220] = 0.0; + out_7837152669402150713[221] = 0.0; + out_7837152669402150713[222] = 0.0; + out_7837152669402150713[223] = 0.0; + out_7837152669402150713[224] = 0.0; + out_7837152669402150713[225] = 0.0; + out_7837152669402150713[226] = 0.0; + out_7837152669402150713[227] = 0.0; + out_7837152669402150713[228] = 1.0; + out_7837152669402150713[229] = 0.0; + out_7837152669402150713[230] = 0.0; + out_7837152669402150713[231] = 0.0; + out_7837152669402150713[232] = 0.0; + out_7837152669402150713[233] = 0.0; + out_7837152669402150713[234] = 0.0; + out_7837152669402150713[235] = 0.0; + out_7837152669402150713[236] = 0.0; + out_7837152669402150713[237] = 0.0; + out_7837152669402150713[238] = 0.0; + out_7837152669402150713[239] = 0.0; + out_7837152669402150713[240] = 0.0; + out_7837152669402150713[241] = 0.0; + out_7837152669402150713[242] = 0.0; + out_7837152669402150713[243] = 0.0; + out_7837152669402150713[244] = 0.0; + out_7837152669402150713[245] = 0.0; + out_7837152669402150713[246] = 0.0; + out_7837152669402150713[247] = 1.0; + out_7837152669402150713[248] = 0.0; + out_7837152669402150713[249] = 0.0; + out_7837152669402150713[250] = 0.0; + out_7837152669402150713[251] = 0.0; + out_7837152669402150713[252] = 0.0; + out_7837152669402150713[253] = 0.0; + out_7837152669402150713[254] = 0.0; + out_7837152669402150713[255] = 0.0; + out_7837152669402150713[256] = 0.0; + out_7837152669402150713[257] = 0.0; + out_7837152669402150713[258] = 0.0; + out_7837152669402150713[259] = 0.0; + out_7837152669402150713[260] = 0.0; + out_7837152669402150713[261] = 0.0; + out_7837152669402150713[262] = 0.0; + out_7837152669402150713[263] = 0.0; + out_7837152669402150713[264] = 0.0; + out_7837152669402150713[265] = 0.0; + out_7837152669402150713[266] = 1.0; + out_7837152669402150713[267] = 0.0; + out_7837152669402150713[268] = 0.0; + out_7837152669402150713[269] = 0.0; + out_7837152669402150713[270] = 0.0; + out_7837152669402150713[271] = 0.0; + out_7837152669402150713[272] = 0.0; + out_7837152669402150713[273] = 0.0; + out_7837152669402150713[274] = 0.0; + out_7837152669402150713[275] = 0.0; + out_7837152669402150713[276] = 0.0; + out_7837152669402150713[277] = 0.0; + out_7837152669402150713[278] = 0.0; + out_7837152669402150713[279] = 0.0; + out_7837152669402150713[280] = 0.0; + out_7837152669402150713[281] = 0.0; + out_7837152669402150713[282] = 0.0; + out_7837152669402150713[283] = 0.0; + out_7837152669402150713[284] = 0.0; + out_7837152669402150713[285] = 1.0; + out_7837152669402150713[286] = 0.0; + out_7837152669402150713[287] = 0.0; + out_7837152669402150713[288] = 0.0; + out_7837152669402150713[289] = 0.0; + out_7837152669402150713[290] = 0.0; + out_7837152669402150713[291] = 0.0; + out_7837152669402150713[292] = 0.0; + out_7837152669402150713[293] = 0.0; + out_7837152669402150713[294] = 0.0; + out_7837152669402150713[295] = 0.0; + out_7837152669402150713[296] = 0.0; + out_7837152669402150713[297] = 0.0; + out_7837152669402150713[298] = 0.0; + out_7837152669402150713[299] = 0.0; + out_7837152669402150713[300] = 0.0; + out_7837152669402150713[301] = 0.0; + out_7837152669402150713[302] = 0.0; + out_7837152669402150713[303] = 0.0; + out_7837152669402150713[304] = 1.0; + out_7837152669402150713[305] = 0.0; + out_7837152669402150713[306] = 0.0; + out_7837152669402150713[307] = 0.0; + out_7837152669402150713[308] = 0.0; + out_7837152669402150713[309] = 0.0; + out_7837152669402150713[310] = 0.0; + out_7837152669402150713[311] = 0.0; + out_7837152669402150713[312] = 0.0; + out_7837152669402150713[313] = 0.0; + out_7837152669402150713[314] = 0.0; + out_7837152669402150713[315] = 0.0; + out_7837152669402150713[316] = 0.0; + out_7837152669402150713[317] = 0.0; + out_7837152669402150713[318] = 0.0; + out_7837152669402150713[319] = 0.0; + out_7837152669402150713[320] = 0.0; + out_7837152669402150713[321] = 0.0; + out_7837152669402150713[322] = 0.0; + out_7837152669402150713[323] = 1.0; } -void f_fun(double *state, double dt, double *out_9153581491484683214) { - out_9153581491484683214[0] = atan2((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), -(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1])); - out_9153581491484683214[1] = asin(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8])); - out_9153581491484683214[2] = atan2(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), -(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2])); - out_9153581491484683214[3] = dt*state[12] + state[3]; - out_9153581491484683214[4] = dt*state[13] + state[4]; - out_9153581491484683214[5] = dt*state[14] + state[5]; - out_9153581491484683214[6] = state[6]; - out_9153581491484683214[7] = state[7]; - out_9153581491484683214[8] = state[8]; - out_9153581491484683214[9] = state[9]; - out_9153581491484683214[10] = state[10]; - out_9153581491484683214[11] = state[11]; - out_9153581491484683214[12] = state[12]; - out_9153581491484683214[13] = state[13]; - out_9153581491484683214[14] = state[14]; - out_9153581491484683214[15] = state[15]; - out_9153581491484683214[16] = state[16]; - out_9153581491484683214[17] = state[17]; +void f_fun(double *state, double dt, double *out_8293850048606202954) { + out_8293850048606202954[0] = atan2((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), -(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1])); + out_8293850048606202954[1] = asin(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8])); + out_8293850048606202954[2] = atan2(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), -(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2])); + out_8293850048606202954[3] = dt*state[12] + state[3]; + out_8293850048606202954[4] = dt*state[13] + state[4]; + out_8293850048606202954[5] = dt*state[14] + state[5]; + out_8293850048606202954[6] = state[6]; + out_8293850048606202954[7] = state[7]; + out_8293850048606202954[8] = state[8]; + out_8293850048606202954[9] = state[9]; + out_8293850048606202954[10] = state[10]; + out_8293850048606202954[11] = state[11]; + out_8293850048606202954[12] = state[12]; + out_8293850048606202954[13] = state[13]; + out_8293850048606202954[14] = state[14]; + out_8293850048606202954[15] = state[15]; + out_8293850048606202954[16] = state[16]; + out_8293850048606202954[17] = state[17]; } -void F_fun(double *state, double dt, double *out_1650230700148071035) { - out_1650230700148071035[0] = ((-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*cos(state[0])*cos(state[1]) - sin(state[0])*cos(dt*state[6])*cos(dt*state[7])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + ((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*cos(state[0])*cos(state[1]) - sin(dt*state[6])*sin(state[0])*cos(dt*state[7])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); - out_1650230700148071035[1] = ((-sin(dt*state[6])*sin(dt*state[8]) - sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*cos(state[1]) - (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*sin(state[1]) - sin(state[1])*cos(dt*state[6])*cos(dt*state[7])*cos(state[0]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*sin(state[1]) + (-sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) + sin(dt*state[8])*cos(dt*state[6]))*cos(state[1]) - sin(dt*state[6])*sin(state[1])*cos(dt*state[7])*cos(state[0]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); - out_1650230700148071035[2] = 0; - out_1650230700148071035[3] = 0; - out_1650230700148071035[4] = 0; - out_1650230700148071035[5] = 0; - out_1650230700148071035[6] = (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(dt*cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*sin(dt*state[8]) - dt*sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-dt*sin(dt*state[6])*cos(dt*state[8]) + dt*sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) - dt*cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (dt*sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); - out_1650230700148071035[7] = (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[6])*sin(dt*state[7])*cos(state[0])*cos(state[1]) + dt*sin(dt*state[6])*sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) - dt*sin(dt*state[6])*sin(state[1])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[7])*cos(dt*state[6])*cos(state[0])*cos(state[1]) + dt*sin(dt*state[8])*sin(state[0])*cos(dt*state[6])*cos(dt*state[7])*cos(state[1]) - dt*sin(state[1])*cos(dt*state[6])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); - out_1650230700148071035[8] = ((dt*sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + dt*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (dt*sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + ((dt*sin(dt*state[6])*sin(dt*state[8]) + dt*sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*cos(dt*state[8]) + dt*sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); - out_1650230700148071035[9] = 0; - out_1650230700148071035[10] = 0; - out_1650230700148071035[11] = 0; - out_1650230700148071035[12] = 0; - out_1650230700148071035[13] = 0; - out_1650230700148071035[14] = 0; - out_1650230700148071035[15] = 0; - out_1650230700148071035[16] = 0; - out_1650230700148071035[17] = 0; - out_1650230700148071035[18] = (-sin(dt*state[7])*sin(state[0])*cos(state[1]) - sin(dt*state[8])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); - out_1650230700148071035[19] = (-sin(dt*state[7])*sin(state[1])*cos(state[0]) + sin(dt*state[8])*sin(state[0])*sin(state[1])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); - out_1650230700148071035[20] = 0; - out_1650230700148071035[21] = 0; - out_1650230700148071035[22] = 0; - out_1650230700148071035[23] = 0; - out_1650230700148071035[24] = 0; - out_1650230700148071035[25] = (dt*sin(dt*state[7])*sin(dt*state[8])*sin(state[0])*cos(state[1]) - dt*sin(dt*state[7])*sin(state[1])*cos(dt*state[8]) + dt*cos(dt*state[7])*cos(state[0])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); - out_1650230700148071035[26] = (-dt*sin(dt*state[8])*sin(state[1])*cos(dt*state[7]) - dt*sin(state[0])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); - out_1650230700148071035[27] = 0; - out_1650230700148071035[28] = 0; - out_1650230700148071035[29] = 0; - out_1650230700148071035[30] = 0; - out_1650230700148071035[31] = 0; - out_1650230700148071035[32] = 0; - out_1650230700148071035[33] = 0; - out_1650230700148071035[34] = 0; - out_1650230700148071035[35] = 0; - out_1650230700148071035[36] = ((sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[7]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[7]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); - out_1650230700148071035[37] = (-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(-sin(dt*state[7])*sin(state[2])*cos(state[0])*cos(state[1]) + sin(dt*state[8])*sin(state[0])*sin(state[2])*cos(dt*state[7])*cos(state[1]) - sin(state[1])*sin(state[2])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*(-sin(dt*state[7])*cos(state[0])*cos(state[1])*cos(state[2]) + sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1])*cos(state[2]) - sin(state[1])*cos(dt*state[7])*cos(dt*state[8])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); - out_1650230700148071035[38] = ((-sin(state[0])*sin(state[2]) - sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (-sin(state[0])*sin(state[1])*sin(state[2]) - cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); - out_1650230700148071035[39] = 0; - out_1650230700148071035[40] = 0; - out_1650230700148071035[41] = 0; - out_1650230700148071035[42] = 0; - out_1650230700148071035[43] = (-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(dt*(sin(state[0])*cos(state[2]) - sin(state[1])*sin(state[2])*cos(state[0]))*cos(dt*state[7]) - dt*(sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[7])*sin(dt*state[8]) - dt*sin(dt*state[7])*sin(state[2])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*(dt*(-sin(state[0])*sin(state[2]) - sin(state[1])*cos(state[0])*cos(state[2]))*cos(dt*state[7]) - dt*(sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[7])*sin(dt*state[8]) - dt*sin(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); - out_1650230700148071035[44] = (dt*(sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*cos(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*sin(state[2])*cos(dt*state[7])*cos(state[1]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + (dt*(sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*cos(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[7])*cos(state[1])*cos(state[2]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); - out_1650230700148071035[45] = 0; - out_1650230700148071035[46] = 0; - out_1650230700148071035[47] = 0; - out_1650230700148071035[48] = 0; - out_1650230700148071035[49] = 0; - out_1650230700148071035[50] = 0; - out_1650230700148071035[51] = 0; - out_1650230700148071035[52] = 0; - out_1650230700148071035[53] = 0; - out_1650230700148071035[54] = 0; - out_1650230700148071035[55] = 0; - out_1650230700148071035[56] = 0; - out_1650230700148071035[57] = 1; - out_1650230700148071035[58] = 0; - out_1650230700148071035[59] = 0; - out_1650230700148071035[60] = 0; - out_1650230700148071035[61] = 0; - out_1650230700148071035[62] = 0; - out_1650230700148071035[63] = 0; - out_1650230700148071035[64] = 0; - out_1650230700148071035[65] = 0; - out_1650230700148071035[66] = dt; - out_1650230700148071035[67] = 0; - out_1650230700148071035[68] = 0; - out_1650230700148071035[69] = 0; - out_1650230700148071035[70] = 0; - out_1650230700148071035[71] = 0; - out_1650230700148071035[72] = 0; - out_1650230700148071035[73] = 0; - out_1650230700148071035[74] = 0; - out_1650230700148071035[75] = 0; - out_1650230700148071035[76] = 1; - out_1650230700148071035[77] = 0; - out_1650230700148071035[78] = 0; - out_1650230700148071035[79] = 0; - out_1650230700148071035[80] = 0; - out_1650230700148071035[81] = 0; - out_1650230700148071035[82] = 0; - out_1650230700148071035[83] = 0; - out_1650230700148071035[84] = 0; - out_1650230700148071035[85] = dt; - out_1650230700148071035[86] = 0; - out_1650230700148071035[87] = 0; - out_1650230700148071035[88] = 0; - out_1650230700148071035[89] = 0; - out_1650230700148071035[90] = 0; - out_1650230700148071035[91] = 0; - out_1650230700148071035[92] = 0; - out_1650230700148071035[93] = 0; - out_1650230700148071035[94] = 0; - out_1650230700148071035[95] = 1; - out_1650230700148071035[96] = 0; - out_1650230700148071035[97] = 0; - out_1650230700148071035[98] = 0; - out_1650230700148071035[99] = 0; - out_1650230700148071035[100] = 0; - out_1650230700148071035[101] = 0; - out_1650230700148071035[102] = 0; - out_1650230700148071035[103] = 0; - out_1650230700148071035[104] = dt; - out_1650230700148071035[105] = 0; - out_1650230700148071035[106] = 0; - out_1650230700148071035[107] = 0; - out_1650230700148071035[108] = 0; - out_1650230700148071035[109] = 0; - out_1650230700148071035[110] = 0; - out_1650230700148071035[111] = 0; - out_1650230700148071035[112] = 0; - out_1650230700148071035[113] = 0; - out_1650230700148071035[114] = 1; - out_1650230700148071035[115] = 0; - out_1650230700148071035[116] = 0; - out_1650230700148071035[117] = 0; - out_1650230700148071035[118] = 0; - out_1650230700148071035[119] = 0; - out_1650230700148071035[120] = 0; - out_1650230700148071035[121] = 0; - out_1650230700148071035[122] = 0; - out_1650230700148071035[123] = 0; - out_1650230700148071035[124] = 0; - out_1650230700148071035[125] = 0; - out_1650230700148071035[126] = 0; - out_1650230700148071035[127] = 0; - out_1650230700148071035[128] = 0; - out_1650230700148071035[129] = 0; - out_1650230700148071035[130] = 0; - out_1650230700148071035[131] = 0; - out_1650230700148071035[132] = 0; - out_1650230700148071035[133] = 1; - out_1650230700148071035[134] = 0; - out_1650230700148071035[135] = 0; - out_1650230700148071035[136] = 0; - out_1650230700148071035[137] = 0; - out_1650230700148071035[138] = 0; - out_1650230700148071035[139] = 0; - out_1650230700148071035[140] = 0; - out_1650230700148071035[141] = 0; - out_1650230700148071035[142] = 0; - out_1650230700148071035[143] = 0; - out_1650230700148071035[144] = 0; - out_1650230700148071035[145] = 0; - out_1650230700148071035[146] = 0; - out_1650230700148071035[147] = 0; - out_1650230700148071035[148] = 0; - out_1650230700148071035[149] = 0; - out_1650230700148071035[150] = 0; - out_1650230700148071035[151] = 0; - out_1650230700148071035[152] = 1; - out_1650230700148071035[153] = 0; - out_1650230700148071035[154] = 0; - out_1650230700148071035[155] = 0; - out_1650230700148071035[156] = 0; - out_1650230700148071035[157] = 0; - out_1650230700148071035[158] = 0; - out_1650230700148071035[159] = 0; - out_1650230700148071035[160] = 0; - out_1650230700148071035[161] = 0; - out_1650230700148071035[162] = 0; - out_1650230700148071035[163] = 0; - out_1650230700148071035[164] = 0; - out_1650230700148071035[165] = 0; - out_1650230700148071035[166] = 0; - out_1650230700148071035[167] = 0; - out_1650230700148071035[168] = 0; - out_1650230700148071035[169] = 0; - out_1650230700148071035[170] = 0; - out_1650230700148071035[171] = 1; - out_1650230700148071035[172] = 0; - out_1650230700148071035[173] = 0; - out_1650230700148071035[174] = 0; - out_1650230700148071035[175] = 0; - out_1650230700148071035[176] = 0; - out_1650230700148071035[177] = 0; - out_1650230700148071035[178] = 0; - out_1650230700148071035[179] = 0; - out_1650230700148071035[180] = 0; - out_1650230700148071035[181] = 0; - out_1650230700148071035[182] = 0; - out_1650230700148071035[183] = 0; - out_1650230700148071035[184] = 0; - out_1650230700148071035[185] = 0; - out_1650230700148071035[186] = 0; - out_1650230700148071035[187] = 0; - out_1650230700148071035[188] = 0; - out_1650230700148071035[189] = 0; - out_1650230700148071035[190] = 1; - out_1650230700148071035[191] = 0; - out_1650230700148071035[192] = 0; - out_1650230700148071035[193] = 0; - out_1650230700148071035[194] = 0; - out_1650230700148071035[195] = 0; - out_1650230700148071035[196] = 0; - out_1650230700148071035[197] = 0; - out_1650230700148071035[198] = 0; - out_1650230700148071035[199] = 0; - out_1650230700148071035[200] = 0; - out_1650230700148071035[201] = 0; - out_1650230700148071035[202] = 0; - out_1650230700148071035[203] = 0; - out_1650230700148071035[204] = 0; - out_1650230700148071035[205] = 0; - out_1650230700148071035[206] = 0; - out_1650230700148071035[207] = 0; - out_1650230700148071035[208] = 0; - out_1650230700148071035[209] = 1; - out_1650230700148071035[210] = 0; - out_1650230700148071035[211] = 0; - out_1650230700148071035[212] = 0; - out_1650230700148071035[213] = 0; - out_1650230700148071035[214] = 0; - out_1650230700148071035[215] = 0; - out_1650230700148071035[216] = 0; - out_1650230700148071035[217] = 0; - out_1650230700148071035[218] = 0; - out_1650230700148071035[219] = 0; - out_1650230700148071035[220] = 0; - out_1650230700148071035[221] = 0; - out_1650230700148071035[222] = 0; - out_1650230700148071035[223] = 0; - out_1650230700148071035[224] = 0; - out_1650230700148071035[225] = 0; - out_1650230700148071035[226] = 0; - out_1650230700148071035[227] = 0; - out_1650230700148071035[228] = 1; - out_1650230700148071035[229] = 0; - out_1650230700148071035[230] = 0; - out_1650230700148071035[231] = 0; - out_1650230700148071035[232] = 0; - out_1650230700148071035[233] = 0; - out_1650230700148071035[234] = 0; - out_1650230700148071035[235] = 0; - out_1650230700148071035[236] = 0; - out_1650230700148071035[237] = 0; - out_1650230700148071035[238] = 0; - out_1650230700148071035[239] = 0; - out_1650230700148071035[240] = 0; - out_1650230700148071035[241] = 0; - out_1650230700148071035[242] = 0; - out_1650230700148071035[243] = 0; - out_1650230700148071035[244] = 0; - out_1650230700148071035[245] = 0; - out_1650230700148071035[246] = 0; - out_1650230700148071035[247] = 1; - out_1650230700148071035[248] = 0; - out_1650230700148071035[249] = 0; - out_1650230700148071035[250] = 0; - out_1650230700148071035[251] = 0; - out_1650230700148071035[252] = 0; - out_1650230700148071035[253] = 0; - out_1650230700148071035[254] = 0; - out_1650230700148071035[255] = 0; - out_1650230700148071035[256] = 0; - out_1650230700148071035[257] = 0; - out_1650230700148071035[258] = 0; - out_1650230700148071035[259] = 0; - out_1650230700148071035[260] = 0; - out_1650230700148071035[261] = 0; - out_1650230700148071035[262] = 0; - out_1650230700148071035[263] = 0; - out_1650230700148071035[264] = 0; - out_1650230700148071035[265] = 0; - out_1650230700148071035[266] = 1; - out_1650230700148071035[267] = 0; - out_1650230700148071035[268] = 0; - out_1650230700148071035[269] = 0; - out_1650230700148071035[270] = 0; - out_1650230700148071035[271] = 0; - out_1650230700148071035[272] = 0; - out_1650230700148071035[273] = 0; - out_1650230700148071035[274] = 0; - out_1650230700148071035[275] = 0; - out_1650230700148071035[276] = 0; - out_1650230700148071035[277] = 0; - out_1650230700148071035[278] = 0; - out_1650230700148071035[279] = 0; - out_1650230700148071035[280] = 0; - out_1650230700148071035[281] = 0; - out_1650230700148071035[282] = 0; - out_1650230700148071035[283] = 0; - out_1650230700148071035[284] = 0; - out_1650230700148071035[285] = 1; - out_1650230700148071035[286] = 0; - out_1650230700148071035[287] = 0; - out_1650230700148071035[288] = 0; - out_1650230700148071035[289] = 0; - out_1650230700148071035[290] = 0; - out_1650230700148071035[291] = 0; - out_1650230700148071035[292] = 0; - out_1650230700148071035[293] = 0; - out_1650230700148071035[294] = 0; - out_1650230700148071035[295] = 0; - out_1650230700148071035[296] = 0; - out_1650230700148071035[297] = 0; - out_1650230700148071035[298] = 0; - out_1650230700148071035[299] = 0; - out_1650230700148071035[300] = 0; - out_1650230700148071035[301] = 0; - out_1650230700148071035[302] = 0; - out_1650230700148071035[303] = 0; - out_1650230700148071035[304] = 1; - out_1650230700148071035[305] = 0; - out_1650230700148071035[306] = 0; - out_1650230700148071035[307] = 0; - out_1650230700148071035[308] = 0; - out_1650230700148071035[309] = 0; - out_1650230700148071035[310] = 0; - out_1650230700148071035[311] = 0; - out_1650230700148071035[312] = 0; - out_1650230700148071035[313] = 0; - out_1650230700148071035[314] = 0; - out_1650230700148071035[315] = 0; - out_1650230700148071035[316] = 0; - out_1650230700148071035[317] = 0; - out_1650230700148071035[318] = 0; - out_1650230700148071035[319] = 0; - out_1650230700148071035[320] = 0; - out_1650230700148071035[321] = 0; - out_1650230700148071035[322] = 0; - out_1650230700148071035[323] = 1; +void F_fun(double *state, double dt, double *out_1277983044864762150) { + out_1277983044864762150[0] = ((-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*cos(state[0])*cos(state[1]) - sin(state[0])*cos(dt*state[6])*cos(dt*state[7])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + ((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*cos(state[0])*cos(state[1]) - sin(dt*state[6])*sin(state[0])*cos(dt*state[7])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); + out_1277983044864762150[1] = ((-sin(dt*state[6])*sin(dt*state[8]) - sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*cos(state[1]) - (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*sin(state[1]) - sin(state[1])*cos(dt*state[6])*cos(dt*state[7])*cos(state[0]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*sin(state[1]) + (-sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) + sin(dt*state[8])*cos(dt*state[6]))*cos(state[1]) - sin(dt*state[6])*sin(state[1])*cos(dt*state[7])*cos(state[0]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); + out_1277983044864762150[2] = 0; + out_1277983044864762150[3] = 0; + out_1277983044864762150[4] = 0; + out_1277983044864762150[5] = 0; + out_1277983044864762150[6] = (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(dt*cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*sin(dt*state[8]) - dt*sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-dt*sin(dt*state[6])*cos(dt*state[8]) + dt*sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) - dt*cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (dt*sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); + out_1277983044864762150[7] = (-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[6])*sin(dt*state[7])*cos(state[0])*cos(state[1]) + dt*sin(dt*state[6])*sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) - dt*sin(dt*state[6])*sin(state[1])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + (-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))*(-dt*sin(dt*state[7])*cos(dt*state[6])*cos(state[0])*cos(state[1]) + dt*sin(dt*state[8])*sin(state[0])*cos(dt*state[6])*cos(dt*state[7])*cos(state[1]) - dt*sin(state[1])*cos(dt*state[6])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); + out_1277983044864762150[8] = ((dt*sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + dt*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (dt*sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]))*(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)) + ((dt*sin(dt*state[6])*sin(dt*state[8]) + dt*sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (-dt*sin(dt*state[6])*cos(dt*state[8]) + dt*sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]))*(-(sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) + (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) - sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/(pow(-(sin(dt*state[6])*sin(dt*state[8]) + sin(dt*state[7])*cos(dt*state[6])*cos(dt*state[8]))*sin(state[1]) + (-sin(dt*state[6])*cos(dt*state[8]) + sin(dt*state[7])*sin(dt*state[8])*cos(dt*state[6]))*sin(state[0])*cos(state[1]) + cos(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2) + pow((sin(dt*state[6])*sin(dt*state[7])*sin(dt*state[8]) + cos(dt*state[6])*cos(dt*state[8]))*sin(state[0])*cos(state[1]) - (sin(dt*state[6])*sin(dt*state[7])*cos(dt*state[8]) - sin(dt*state[8])*cos(dt*state[6]))*sin(state[1]) + sin(dt*state[6])*cos(dt*state[7])*cos(state[0])*cos(state[1]), 2)); + out_1277983044864762150[9] = 0; + out_1277983044864762150[10] = 0; + out_1277983044864762150[11] = 0; + out_1277983044864762150[12] = 0; + out_1277983044864762150[13] = 0; + out_1277983044864762150[14] = 0; + out_1277983044864762150[15] = 0; + out_1277983044864762150[16] = 0; + out_1277983044864762150[17] = 0; + out_1277983044864762150[18] = (-sin(dt*state[7])*sin(state[0])*cos(state[1]) - sin(dt*state[8])*cos(dt*state[7])*cos(state[0])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); + out_1277983044864762150[19] = (-sin(dt*state[7])*sin(state[1])*cos(state[0]) + sin(dt*state[8])*sin(state[0])*sin(state[1])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); + out_1277983044864762150[20] = 0; + out_1277983044864762150[21] = 0; + out_1277983044864762150[22] = 0; + out_1277983044864762150[23] = 0; + out_1277983044864762150[24] = 0; + out_1277983044864762150[25] = (dt*sin(dt*state[7])*sin(dt*state[8])*sin(state[0])*cos(state[1]) - dt*sin(dt*state[7])*sin(state[1])*cos(dt*state[8]) + dt*cos(dt*state[7])*cos(state[0])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); + out_1277983044864762150[26] = (-dt*sin(dt*state[8])*sin(state[1])*cos(dt*state[7]) - dt*sin(state[0])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/sqrt(1 - pow(sin(dt*state[7])*cos(state[0])*cos(state[1]) - sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1]) + sin(state[1])*cos(dt*state[7])*cos(dt*state[8]), 2)); + out_1277983044864762150[27] = 0; + out_1277983044864762150[28] = 0; + out_1277983044864762150[29] = 0; + out_1277983044864762150[30] = 0; + out_1277983044864762150[31] = 0; + out_1277983044864762150[32] = 0; + out_1277983044864762150[33] = 0; + out_1277983044864762150[34] = 0; + out_1277983044864762150[35] = 0; + out_1277983044864762150[36] = ((sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[7]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[7]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); + out_1277983044864762150[37] = (-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(-sin(dt*state[7])*sin(state[2])*cos(state[0])*cos(state[1]) + sin(dt*state[8])*sin(state[0])*sin(state[2])*cos(dt*state[7])*cos(state[1]) - sin(state[1])*sin(state[2])*cos(dt*state[7])*cos(dt*state[8]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*(-sin(dt*state[7])*cos(state[0])*cos(state[1])*cos(state[2]) + sin(dt*state[8])*sin(state[0])*cos(dt*state[7])*cos(state[1])*cos(state[2]) - sin(state[1])*cos(dt*state[7])*cos(dt*state[8])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); + out_1277983044864762150[38] = ((-sin(state[0])*sin(state[2]) - sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (-sin(state[0])*sin(state[1])*sin(state[2]) - cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); + out_1277983044864762150[39] = 0; + out_1277983044864762150[40] = 0; + out_1277983044864762150[41] = 0; + out_1277983044864762150[42] = 0; + out_1277983044864762150[43] = (-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))*(dt*(sin(state[0])*cos(state[2]) - sin(state[1])*sin(state[2])*cos(state[0]))*cos(dt*state[7]) - dt*(sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[7])*sin(dt*state[8]) - dt*sin(dt*state[7])*sin(state[2])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + ((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))*(dt*(-sin(state[0])*sin(state[2]) - sin(state[1])*cos(state[0])*cos(state[2]))*cos(dt*state[7]) - dt*(sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[7])*sin(dt*state[8]) - dt*sin(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); + out_1277983044864762150[44] = (dt*(sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*cos(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*sin(state[2])*cos(dt*state[7])*cos(state[1]))*(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)) + (dt*(sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*cos(dt*state[7])*cos(dt*state[8]) - dt*sin(dt*state[8])*cos(dt*state[7])*cos(state[1])*cos(state[2]))*((-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) - (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) - sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]))/(pow(-(sin(state[0])*sin(state[2]) + sin(state[1])*cos(state[0])*cos(state[2]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*cos(state[2]) - sin(state[2])*cos(state[0]))*sin(dt*state[8])*cos(dt*state[7]) + cos(dt*state[7])*cos(dt*state[8])*cos(state[1])*cos(state[2]), 2) + pow(-(-sin(state[0])*cos(state[2]) + sin(state[1])*sin(state[2])*cos(state[0]))*sin(dt*state[7]) + (sin(state[0])*sin(state[1])*sin(state[2]) + cos(state[0])*cos(state[2]))*sin(dt*state[8])*cos(dt*state[7]) + sin(state[2])*cos(dt*state[7])*cos(dt*state[8])*cos(state[1]), 2)); + out_1277983044864762150[45] = 0; + out_1277983044864762150[46] = 0; + out_1277983044864762150[47] = 0; + out_1277983044864762150[48] = 0; + out_1277983044864762150[49] = 0; + out_1277983044864762150[50] = 0; + out_1277983044864762150[51] = 0; + out_1277983044864762150[52] = 0; + out_1277983044864762150[53] = 0; + out_1277983044864762150[54] = 0; + out_1277983044864762150[55] = 0; + out_1277983044864762150[56] = 0; + out_1277983044864762150[57] = 1; + out_1277983044864762150[58] = 0; + out_1277983044864762150[59] = 0; + out_1277983044864762150[60] = 0; + out_1277983044864762150[61] = 0; + out_1277983044864762150[62] = 0; + out_1277983044864762150[63] = 0; + out_1277983044864762150[64] = 0; + out_1277983044864762150[65] = 0; + out_1277983044864762150[66] = dt; + out_1277983044864762150[67] = 0; + out_1277983044864762150[68] = 0; + out_1277983044864762150[69] = 0; + out_1277983044864762150[70] = 0; + out_1277983044864762150[71] = 0; + out_1277983044864762150[72] = 0; + out_1277983044864762150[73] = 0; + out_1277983044864762150[74] = 0; + out_1277983044864762150[75] = 0; + out_1277983044864762150[76] = 1; + out_1277983044864762150[77] = 0; + out_1277983044864762150[78] = 0; + out_1277983044864762150[79] = 0; + out_1277983044864762150[80] = 0; + out_1277983044864762150[81] = 0; + out_1277983044864762150[82] = 0; + out_1277983044864762150[83] = 0; + out_1277983044864762150[84] = 0; + out_1277983044864762150[85] = dt; + out_1277983044864762150[86] = 0; + out_1277983044864762150[87] = 0; + out_1277983044864762150[88] = 0; + out_1277983044864762150[89] = 0; + out_1277983044864762150[90] = 0; + out_1277983044864762150[91] = 0; + out_1277983044864762150[92] = 0; + out_1277983044864762150[93] = 0; + out_1277983044864762150[94] = 0; + out_1277983044864762150[95] = 1; + out_1277983044864762150[96] = 0; + out_1277983044864762150[97] = 0; + out_1277983044864762150[98] = 0; + out_1277983044864762150[99] = 0; + out_1277983044864762150[100] = 0; + out_1277983044864762150[101] = 0; + out_1277983044864762150[102] = 0; + out_1277983044864762150[103] = 0; + out_1277983044864762150[104] = dt; + out_1277983044864762150[105] = 0; + out_1277983044864762150[106] = 0; + out_1277983044864762150[107] = 0; + out_1277983044864762150[108] = 0; + out_1277983044864762150[109] = 0; + out_1277983044864762150[110] = 0; + out_1277983044864762150[111] = 0; + out_1277983044864762150[112] = 0; + out_1277983044864762150[113] = 0; + out_1277983044864762150[114] = 1; + out_1277983044864762150[115] = 0; + out_1277983044864762150[116] = 0; + out_1277983044864762150[117] = 0; + out_1277983044864762150[118] = 0; + out_1277983044864762150[119] = 0; + out_1277983044864762150[120] = 0; + out_1277983044864762150[121] = 0; + out_1277983044864762150[122] = 0; + out_1277983044864762150[123] = 0; + out_1277983044864762150[124] = 0; + out_1277983044864762150[125] = 0; + out_1277983044864762150[126] = 0; + out_1277983044864762150[127] = 0; + out_1277983044864762150[128] = 0; + out_1277983044864762150[129] = 0; + out_1277983044864762150[130] = 0; + out_1277983044864762150[131] = 0; + out_1277983044864762150[132] = 0; + out_1277983044864762150[133] = 1; + out_1277983044864762150[134] = 0; + out_1277983044864762150[135] = 0; + out_1277983044864762150[136] = 0; + out_1277983044864762150[137] = 0; + out_1277983044864762150[138] = 0; + out_1277983044864762150[139] = 0; + out_1277983044864762150[140] = 0; + out_1277983044864762150[141] = 0; + out_1277983044864762150[142] = 0; + out_1277983044864762150[143] = 0; + out_1277983044864762150[144] = 0; + out_1277983044864762150[145] = 0; + out_1277983044864762150[146] = 0; + out_1277983044864762150[147] = 0; + out_1277983044864762150[148] = 0; + out_1277983044864762150[149] = 0; + out_1277983044864762150[150] = 0; + out_1277983044864762150[151] = 0; + out_1277983044864762150[152] = 1; + out_1277983044864762150[153] = 0; + out_1277983044864762150[154] = 0; + out_1277983044864762150[155] = 0; + out_1277983044864762150[156] = 0; + out_1277983044864762150[157] = 0; + out_1277983044864762150[158] = 0; + out_1277983044864762150[159] = 0; + out_1277983044864762150[160] = 0; + out_1277983044864762150[161] = 0; + out_1277983044864762150[162] = 0; + out_1277983044864762150[163] = 0; + out_1277983044864762150[164] = 0; + out_1277983044864762150[165] = 0; + out_1277983044864762150[166] = 0; + out_1277983044864762150[167] = 0; + out_1277983044864762150[168] = 0; + out_1277983044864762150[169] = 0; + out_1277983044864762150[170] = 0; + out_1277983044864762150[171] = 1; + out_1277983044864762150[172] = 0; + out_1277983044864762150[173] = 0; + out_1277983044864762150[174] = 0; + out_1277983044864762150[175] = 0; + out_1277983044864762150[176] = 0; + out_1277983044864762150[177] = 0; + out_1277983044864762150[178] = 0; + out_1277983044864762150[179] = 0; + out_1277983044864762150[180] = 0; + out_1277983044864762150[181] = 0; + out_1277983044864762150[182] = 0; + out_1277983044864762150[183] = 0; + out_1277983044864762150[184] = 0; + out_1277983044864762150[185] = 0; + out_1277983044864762150[186] = 0; + out_1277983044864762150[187] = 0; + out_1277983044864762150[188] = 0; + out_1277983044864762150[189] = 0; + out_1277983044864762150[190] = 1; + out_1277983044864762150[191] = 0; + out_1277983044864762150[192] = 0; + out_1277983044864762150[193] = 0; + out_1277983044864762150[194] = 0; + out_1277983044864762150[195] = 0; + out_1277983044864762150[196] = 0; + out_1277983044864762150[197] = 0; + out_1277983044864762150[198] = 0; + out_1277983044864762150[199] = 0; + out_1277983044864762150[200] = 0; + out_1277983044864762150[201] = 0; + out_1277983044864762150[202] = 0; + out_1277983044864762150[203] = 0; + out_1277983044864762150[204] = 0; + out_1277983044864762150[205] = 0; + out_1277983044864762150[206] = 0; + out_1277983044864762150[207] = 0; + out_1277983044864762150[208] = 0; + out_1277983044864762150[209] = 1; + out_1277983044864762150[210] = 0; + out_1277983044864762150[211] = 0; + out_1277983044864762150[212] = 0; + out_1277983044864762150[213] = 0; + out_1277983044864762150[214] = 0; + out_1277983044864762150[215] = 0; + out_1277983044864762150[216] = 0; + out_1277983044864762150[217] = 0; + out_1277983044864762150[218] = 0; + out_1277983044864762150[219] = 0; + out_1277983044864762150[220] = 0; + out_1277983044864762150[221] = 0; + out_1277983044864762150[222] = 0; + out_1277983044864762150[223] = 0; + out_1277983044864762150[224] = 0; + out_1277983044864762150[225] = 0; + out_1277983044864762150[226] = 0; + out_1277983044864762150[227] = 0; + out_1277983044864762150[228] = 1; + out_1277983044864762150[229] = 0; + out_1277983044864762150[230] = 0; + out_1277983044864762150[231] = 0; + out_1277983044864762150[232] = 0; + out_1277983044864762150[233] = 0; + out_1277983044864762150[234] = 0; + out_1277983044864762150[235] = 0; + out_1277983044864762150[236] = 0; + out_1277983044864762150[237] = 0; + out_1277983044864762150[238] = 0; + out_1277983044864762150[239] = 0; + out_1277983044864762150[240] = 0; + out_1277983044864762150[241] = 0; + out_1277983044864762150[242] = 0; + out_1277983044864762150[243] = 0; + out_1277983044864762150[244] = 0; + out_1277983044864762150[245] = 0; + out_1277983044864762150[246] = 0; + out_1277983044864762150[247] = 1; + out_1277983044864762150[248] = 0; + out_1277983044864762150[249] = 0; + out_1277983044864762150[250] = 0; + out_1277983044864762150[251] = 0; + out_1277983044864762150[252] = 0; + out_1277983044864762150[253] = 0; + out_1277983044864762150[254] = 0; + out_1277983044864762150[255] = 0; + out_1277983044864762150[256] = 0; + out_1277983044864762150[257] = 0; + out_1277983044864762150[258] = 0; + out_1277983044864762150[259] = 0; + out_1277983044864762150[260] = 0; + out_1277983044864762150[261] = 0; + out_1277983044864762150[262] = 0; + out_1277983044864762150[263] = 0; + out_1277983044864762150[264] = 0; + out_1277983044864762150[265] = 0; + out_1277983044864762150[266] = 1; + out_1277983044864762150[267] = 0; + out_1277983044864762150[268] = 0; + out_1277983044864762150[269] = 0; + out_1277983044864762150[270] = 0; + out_1277983044864762150[271] = 0; + out_1277983044864762150[272] = 0; + out_1277983044864762150[273] = 0; + out_1277983044864762150[274] = 0; + out_1277983044864762150[275] = 0; + out_1277983044864762150[276] = 0; + out_1277983044864762150[277] = 0; + out_1277983044864762150[278] = 0; + out_1277983044864762150[279] = 0; + out_1277983044864762150[280] = 0; + out_1277983044864762150[281] = 0; + out_1277983044864762150[282] = 0; + out_1277983044864762150[283] = 0; + out_1277983044864762150[284] = 0; + out_1277983044864762150[285] = 1; + out_1277983044864762150[286] = 0; + out_1277983044864762150[287] = 0; + out_1277983044864762150[288] = 0; + out_1277983044864762150[289] = 0; + out_1277983044864762150[290] = 0; + out_1277983044864762150[291] = 0; + out_1277983044864762150[292] = 0; + out_1277983044864762150[293] = 0; + out_1277983044864762150[294] = 0; + out_1277983044864762150[295] = 0; + out_1277983044864762150[296] = 0; + out_1277983044864762150[297] = 0; + out_1277983044864762150[298] = 0; + out_1277983044864762150[299] = 0; + out_1277983044864762150[300] = 0; + out_1277983044864762150[301] = 0; + out_1277983044864762150[302] = 0; + out_1277983044864762150[303] = 0; + out_1277983044864762150[304] = 1; + out_1277983044864762150[305] = 0; + out_1277983044864762150[306] = 0; + out_1277983044864762150[307] = 0; + out_1277983044864762150[308] = 0; + out_1277983044864762150[309] = 0; + out_1277983044864762150[310] = 0; + out_1277983044864762150[311] = 0; + out_1277983044864762150[312] = 0; + out_1277983044864762150[313] = 0; + out_1277983044864762150[314] = 0; + out_1277983044864762150[315] = 0; + out_1277983044864762150[316] = 0; + out_1277983044864762150[317] = 0; + out_1277983044864762150[318] = 0; + out_1277983044864762150[319] = 0; + out_1277983044864762150[320] = 0; + out_1277983044864762150[321] = 0; + out_1277983044864762150[322] = 0; + out_1277983044864762150[323] = 1; } -void h_4(double *state, double *unused, double *out_7718420596511956484) { - out_7718420596511956484[0] = state[6] + state[9]; - out_7718420596511956484[1] = state[7] + state[10]; - out_7718420596511956484[2] = state[8] + state[11]; +void h_4(double *state, double *unused, double *out_6167073772337384283) { + out_6167073772337384283[0] = state[6] + state[9]; + out_6167073772337384283[1] = state[7] + state[10]; + out_6167073772337384283[2] = state[8] + state[11]; } -void H_4(double *state, double *unused, double *out_9146915311723630973) { - out_9146915311723630973[0] = 0; - out_9146915311723630973[1] = 0; - out_9146915311723630973[2] = 0; - out_9146915311723630973[3] = 0; - out_9146915311723630973[4] = 0; - out_9146915311723630973[5] = 0; - out_9146915311723630973[6] = 1; - out_9146915311723630973[7] = 0; - out_9146915311723630973[8] = 0; - out_9146915311723630973[9] = 1; - out_9146915311723630973[10] = 0; - out_9146915311723630973[11] = 0; - out_9146915311723630973[12] = 0; - out_9146915311723630973[13] = 0; - out_9146915311723630973[14] = 0; - out_9146915311723630973[15] = 0; - out_9146915311723630973[16] = 0; - out_9146915311723630973[17] = 0; - out_9146915311723630973[18] = 0; - out_9146915311723630973[19] = 0; - out_9146915311723630973[20] = 0; - out_9146915311723630973[21] = 0; - out_9146915311723630973[22] = 0; - out_9146915311723630973[23] = 0; - out_9146915311723630973[24] = 0; - out_9146915311723630973[25] = 1; - out_9146915311723630973[26] = 0; - out_9146915311723630973[27] = 0; - out_9146915311723630973[28] = 1; - out_9146915311723630973[29] = 0; - out_9146915311723630973[30] = 0; - out_9146915311723630973[31] = 0; - out_9146915311723630973[32] = 0; - out_9146915311723630973[33] = 0; - out_9146915311723630973[34] = 0; - out_9146915311723630973[35] = 0; - out_9146915311723630973[36] = 0; - out_9146915311723630973[37] = 0; - out_9146915311723630973[38] = 0; - out_9146915311723630973[39] = 0; - out_9146915311723630973[40] = 0; - out_9146915311723630973[41] = 0; - out_9146915311723630973[42] = 0; - out_9146915311723630973[43] = 0; - out_9146915311723630973[44] = 1; - out_9146915311723630973[45] = 0; - out_9146915311723630973[46] = 0; - out_9146915311723630973[47] = 1; - out_9146915311723630973[48] = 0; - out_9146915311723630973[49] = 0; - out_9146915311723630973[50] = 0; - out_9146915311723630973[51] = 0; - out_9146915311723630973[52] = 0; - out_9146915311723630973[53] = 0; +void H_4(double *state, double *unused, double *out_4761509597555442182) { + out_4761509597555442182[0] = 0; + out_4761509597555442182[1] = 0; + out_4761509597555442182[2] = 0; + out_4761509597555442182[3] = 0; + out_4761509597555442182[4] = 0; + out_4761509597555442182[5] = 0; + out_4761509597555442182[6] = 1; + out_4761509597555442182[7] = 0; + out_4761509597555442182[8] = 0; + out_4761509597555442182[9] = 1; + out_4761509597555442182[10] = 0; + out_4761509597555442182[11] = 0; + out_4761509597555442182[12] = 0; + out_4761509597555442182[13] = 0; + out_4761509597555442182[14] = 0; + out_4761509597555442182[15] = 0; + out_4761509597555442182[16] = 0; + out_4761509597555442182[17] = 0; + out_4761509597555442182[18] = 0; + out_4761509597555442182[19] = 0; + out_4761509597555442182[20] = 0; + out_4761509597555442182[21] = 0; + out_4761509597555442182[22] = 0; + out_4761509597555442182[23] = 0; + out_4761509597555442182[24] = 0; + out_4761509597555442182[25] = 1; + out_4761509597555442182[26] = 0; + out_4761509597555442182[27] = 0; + out_4761509597555442182[28] = 1; + out_4761509597555442182[29] = 0; + out_4761509597555442182[30] = 0; + out_4761509597555442182[31] = 0; + out_4761509597555442182[32] = 0; + out_4761509597555442182[33] = 0; + out_4761509597555442182[34] = 0; + out_4761509597555442182[35] = 0; + out_4761509597555442182[36] = 0; + out_4761509597555442182[37] = 0; + out_4761509597555442182[38] = 0; + out_4761509597555442182[39] = 0; + out_4761509597555442182[40] = 0; + out_4761509597555442182[41] = 0; + out_4761509597555442182[42] = 0; + out_4761509597555442182[43] = 0; + out_4761509597555442182[44] = 1; + out_4761509597555442182[45] = 0; + out_4761509597555442182[46] = 0; + out_4761509597555442182[47] = 1; + out_4761509597555442182[48] = 0; + out_4761509597555442182[49] = 0; + out_4761509597555442182[50] = 0; + out_4761509597555442182[51] = 0; + out_4761509597555442182[52] = 0; + out_4761509597555442182[53] = 0; } -void h_10(double *state, double *unused, double *out_5513215277046893653) { - out_5513215277046893653[0] = 9.8100000000000005*sin(state[1]) - state[4]*state[8] + state[5]*state[7] + state[12] + state[15]; - out_5513215277046893653[1] = -9.8100000000000005*sin(state[0])*cos(state[1]) + state[3]*state[8] - state[5]*state[6] + state[13] + state[16]; - out_5513215277046893653[2] = -9.8100000000000005*cos(state[0])*cos(state[1]) - state[3]*state[7] + state[4]*state[6] + state[14] + state[17]; +void h_10(double *state, double *unused, double *out_3137948981903642358) { + out_3137948981903642358[0] = 9.8100000000000005*sin(state[1]) - state[4]*state[8] + state[5]*state[7] + state[12] + state[15]; + out_3137948981903642358[1] = -9.8100000000000005*sin(state[0])*cos(state[1]) + state[3]*state[8] - state[5]*state[6] + state[13] + state[16]; + out_3137948981903642358[2] = -9.8100000000000005*cos(state[0])*cos(state[1]) - state[3]*state[7] + state[4]*state[6] + state[14] + state[17]; } -void H_10(double *state, double *unused, double *out_1077084666490538527) { - out_1077084666490538527[0] = 0; - out_1077084666490538527[1] = 9.8100000000000005*cos(state[1]); - out_1077084666490538527[2] = 0; - out_1077084666490538527[3] = 0; - out_1077084666490538527[4] = -state[8]; - out_1077084666490538527[5] = state[7]; - out_1077084666490538527[6] = 0; - out_1077084666490538527[7] = state[5]; - out_1077084666490538527[8] = -state[4]; - out_1077084666490538527[9] = 0; - out_1077084666490538527[10] = 0; - out_1077084666490538527[11] = 0; - out_1077084666490538527[12] = 1; - out_1077084666490538527[13] = 0; - out_1077084666490538527[14] = 0; - out_1077084666490538527[15] = 1; - out_1077084666490538527[16] = 0; - out_1077084666490538527[17] = 0; - out_1077084666490538527[18] = -9.8100000000000005*cos(state[0])*cos(state[1]); - out_1077084666490538527[19] = 9.8100000000000005*sin(state[0])*sin(state[1]); - out_1077084666490538527[20] = 0; - out_1077084666490538527[21] = state[8]; - out_1077084666490538527[22] = 0; - out_1077084666490538527[23] = -state[6]; - out_1077084666490538527[24] = -state[5]; - out_1077084666490538527[25] = 0; - out_1077084666490538527[26] = state[3]; - out_1077084666490538527[27] = 0; - out_1077084666490538527[28] = 0; - out_1077084666490538527[29] = 0; - out_1077084666490538527[30] = 0; - out_1077084666490538527[31] = 1; - out_1077084666490538527[32] = 0; - out_1077084666490538527[33] = 0; - out_1077084666490538527[34] = 1; - out_1077084666490538527[35] = 0; - out_1077084666490538527[36] = 9.8100000000000005*sin(state[0])*cos(state[1]); - out_1077084666490538527[37] = 9.8100000000000005*sin(state[1])*cos(state[0]); - out_1077084666490538527[38] = 0; - out_1077084666490538527[39] = -state[7]; - out_1077084666490538527[40] = state[6]; - out_1077084666490538527[41] = 0; - out_1077084666490538527[42] = state[4]; - out_1077084666490538527[43] = -state[3]; - out_1077084666490538527[44] = 0; - out_1077084666490538527[45] = 0; - out_1077084666490538527[46] = 0; - out_1077084666490538527[47] = 0; - out_1077084666490538527[48] = 0; - out_1077084666490538527[49] = 0; - out_1077084666490538527[50] = 1; - out_1077084666490538527[51] = 0; - out_1077084666490538527[52] = 0; - out_1077084666490538527[53] = 1; +void H_10(double *state, double *unused, double *out_6455930617601822676) { + out_6455930617601822676[0] = 0; + out_6455930617601822676[1] = 9.8100000000000005*cos(state[1]); + out_6455930617601822676[2] = 0; + out_6455930617601822676[3] = 0; + out_6455930617601822676[4] = -state[8]; + out_6455930617601822676[5] = state[7]; + out_6455930617601822676[6] = 0; + out_6455930617601822676[7] = state[5]; + out_6455930617601822676[8] = -state[4]; + out_6455930617601822676[9] = 0; + out_6455930617601822676[10] = 0; + out_6455930617601822676[11] = 0; + out_6455930617601822676[12] = 1; + out_6455930617601822676[13] = 0; + out_6455930617601822676[14] = 0; + out_6455930617601822676[15] = 1; + out_6455930617601822676[16] = 0; + out_6455930617601822676[17] = 0; + out_6455930617601822676[18] = -9.8100000000000005*cos(state[0])*cos(state[1]); + out_6455930617601822676[19] = 9.8100000000000005*sin(state[0])*sin(state[1]); + out_6455930617601822676[20] = 0; + out_6455930617601822676[21] = state[8]; + out_6455930617601822676[22] = 0; + out_6455930617601822676[23] = -state[6]; + out_6455930617601822676[24] = -state[5]; + out_6455930617601822676[25] = 0; + out_6455930617601822676[26] = state[3]; + out_6455930617601822676[27] = 0; + out_6455930617601822676[28] = 0; + out_6455930617601822676[29] = 0; + out_6455930617601822676[30] = 0; + out_6455930617601822676[31] = 1; + out_6455930617601822676[32] = 0; + out_6455930617601822676[33] = 0; + out_6455930617601822676[34] = 1; + out_6455930617601822676[35] = 0; + out_6455930617601822676[36] = 9.8100000000000005*sin(state[0])*cos(state[1]); + out_6455930617601822676[37] = 9.8100000000000005*sin(state[1])*cos(state[0]); + out_6455930617601822676[38] = 0; + out_6455930617601822676[39] = -state[7]; + out_6455930617601822676[40] = state[6]; + out_6455930617601822676[41] = 0; + out_6455930617601822676[42] = state[4]; + out_6455930617601822676[43] = -state[3]; + out_6455930617601822676[44] = 0; + out_6455930617601822676[45] = 0; + out_6455930617601822676[46] = 0; + out_6455930617601822676[47] = 0; + out_6455930617601822676[48] = 0; + out_6455930617601822676[49] = 0; + out_6455930617601822676[50] = 1; + out_6455930617601822676[51] = 0; + out_6455930617601822676[52] = 0; + out_6455930617601822676[53] = 1; } -void h_13(double *state, double *unused, double *out_399423813345080057) { - out_399423813345080057[0] = state[3]; - out_399423813345080057[1] = state[4]; - out_399423813345080057[2] = state[5]; +void h_13(double *state, double *unused, double *out_1578870771935541941) { + out_1578870771935541941[0] = state[3]; + out_1578870771935541941[1] = state[4]; + out_1578870771935541941[2] = state[5]; } -void H_13(double *state, double *unused, double *out_6087554936653587842) { - out_6087554936653587842[0] = 0; - out_6087554936653587842[1] = 0; - out_6087554936653587842[2] = 0; - out_6087554936653587842[3] = 1; - out_6087554936653587842[4] = 0; - out_6087554936653587842[5] = 0; - out_6087554936653587842[6] = 0; - out_6087554936653587842[7] = 0; - out_6087554936653587842[8] = 0; - out_6087554936653587842[9] = 0; - out_6087554936653587842[10] = 0; - out_6087554936653587842[11] = 0; - out_6087554936653587842[12] = 0; - out_6087554936653587842[13] = 0; - out_6087554936653587842[14] = 0; - out_6087554936653587842[15] = 0; - out_6087554936653587842[16] = 0; - out_6087554936653587842[17] = 0; - out_6087554936653587842[18] = 0; - out_6087554936653587842[19] = 0; - out_6087554936653587842[20] = 0; - out_6087554936653587842[21] = 0; - out_6087554936653587842[22] = 1; - out_6087554936653587842[23] = 0; - out_6087554936653587842[24] = 0; - out_6087554936653587842[25] = 0; - out_6087554936653587842[26] = 0; - out_6087554936653587842[27] = 0; - out_6087554936653587842[28] = 0; - out_6087554936653587842[29] = 0; - out_6087554936653587842[30] = 0; - out_6087554936653587842[31] = 0; - out_6087554936653587842[32] = 0; - out_6087554936653587842[33] = 0; - out_6087554936653587842[34] = 0; - out_6087554936653587842[35] = 0; - out_6087554936653587842[36] = 0; - out_6087554936653587842[37] = 0; - out_6087554936653587842[38] = 0; - out_6087554936653587842[39] = 0; - out_6087554936653587842[40] = 0; - out_6087554936653587842[41] = 1; - out_6087554936653587842[42] = 0; - out_6087554936653587842[43] = 0; - out_6087554936653587842[44] = 0; - out_6087554936653587842[45] = 0; - out_6087554936653587842[46] = 0; - out_6087554936653587842[47] = 0; - out_6087554936653587842[48] = 0; - out_6087554936653587842[49] = 0; - out_6087554936653587842[50] = 0; - out_6087554936653587842[51] = 0; - out_6087554936653587842[52] = 0; - out_6087554936653587842[53] = 0; +void H_13(double *state, double *unused, double *out_7973783422887774983) { + out_7973783422887774983[0] = 0; + out_7973783422887774983[1] = 0; + out_7973783422887774983[2] = 0; + out_7973783422887774983[3] = 1; + out_7973783422887774983[4] = 0; + out_7973783422887774983[5] = 0; + out_7973783422887774983[6] = 0; + out_7973783422887774983[7] = 0; + out_7973783422887774983[8] = 0; + out_7973783422887774983[9] = 0; + out_7973783422887774983[10] = 0; + out_7973783422887774983[11] = 0; + out_7973783422887774983[12] = 0; + out_7973783422887774983[13] = 0; + out_7973783422887774983[14] = 0; + out_7973783422887774983[15] = 0; + out_7973783422887774983[16] = 0; + out_7973783422887774983[17] = 0; + out_7973783422887774983[18] = 0; + out_7973783422887774983[19] = 0; + out_7973783422887774983[20] = 0; + out_7973783422887774983[21] = 0; + out_7973783422887774983[22] = 1; + out_7973783422887774983[23] = 0; + out_7973783422887774983[24] = 0; + out_7973783422887774983[25] = 0; + out_7973783422887774983[26] = 0; + out_7973783422887774983[27] = 0; + out_7973783422887774983[28] = 0; + out_7973783422887774983[29] = 0; + out_7973783422887774983[30] = 0; + out_7973783422887774983[31] = 0; + out_7973783422887774983[32] = 0; + out_7973783422887774983[33] = 0; + out_7973783422887774983[34] = 0; + out_7973783422887774983[35] = 0; + out_7973783422887774983[36] = 0; + out_7973783422887774983[37] = 0; + out_7973783422887774983[38] = 0; + out_7973783422887774983[39] = 0; + out_7973783422887774983[40] = 0; + out_7973783422887774983[41] = 1; + out_7973783422887774983[42] = 0; + out_7973783422887774983[43] = 0; + out_7973783422887774983[44] = 0; + out_7973783422887774983[45] = 0; + out_7973783422887774983[46] = 0; + out_7973783422887774983[47] = 0; + out_7973783422887774983[48] = 0; + out_7973783422887774983[49] = 0; + out_7973783422887774983[50] = 0; + out_7973783422887774983[51] = 0; + out_7973783422887774983[52] = 0; + out_7973783422887774983[53] = 0; } -void h_14(double *state, double *unused, double *out_1933161813507433673) { - out_1933161813507433673[0] = state[6]; - out_1933161813507433673[1] = state[7]; - out_1933161813507433673[2] = state[8]; +void h_14(double *state, double *unused, double *out_7672211974709550584) { + out_7672211974709550584[0] = state[6]; + out_7672211974709550584[1] = state[7]; + out_7672211974709550584[2] = state[8]; } -void H_14(double *state, double *unused, double *out_5336587905646436114) { - out_5336587905646436114[0] = 0; - out_5336587905646436114[1] = 0; - out_5336587905646436114[2] = 0; - out_5336587905646436114[3] = 0; - out_5336587905646436114[4] = 0; - out_5336587905646436114[5] = 0; - out_5336587905646436114[6] = 1; - out_5336587905646436114[7] = 0; - out_5336587905646436114[8] = 0; - out_5336587905646436114[9] = 0; - out_5336587905646436114[10] = 0; - out_5336587905646436114[11] = 0; - out_5336587905646436114[12] = 0; - out_5336587905646436114[13] = 0; - out_5336587905646436114[14] = 0; - out_5336587905646436114[15] = 0; - out_5336587905646436114[16] = 0; - out_5336587905646436114[17] = 0; - out_5336587905646436114[18] = 0; - out_5336587905646436114[19] = 0; - out_5336587905646436114[20] = 0; - out_5336587905646436114[21] = 0; - out_5336587905646436114[22] = 0; - out_5336587905646436114[23] = 0; - out_5336587905646436114[24] = 0; - out_5336587905646436114[25] = 1; - out_5336587905646436114[26] = 0; - out_5336587905646436114[27] = 0; - out_5336587905646436114[28] = 0; - out_5336587905646436114[29] = 0; - out_5336587905646436114[30] = 0; - out_5336587905646436114[31] = 0; - out_5336587905646436114[32] = 0; - out_5336587905646436114[33] = 0; - out_5336587905646436114[34] = 0; - out_5336587905646436114[35] = 0; - out_5336587905646436114[36] = 0; - out_5336587905646436114[37] = 0; - out_5336587905646436114[38] = 0; - out_5336587905646436114[39] = 0; - out_5336587905646436114[40] = 0; - out_5336587905646436114[41] = 0; - out_5336587905646436114[42] = 0; - out_5336587905646436114[43] = 0; - out_5336587905646436114[44] = 1; - out_5336587905646436114[45] = 0; - out_5336587905646436114[46] = 0; - out_5336587905646436114[47] = 0; - out_5336587905646436114[48] = 0; - out_5336587905646436114[49] = 0; - out_5336587905646436114[50] = 0; - out_5336587905646436114[51] = 0; - out_5336587905646436114[52] = 0; - out_5336587905646436114[53] = 0; +void H_14(double *state, double *unused, double *out_4326393070910558583) { + out_4326393070910558583[0] = 0; + out_4326393070910558583[1] = 0; + out_4326393070910558583[2] = 0; + out_4326393070910558583[3] = 0; + out_4326393070910558583[4] = 0; + out_4326393070910558583[5] = 0; + out_4326393070910558583[6] = 1; + out_4326393070910558583[7] = 0; + out_4326393070910558583[8] = 0; + out_4326393070910558583[9] = 0; + out_4326393070910558583[10] = 0; + out_4326393070910558583[11] = 0; + out_4326393070910558583[12] = 0; + out_4326393070910558583[13] = 0; + out_4326393070910558583[14] = 0; + out_4326393070910558583[15] = 0; + out_4326393070910558583[16] = 0; + out_4326393070910558583[17] = 0; + out_4326393070910558583[18] = 0; + out_4326393070910558583[19] = 0; + out_4326393070910558583[20] = 0; + out_4326393070910558583[21] = 0; + out_4326393070910558583[22] = 0; + out_4326393070910558583[23] = 0; + out_4326393070910558583[24] = 0; + out_4326393070910558583[25] = 1; + out_4326393070910558583[26] = 0; + out_4326393070910558583[27] = 0; + out_4326393070910558583[28] = 0; + out_4326393070910558583[29] = 0; + out_4326393070910558583[30] = 0; + out_4326393070910558583[31] = 0; + out_4326393070910558583[32] = 0; + out_4326393070910558583[33] = 0; + out_4326393070910558583[34] = 0; + out_4326393070910558583[35] = 0; + out_4326393070910558583[36] = 0; + out_4326393070910558583[37] = 0; + out_4326393070910558583[38] = 0; + out_4326393070910558583[39] = 0; + out_4326393070910558583[40] = 0; + out_4326393070910558583[41] = 0; + out_4326393070910558583[42] = 0; + out_4326393070910558583[43] = 0; + out_4326393070910558583[44] = 1; + out_4326393070910558583[45] = 0; + out_4326393070910558583[46] = 0; + out_4326393070910558583[47] = 0; + out_4326393070910558583[48] = 0; + out_4326393070910558583[49] = 0; + out_4326393070910558583[50] = 0; + out_4326393070910558583[51] = 0; + out_4326393070910558583[52] = 0; + out_4326393070910558583[53] = 0; } #include #include @@ -1113,44 +1113,44 @@ void pose_update_13(double *in_x, double *in_P, double *in_z, double *in_R, doub void pose_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_14, H_14, NULL, in_z, in_R, in_ea, MAHA_THRESH_14); } -void pose_err_fun(double *nom_x, double *delta_x, double *out_3083751291667230086) { - err_fun(nom_x, delta_x, out_3083751291667230086); +void pose_err_fun(double *nom_x, double *delta_x, double *out_2755267697534836281) { + err_fun(nom_x, delta_x, out_2755267697534836281); } -void pose_inv_err_fun(double *nom_x, double *true_x, double *out_8958923596036680453) { - inv_err_fun(nom_x, true_x, out_8958923596036680453); +void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4688414877314135206) { + inv_err_fun(nom_x, true_x, out_4688414877314135206); } -void pose_H_mod_fun(double *state, double *out_3451746955233961922) { - H_mod_fun(state, out_3451746955233961922); +void pose_H_mod_fun(double *state, double *out_7837152669402150713) { + H_mod_fun(state, out_7837152669402150713); } -void pose_f_fun(double *state, double dt, double *out_9153581491484683214) { - f_fun(state, dt, out_9153581491484683214); +void pose_f_fun(double *state, double dt, double *out_8293850048606202954) { + f_fun(state, dt, out_8293850048606202954); } -void pose_F_fun(double *state, double dt, double *out_1650230700148071035) { - F_fun(state, dt, out_1650230700148071035); +void pose_F_fun(double *state, double dt, double *out_1277983044864762150) { + F_fun(state, dt, out_1277983044864762150); } -void pose_h_4(double *state, double *unused, double *out_7718420596511956484) { - h_4(state, unused, out_7718420596511956484); +void pose_h_4(double *state, double *unused, double *out_6167073772337384283) { + h_4(state, unused, out_6167073772337384283); } -void pose_H_4(double *state, double *unused, double *out_9146915311723630973) { - H_4(state, unused, out_9146915311723630973); +void pose_H_4(double *state, double *unused, double *out_4761509597555442182) { + H_4(state, unused, out_4761509597555442182); } -void pose_h_10(double *state, double *unused, double *out_5513215277046893653) { - h_10(state, unused, out_5513215277046893653); +void pose_h_10(double *state, double *unused, double *out_3137948981903642358) { + h_10(state, unused, out_3137948981903642358); } -void pose_H_10(double *state, double *unused, double *out_1077084666490538527) { - H_10(state, unused, out_1077084666490538527); +void pose_H_10(double *state, double *unused, double *out_6455930617601822676) { + H_10(state, unused, out_6455930617601822676); } -void pose_h_13(double *state, double *unused, double *out_399423813345080057) { - h_13(state, unused, out_399423813345080057); +void pose_h_13(double *state, double *unused, double *out_1578870771935541941) { + h_13(state, unused, out_1578870771935541941); } -void pose_H_13(double *state, double *unused, double *out_6087554936653587842) { - H_13(state, unused, out_6087554936653587842); +void pose_H_13(double *state, double *unused, double *out_7973783422887774983) { + H_13(state, unused, out_7973783422887774983); } -void pose_h_14(double *state, double *unused, double *out_1933161813507433673) { - h_14(state, unused, out_1933161813507433673); +void pose_h_14(double *state, double *unused, double *out_7672211974709550584) { + h_14(state, unused, out_7672211974709550584); } -void pose_H_14(double *state, double *unused, double *out_5336587905646436114) { - H_14(state, unused, out_5336587905646436114); +void pose_H_14(double *state, double *unused, double *out_4326393070910558583) { + H_14(state, unused, out_4326393070910558583); } void pose_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/pose.h b/selfdrive/locationd/models/generated/pose.h index af5d429008..615d1233b4 100644 --- a/selfdrive/locationd/models/generated/pose.h +++ b/selfdrive/locationd/models/generated/pose.h @@ -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_3083751291667230086); -void pose_inv_err_fun(double *nom_x, double *true_x, double *out_8958923596036680453); -void pose_H_mod_fun(double *state, double *out_3451746955233961922); -void pose_f_fun(double *state, double dt, double *out_9153581491484683214); -void pose_F_fun(double *state, double dt, double *out_1650230700148071035); -void pose_h_4(double *state, double *unused, double *out_7718420596511956484); -void pose_H_4(double *state, double *unused, double *out_9146915311723630973); -void pose_h_10(double *state, double *unused, double *out_5513215277046893653); -void pose_H_10(double *state, double *unused, double *out_1077084666490538527); -void pose_h_13(double *state, double *unused, double *out_399423813345080057); -void pose_H_13(double *state, double *unused, double *out_6087554936653587842); -void pose_h_14(double *state, double *unused, double *out_1933161813507433673); -void pose_H_14(double *state, double *unused, double *out_5336587905646436114); +void pose_err_fun(double *nom_x, double *delta_x, double *out_2755267697534836281); +void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4688414877314135206); +void pose_H_mod_fun(double *state, double *out_7837152669402150713); +void pose_f_fun(double *state, double dt, double *out_8293850048606202954); +void pose_F_fun(double *state, double dt, double *out_1277983044864762150); +void pose_h_4(double *state, double *unused, double *out_6167073772337384283); +void pose_H_4(double *state, double *unused, double *out_4761509597555442182); +void pose_h_10(double *state, double *unused, double *out_3137948981903642358); +void pose_H_10(double *state, double *unused, double *out_6455930617601822676); +void pose_h_13(double *state, double *unused, double *out_1578870771935541941); +void pose_H_13(double *state, double *unused, double *out_7973783422887774983); +void pose_h_14(double *state, double *unused, double *out_7672211974709550584); +void pose_H_14(double *state, double *unused, double *out_4326393070910558583); void pose_predict(double *in_x, double *in_P, double *in_Q, double dt); } \ No newline at end of file diff --git a/selfdrive/ui/onroad/starpilot/navigation_card.py b/selfdrive/ui/onroad/starpilot/navigation_card.py index 501220d4ba..26609122f6 100644 --- a/selfdrive/ui/onroad/starpilot/navigation_card.py +++ b/selfdrive/ui/onroad/starpilot/navigation_card.py @@ -14,6 +14,7 @@ from openpilot.system.ui.widgets import Widget ASSETS_PATH = Path(__file__).resolve().parents[4] / "starpilot" / "assets" / "navigation" FALLBACK_ICON = "direction_turn_straight.png" +NAV_CANCEL_HOLD_SECONDS = 0.65 def _format_distance(distance_m: float, is_metric: bool) -> str: @@ -77,8 +78,7 @@ class NavigationCardRenderer(Widget): self._collapsed_param_supported: bool | None = None self._interactive_rect = rl.Rectangle(0, 0, 0, 0) self._click_delay = 0.15 - - self.set_click_callback(self._toggle_collapsed) + self._press_started_at: float | None = None @property def _hit_rect(self) -> rl.Rectangle: @@ -98,6 +98,45 @@ class NavigationCardRenderer(Widget): self._collapsed_fallback = new_state self._collapsed = new_state + def _cancel_navigation(self) -> None: + try: + ui_state.params.remove("NavDestination") + except Exception: + pass + + try: + ui_state.params_memory.remove("NavInstructionState") + except Exception: + pass + + try: + ui_state.params_memory.remove("NavInstructionCollapsed") + self._collapsed_param_supported = True + except UnknownKeyName: + self._collapsed_param_supported = False + + self._collapsed_fallback = False + self._collapsed = False + self._valid = False + + def _handle_mouse_press(self, mouse_pos) -> None: + self._press_started_at = rl.get_time() + + def _handle_mouse_release(self, mouse_pos) -> None: + if self._click_delay is not None: + self._click_release_time = rl.get_time() + self._click_delay + + if not self._valid or self._press_started_at is None: + self._press_started_at = None + return + + held_seconds = rl.get_time() - self._press_started_at + self._press_started_at = None + if held_seconds >= NAV_CANCEL_HOLD_SECONDS: + self._cancel_navigation() + else: + self._toggle_collapsed() + def _icon_filename(self, maneuver_type: str, modifier: str) -> str: normalized_type = _normalize_maneuver_type(maneuver_type) if modifier == "uturn": diff --git a/selfdrive/ui/qt/onroad/annotated_camera.cc b/selfdrive/ui/qt/onroad/annotated_camera.cc index 76708a9984..6a6e191a0b 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.cc +++ b/selfdrive/ui/qt/onroad/annotated_camera.cc @@ -27,8 +27,12 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget *par screen_recorder->setVisible(false); } -bool AnnotatedCameraWidget::handleHudTap(const QPoint &pos) { - return hud.handleNavigationTap(pos); +bool AnnotatedCameraWidget::handleHudPress(const QPoint &pos) { + return hud.handleNavigationPress(pos); +} + +bool AnnotatedCameraWidget::handleHudRelease(const QPoint &pos) { + return hud.handleNavigationRelease(pos); } void AnnotatedCameraWidget::updateState(const UIState &s, const StarPilotUIState &fs) { diff --git a/selfdrive/ui/qt/onroad/annotated_camera.h b/selfdrive/ui/qt/onroad/annotated_camera.h index 1c14756b5e..98acb9b1bc 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.h +++ b/selfdrive/ui/qt/onroad/annotated_camera.h @@ -17,7 +17,8 @@ class AnnotatedCameraWidget : public CameraWidget { public: explicit AnnotatedCameraWidget(VisionStreamType type, QWidget* parent = 0); void updateState(const UIState &s, const StarPilotUIState &fs); - bool handleHudTap(const QPoint &pos); + bool handleHudPress(const QPoint &pos); + bool handleHudRelease(const QPoint &pos); double fps; diff --git a/selfdrive/ui/qt/onroad/hud.cc b/selfdrive/ui/qt/onroad/hud.cc index 7125722b8c..0e18d94b4a 100644 --- a/selfdrive/ui/qt/onroad/hud.cc +++ b/selfdrive/ui/qt/onroad/hud.cc @@ -9,18 +9,54 @@ #include "selfdrive/ui/qt/util.h" constexpr int SET_SPEED_NA = 255; +constexpr int NAV_CANCEL_HOLD_MS = 650; HudRenderer::HudRenderer() {} -bool HudRenderer::handleNavigationTap(const QPoint &pos) { +bool HudRenderer::handleNavigationPress(const QPoint &pos) { if (!navigation_valid || !nav_hit_rect.contains(pos)) { return false; } - params_memory.putBool("NavInstructionCollapsed", !navigation_collapsed); + nav_press_active = true; + nav_press_timer.restart(); return true; } +bool HudRenderer::handleNavigationRelease(const QPoint &pos) { + if (!nav_press_active) { + return false; + } + + nav_press_active = false; + if (!nav_hit_rect.contains(pos)) { + return true; + } + + if (nav_press_timer.isValid() && nav_press_timer.elapsed() >= NAV_CANCEL_HOLD_MS) { + cancelNavigation(); + } else { + params_memory.putBool("NavInstructionCollapsed", !navigation_collapsed); + } + return true; +} + +void HudRenderer::cancelNavigation() { + params.remove("NavDestination"); + params_memory.remove("NavInstructionState"); + params_memory.remove("NavInstructionCollapsed"); + navigation_valid = false; + navigation_collapsed = false; + nav_hit_rect = QRect(); + nav_primary_text.clear(); + nav_secondary_text.clear(); + nav_distance.clear(); + nav_maneuver_type.clear(); + nav_modifier.clear(); + nav_next_maneuver_type.clear(); + nav_next_modifier.clear(); +} + void HudRenderer::updateState(const UIState &s) { is_metric = s.scene.is_metric; status = s.status; diff --git a/selfdrive/ui/qt/onroad/hud.h b/selfdrive/ui/qt/onroad/hud.h index 92cbb51b02..ddc7f01129 100644 --- a/selfdrive/ui/qt/onroad/hud.h +++ b/selfdrive/ui/qt/onroad/hud.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -15,7 +16,8 @@ public: HudRenderer(); void updateState(const UIState &s); void draw(QPainter &p, const QRect &surface_rect); - bool handleNavigationTap(const QPoint &pos); + bool handleNavigationPress(const QPoint &pos); + bool handleNavigationRelease(const QPoint &pos); StarPilotAnnotatedCameraWidget *starpilot_nvg; @@ -30,6 +32,7 @@ private: QString formatNavDistance(float distance_m) const; QString navigationIconFilename(const QString &maneuver_type, const QString &modifier) const; QPixmap getNavigationIcon(const QString &maneuver_type, const QString &modifier, int size); + void cancelNavigation(); float speed = 0; float set_speed = 0; @@ -51,6 +54,8 @@ private: QString nav_next_modifier; QRect nav_hit_rect; QHash nav_icon_cache; + QElapsedTimer nav_press_timer; + bool nav_press_active = false; Params params; Params params_memory{"", true}; }; diff --git a/selfdrive/ui/qt/onroad/onroad_home.cc b/selfdrive/ui/qt/onroad/onroad_home.cc index 366479d8a3..4ac1ff42f9 100644 --- a/selfdrive/ui/qt/onroad/onroad_home.cc +++ b/selfdrive/ui/qt/onroad/onroad_home.cc @@ -113,7 +113,7 @@ void OnroadWindow::paintEvent(QPaintEvent *event) { } void OnroadWindow::mousePressEvent(QMouseEvent* mouseEvent) { - if (nvg->handleHudTap(mouseEvent->pos())) { + if (nvg->handleHudPress(mouseEvent->pos())) { mouseEvent->accept(); return; } @@ -127,3 +127,12 @@ void OnroadWindow::mousePressEvent(QMouseEvent* mouseEvent) { // propagation event to parent(HomeWindow) QWidget::mousePressEvent(mouseEvent); } + +void OnroadWindow::mouseReleaseEvent(QMouseEvent* mouseEvent) { + if (nvg->handleHudRelease(mouseEvent->pos())) { + mouseEvent->accept(); + return; + } + + QWidget::mouseReleaseEvent(mouseEvent); +} diff --git a/selfdrive/ui/qt/onroad/onroad_home.h b/selfdrive/ui/qt/onroad/onroad_home.h index 422f828014..d6b6d68a1c 100644 --- a/selfdrive/ui/qt/onroad/onroad_home.h +++ b/selfdrive/ui/qt/onroad/onroad_home.h @@ -19,6 +19,7 @@ private: QHBoxLayout* split; void mousePressEvent(QMouseEvent* mouseEvent); + void mouseReleaseEvent(QMouseEvent* mouseEvent); StarPilotAnnotatedCameraWidget *starpilot_nvg; StarPilotOnroadWindow *starpilot_onroad; diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui index 803b47c690..06e06148ef 100755 Binary files a/selfdrive/ui/ui and b/selfdrive/ui/ui differ diff --git a/starpilot/controls/starpilot_planner.py b/starpilot/controls/starpilot_planner.py index e170374d40..9bedb8e8f8 100644 --- a/starpilot/controls/starpilot_planner.py +++ b/starpilot/controls/starpilot_planner.py @@ -115,6 +115,7 @@ class StarPilotPlanner: "speed": v_ego, "hasFix": bool(getattr(gps_location, "hasFix", False)), "updatedAtMonotonic": time.monotonic(), + "updatedAtSec": time.time(), } self.gps_valid = self.gps_position["hasFix"] and (self.gps_position["latitude"] != 0 or self.gps_position["longitude"] != 0) bearing = self.gps_position["bearing"] diff --git a/starpilot/starpilot_process.py b/starpilot/starpilot_process.py index 41376faff8..9088894018 100644 --- a/starpilot/starpilot_process.py +++ b/starpilot/starpilot_process.py @@ -7,6 +7,7 @@ import time from cereal import messaging from openpilot.common.api import Api, api_get +from openpilot.common.gps import get_gps_location_service from openpilot.common.params import Params from openpilot.common.realtime import DT_MDL, Priority, Ratekeeper, config_realtime_process from openpilot.common.time_helpers import system_time_valid @@ -30,6 +31,8 @@ from openpilot.starpilot.system.starpilot_tracking import StarPilotTracking ASSET_CHECK_RATE = (1 / DT_MDL) DRIVE_STATS_SYNC_RATE = 30 +OFFROAD_GPS_MEMORY_REFRESH_SECONDS = 1.0 +OFFROAD_GPS_PERSIST_REFRESH_SECONDS = 30.0 TOGGLE_BROADCAST_INTERVAL_FRAMES = int(1 / DT_MDL) UPDATE_CHECK_INTERVAL_SECONDS = 60 * 60 @@ -53,6 +56,31 @@ def get_next_periodic_update_check(monotonic_now, phase_seconds): next_check += UPDATE_CHECK_INTERVAL_SECONDS return next_check + +def build_gps_position(gps_location, speed): + return { + "latitude": gps_location.latitude, + "longitude": gps_location.longitude, + "bearing": gps_location.bearingDeg, + "speed": max(float(speed), 0.0), + "hasFix": bool(getattr(gps_location, "hasFix", False)), + "updatedAtMonotonic": time.monotonic(), + "updatedAtSec": time.time(), + } + + +def gps_position_valid(gps_position): + return bool(gps_position["hasFix"]) and (gps_position["latitude"] != 0 or gps_position["longitude"] != 0) + + +def gps_position_signature(gps_position): + return ( + round(float(gps_position["latitude"]), 6), + round(float(gps_position["longitude"]), 6), + round(float(gps_position["bearing"]), 1), + bool(gps_position["hasFix"]), + ) + def check_assets(now, model_manager, theme_manager, thread_manager, params, params_memory, starpilot_toggles): if params_memory.get_bool(MODEL_DOWNLOAD_ALL_PARAM): thread_manager.run_with_lock(model_manager.download_all_models) @@ -182,6 +210,7 @@ def starpilot_thread(): model_manager = ModelManager(params, params_memory) theme_manager = ThemeManager(params, params_memory) thread_manager = ThreadManager() + gps_location_service = get_gps_location_service(params) starpilot_toggles = starpilot_variables.starpilot_toggles serialized_starpilot_toggles = serialize_starpilot_toggles(starpilot_toggles) @@ -191,6 +220,9 @@ def starpilot_thread(): next_drive_stats_sync = 0.0 periodic_update_phase = get_update_check_phase_seconds(params_raw) next_periodic_update_check = get_next_periodic_update_check(time.monotonic(), periodic_update_phase) + last_offroad_gps_memory_write = 0.0 + last_offroad_gps_persist_write = 0.0 + last_offroad_gps_persist_signature = None run_update_checks = False safe_mode_active = safe_mode_enabled(params_raw) @@ -243,6 +275,21 @@ def starpilot_thread(): starpilot_plan_send.starpilotPlan.themeUpdated = theme_manager.theme_updated pm.send("starpilotPlan", starpilot_plan_send) + gps_position = build_gps_position(sm[gps_location_service], getattr(sm["carState"], "vEgo", 0.0)) + if gps_position_valid(gps_position): + gps_memory_state = json.dumps(gps_position, allow_nan=False) + if (monotonic_now - last_offroad_gps_memory_write) >= OFFROAD_GPS_MEMORY_REFRESH_SECONDS: + params_memory.put_nonblocking("LastGPSPosition", gps_memory_state) + last_offroad_gps_memory_write = monotonic_now + + gps_signature = gps_position_signature(gps_position) + persist_due = (monotonic_now - last_offroad_gps_persist_write) >= OFFROAD_GPS_PERSIST_REFRESH_SECONDS + first_persist = last_offroad_gps_persist_signature is None + if gps_signature != last_offroad_gps_persist_signature and (first_persist or persist_due): + params.put("LastGPSPosition", gps_memory_state) + last_offroad_gps_persist_signature = gps_signature + last_offroad_gps_persist_write = monotonic_now + started_previously = started if not started and time_validated and sm["deviceState"].screenBrightnessPercent > 0: diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_destination.js b/starpilot/system/the_pond/assets/components/navigation/navigation_destination.js index 1397e5ec76..5e5223f56e 100644 --- a/starpilot/system/the_pond/assets/components/navigation/navigation_destination.js +++ b/starpilot/system/the_pond/assets/components/navigation/navigation_destination.js @@ -303,8 +303,7 @@ export function NavDestination() { state.destination = JSON.parse(data.destination); } catch { } - state.lastPosition = parseCoordinatePair(data.lastPosition) ?? - parseCoordinatePair(state.destination); + state.lastPosition = parseCoordinatePair(data.lastPosition); try { const prev = JSON.parse(data.previousDestinations); diff --git a/starpilot/system/the_pond/the_pond.py b/starpilot/system/the_pond/the_pond.py index e81c87b1c2..b99b427870 100644 --- a/starpilot/system/the_pond/the_pond.py +++ b/starpilot/system/the_pond/the_pond.py @@ -462,6 +462,9 @@ KEYS = { "secret": ("secret", "sk.", "MapboxSecretKey", "Secret key", 80), } +NAVIGATION_MEMORY_LOCATION_STALE_SECONDS = 10.0 +NAVIGATION_PERSISTED_LOCATION_BOOT_SKEW_SECONDS = 5.0 + TMUX_LOGS_PATH = Path("/data/tmux_logs") MODEL_DOWNLOAD_PARAM = "ModelToDownload" @@ -473,6 +476,82 @@ MODEL_USER_FAVORITES_PARAM = "UserFavorites" MAPS_DOWNLOAD_PARAM = "DownloadMaps" MAPS_CANCEL_DOWNLOAD_PARAM = "CancelDownloadMaps" + +def _parse_last_gps_position(raw_value): + if not raw_value: + return None + + try: + payload = json.loads(raw_value) + except (TypeError, ValueError, json.JSONDecodeError): + return None + + if not isinstance(payload, dict): + return None + + latitude = payload.get("latitude") + longitude = payload.get("longitude") + has_fix = payload.get("hasFix", False) + try: + latitude = float(latitude or 0.0) + longitude = float(longitude or 0.0) + except (TypeError, ValueError): + return None + + if not has_fix or (abs(latitude) < 1e-6 and abs(longitude) < 1e-6): + return None + + payload["latitude"] = latitude + payload["longitude"] = longitude + return payload + + +def _last_gps_position_is_live(payload): + if not isinstance(payload, dict): + return False + + try: + updated_at_monotonic = float(payload.get("updatedAtMonotonic", 0.0) or 0.0) + except (TypeError, ValueError): + updated_at_monotonic = 0.0 + + if updated_at_monotonic <= 0.0: + return False + + return (time.monotonic() - updated_at_monotonic) <= NAVIGATION_MEMORY_LOCATION_STALE_SECONDS + + +def _last_gps_position_is_current_boot(payload): + if not isinstance(payload, dict): + return False + + try: + updated_at_sec = float(payload.get("updatedAtSec", 0.0) or 0.0) + except (TypeError, ValueError): + updated_at_sec = 0.0 + + if updated_at_sec <= 0.0: + return False + + now_sec = time.time() + boot_started_at_sec = now_sec - time.monotonic() + if updated_at_sec > (now_sec + 60.0): + return False + + return updated_at_sec >= (boot_started_at_sec - NAVIGATION_PERSISTED_LOCATION_BOOT_SKEW_SECONDS) + + +def _get_navigation_last_position(): + memory_position = _parse_last_gps_position(params_memory.get("LastGPSPosition", encoding="utf8") or "") + if _last_gps_position_is_live(memory_position): + return memory_position + + persisted_position = _parse_last_gps_position(params.get("LastGPSPosition", encoding="utf8") or "") + if _last_gps_position_is_current_boot(persisted_position): + return persisted_position + + return None + FINGERPRINT_MAKE_LABELS = [ "Acura", "Audi", @@ -3444,14 +3523,7 @@ def setup(app): @app.route("/api/navigation", methods=["GET"]) def navigation(): - last_position_raw = params.get("LastGPSPosition", encoding="utf8") or "" - try: - last_position = json.loads(last_position_raw) if last_position_raw else {} - except (TypeError, ValueError, json.JSONDecodeError): - last_position = {} - - if not isinstance(last_position, dict): - last_position = {} + last_position = _get_navigation_last_position() or {} return { "amap1Key": params.get("AMapKey1", encoding="utf8") or "",