diff --git a/compile_commands.json b/compile_commands.json index 4b3770fa5..1f9c57a09 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -150,91 +150,91 @@ "output": "/data/openpilot/openpilot/cereal/messaging/socketmaster.o" }, { - "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", + "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s", "output": "/data/openpilot/panda/board/stm32h7/board/obj/panda_h7startup_stm32h7x5xx.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/rsa.c", "output": "/data/openpilot/panda/board/crypto/board/obj/panda_h7rsa.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/sha.c", "output": "/data/openpilot/panda/board/crypto/board/obj/panda_h7sha.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", + "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/bootstub.c", "output": "/data/openpilot/panda/board/board/obj/panda_h7bootstub.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/main.c", + "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/main.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/main.c", "output": "/data/openpilot/panda/board/board/obj/panda_h7main.o" }, { - "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_jungle_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", + "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/panda_jungle_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s", "output": "/data/openpilot/panda/board/stm32h7/board/obj/panda_jungle_h7startup_stm32h7x5xx.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/rsa.c", "output": "/data/openpilot/panda/board/crypto/board/obj/panda_jungle_h7rsa.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/panda_jungle_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/sha.c", "output": "/data/openpilot/panda/board/crypto/board/obj/panda_jungle_h7sha.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_jungle_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", + "command": "arm-none-eabi-gcc -o panda/board/board/obj/panda_jungle_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/bootstub.c", "output": "/data/openpilot/panda/board/board/obj/panda_jungle_h7bootstub.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/jungle/board/obj/panda_jungle_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/jungle/main.c", + "command": "arm-none-eabi-gcc -o panda/board/jungle/board/obj/panda_jungle_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_JUNGLE -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/jungle/main.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/jungle/main.c", "output": "/data/openpilot/panda/board/jungle/board/obj/panda_jungle_h7main.o" }, { - "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/body_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", + "command": "arm-none-eabi-gcc -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -o panda/board/stm32h7/board/obj/body_h7startup_stm32h7x5xx.o -c panda/board/stm32h7/startup_stm32h7x5xx.s", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/stm32h7/startup_stm32h7x5xx.s", "output": "/data/openpilot/panda/board/stm32h7/board/obj/body_h7startup_stm32h7x5xx.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7rsa.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/rsa.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/rsa.c", "output": "/data/openpilot/panda/board/crypto/board/obj/body_h7rsa.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", + "command": "arm-none-eabi-gcc -o panda/board/crypto/board/obj/body_h7sha.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/crypto/sha.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/crypto/sha.c", "output": "/data/openpilot/panda/board/crypto/board/obj/body_h7sha.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/board/obj/body_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", + "command": "arm-none-eabi-gcc -o panda/board/board/obj/body_h7bootstub.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -DBOOTSTUB -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/bootstub.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/bootstub.c", "output": "/data/openpilot/panda/board/board/obj/body_h7bootstub.o" }, { - "command": "arm-none-eabi-gcc -o panda/board/body/board/obj/body_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0x8BD89F90U -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/body/main.c", + "command": "arm-none-eabi-gcc -o panda/board/body/board/obj/body_h7main.o -c -mcpu=cortex-m7 -mhard-float -DSTM32H7 -DSTM32H725xx -Iboard/stm32h7/inc -mfpu=fpv5-d16 -DPANDA_BODY -DALLOW_DEBUG -DHEALTH_PACKET_VERSION=0xCC90A31EU -DCAN_PACKET_VERSION_HASH=0x75ABF276U -DJUNGLE_HEALTH_PACKET_VERSION=0xA39967B7U -Wall -Wextra -Wstrict-prototypes -Werror -mlittle-endian -mthumb -nostdlib -fno-builtin -std=gnu11 -fmax-errors=1 -Tpanda/board/stm32h7/stm32h7x5_flash.ld -fsingle-precision-constant -Os -g -Ipanda -Ipanda/board/stm32h7/inc -Iopendbc_repo panda/board/body/main.c", "directory": "/data/openpilot", "file": "/data/openpilot/panda/board/body/main.c", "output": "/data/openpilot/panda/board/body/board/obj/body_h7main.o" diff --git a/launch_env.sh b/launch_env.sh index 094622005..4fcb243f1 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -16,7 +16,7 @@ export VECLIB_MAXIMUM_THREADS=1 export QCOM_PRIORITY=12 if [ -z "$AGNOS_VERSION" ]; then - export AGNOS_VERSION="19.6" + export AGNOS_VERSION="19.7" fi export STAGING_ROOT="/data/safe_staging" diff --git a/msgq_repo/msgq/visionipc/visionipc_pyx.so b/msgq_repo/msgq/visionipc/visionipc_pyx.so index 542d48995..1d5e7a8e5 100755 Binary files a/msgq_repo/msgq/visionipc/visionipc_pyx.so and b/msgq_repo/msgq/visionipc/visionipc_pyx.so differ diff --git a/opendbc_repo/opendbc/safety/sunnypilot/mads.h b/opendbc_repo/opendbc/safety/sunnypilot/mads.h index 45ce8d233..a87ecf68f 100644 --- a/opendbc_repo/opendbc/safety/sunnypilot/mads.h +++ b/opendbc_repo/opendbc/safety/sunnypilot/mads.h @@ -148,6 +148,7 @@ inline void mads_heartbeat_engaged_check(void) { // Function Implementations // =============================== +// cppcheck-suppress misra-c2012-8.7; called from libsafety test harness inline void mads_set_alternative_experience(const int *mode) { const bool mads_enabled = (*mode & ALT_EXP_ENABLE_MADS) != 0; const bool disengage_lateral_on_brake = (*mode & ALT_EXP_MADS_DISENGAGE_LATERAL_ON_BRAKE) != 0; diff --git a/openpilot/cereal/gen/cpp/car.capnp.c++ b/openpilot/cereal/gen/cpp/car.capnp.c++ index 02ad63862..855c08f89 100644 --- a/openpilot/cereal/gen/cpp/car.capnp.c++ +++ b/openpilot/cereal/gen/cpp/car.capnp.c++ @@ -6315,7 +6315,7 @@ const ::capnp::_::RawSchema s_a1adf400915718e5 = { 0, 8, i_a1adf400915718e5, nullptr, nullptr, { &s_a1adf400915718e5, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE -static const ::capnp::_::AlignedData<181> b_95551e5b1edaf451 = { +static const ::capnp::_::AlignedData<189> b_95551e5b1edaf451 = { { 0, 0, 0, 0, 5, 0, 6, 0, 81, 244, 218, 30, 91, 30, 85, 149, 20, 0, 0, 0, 2, 0, 0, 0, @@ -6325,7 +6325,7 @@ static const ::capnp::_::AlignedData<181> b_95551e5b1edaf451 = { 21, 0, 0, 0, 2, 1, 0, 0, 33, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 29, 0, 0, 0, 79, 3, 0, 0, + 29, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 97, 114, 46, 99, 97, 112, 110, @@ -6333,111 +6333,117 @@ static const ::capnp::_::AlignedData<181> b_95551e5b1edaf451 = { 97, 109, 115, 46, 83, 97, 102, 101, 116, 121, 77, 111, 100, 101, 108, 0, 0, 0, 0, 0, 1, 0, 1, 0, - 140, 0, 0, 0, 1, 0, 2, 0, + 148, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 58, 0, 0, 0, + 181, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 149, 1, 0, 0, 90, 0, 0, 0, + 173, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 145, 1, 0, 0, 58, 0, 0, 0, + 169, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 137, 1, 0, 0, 58, 0, 0, 0, + 161, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 129, 1, 0, 0, 26, 0, 0, 0, + 153, 1, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, - 121, 1, 0, 0, 146, 0, 0, 0, + 145, 1, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, - 121, 1, 0, 0, 42, 0, 0, 0, + 145, 1, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, - 113, 1, 0, 0, 74, 0, 0, 0, + 137, 1, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, - 109, 1, 0, 0, 66, 0, 0, 0, + 133, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, - 101, 1, 0, 0, 74, 0, 0, 0, + 125, 1, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, - 97, 1, 0, 0, 50, 0, 0, 0, + 121, 1, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, - 89, 1, 0, 0, 58, 0, 0, 0, + 113, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, - 81, 1, 0, 0, 82, 0, 0, 0, + 105, 1, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, - 77, 1, 0, 0, 50, 0, 0, 0, + 101, 1, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 69, 1, 0, 0, 58, 0, 0, 0, + 93, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, - 61, 1, 0, 0, 90, 0, 0, 0, + 85, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 57, 1, 0, 0, 90, 0, 0, 0, + 81, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, - 53, 1, 0, 0, 82, 0, 0, 0, + 77, 1, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, - 49, 1, 0, 0, 58, 0, 0, 0, + 73, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, - 41, 1, 0, 0, 74, 0, 0, 0, + 65, 1, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, - 37, 1, 0, 0, 90, 0, 0, 0, + 61, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, - 33, 1, 0, 0, 106, 0, 0, 0, + 57, 1, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, - 29, 1, 0, 0, 130, 0, 0, 0, + 53, 1, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, - 25, 1, 0, 0, 114, 0, 0, 0, + 49, 1, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, - 21, 1, 0, 0, 138, 0, 0, 0, + 45, 1, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, - 21, 1, 0, 0, 114, 0, 0, 0, + 45, 1, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, - 17, 1, 0, 0, 58, 0, 0, 0, + 41, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, - 9, 1, 0, 0, 42, 0, 0, 0, + 33, 1, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 0, 0, 106, 0, 0, 0, + 25, 1, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, - 253, 0, 0, 0, 138, 0, 0, 0, + 21, 1, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, - 253, 0, 0, 0, 106, 0, 0, 0, + 21, 1, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, - 249, 0, 0, 0, 34, 0, 0, 0, + 17, 1, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, - 241, 0, 0, 0, 90, 0, 0, 0, + 9, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, - 237, 0, 0, 0, 58, 0, 0, 0, + 5, 1, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, - 229, 0, 0, 0, 114, 0, 0, 0, + 253, 0, 0, 0, 114, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 35, 0, 0, 0, 0, 0, 0, 0, + 249, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 36, 0, 0, 0, 0, 0, 0, 0, + 241, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 105, 108, 101, 110, 116, 0, 0, 104, 111, 110, 100, 97, 78, 105, 100, @@ -6496,14 +6502,16 @@ static const ::capnp::_::AlignedData<181> b_95551e5b1edaf451 = { 105, 111, 0, 0, 0, 0, 0, 0, 114, 105, 118, 105, 97, 110, 0, 0, 118, 111, 108, 107, 115, 119, 97, 103, - 101, 110, 77, 101, 98, 0, 0, 0, } + 101, 110, 77, 101, 98, 0, 0, 0, + 109, 103, 0, 0, 0, 0, 0, 0, + 103, 119, 109, 0, 0, 0, 0, 0, } }; ::capnp::word const* const bp_95551e5b1edaf451 = b_95551e5b1edaf451.words; #if !CAPNP_LITE -static const uint16_t m_95551e5b1edaf451[] = {17, 27, 7, 9, 30, 3, 32, 6, 4, 18, 12, 20, 5, 1, 26, 8, 28, 24, 23, 13, 14, 19, 31, 33, 0, 11, 22, 10, 2, 16, 15, 34, 25, 29, 21}; +static const uint16_t m_95551e5b1edaf451[] = {17, 27, 7, 9, 30, 3, 32, 6, 4, 18, 12, 36, 20, 5, 1, 26, 8, 28, 24, 23, 13, 35, 14, 19, 31, 33, 0, 11, 22, 10, 2, 16, 15, 34, 25, 29, 21}; const ::capnp::_::RawSchema s_95551e5b1edaf451 = { - 0x95551e5b1edaf451, b_95551e5b1edaf451.words, 181, nullptr, m_95551e5b1edaf451, - 0, 35, nullptr, nullptr, nullptr, { &s_95551e5b1edaf451, nullptr, nullptr, 0, 0, nullptr }, false + 0x95551e5b1edaf451, b_95551e5b1edaf451.words, 189, nullptr, m_95551e5b1edaf451, + 0, 37, nullptr, nullptr, nullptr, { &s_95551e5b1edaf451, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE CAPNP_DEFINE_ENUM(SafetyModel_95551e5b1edaf451, 95551e5b1edaf451); diff --git a/openpilot/cereal/gen/cpp/car.capnp.h b/openpilot/cereal/gen/cpp/car.capnp.h index 499e37a94..1f98ded10 100644 --- a/openpilot/cereal/gen/cpp/car.capnp.h +++ b/openpilot/cereal/gen/cpp/car.capnp.h @@ -286,6 +286,8 @@ enum class SafetyModel_95551e5b1edaf451: uint16_t { FCA_GIORGIO, RIVIAN, VOLKSWAGEN_MEB, + MG, + GWM, }; CAPNP_DECLARE_ENUM(SafetyModel, 95551e5b1edaf451); CAPNP_DECLARE_SCHEMA(d661512be2def77f); diff --git a/openpilot/cereal/gen/cpp/log.capnp.c++ b/openpilot/cereal/gen/cpp/log.capnp.c++ index 1c621c64c..3e5a0eff0 100644 --- a/openpilot/cereal/gen/cpp/log.capnp.c++ +++ b/openpilot/cereal/gen/cpp/log.capnp.c++ @@ -7192,7 +7192,7 @@ const ::capnp::_::RawSchema s_a7053446d13dbfe4 = { }; #endif // !CAPNP_LITE CAPNP_DEFINE_ENUM(Usb3Lane_a7053446d13dbfe4, a7053446d13dbfe4); -static const ::capnp::_::AlignedData<176> b_8fd70f1cb19dc3aa = { +static const ::capnp::_::AlignedData<192> b_8fd70f1cb19dc3aa = { { 0, 0, 0, 0, 5, 0, 6, 0, 170, 195, 157, 177, 28, 15, 215, 143, 10, 0, 0, 0, 1, 0, 4, 0, @@ -7202,84 +7202,91 @@ static const ::capnp::_::AlignedData<176> b_8fd70f1cb19dc3aa = { 21, 0, 0, 0, 194, 0, 0, 0, 29, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 55, 2, 0, 0, + 25, 0, 0, 0, 111, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 111, 103, 46, 99, 97, 112, 110, 112, 58, 67, 104, 101, 115, 116, 110, 117, 116, 83, 116, 97, 116, 101, 0, 0, 0, 0, 0, 1, 0, 1, 0, - 40, 0, 0, 0, 3, 0, 4, 0, + 44, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 9, 1, 0, 0, 50, 0, 0, 0, + 37, 1, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 1, 0, 0, 3, 0, 1, 0, - 16, 1, 0, 0, 2, 0, 1, 0, + 32, 1, 0, 0, 3, 0, 1, 0, + 44, 1, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 1, 0, 0, 98, 0, 0, 0, + 41, 1, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 1, 0, 0, 3, 0, 1, 0, - 24, 1, 0, 0, 2, 0, 1, 0, + 40, 1, 0, 0, 3, 0, 1, 0, + 52, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 21, 1, 0, 0, 90, 0, 0, 0, + 49, 1, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20, 1, 0, 0, 3, 0, 1, 0, - 32, 1, 0, 0, 2, 0, 1, 0, + 48, 1, 0, 0, 3, 0, 1, 0, + 60, 1, 0, 0, 2, 0, 1, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 29, 1, 0, 0, 98, 0, 0, 0, + 57, 1, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 28, 1, 0, 0, 3, 0, 1, 0, - 40, 1, 0, 0, 2, 0, 1, 0, + 56, 1, 0, 0, 3, 0, 1, 0, + 68, 1, 0, 0, 2, 0, 1, 0, 4, 0, 0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 37, 1, 0, 0, 130, 0, 0, 0, + 65, 1, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 36, 1, 0, 0, 3, 0, 1, 0, - 48, 1, 0, 0, 2, 0, 1, 0, + 64, 1, 0, 0, 3, 0, 1, 0, + 76, 1, 0, 0, 2, 0, 1, 0, 5, 0, 0, 0, 9, 0, 0, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 1, 0, 0, 98, 0, 0, 0, + 73, 1, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 44, 1, 0, 0, 3, 0, 1, 0, - 56, 1, 0, 0, 2, 0, 1, 0, + 72, 1, 0, 0, 3, 0, 1, 0, + 84, 1, 0, 0, 2, 0, 1, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 1, 0, 0, 98, 0, 0, 0, + 81, 1, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 52, 1, 0, 0, 3, 0, 1, 0, - 64, 1, 0, 0, 2, 0, 1, 0, + 80, 1, 0, 0, 3, 0, 1, 0, + 92, 1, 0, 0, 2, 0, 1, 0, 7, 0, 0, 0, 17, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 61, 1, 0, 0, 82, 0, 0, 0, + 89, 1, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 60, 1, 0, 0, 3, 0, 1, 0, - 72, 1, 0, 0, 2, 0, 1, 0, + 88, 1, 0, 0, 3, 0, 1, 0, + 100, 1, 0, 0, 2, 0, 1, 0, 8, 0, 0, 0, 11, 0, 0, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 69, 1, 0, 0, 114, 0, 0, 0, + 97, 1, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 3, 0, 1, 0, - 80, 1, 0, 0, 2, 0, 1, 0, + 96, 1, 0, 0, 3, 0, 1, 0, + 108, 1, 0, 0, 2, 0, 1, 0, 9, 0, 0, 0, 12, 0, 0, 0, 0, 0, 1, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 1, 0, 0, 114, 0, 0, 0, + 105, 1, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 76, 1, 0, 0, 3, 0, 1, 0, - 88, 1, 0, 0, 2, 0, 1, 0, + 104, 1, 0, 0, 3, 0, 1, 0, + 116, 1, 0, 0, 2, 0, 1, 0, + 10, 0, 0, 0, 208, 0, 0, 0, + 0, 0, 1, 0, 10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 113, 1, 0, 0, 98, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 112, 1, 0, 0, 3, 0, 1, 0, + 124, 1, 0, 0, 2, 0, 1, 0, 116, 101, 109, 112, 67, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7368,15 +7375,24 @@ static const ::capnp::_::AlignedData<176> b_8fd70f1cb19dc3aa = { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 115, 117, 112, 112, 108, 121, 70, 97, + 117, 108, 116, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } }; ::capnp::word const* const bp_8fd70f1cb19dc3aa = b_8fd70f1cb19dc3aa.words; #if !CAPNP_LITE -static const uint16_t m_8fd70f1cb19dc3aa[] = {6, 5, 4, 1, 7, 2, 3, 9, 8, 0}; -static const uint16_t i_8fd70f1cb19dc3aa[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; +static const uint16_t m_8fd70f1cb19dc3aa[] = {6, 5, 4, 1, 7, 2, 3, 9, 10, 8, 0}; +static const uint16_t i_8fd70f1cb19dc3aa[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; const ::capnp::_::RawSchema s_8fd70f1cb19dc3aa = { - 0x8fd70f1cb19dc3aa, b_8fd70f1cb19dc3aa.words, 176, nullptr, m_8fd70f1cb19dc3aa, - 0, 10, i_8fd70f1cb19dc3aa, nullptr, nullptr, { &s_8fd70f1cb19dc3aa, nullptr, nullptr, 0, 0, nullptr }, false + 0x8fd70f1cb19dc3aa, b_8fd70f1cb19dc3aa.words, 192, nullptr, m_8fd70f1cb19dc3aa, + 0, 11, i_8fd70f1cb19dc3aa, nullptr, nullptr, { &s_8fd70f1cb19dc3aa, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE static const ::capnp::_::AlignedData<92> b_9a185389d6fdd05f = { @@ -10943,17 +10959,17 @@ const ::capnp::_::RawSchema s_9187f23dbdc347c2 = { 8, 7, i_9187f23dbdc347c2, nullptr, nullptr, { &s_9187f23dbdc347c2, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE -static const ::capnp::_::AlignedData<155> b_e8f9ba819993a776 = { +static const ::capnp::_::AlignedData<170> b_e8f9ba819993a776 = { { 0, 0, 0, 0, 5, 0, 6, 0, 118, 167, 147, 153, 129, 186, 249, 232, - 10, 0, 0, 0, 1, 0, 2, 0, + 10, 0, 0, 0, 1, 0, 3, 0, 91, 40, 164, 37, 126, 241, 177, 243, 4, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 218, 0, 0, 0, 33, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 0, 0, 0, 199, 1, 0, 0, + 77, 0, 0, 0, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 111, 103, 46, 99, 97, 112, 110, @@ -10973,63 +10989,70 @@ static const ::capnp::_::AlignedData<155> b_e8f9ba819993a776 = { 77, 101, 116, 97, 0, 0, 0, 0, 77, 101, 116, 97, 68, 97, 116, 97, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 0, 0, 0, 3, 0, 4, 0, + 36, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 209, 0, 0, 0, 66, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 204, 0, 0, 0, 3, 0, 1, 0, - 216, 0, 0, 0, 2, 0, 1, 0, - 1, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 213, 0, 0, 0, 106, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 212, 0, 0, 0, 3, 0, 1, 0, - 224, 0, 0, 0, 2, 0, 1, 0, - 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 221, 0, 0, 0, 58, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 0, 0, 3, 0, 1, 0, - 228, 0, 0, 0, 2, 0, 1, 0, - 5, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 1, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 225, 0, 0, 0, 106, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 224, 0, 0, 0, 3, 0, 1, 0, - 236, 0, 0, 0, 2, 0, 1, 0, - 6, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 233, 0, 0, 0, 42, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 228, 0, 0, 0, 3, 0, 1, 0, - 240, 0, 0, 0, 2, 0, 1, 0, - 7, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 1, 0, 5, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 237, 0, 0, 0, 42, 0, 0, 0, + 237, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, 3, 0, 1, 0, 244, 0, 0, 0, 2, 0, 1, 0, - 2, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 1, 0, 6, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 241, 0, 0, 0, 114, 0, 0, 0, + 241, 0, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 3, 0, 1, 0, 252, 0, 0, 0, 2, 0, 1, 0, - 3, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 1, 0, 7, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 249, 0, 0, 0, 154, 0, 0, 0, + 249, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 244, 0, 0, 0, 3, 0, 1, 0, + 0, 1, 0, 0, 2, 0, 1, 0, + 6, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 1, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 253, 0, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 3, 0, 1, 0, 8, 1, 0, 0, 2, 0, 1, 0, + 7, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 5, 1, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 3, 0, 1, 0, + 12, 1, 0, 0, 2, 0, 1, 0, + 8, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 1, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 1, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 1, 0, 0, 3, 0, 1, 0, + 16, 1, 0, 0, 2, 0, 1, 0, + 2, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 1, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 13, 1, 0, 0, 114, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 12, 1, 0, 0, 3, 0, 1, 0, + 24, 1, 0, 0, 2, 0, 1, 0, + 3, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 1, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 21, 1, 0, 0, 154, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 24, 1, 0, 0, 3, 0, 1, 0, + 36, 1, 0, 0, 2, 0, 1, 0, + 4, 0, 0, 0, 128, 0, 0, 0, + 0, 0, 1, 0, 8, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33, 1, 0, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 28, 1, 0, 0, 3, 0, 1, 0, + 40, 1, 0, 0, 2, 0, 1, 0, 102, 114, 97, 109, 101, 73, 100, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -11097,6 +11120,14 @@ static const ::capnp::_::AlignedData<155> b_e8f9ba819993a776 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 98, 105, 103, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } }; @@ -11108,11 +11139,11 @@ static const ::capnp::_::RawSchema* const d_e8f9ba819993a776[] = { &s_a0cfcfa4ed19ac5d, &s_ca1e4710874d12b5, }; -static const uint16_t m_e8f9ba819993a776[] = {2, 6, 0, 1, 3, 4, 7, 5}; -static const uint16_t i_e8f9ba819993a776[] = {0, 1, 2, 3, 4, 5, 6, 7}; +static const uint16_t m_e8f9ba819993a776[] = {2, 8, 6, 0, 1, 3, 4, 7, 5}; +static const uint16_t i_e8f9ba819993a776[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const ::capnp::_::RawSchema s_e8f9ba819993a776 = { - 0xe8f9ba819993a776, b_e8f9ba819993a776.words, 155, d_e8f9ba819993a776, m_e8f9ba819993a776, - 4, 8, i_e8f9ba819993a776, nullptr, nullptr, { &s_e8f9ba819993a776, nullptr, nullptr, 0, 0, nullptr }, false + 0xe8f9ba819993a776, b_e8f9ba819993a776.words, 170, d_e8f9ba819993a776, m_e8f9ba819993a776, + 4, 9, i_e8f9ba819993a776, nullptr, nullptr, { &s_e8f9ba819993a776, nullptr, nullptr, 0, 0, nullptr }, false }; #endif // !CAPNP_LITE static const ::capnp::_::AlignedData<79> b_ca1e4710874d12b5 = { diff --git a/openpilot/cereal/gen/cpp/log.capnp.h b/openpilot/cereal/gen/cpp/log.capnp.h index f0e9e8651..0b729ae54 100644 --- a/openpilot/cereal/gen/cpp/log.capnp.h +++ b/openpilot/cereal/gen/cpp/log.capnp.h @@ -1513,7 +1513,7 @@ struct DrivingModelData { struct MetaData; struct _capnpPrivate { - CAPNP_DECLARE_STRUCT_HEADER(e8f9ba819993a776, 2, 4) + CAPNP_DECLARE_STRUCT_HEADER(e8f9ba819993a776, 3, 4) #if !CAPNP_LITE static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } #endif // !CAPNP_LITE @@ -7300,6 +7300,8 @@ public: inline ::int16_t getSupplyCurrent() const; + inline bool getSupplyFault() const; + private: ::capnp::_::StructReader _reader; template @@ -7358,6 +7360,9 @@ public: inline ::int16_t getSupplyCurrent(); inline void setSupplyCurrent( ::int16_t value); + inline bool getSupplyFault(); + inline void setSupplyFault(bool value); + private: ::capnp::_::StructBuilder _builder; template @@ -9594,6 +9599,8 @@ public: inline float getModelExecutionTime() const; + inline bool getBig() const; + private: ::capnp::_::StructReader _reader; template @@ -9662,6 +9669,9 @@ public: inline float getModelExecutionTime(); inline void setModelExecutionTime(float value); + inline bool getBig(); + inline void setBig(bool value); + private: ::capnp::_::StructBuilder _builder; template @@ -30413,6 +30423,20 @@ inline void ChestnutState::Builder::setSupplyCurrent( ::int16_t value) { ::capnp::bounded<12>() * ::capnp::ELEMENTS, value); } +inline bool ChestnutState::Reader::getSupplyFault() const { + return _reader.getDataField( + ::capnp::bounded<208>() * ::capnp::ELEMENTS); +} + +inline bool ChestnutState::Builder::getSupplyFault() { + return _builder.getDataField( + ::capnp::bounded<208>() * ::capnp::ELEMENTS); +} +inline void ChestnutState::Builder::setSupplyFault(bool value) { + _builder.setDataField( + ::capnp::bounded<208>() * ::capnp::ELEMENTS, value); +} + inline typename RadarState::Deprecated::Reader RadarState::Reader::getDeprecated() const { return typename RadarState::Deprecated::Reader(_reader); } @@ -33884,6 +33908,20 @@ inline void DrivingModelData::Builder::setModelExecutionTime(float value) { ::capnp::bounded<3>() * ::capnp::ELEMENTS, value); } +inline bool DrivingModelData::Reader::getBig() const { + return _reader.getDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS); +} + +inline bool DrivingModelData::Builder::getBig() { + return _builder.getDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS); +} +inline void DrivingModelData::Builder::setBig(bool value) { + _builder.setDataField( + ::capnp::bounded<128>() * ::capnp::ELEMENTS, value); +} + inline bool DrivingModelData::PolyPath::Reader::hasXCoefficients() const { return !_reader.getPointerField( ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); diff --git a/openpilot/cereal/log.capnp b/openpilot/cereal/log.capnp index b87499806..5cee3266e 100644 --- a/openpilot/cereal/log.capnp +++ b/openpilot/cereal/log.capnp @@ -725,6 +725,7 @@ struct ChestnutState { pcieLtssm @7 :UInt8; supplyVoltage @8 :UInt16; # mV supplyCurrent @9 :Int16; # mA + supplyFault @10 :Bool; } struct RadarState @0x9a185389d6fdd05f { @@ -1004,6 +1005,7 @@ struct DrivingModelData { frameIdExtra @1 :UInt32; frameDropPerc @6 :Float32; modelExecutionTime @7 :Float32; + big @8 :Bool; action @2 :ModelDataV2.Action; diff --git a/openpilot/common/hardware/comma/agnos.json b/openpilot/common/hardware/comma/agnos.json index 20955a767..ffe646fdc 100644 --- a/openpilot/common/hardware/comma/agnos.json +++ b/openpilot/common/hardware/comma/agnos.json @@ -67,18 +67,18 @@ }, { "alt": { - "hash": "5b6ce7965904a157fd3a134ccfcb854f9ca5c1cc2a26b7cb80a4fa4e1cc4aaa3", + "hash": "3c271e2b3d20d2f0a8bf6555a1319f3efb12845490967d6151195174a01e912f", "size": 4718592000, - "url": "https://commadist.azureedge.net/agnosupdate/system-5b6ce7965904a157fd3a134ccfcb854f9ca5c1cc2a26b7cb80a4fa4e1cc4aaa3.img" + "url": "https://commadist.azureedge.net/agnosupdate/system-3c271e2b3d20d2f0a8bf6555a1319f3efb12845490967d6151195174a01e912f.img" }, "full_check": false, "has_ab": true, - "hash": "b134fd04e9da27fa1d359ea0f2742c216fa21a08b5c47e9be22ab3b0563d9b9b", - "hash_raw": "5b6ce7965904a157fd3a134ccfcb854f9ca5c1cc2a26b7cb80a4fa4e1cc4aaa3", + "hash": "74ffc9c551e1f29cda897ace8a69080fe644f8039977c6885f2b48362e39b744", + "hash_raw": "3c271e2b3d20d2f0a8bf6555a1319f3efb12845490967d6151195174a01e912f", "name": "system", - "ondevice_hash": "91242772af771ae96fe2eebc105f2b80a7e1dbaaf6003c2574b62d51b806f468", + "ondevice_hash": "6a992680183685eea9db99d915219a37935f45989330d9b619e880450257f448", "size": 4718592000, "sparse": true, - "url": "https://commadist.azureedge.net/agnosupdate/system-5b6ce7965904a157fd3a134ccfcb854f9ca5c1cc2a26b7cb80a4fa4e1cc4aaa3.img.xz" + "url": "https://commadist.azureedge.net/agnosupdate/system-3c271e2b3d20d2f0a8bf6555a1319f3efb12845490967d6151195174a01e912f.img.xz" } -] \ No newline at end of file +] diff --git a/openpilot/common/hardware/comma/modem.py b/openpilot/common/hardware/comma/modem.py index 171ed8c0e..901efae2b 100755 --- a/openpilot/common/hardware/comma/modem.py +++ b/openpilot/common/hardware/comma/modem.py @@ -5,6 +5,7 @@ import logging import os import select import signal +import string import struct import subprocess import tempfile @@ -354,7 +355,7 @@ class Modem: imei = "" iccid = (self._atv("AT+QCCID", "+QCCID:") or "").rstrip("F") - if not iccid.isdigit(): + if not all(c in string.hexdigits for c in iccid): iccid = "" imsi = first_line("AT+CIMI") diff --git a/openpilot/common/hardware/usb.py b/openpilot/common/hardware/usb.py index b9f6db275..c3c2050b6 100644 --- a/openpilot/common/hardware/usb.py +++ b/openpilot/common/hardware/usb.py @@ -4,11 +4,17 @@ from pathlib import Path CHESTNUT_FW_VERSION = "ed4e39b7" CHESTNUT_USB_IDS = ((0xADD1, 0x0001), (0x3801, 0x0001)) CHESTNUT_ROM_USB_IDS = ((0x174C, 0x2464), (0x174C, 0x2463)) +CHESTNUT_USB_PRODUCT = f"custom {CHESTNUT_FW_VERSION}-CLEAN" USB_DEVICES_PATH = Path("/sys/bus/usb/devices") TYPEC_CC_ORIENTATION_PATH = Path("/sys/class/power_supply/usb/typec_cc_orientation") PRIMARY_USB_CONTROLLER = "a600000.ssusb" +def is_chestnut_usb_id(vendor_id: int, product_id: int, include_bootloader: bool = False) -> bool: + ids = CHESTNUT_USB_IDS + CHESTNUT_ROM_USB_IDS if include_bootloader else CHESTNUT_USB_IDS + return (vendor_id, product_id) in ids + + def get_usb_topology() -> set[str]: try: return set(os.listdir(USB_DEVICES_PATH)) @@ -81,7 +87,7 @@ def set_usb_state(device_state, devices: list[dict]) -> None: entry.linkErrorCount = device["linkErrorCount"] entry.usb3Lane = device.get("usb3Lane", "unknown") - if (entry.vendorId, entry.productId) in CHESTNUT_USB_IDS: + if is_chestnut_usb_id(entry.vendorId, entry.productId): chestnut_present = True device_state.chestnutPresent = chestnut_present diff --git a/openpilot/common/libparams_c.so b/openpilot/common/libparams_c.so index 868b3630b..10f623fae 100755 Binary files a/openpilot/common/libparams_c.so and b/openpilot/common/libparams_c.so differ diff --git a/openpilot/common/params_keys.h b/openpilot/common/params_keys.h index 33ea83cab..6e4ada136 100644 --- a/openpilot/common/params_keys.h +++ b/openpilot/common/params_keys.h @@ -92,6 +92,12 @@ inline static std::unordered_map keys = { {"ObdMultiplexingEnabled", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}}, {"Offroad_CarUnrecognized", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}}, {"Offroad_ChestnutBranch", {CLEAR_ON_MANAGER_START, JSON}}, + {"Offroad_ChestnutNotDetected", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}}, + {"Offroad_ChestnutOverheated", {CLEAR_ON_MANAGER_START, JSON}}, + {"Offroad_ChestnutPcieUnavailable", {CLEAR_ON_MANAGER_START, JSON}}, + {"Offroad_ChestnutUncompiled", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}}, + {"Offroad_ChestnutUpdateFailed", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}}, + {"Offroad_ChestnutUsbSlow", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}}, {"Offroad_ConnectivityNeeded", {CLEAR_ON_MANAGER_START, JSON}}, {"Offroad_ConnectivityNeededPrompt", {CLEAR_ON_MANAGER_START, JSON}}, {"Offroad_ExcessiveActuation", {PERSISTENT, JSON}}, @@ -132,6 +138,7 @@ inline static std::unordered_map keys = { {"UptimeOnroad", {PERSISTENT, FLOAT, "0.0"}}, {"ChestnutActive", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION | CLEAR_ON_IGNITION_ON, BOOL}}, {"ChestnutLoading", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION | CLEAR_ON_IGNITION_ON, BOOL}}, + {"ChestnutModelError", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION | CLEAR_ON_IGNITION_ON, BOOL}}, {"Version", {PERSISTENT, STRING}}, // --- sunnypilot params --- // diff --git a/openpilot/common/prefix.h b/openpilot/common/prefix.h index 89f346b9e..0f2c59252 100644 --- a/openpilot/common/prefix.h +++ b/openpilot/common/prefix.h @@ -27,14 +27,14 @@ public: auto param_path = Params().getParamPath(); if (util::file_exists(param_path)) { std::string real_path = util::readlink(param_path); - util::check_system(util::string_format("rm %s -rf", real_path.c_str())); + util::check_system(util::string_format("rm -rf %s", real_path.c_str())); unlink(param_path.c_str()); } if (getenv("COMMA_CACHE") == nullptr) { - util::check_system(util::string_format("rm %s -rf", Path::download_cache_root().c_str())); + util::check_system(util::string_format("rm -rf %s", Path::download_cache_root().c_str())); } - util::check_system(util::string_format("rm %s -rf", Path::comma_home().c_str())); - util::check_system(util::string_format("rm %s -rf", msgq_path.c_str())); + util::check_system(util::string_format("rm -rf %s", Path::comma_home().c_str())); + util::check_system(util::string_format("rm -rf %s", msgq_path.c_str())); unsetenv("OPENPILOT_PREFIX"); } diff --git a/openpilot/selfdrive/assets/icons_mici/usb.png b/openpilot/selfdrive/assets/icons_mici/usb.png new file mode 100644 index 000000000..a18257be3 Binary files /dev/null and b/openpilot/selfdrive/assets/icons_mici/usb.png differ diff --git a/openpilot/selfdrive/locationd/models/generated/car.cpp b/openpilot/selfdrive/locationd/models/generated/car.cpp index 5fc7cd25f..0344efa1c 100644 --- a/openpilot/selfdrive/locationd/models/generated/car.cpp +++ b/openpilot/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_6607755363165806471) { - out_6607755363165806471[0] = delta_x[0] + nom_x[0]; - out_6607755363165806471[1] = delta_x[1] + nom_x[1]; - out_6607755363165806471[2] = delta_x[2] + nom_x[2]; - out_6607755363165806471[3] = delta_x[3] + nom_x[3]; - out_6607755363165806471[4] = delta_x[4] + nom_x[4]; - out_6607755363165806471[5] = delta_x[5] + nom_x[5]; - out_6607755363165806471[6] = delta_x[6] + nom_x[6]; - out_6607755363165806471[7] = delta_x[7] + nom_x[7]; - out_6607755363165806471[8] = delta_x[8] + nom_x[8]; +void err_fun(double *nom_x, double *delta_x, double *out_4680453271178883722) { + out_4680453271178883722[0] = delta_x[0] + nom_x[0]; + out_4680453271178883722[1] = delta_x[1] + nom_x[1]; + out_4680453271178883722[2] = delta_x[2] + nom_x[2]; + out_4680453271178883722[3] = delta_x[3] + nom_x[3]; + out_4680453271178883722[4] = delta_x[4] + nom_x[4]; + out_4680453271178883722[5] = delta_x[5] + nom_x[5]; + out_4680453271178883722[6] = delta_x[6] + nom_x[6]; + out_4680453271178883722[7] = delta_x[7] + nom_x[7]; + out_4680453271178883722[8] = delta_x[8] + nom_x[8]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_8930007875694985889) { - out_8930007875694985889[0] = -nom_x[0] + true_x[0]; - out_8930007875694985889[1] = -nom_x[1] + true_x[1]; - out_8930007875694985889[2] = -nom_x[2] + true_x[2]; - out_8930007875694985889[3] = -nom_x[3] + true_x[3]; - out_8930007875694985889[4] = -nom_x[4] + true_x[4]; - out_8930007875694985889[5] = -nom_x[5] + true_x[5]; - out_8930007875694985889[6] = -nom_x[6] + true_x[6]; - out_8930007875694985889[7] = -nom_x[7] + true_x[7]; - out_8930007875694985889[8] = -nom_x[8] + true_x[8]; +void inv_err_fun(double *nom_x, double *true_x, double *out_2158585798385581189) { + out_2158585798385581189[0] = -nom_x[0] + true_x[0]; + out_2158585798385581189[1] = -nom_x[1] + true_x[1]; + out_2158585798385581189[2] = -nom_x[2] + true_x[2]; + out_2158585798385581189[3] = -nom_x[3] + true_x[3]; + out_2158585798385581189[4] = -nom_x[4] + true_x[4]; + out_2158585798385581189[5] = -nom_x[5] + true_x[5]; + out_2158585798385581189[6] = -nom_x[6] + true_x[6]; + out_2158585798385581189[7] = -nom_x[7] + true_x[7]; + out_2158585798385581189[8] = -nom_x[8] + true_x[8]; } -void H_mod_fun(double *state, double *out_8503116716236050026) { - out_8503116716236050026[0] = 1.0; - out_8503116716236050026[1] = 0.0; - out_8503116716236050026[2] = 0.0; - out_8503116716236050026[3] = 0.0; - out_8503116716236050026[4] = 0.0; - out_8503116716236050026[5] = 0.0; - out_8503116716236050026[6] = 0.0; - out_8503116716236050026[7] = 0.0; - out_8503116716236050026[8] = 0.0; - out_8503116716236050026[9] = 0.0; - out_8503116716236050026[10] = 1.0; - out_8503116716236050026[11] = 0.0; - out_8503116716236050026[12] = 0.0; - out_8503116716236050026[13] = 0.0; - out_8503116716236050026[14] = 0.0; - out_8503116716236050026[15] = 0.0; - out_8503116716236050026[16] = 0.0; - out_8503116716236050026[17] = 0.0; - out_8503116716236050026[18] = 0.0; - out_8503116716236050026[19] = 0.0; - out_8503116716236050026[20] = 1.0; - out_8503116716236050026[21] = 0.0; - out_8503116716236050026[22] = 0.0; - out_8503116716236050026[23] = 0.0; - out_8503116716236050026[24] = 0.0; - out_8503116716236050026[25] = 0.0; - out_8503116716236050026[26] = 0.0; - out_8503116716236050026[27] = 0.0; - out_8503116716236050026[28] = 0.0; - out_8503116716236050026[29] = 0.0; - out_8503116716236050026[30] = 1.0; - out_8503116716236050026[31] = 0.0; - out_8503116716236050026[32] = 0.0; - out_8503116716236050026[33] = 0.0; - out_8503116716236050026[34] = 0.0; - out_8503116716236050026[35] = 0.0; - out_8503116716236050026[36] = 0.0; - out_8503116716236050026[37] = 0.0; - out_8503116716236050026[38] = 0.0; - out_8503116716236050026[39] = 0.0; - out_8503116716236050026[40] = 1.0; - out_8503116716236050026[41] = 0.0; - out_8503116716236050026[42] = 0.0; - out_8503116716236050026[43] = 0.0; - out_8503116716236050026[44] = 0.0; - out_8503116716236050026[45] = 0.0; - out_8503116716236050026[46] = 0.0; - out_8503116716236050026[47] = 0.0; - out_8503116716236050026[48] = 0.0; - out_8503116716236050026[49] = 0.0; - out_8503116716236050026[50] = 1.0; - out_8503116716236050026[51] = 0.0; - out_8503116716236050026[52] = 0.0; - out_8503116716236050026[53] = 0.0; - out_8503116716236050026[54] = 0.0; - out_8503116716236050026[55] = 0.0; - out_8503116716236050026[56] = 0.0; - out_8503116716236050026[57] = 0.0; - out_8503116716236050026[58] = 0.0; - out_8503116716236050026[59] = 0.0; - out_8503116716236050026[60] = 1.0; - out_8503116716236050026[61] = 0.0; - out_8503116716236050026[62] = 0.0; - out_8503116716236050026[63] = 0.0; - out_8503116716236050026[64] = 0.0; - out_8503116716236050026[65] = 0.0; - out_8503116716236050026[66] = 0.0; - out_8503116716236050026[67] = 0.0; - out_8503116716236050026[68] = 0.0; - out_8503116716236050026[69] = 0.0; - out_8503116716236050026[70] = 1.0; - out_8503116716236050026[71] = 0.0; - out_8503116716236050026[72] = 0.0; - out_8503116716236050026[73] = 0.0; - out_8503116716236050026[74] = 0.0; - out_8503116716236050026[75] = 0.0; - out_8503116716236050026[76] = 0.0; - out_8503116716236050026[77] = 0.0; - out_8503116716236050026[78] = 0.0; - out_8503116716236050026[79] = 0.0; - out_8503116716236050026[80] = 1.0; +void H_mod_fun(double *state, double *out_5438563696312539105) { + out_5438563696312539105[0] = 1.0; + out_5438563696312539105[1] = 0.0; + out_5438563696312539105[2] = 0.0; + out_5438563696312539105[3] = 0.0; + out_5438563696312539105[4] = 0.0; + out_5438563696312539105[5] = 0.0; + out_5438563696312539105[6] = 0.0; + out_5438563696312539105[7] = 0.0; + out_5438563696312539105[8] = 0.0; + out_5438563696312539105[9] = 0.0; + out_5438563696312539105[10] = 1.0; + out_5438563696312539105[11] = 0.0; + out_5438563696312539105[12] = 0.0; + out_5438563696312539105[13] = 0.0; + out_5438563696312539105[14] = 0.0; + out_5438563696312539105[15] = 0.0; + out_5438563696312539105[16] = 0.0; + out_5438563696312539105[17] = 0.0; + out_5438563696312539105[18] = 0.0; + out_5438563696312539105[19] = 0.0; + out_5438563696312539105[20] = 1.0; + out_5438563696312539105[21] = 0.0; + out_5438563696312539105[22] = 0.0; + out_5438563696312539105[23] = 0.0; + out_5438563696312539105[24] = 0.0; + out_5438563696312539105[25] = 0.0; + out_5438563696312539105[26] = 0.0; + out_5438563696312539105[27] = 0.0; + out_5438563696312539105[28] = 0.0; + out_5438563696312539105[29] = 0.0; + out_5438563696312539105[30] = 1.0; + out_5438563696312539105[31] = 0.0; + out_5438563696312539105[32] = 0.0; + out_5438563696312539105[33] = 0.0; + out_5438563696312539105[34] = 0.0; + out_5438563696312539105[35] = 0.0; + out_5438563696312539105[36] = 0.0; + out_5438563696312539105[37] = 0.0; + out_5438563696312539105[38] = 0.0; + out_5438563696312539105[39] = 0.0; + out_5438563696312539105[40] = 1.0; + out_5438563696312539105[41] = 0.0; + out_5438563696312539105[42] = 0.0; + out_5438563696312539105[43] = 0.0; + out_5438563696312539105[44] = 0.0; + out_5438563696312539105[45] = 0.0; + out_5438563696312539105[46] = 0.0; + out_5438563696312539105[47] = 0.0; + out_5438563696312539105[48] = 0.0; + out_5438563696312539105[49] = 0.0; + out_5438563696312539105[50] = 1.0; + out_5438563696312539105[51] = 0.0; + out_5438563696312539105[52] = 0.0; + out_5438563696312539105[53] = 0.0; + out_5438563696312539105[54] = 0.0; + out_5438563696312539105[55] = 0.0; + out_5438563696312539105[56] = 0.0; + out_5438563696312539105[57] = 0.0; + out_5438563696312539105[58] = 0.0; + out_5438563696312539105[59] = 0.0; + out_5438563696312539105[60] = 1.0; + out_5438563696312539105[61] = 0.0; + out_5438563696312539105[62] = 0.0; + out_5438563696312539105[63] = 0.0; + out_5438563696312539105[64] = 0.0; + out_5438563696312539105[65] = 0.0; + out_5438563696312539105[66] = 0.0; + out_5438563696312539105[67] = 0.0; + out_5438563696312539105[68] = 0.0; + out_5438563696312539105[69] = 0.0; + out_5438563696312539105[70] = 1.0; + out_5438563696312539105[71] = 0.0; + out_5438563696312539105[72] = 0.0; + out_5438563696312539105[73] = 0.0; + out_5438563696312539105[74] = 0.0; + out_5438563696312539105[75] = 0.0; + out_5438563696312539105[76] = 0.0; + out_5438563696312539105[77] = 0.0; + out_5438563696312539105[78] = 0.0; + out_5438563696312539105[79] = 0.0; + out_5438563696312539105[80] = 1.0; } -void f_fun(double *state, double dt, double *out_1379221821852906246) { - out_1379221821852906246[0] = state[0]; - out_1379221821852906246[1] = state[1]; - out_1379221821852906246[2] = state[2]; - out_1379221821852906246[3] = state[3]; - out_1379221821852906246[4] = state[4]; - out_1379221821852906246[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_1379221821852906246[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_1379221821852906246[7] = state[7]; - out_1379221821852906246[8] = state[8]; +void f_fun(double *state, double dt, double *out_5226637712802323280) { + out_5226637712802323280[0] = state[0]; + out_5226637712802323280[1] = state[1]; + out_5226637712802323280[2] = state[2]; + out_5226637712802323280[3] = state[3]; + out_5226637712802323280[4] = state[4]; + out_5226637712802323280[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_5226637712802323280[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_5226637712802323280[7] = state[7]; + out_5226637712802323280[8] = state[8]; } -void F_fun(double *state, double dt, double *out_4439064891851207524) { - out_4439064891851207524[0] = 1; - out_4439064891851207524[1] = 0; - out_4439064891851207524[2] = 0; - out_4439064891851207524[3] = 0; - out_4439064891851207524[4] = 0; - out_4439064891851207524[5] = 0; - out_4439064891851207524[6] = 0; - out_4439064891851207524[7] = 0; - out_4439064891851207524[8] = 0; - out_4439064891851207524[9] = 0; - out_4439064891851207524[10] = 1; - out_4439064891851207524[11] = 0; - out_4439064891851207524[12] = 0; - out_4439064891851207524[13] = 0; - out_4439064891851207524[14] = 0; - out_4439064891851207524[15] = 0; - out_4439064891851207524[16] = 0; - out_4439064891851207524[17] = 0; - out_4439064891851207524[18] = 0; - out_4439064891851207524[19] = 0; - out_4439064891851207524[20] = 1; - out_4439064891851207524[21] = 0; - out_4439064891851207524[22] = 0; - out_4439064891851207524[23] = 0; - out_4439064891851207524[24] = 0; - out_4439064891851207524[25] = 0; - out_4439064891851207524[26] = 0; - out_4439064891851207524[27] = 0; - out_4439064891851207524[28] = 0; - out_4439064891851207524[29] = 0; - out_4439064891851207524[30] = 1; - out_4439064891851207524[31] = 0; - out_4439064891851207524[32] = 0; - out_4439064891851207524[33] = 0; - out_4439064891851207524[34] = 0; - out_4439064891851207524[35] = 0; - out_4439064891851207524[36] = 0; - out_4439064891851207524[37] = 0; - out_4439064891851207524[38] = 0; - out_4439064891851207524[39] = 0; - out_4439064891851207524[40] = 1; - out_4439064891851207524[41] = 0; - out_4439064891851207524[42] = 0; - out_4439064891851207524[43] = 0; - out_4439064891851207524[44] = 0; - out_4439064891851207524[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_4439064891851207524[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); - out_4439064891851207524[47] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_4439064891851207524[48] = -dt*stiffness_front*state[0]/(mass*state[1]); - out_4439064891851207524[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_4439064891851207524[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; - out_4439064891851207524[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); - out_4439064891851207524[52] = dt*stiffness_front*state[0]/(mass*state[1]); - out_4439064891851207524[53] = -9.8100000000000005*dt; - out_4439064891851207524[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_4439064891851207524[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); - out_4439064891851207524[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_4439064891851207524[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_4439064891851207524[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_4439064891851207524[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); - out_4439064891851207524[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_4439064891851207524[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); - out_4439064891851207524[62] = 0; - out_4439064891851207524[63] = 0; - out_4439064891851207524[64] = 0; - out_4439064891851207524[65] = 0; - out_4439064891851207524[66] = 0; - out_4439064891851207524[67] = 0; - out_4439064891851207524[68] = 0; - out_4439064891851207524[69] = 0; - out_4439064891851207524[70] = 1; - out_4439064891851207524[71] = 0; - out_4439064891851207524[72] = 0; - out_4439064891851207524[73] = 0; - out_4439064891851207524[74] = 0; - out_4439064891851207524[75] = 0; - out_4439064891851207524[76] = 0; - out_4439064891851207524[77] = 0; - out_4439064891851207524[78] = 0; - out_4439064891851207524[79] = 0; - out_4439064891851207524[80] = 1; +void F_fun(double *state, double dt, double *out_1299444942662215767) { + out_1299444942662215767[0] = 1; + out_1299444942662215767[1] = 0; + out_1299444942662215767[2] = 0; + out_1299444942662215767[3] = 0; + out_1299444942662215767[4] = 0; + out_1299444942662215767[5] = 0; + out_1299444942662215767[6] = 0; + out_1299444942662215767[7] = 0; + out_1299444942662215767[8] = 0; + out_1299444942662215767[9] = 0; + out_1299444942662215767[10] = 1; + out_1299444942662215767[11] = 0; + out_1299444942662215767[12] = 0; + out_1299444942662215767[13] = 0; + out_1299444942662215767[14] = 0; + out_1299444942662215767[15] = 0; + out_1299444942662215767[16] = 0; + out_1299444942662215767[17] = 0; + out_1299444942662215767[18] = 0; + out_1299444942662215767[19] = 0; + out_1299444942662215767[20] = 1; + out_1299444942662215767[21] = 0; + out_1299444942662215767[22] = 0; + out_1299444942662215767[23] = 0; + out_1299444942662215767[24] = 0; + out_1299444942662215767[25] = 0; + out_1299444942662215767[26] = 0; + out_1299444942662215767[27] = 0; + out_1299444942662215767[28] = 0; + out_1299444942662215767[29] = 0; + out_1299444942662215767[30] = 1; + out_1299444942662215767[31] = 0; + out_1299444942662215767[32] = 0; + out_1299444942662215767[33] = 0; + out_1299444942662215767[34] = 0; + out_1299444942662215767[35] = 0; + out_1299444942662215767[36] = 0; + out_1299444942662215767[37] = 0; + out_1299444942662215767[38] = 0; + out_1299444942662215767[39] = 0; + out_1299444942662215767[40] = 1; + out_1299444942662215767[41] = 0; + out_1299444942662215767[42] = 0; + out_1299444942662215767[43] = 0; + out_1299444942662215767[44] = 0; + out_1299444942662215767[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_1299444942662215767[46] = -dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(mass*pow(state[1], 2)); + out_1299444942662215767[47] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_1299444942662215767[48] = -dt*stiffness_front*state[0]/(mass*state[1]); + out_1299444942662215767[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_1299444942662215767[50] = dt*(-stiffness_front*state[0] - stiffness_rear*state[0])/(mass*state[4]) + 1; + out_1299444942662215767[51] = dt*(-state[4] + (-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(mass*state[4])); + out_1299444942662215767[52] = dt*stiffness_front*state[0]/(mass*state[1]); + out_1299444942662215767[53] = -9.8100000000000005*dt; + out_1299444942662215767[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_1299444942662215767[55] = -center_to_front*dt*stiffness_front*(-state[2] - state[3] + state[7])*state[0]/(rotational_inertia*pow(state[1], 2)); + out_1299444942662215767[56] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_1299444942662215767[57] = -center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_1299444942662215767[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_1299444942662215767[59] = dt*(-center_to_front*stiffness_front*state[0] + center_to_rear*stiffness_rear*state[0])/(rotational_inertia*state[4]); + out_1299444942662215767[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_1299444942662215767[61] = center_to_front*dt*stiffness_front*state[0]/(rotational_inertia*state[1]); + out_1299444942662215767[62] = 0; + out_1299444942662215767[63] = 0; + out_1299444942662215767[64] = 0; + out_1299444942662215767[65] = 0; + out_1299444942662215767[66] = 0; + out_1299444942662215767[67] = 0; + out_1299444942662215767[68] = 0; + out_1299444942662215767[69] = 0; + out_1299444942662215767[70] = 1; + out_1299444942662215767[71] = 0; + out_1299444942662215767[72] = 0; + out_1299444942662215767[73] = 0; + out_1299444942662215767[74] = 0; + out_1299444942662215767[75] = 0; + out_1299444942662215767[76] = 0; + out_1299444942662215767[77] = 0; + out_1299444942662215767[78] = 0; + out_1299444942662215767[79] = 0; + out_1299444942662215767[80] = 1; } -void h_25(double *state, double *unused, double *out_163359513787674561) { - out_163359513787674561[0] = state[6]; +void h_25(double *state, double *unused, double *out_3872552225024340379) { + out_3872552225024340379[0] = state[6]; } -void H_25(double *state, double *unused, double *out_4980136066246558349) { - out_4980136066246558349[0] = 0; - out_4980136066246558349[1] = 0; - out_4980136066246558349[2] = 0; - out_4980136066246558349[3] = 0; - out_4980136066246558349[4] = 0; - out_4980136066246558349[5] = 0; - out_4980136066246558349[6] = 1; - out_4980136066246558349[7] = 0; - out_4980136066246558349[8] = 0; +void H_25(double *state, double *unused, double *out_4134224586120567485) { + out_4134224586120567485[0] = 0; + out_4134224586120567485[1] = 0; + out_4134224586120567485[2] = 0; + out_4134224586120567485[3] = 0; + out_4134224586120567485[4] = 0; + out_4134224586120567485[5] = 0; + out_4134224586120567485[6] = 1; + out_4134224586120567485[7] = 0; + out_4134224586120567485[8] = 0; } -void h_24(double *state, double *unused, double *out_3507524691101779904) { - out_3507524691101779904[0] = state[4]; - out_3507524691101779904[1] = state[5]; +void h_24(double *state, double *unused, double *out_9027181674952805450) { + out_9027181674952805450[0] = state[4]; + out_9027181674952805450[1] = state[5]; } -void H_24(double *state, double *unused, double *out_2754428282267689787) { - out_2754428282267689787[0] = 0; - out_2754428282267689787[1] = 0; - out_2754428282267689787[2] = 0; - out_2754428282267689787[3] = 0; - out_2754428282267689787[4] = 1; - out_2754428282267689787[5] = 0; - out_2754428282267689787[6] = 0; - out_2754428282267689787[7] = 0; - out_2754428282267689787[8] = 0; - out_2754428282267689787[9] = 0; - out_2754428282267689787[10] = 0; - out_2754428282267689787[11] = 0; - out_2754428282267689787[12] = 0; - out_2754428282267689787[13] = 0; - out_2754428282267689787[14] = 1; - out_2754428282267689787[15] = 0; - out_2754428282267689787[16] = 0; - out_2754428282267689787[17] = 0; +void H_24(double *state, double *unused, double *out_2899580928508487625) { + out_2899580928508487625[0] = 0; + out_2899580928508487625[1] = 0; + out_2899580928508487625[2] = 0; + out_2899580928508487625[3] = 0; + out_2899580928508487625[4] = 1; + out_2899580928508487625[5] = 0; + out_2899580928508487625[6] = 0; + out_2899580928508487625[7] = 0; + out_2899580928508487625[8] = 0; + out_2899580928508487625[9] = 0; + out_2899580928508487625[10] = 0; + out_2899580928508487625[11] = 0; + out_2899580928508487625[12] = 0; + out_2899580928508487625[13] = 0; + out_2899580928508487625[14] = 1; + out_2899580928508487625[15] = 0; + out_2899580928508487625[16] = 0; + out_2899580928508487625[17] = 0; } -void h_30(double *state, double *unused, double *out_7028189599067837235) { - out_7028189599067837235[0] = state[4]; +void h_30(double *state, double *unused, double *out_7734235701452842031) { + out_7734235701452842031[0] = state[4]; } -void H_30(double *state, double *unused, double *out_1936554275245058406) { - out_1936554275245058406[0] = 0; - out_1936554275245058406[1] = 0; - out_1936554275245058406[2] = 0; - out_1936554275245058406[3] = 0; - out_1936554275245058406[4] = 1; - out_1936554275245058406[5] = 0; - out_1936554275245058406[6] = 0; - out_1936554275245058406[7] = 0; - out_1936554275245058406[8] = 0; +void H_30(double *state, double *unused, double *out_4004885638977327415) { + out_4004885638977327415[0] = 0; + out_4004885638977327415[1] = 0; + out_4004885638977327415[2] = 0; + out_4004885638977327415[3] = 0; + out_4004885638977327415[4] = 1; + out_4004885638977327415[5] = 0; + out_4004885638977327415[6] = 0; + out_4004885638977327415[7] = 0; + out_4004885638977327415[8] = 0; } -void h_26(double *state, double *unused, double *out_2026516331406991590) { - out_2026516331406991590[0] = state[7]; +void h_26(double *state, double *unused, double *out_1730539200249868820) { + out_1730539200249868820[0] = state[7]; } -void H_26(double *state, double *unused, double *out_8721639385120614573) { - out_8721639385120614573[0] = 0; - out_8721639385120614573[1] = 0; - out_8721639385120614573[2] = 0; - out_8721639385120614573[3] = 0; - out_8721639385120614573[4] = 0; - out_8721639385120614573[5] = 0; - out_8721639385120614573[6] = 0; - out_8721639385120614573[7] = 1; - out_8721639385120614573[8] = 0; +void H_26(double *state, double *unused, double *out_4791078650230879389) { + out_4791078650230879389[0] = 0; + out_4791078650230879389[1] = 0; + out_4791078650230879389[2] = 0; + out_4791078650230879389[3] = 0; + out_4791078650230879389[4] = 0; + out_4791078650230879389[5] = 0; + out_4791078650230879389[6] = 0; + out_4791078650230879389[7] = 1; + out_4791078650230879389[8] = 0; } -void h_27(double *state, double *unused, double *out_1106869366689336996) { - out_1106869366689336996[0] = state[3]; +void h_27(double *state, double *unused, double *out_9098459440859665326) { + out_9098459440859665326[0] = state[3]; } -void H_27(double *state, double *unused, double *out_238209036555366505) { - out_238209036555366505[0] = 0; - out_238209036555366505[1] = 0; - out_238209036555366505[2] = 0; - out_238209036555366505[3] = 1; - out_238209036555366505[4] = 0; - out_238209036555366505[5] = 0; - out_238209036555366505[6] = 0; - out_238209036555366505[7] = 0; - out_238209036555366505[8] = 0; +void H_27(double *state, double *unused, double *out_1830122327176902504) { + out_1830122327176902504[0] = 0; + out_1830122327176902504[1] = 0; + out_1830122327176902504[2] = 0; + out_1830122327176902504[3] = 1; + out_1830122327176902504[4] = 0; + out_1830122327176902504[5] = 0; + out_1830122327176902504[6] = 0; + out_1830122327176902504[7] = 0; + out_1830122327176902504[8] = 0; } -void h_29(double *state, double *unused, double *out_3198557362738331353) { - out_3198557362738331353[0] = state[1]; +void h_29(double *state, double *unused, double *out_5710835104595863940) { + out_5710835104595863940[0] = state[1]; } -void H_29(double *state, double *unused, double *out_2446785619559450590) { - out_2446785619559450590[0] = 0; - out_2446785619559450590[1] = 1; - out_2446785619559450590[2] = 0; - out_2446785619559450590[3] = 0; - out_2446785619559450590[4] = 0; - out_2446785619559450590[5] = 0; - out_2446785619559450590[6] = 0; - out_2446785619559450590[7] = 0; - out_2446785619559450590[8] = 0; +void H_29(double *state, double *unused, double *out_4515116983291719599) { + out_4515116983291719599[0] = 0; + out_4515116983291719599[1] = 1; + out_4515116983291719599[2] = 0; + out_4515116983291719599[3] = 0; + out_4515116983291719599[4] = 0; + out_4515116983291719599[5] = 0; + out_4515116983291719599[6] = 0; + out_4515116983291719599[7] = 0; + out_4515116983291719599[8] = 0; } -void h_28(double *state, double *unused, double *out_7505910884103186142) { - out_7505910884103186142[0] = state[0]; +void h_28(double *state, double *unused, double *out_6061673389415332641) { + out_6061673389415332641[0] = state[0]; } -void H_28(double *state, double *unused, double *out_2635613397510079984) { - out_2635613397510079984[0] = 1; - out_2635613397510079984[1] = 0; - out_2635613397510079984[2] = 0; - out_2635613397510079984[3] = 0; - out_2635613397510079984[4] = 0; - out_2635613397510079984[5] = 0; - out_2635613397510079984[6] = 0; - out_2635613397510079984[7] = 0; - out_2635613397510079984[8] = 0; +void H_28(double *state, double *unused, double *out_567282033777810975) { + out_567282033777810975[0] = 1; + out_567282033777810975[1] = 0; + out_567282033777810975[2] = 0; + out_567282033777810975[3] = 0; + out_567282033777810975[4] = 0; + out_567282033777810975[5] = 0; + out_567282033777810975[6] = 0; + out_567282033777810975[7] = 0; + out_567282033777810975[8] = 0; } -void h_31(double *state, double *unused, double *out_8700751911105346625) { - out_8700751911105346625[0] = state[8]; +void h_31(double *state, double *unused, double *out_3821592110914313792) { + out_3821592110914313792[0] = state[8]; } -void H_31(double *state, double *unused, double *out_4949490104369597921) { - out_4949490104369597921[0] = 0; - out_4949490104369597921[1] = 0; - out_4949490104369597921[2] = 0; - out_4949490104369597921[3] = 0; - out_4949490104369597921[4] = 0; - out_4949490104369597921[5] = 0; - out_4949490104369597921[6] = 0; - out_4949490104369597921[7] = 0; - out_4949490104369597921[8] = 1; +void H_31(double *state, double *unused, double *out_4164870547997527913) { + out_4164870547997527913[0] = 0; + out_4164870547997527913[1] = 0; + out_4164870547997527913[2] = 0; + out_4164870547997527913[3] = 0; + out_4164870547997527913[4] = 0; + out_4164870547997527913[5] = 0; + out_4164870547997527913[6] = 0; + out_4164870547997527913[7] = 0; + out_4164870547997527913[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_6607755363165806471) { - err_fun(nom_x, delta_x, out_6607755363165806471); +void car_err_fun(double *nom_x, double *delta_x, double *out_4680453271178883722) { + err_fun(nom_x, delta_x, out_4680453271178883722); } -void car_inv_err_fun(double *nom_x, double *true_x, double *out_8930007875694985889) { - inv_err_fun(nom_x, true_x, out_8930007875694985889); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_2158585798385581189) { + inv_err_fun(nom_x, true_x, out_2158585798385581189); } -void car_H_mod_fun(double *state, double *out_8503116716236050026) { - H_mod_fun(state, out_8503116716236050026); +void car_H_mod_fun(double *state, double *out_5438563696312539105) { + H_mod_fun(state, out_5438563696312539105); } -void car_f_fun(double *state, double dt, double *out_1379221821852906246) { - f_fun(state, dt, out_1379221821852906246); +void car_f_fun(double *state, double dt, double *out_5226637712802323280) { + f_fun(state, dt, out_5226637712802323280); } -void car_F_fun(double *state, double dt, double *out_4439064891851207524) { - F_fun(state, dt, out_4439064891851207524); +void car_F_fun(double *state, double dt, double *out_1299444942662215767) { + F_fun(state, dt, out_1299444942662215767); } -void car_h_25(double *state, double *unused, double *out_163359513787674561) { - h_25(state, unused, out_163359513787674561); +void car_h_25(double *state, double *unused, double *out_3872552225024340379) { + h_25(state, unused, out_3872552225024340379); } -void car_H_25(double *state, double *unused, double *out_4980136066246558349) { - H_25(state, unused, out_4980136066246558349); +void car_H_25(double *state, double *unused, double *out_4134224586120567485) { + H_25(state, unused, out_4134224586120567485); } -void car_h_24(double *state, double *unused, double *out_3507524691101779904) { - h_24(state, unused, out_3507524691101779904); +void car_h_24(double *state, double *unused, double *out_9027181674952805450) { + h_24(state, unused, out_9027181674952805450); } -void car_H_24(double *state, double *unused, double *out_2754428282267689787) { - H_24(state, unused, out_2754428282267689787); +void car_H_24(double *state, double *unused, double *out_2899580928508487625) { + H_24(state, unused, out_2899580928508487625); } -void car_h_30(double *state, double *unused, double *out_7028189599067837235) { - h_30(state, unused, out_7028189599067837235); +void car_h_30(double *state, double *unused, double *out_7734235701452842031) { + h_30(state, unused, out_7734235701452842031); } -void car_H_30(double *state, double *unused, double *out_1936554275245058406) { - H_30(state, unused, out_1936554275245058406); +void car_H_30(double *state, double *unused, double *out_4004885638977327415) { + H_30(state, unused, out_4004885638977327415); } -void car_h_26(double *state, double *unused, double *out_2026516331406991590) { - h_26(state, unused, out_2026516331406991590); +void car_h_26(double *state, double *unused, double *out_1730539200249868820) { + h_26(state, unused, out_1730539200249868820); } -void car_H_26(double *state, double *unused, double *out_8721639385120614573) { - H_26(state, unused, out_8721639385120614573); +void car_H_26(double *state, double *unused, double *out_4791078650230879389) { + H_26(state, unused, out_4791078650230879389); } -void car_h_27(double *state, double *unused, double *out_1106869366689336996) { - h_27(state, unused, out_1106869366689336996); +void car_h_27(double *state, double *unused, double *out_9098459440859665326) { + h_27(state, unused, out_9098459440859665326); } -void car_H_27(double *state, double *unused, double *out_238209036555366505) { - H_27(state, unused, out_238209036555366505); +void car_H_27(double *state, double *unused, double *out_1830122327176902504) { + H_27(state, unused, out_1830122327176902504); } -void car_h_29(double *state, double *unused, double *out_3198557362738331353) { - h_29(state, unused, out_3198557362738331353); +void car_h_29(double *state, double *unused, double *out_5710835104595863940) { + h_29(state, unused, out_5710835104595863940); } -void car_H_29(double *state, double *unused, double *out_2446785619559450590) { - H_29(state, unused, out_2446785619559450590); +void car_H_29(double *state, double *unused, double *out_4515116983291719599) { + H_29(state, unused, out_4515116983291719599); } -void car_h_28(double *state, double *unused, double *out_7505910884103186142) { - h_28(state, unused, out_7505910884103186142); +void car_h_28(double *state, double *unused, double *out_6061673389415332641) { + h_28(state, unused, out_6061673389415332641); } -void car_H_28(double *state, double *unused, double *out_2635613397510079984) { - H_28(state, unused, out_2635613397510079984); +void car_H_28(double *state, double *unused, double *out_567282033777810975) { + H_28(state, unused, out_567282033777810975); } -void car_h_31(double *state, double *unused, double *out_8700751911105346625) { - h_31(state, unused, out_8700751911105346625); +void car_h_31(double *state, double *unused, double *out_3821592110914313792) { + h_31(state, unused, out_3821592110914313792); } -void car_H_31(double *state, double *unused, double *out_4949490104369597921) { - H_31(state, unused, out_4949490104369597921); +void car_H_31(double *state, double *unused, double *out_4164870547997527913) { + H_31(state, unused, out_4164870547997527913); } 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/openpilot/selfdrive/locationd/models/generated/car.h b/openpilot/selfdrive/locationd/models/generated/car.h index 0cbe93fba..75bdc9c46 100644 --- a/openpilot/selfdrive/locationd/models/generated/car.h +++ b/openpilot/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_6607755363165806471); -void car_inv_err_fun(double *nom_x, double *true_x, double *out_8930007875694985889); -void car_H_mod_fun(double *state, double *out_8503116716236050026); -void car_f_fun(double *state, double dt, double *out_1379221821852906246); -void car_F_fun(double *state, double dt, double *out_4439064891851207524); -void car_h_25(double *state, double *unused, double *out_163359513787674561); -void car_H_25(double *state, double *unused, double *out_4980136066246558349); -void car_h_24(double *state, double *unused, double *out_3507524691101779904); -void car_H_24(double *state, double *unused, double *out_2754428282267689787); -void car_h_30(double *state, double *unused, double *out_7028189599067837235); -void car_H_30(double *state, double *unused, double *out_1936554275245058406); -void car_h_26(double *state, double *unused, double *out_2026516331406991590); -void car_H_26(double *state, double *unused, double *out_8721639385120614573); -void car_h_27(double *state, double *unused, double *out_1106869366689336996); -void car_H_27(double *state, double *unused, double *out_238209036555366505); -void car_h_29(double *state, double *unused, double *out_3198557362738331353); -void car_H_29(double *state, double *unused, double *out_2446785619559450590); -void car_h_28(double *state, double *unused, double *out_7505910884103186142); -void car_H_28(double *state, double *unused, double *out_2635613397510079984); -void car_h_31(double *state, double *unused, double *out_8700751911105346625); -void car_H_31(double *state, double *unused, double *out_4949490104369597921); +void car_err_fun(double *nom_x, double *delta_x, double *out_4680453271178883722); +void car_inv_err_fun(double *nom_x, double *true_x, double *out_2158585798385581189); +void car_H_mod_fun(double *state, double *out_5438563696312539105); +void car_f_fun(double *state, double dt, double *out_5226637712802323280); +void car_F_fun(double *state, double dt, double *out_1299444942662215767); +void car_h_25(double *state, double *unused, double *out_3872552225024340379); +void car_H_25(double *state, double *unused, double *out_4134224586120567485); +void car_h_24(double *state, double *unused, double *out_9027181674952805450); +void car_H_24(double *state, double *unused, double *out_2899580928508487625); +void car_h_30(double *state, double *unused, double *out_7734235701452842031); +void car_H_30(double *state, double *unused, double *out_4004885638977327415); +void car_h_26(double *state, double *unused, double *out_1730539200249868820); +void car_H_26(double *state, double *unused, double *out_4791078650230879389); +void car_h_27(double *state, double *unused, double *out_9098459440859665326); +void car_H_27(double *state, double *unused, double *out_1830122327176902504); +void car_h_29(double *state, double *unused, double *out_5710835104595863940); +void car_H_29(double *state, double *unused, double *out_4515116983291719599); +void car_h_28(double *state, double *unused, double *out_6061673389415332641); +void car_H_28(double *state, double *unused, double *out_567282033777810975); +void car_h_31(double *state, double *unused, double *out_3821592110914313792); +void car_H_31(double *state, double *unused, double *out_4164870547997527913); 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/openpilot/selfdrive/locationd/models/generated/libcar.so b/openpilot/selfdrive/locationd/models/generated/libcar.so index 6595e6ea6..d31cbb71f 100755 Binary files a/openpilot/selfdrive/locationd/models/generated/libcar.so and b/openpilot/selfdrive/locationd/models/generated/libcar.so differ diff --git a/openpilot/selfdrive/locationd/models/generated/libpose.so b/openpilot/selfdrive/locationd/models/generated/libpose.so index 64f8d7db4..fba5e3440 100755 Binary files a/openpilot/selfdrive/locationd/models/generated/libpose.so and b/openpilot/selfdrive/locationd/models/generated/libpose.so differ diff --git a/openpilot/selfdrive/locationd/models/generated/pose.cpp b/openpilot/selfdrive/locationd/models/generated/pose.cpp index 0572e3f9d..758cb93d2 100644 --- a/openpilot/selfdrive/locationd/models/generated/pose.cpp +++ b/openpilot/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_4922672802559952531) { - out_4922672802559952531[0] = delta_x[0] + nom_x[0]; - out_4922672802559952531[1] = delta_x[1] + nom_x[1]; - out_4922672802559952531[2] = delta_x[2] + nom_x[2]; - out_4922672802559952531[3] = delta_x[3] + nom_x[3]; - out_4922672802559952531[4] = delta_x[4] + nom_x[4]; - out_4922672802559952531[5] = delta_x[5] + nom_x[5]; - out_4922672802559952531[6] = delta_x[6] + nom_x[6]; - out_4922672802559952531[7] = delta_x[7] + nom_x[7]; - out_4922672802559952531[8] = delta_x[8] + nom_x[8]; - out_4922672802559952531[9] = delta_x[9] + nom_x[9]; - out_4922672802559952531[10] = delta_x[10] + nom_x[10]; - out_4922672802559952531[11] = delta_x[11] + nom_x[11]; - out_4922672802559952531[12] = delta_x[12] + nom_x[12]; - out_4922672802559952531[13] = delta_x[13] + nom_x[13]; - out_4922672802559952531[14] = delta_x[14] + nom_x[14]; - out_4922672802559952531[15] = delta_x[15] + nom_x[15]; - out_4922672802559952531[16] = delta_x[16] + nom_x[16]; - out_4922672802559952531[17] = delta_x[17] + nom_x[17]; +void err_fun(double *nom_x, double *delta_x, double *out_7822607448529633229) { + out_7822607448529633229[0] = delta_x[0] + nom_x[0]; + out_7822607448529633229[1] = delta_x[1] + nom_x[1]; + out_7822607448529633229[2] = delta_x[2] + nom_x[2]; + out_7822607448529633229[3] = delta_x[3] + nom_x[3]; + out_7822607448529633229[4] = delta_x[4] + nom_x[4]; + out_7822607448529633229[5] = delta_x[5] + nom_x[5]; + out_7822607448529633229[6] = delta_x[6] + nom_x[6]; + out_7822607448529633229[7] = delta_x[7] + nom_x[7]; + out_7822607448529633229[8] = delta_x[8] + nom_x[8]; + out_7822607448529633229[9] = delta_x[9] + nom_x[9]; + out_7822607448529633229[10] = delta_x[10] + nom_x[10]; + out_7822607448529633229[11] = delta_x[11] + nom_x[11]; + out_7822607448529633229[12] = delta_x[12] + nom_x[12]; + out_7822607448529633229[13] = delta_x[13] + nom_x[13]; + out_7822607448529633229[14] = delta_x[14] + nom_x[14]; + out_7822607448529633229[15] = delta_x[15] + nom_x[15]; + out_7822607448529633229[16] = delta_x[16] + nom_x[16]; + out_7822607448529633229[17] = delta_x[17] + nom_x[17]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_4675286663206909820) { - out_4675286663206909820[0] = -nom_x[0] + true_x[0]; - out_4675286663206909820[1] = -nom_x[1] + true_x[1]; - out_4675286663206909820[2] = -nom_x[2] + true_x[2]; - out_4675286663206909820[3] = -nom_x[3] + true_x[3]; - out_4675286663206909820[4] = -nom_x[4] + true_x[4]; - out_4675286663206909820[5] = -nom_x[5] + true_x[5]; - out_4675286663206909820[6] = -nom_x[6] + true_x[6]; - out_4675286663206909820[7] = -nom_x[7] + true_x[7]; - out_4675286663206909820[8] = -nom_x[8] + true_x[8]; - out_4675286663206909820[9] = -nom_x[9] + true_x[9]; - out_4675286663206909820[10] = -nom_x[10] + true_x[10]; - out_4675286663206909820[11] = -nom_x[11] + true_x[11]; - out_4675286663206909820[12] = -nom_x[12] + true_x[12]; - out_4675286663206909820[13] = -nom_x[13] + true_x[13]; - out_4675286663206909820[14] = -nom_x[14] + true_x[14]; - out_4675286663206909820[15] = -nom_x[15] + true_x[15]; - out_4675286663206909820[16] = -nom_x[16] + true_x[16]; - out_4675286663206909820[17] = -nom_x[17] + true_x[17]; +void inv_err_fun(double *nom_x, double *true_x, double *out_4249233298537579143) { + out_4249233298537579143[0] = -nom_x[0] + true_x[0]; + out_4249233298537579143[1] = -nom_x[1] + true_x[1]; + out_4249233298537579143[2] = -nom_x[2] + true_x[2]; + out_4249233298537579143[3] = -nom_x[3] + true_x[3]; + out_4249233298537579143[4] = -nom_x[4] + true_x[4]; + out_4249233298537579143[5] = -nom_x[5] + true_x[5]; + out_4249233298537579143[6] = -nom_x[6] + true_x[6]; + out_4249233298537579143[7] = -nom_x[7] + true_x[7]; + out_4249233298537579143[8] = -nom_x[8] + true_x[8]; + out_4249233298537579143[9] = -nom_x[9] + true_x[9]; + out_4249233298537579143[10] = -nom_x[10] + true_x[10]; + out_4249233298537579143[11] = -nom_x[11] + true_x[11]; + out_4249233298537579143[12] = -nom_x[12] + true_x[12]; + out_4249233298537579143[13] = -nom_x[13] + true_x[13]; + out_4249233298537579143[14] = -nom_x[14] + true_x[14]; + out_4249233298537579143[15] = -nom_x[15] + true_x[15]; + out_4249233298537579143[16] = -nom_x[16] + true_x[16]; + out_4249233298537579143[17] = -nom_x[17] + true_x[17]; } -void H_mod_fun(double *state, double *out_30455509765476285) { - out_30455509765476285[0] = 1.0; - out_30455509765476285[1] = 0.0; - out_30455509765476285[2] = 0.0; - out_30455509765476285[3] = 0.0; - out_30455509765476285[4] = 0.0; - out_30455509765476285[5] = 0.0; - out_30455509765476285[6] = 0.0; - out_30455509765476285[7] = 0.0; - out_30455509765476285[8] = 0.0; - out_30455509765476285[9] = 0.0; - out_30455509765476285[10] = 0.0; - out_30455509765476285[11] = 0.0; - out_30455509765476285[12] = 0.0; - out_30455509765476285[13] = 0.0; - out_30455509765476285[14] = 0.0; - out_30455509765476285[15] = 0.0; - out_30455509765476285[16] = 0.0; - out_30455509765476285[17] = 0.0; - out_30455509765476285[18] = 0.0; - out_30455509765476285[19] = 1.0; - out_30455509765476285[20] = 0.0; - out_30455509765476285[21] = 0.0; - out_30455509765476285[22] = 0.0; - out_30455509765476285[23] = 0.0; - out_30455509765476285[24] = 0.0; - out_30455509765476285[25] = 0.0; - out_30455509765476285[26] = 0.0; - out_30455509765476285[27] = 0.0; - out_30455509765476285[28] = 0.0; - out_30455509765476285[29] = 0.0; - out_30455509765476285[30] = 0.0; - out_30455509765476285[31] = 0.0; - out_30455509765476285[32] = 0.0; - out_30455509765476285[33] = 0.0; - out_30455509765476285[34] = 0.0; - out_30455509765476285[35] = 0.0; - out_30455509765476285[36] = 0.0; - out_30455509765476285[37] = 0.0; - out_30455509765476285[38] = 1.0; - out_30455509765476285[39] = 0.0; - out_30455509765476285[40] = 0.0; - out_30455509765476285[41] = 0.0; - out_30455509765476285[42] = 0.0; - out_30455509765476285[43] = 0.0; - out_30455509765476285[44] = 0.0; - out_30455509765476285[45] = 0.0; - out_30455509765476285[46] = 0.0; - out_30455509765476285[47] = 0.0; - out_30455509765476285[48] = 0.0; - out_30455509765476285[49] = 0.0; - out_30455509765476285[50] = 0.0; - out_30455509765476285[51] = 0.0; - out_30455509765476285[52] = 0.0; - out_30455509765476285[53] = 0.0; - out_30455509765476285[54] = 0.0; - out_30455509765476285[55] = 0.0; - out_30455509765476285[56] = 0.0; - out_30455509765476285[57] = 1.0; - out_30455509765476285[58] = 0.0; - out_30455509765476285[59] = 0.0; - out_30455509765476285[60] = 0.0; - out_30455509765476285[61] = 0.0; - out_30455509765476285[62] = 0.0; - out_30455509765476285[63] = 0.0; - out_30455509765476285[64] = 0.0; - out_30455509765476285[65] = 0.0; - out_30455509765476285[66] = 0.0; - out_30455509765476285[67] = 0.0; - out_30455509765476285[68] = 0.0; - out_30455509765476285[69] = 0.0; - out_30455509765476285[70] = 0.0; - out_30455509765476285[71] = 0.0; - out_30455509765476285[72] = 0.0; - out_30455509765476285[73] = 0.0; - out_30455509765476285[74] = 0.0; - out_30455509765476285[75] = 0.0; - out_30455509765476285[76] = 1.0; - out_30455509765476285[77] = 0.0; - out_30455509765476285[78] = 0.0; - out_30455509765476285[79] = 0.0; - out_30455509765476285[80] = 0.0; - out_30455509765476285[81] = 0.0; - out_30455509765476285[82] = 0.0; - out_30455509765476285[83] = 0.0; - out_30455509765476285[84] = 0.0; - out_30455509765476285[85] = 0.0; - out_30455509765476285[86] = 0.0; - out_30455509765476285[87] = 0.0; - out_30455509765476285[88] = 0.0; - out_30455509765476285[89] = 0.0; - out_30455509765476285[90] = 0.0; - out_30455509765476285[91] = 0.0; - out_30455509765476285[92] = 0.0; - out_30455509765476285[93] = 0.0; - out_30455509765476285[94] = 0.0; - out_30455509765476285[95] = 1.0; - out_30455509765476285[96] = 0.0; - out_30455509765476285[97] = 0.0; - out_30455509765476285[98] = 0.0; - out_30455509765476285[99] = 0.0; - out_30455509765476285[100] = 0.0; - out_30455509765476285[101] = 0.0; - out_30455509765476285[102] = 0.0; - out_30455509765476285[103] = 0.0; - out_30455509765476285[104] = 0.0; - out_30455509765476285[105] = 0.0; - out_30455509765476285[106] = 0.0; - out_30455509765476285[107] = 0.0; - out_30455509765476285[108] = 0.0; - out_30455509765476285[109] = 0.0; - out_30455509765476285[110] = 0.0; - out_30455509765476285[111] = 0.0; - out_30455509765476285[112] = 0.0; - out_30455509765476285[113] = 0.0; - out_30455509765476285[114] = 1.0; - out_30455509765476285[115] = 0.0; - out_30455509765476285[116] = 0.0; - out_30455509765476285[117] = 0.0; - out_30455509765476285[118] = 0.0; - out_30455509765476285[119] = 0.0; - out_30455509765476285[120] = 0.0; - out_30455509765476285[121] = 0.0; - out_30455509765476285[122] = 0.0; - out_30455509765476285[123] = 0.0; - out_30455509765476285[124] = 0.0; - out_30455509765476285[125] = 0.0; - out_30455509765476285[126] = 0.0; - out_30455509765476285[127] = 0.0; - out_30455509765476285[128] = 0.0; - out_30455509765476285[129] = 0.0; - out_30455509765476285[130] = 0.0; - out_30455509765476285[131] = 0.0; - out_30455509765476285[132] = 0.0; - out_30455509765476285[133] = 1.0; - out_30455509765476285[134] = 0.0; - out_30455509765476285[135] = 0.0; - out_30455509765476285[136] = 0.0; - out_30455509765476285[137] = 0.0; - out_30455509765476285[138] = 0.0; - out_30455509765476285[139] = 0.0; - out_30455509765476285[140] = 0.0; - out_30455509765476285[141] = 0.0; - out_30455509765476285[142] = 0.0; - out_30455509765476285[143] = 0.0; - out_30455509765476285[144] = 0.0; - out_30455509765476285[145] = 0.0; - out_30455509765476285[146] = 0.0; - out_30455509765476285[147] = 0.0; - out_30455509765476285[148] = 0.0; - out_30455509765476285[149] = 0.0; - out_30455509765476285[150] = 0.0; - out_30455509765476285[151] = 0.0; - out_30455509765476285[152] = 1.0; - out_30455509765476285[153] = 0.0; - out_30455509765476285[154] = 0.0; - out_30455509765476285[155] = 0.0; - out_30455509765476285[156] = 0.0; - out_30455509765476285[157] = 0.0; - out_30455509765476285[158] = 0.0; - out_30455509765476285[159] = 0.0; - out_30455509765476285[160] = 0.0; - out_30455509765476285[161] = 0.0; - out_30455509765476285[162] = 0.0; - out_30455509765476285[163] = 0.0; - out_30455509765476285[164] = 0.0; - out_30455509765476285[165] = 0.0; - out_30455509765476285[166] = 0.0; - out_30455509765476285[167] = 0.0; - out_30455509765476285[168] = 0.0; - out_30455509765476285[169] = 0.0; - out_30455509765476285[170] = 0.0; - out_30455509765476285[171] = 1.0; - out_30455509765476285[172] = 0.0; - out_30455509765476285[173] = 0.0; - out_30455509765476285[174] = 0.0; - out_30455509765476285[175] = 0.0; - out_30455509765476285[176] = 0.0; - out_30455509765476285[177] = 0.0; - out_30455509765476285[178] = 0.0; - out_30455509765476285[179] = 0.0; - out_30455509765476285[180] = 0.0; - out_30455509765476285[181] = 0.0; - out_30455509765476285[182] = 0.0; - out_30455509765476285[183] = 0.0; - out_30455509765476285[184] = 0.0; - out_30455509765476285[185] = 0.0; - out_30455509765476285[186] = 0.0; - out_30455509765476285[187] = 0.0; - out_30455509765476285[188] = 0.0; - out_30455509765476285[189] = 0.0; - out_30455509765476285[190] = 1.0; - out_30455509765476285[191] = 0.0; - out_30455509765476285[192] = 0.0; - out_30455509765476285[193] = 0.0; - out_30455509765476285[194] = 0.0; - out_30455509765476285[195] = 0.0; - out_30455509765476285[196] = 0.0; - out_30455509765476285[197] = 0.0; - out_30455509765476285[198] = 0.0; - out_30455509765476285[199] = 0.0; - out_30455509765476285[200] = 0.0; - out_30455509765476285[201] = 0.0; - out_30455509765476285[202] = 0.0; - out_30455509765476285[203] = 0.0; - out_30455509765476285[204] = 0.0; - out_30455509765476285[205] = 0.0; - out_30455509765476285[206] = 0.0; - out_30455509765476285[207] = 0.0; - out_30455509765476285[208] = 0.0; - out_30455509765476285[209] = 1.0; - out_30455509765476285[210] = 0.0; - out_30455509765476285[211] = 0.0; - out_30455509765476285[212] = 0.0; - out_30455509765476285[213] = 0.0; - out_30455509765476285[214] = 0.0; - out_30455509765476285[215] = 0.0; - out_30455509765476285[216] = 0.0; - out_30455509765476285[217] = 0.0; - out_30455509765476285[218] = 0.0; - out_30455509765476285[219] = 0.0; - out_30455509765476285[220] = 0.0; - out_30455509765476285[221] = 0.0; - out_30455509765476285[222] = 0.0; - out_30455509765476285[223] = 0.0; - out_30455509765476285[224] = 0.0; - out_30455509765476285[225] = 0.0; - out_30455509765476285[226] = 0.0; - out_30455509765476285[227] = 0.0; - out_30455509765476285[228] = 1.0; - out_30455509765476285[229] = 0.0; - out_30455509765476285[230] = 0.0; - out_30455509765476285[231] = 0.0; - out_30455509765476285[232] = 0.0; - out_30455509765476285[233] = 0.0; - out_30455509765476285[234] = 0.0; - out_30455509765476285[235] = 0.0; - out_30455509765476285[236] = 0.0; - out_30455509765476285[237] = 0.0; - out_30455509765476285[238] = 0.0; - out_30455509765476285[239] = 0.0; - out_30455509765476285[240] = 0.0; - out_30455509765476285[241] = 0.0; - out_30455509765476285[242] = 0.0; - out_30455509765476285[243] = 0.0; - out_30455509765476285[244] = 0.0; - out_30455509765476285[245] = 0.0; - out_30455509765476285[246] = 0.0; - out_30455509765476285[247] = 1.0; - out_30455509765476285[248] = 0.0; - out_30455509765476285[249] = 0.0; - out_30455509765476285[250] = 0.0; - out_30455509765476285[251] = 0.0; - out_30455509765476285[252] = 0.0; - out_30455509765476285[253] = 0.0; - out_30455509765476285[254] = 0.0; - out_30455509765476285[255] = 0.0; - out_30455509765476285[256] = 0.0; - out_30455509765476285[257] = 0.0; - out_30455509765476285[258] = 0.0; - out_30455509765476285[259] = 0.0; - out_30455509765476285[260] = 0.0; - out_30455509765476285[261] = 0.0; - out_30455509765476285[262] = 0.0; - out_30455509765476285[263] = 0.0; - out_30455509765476285[264] = 0.0; - out_30455509765476285[265] = 0.0; - out_30455509765476285[266] = 1.0; - out_30455509765476285[267] = 0.0; - out_30455509765476285[268] = 0.0; - out_30455509765476285[269] = 0.0; - out_30455509765476285[270] = 0.0; - out_30455509765476285[271] = 0.0; - out_30455509765476285[272] = 0.0; - out_30455509765476285[273] = 0.0; - out_30455509765476285[274] = 0.0; - out_30455509765476285[275] = 0.0; - out_30455509765476285[276] = 0.0; - out_30455509765476285[277] = 0.0; - out_30455509765476285[278] = 0.0; - out_30455509765476285[279] = 0.0; - out_30455509765476285[280] = 0.0; - out_30455509765476285[281] = 0.0; - out_30455509765476285[282] = 0.0; - out_30455509765476285[283] = 0.0; - out_30455509765476285[284] = 0.0; - out_30455509765476285[285] = 1.0; - out_30455509765476285[286] = 0.0; - out_30455509765476285[287] = 0.0; - out_30455509765476285[288] = 0.0; - out_30455509765476285[289] = 0.0; - out_30455509765476285[290] = 0.0; - out_30455509765476285[291] = 0.0; - out_30455509765476285[292] = 0.0; - out_30455509765476285[293] = 0.0; - out_30455509765476285[294] = 0.0; - out_30455509765476285[295] = 0.0; - out_30455509765476285[296] = 0.0; - out_30455509765476285[297] = 0.0; - out_30455509765476285[298] = 0.0; - out_30455509765476285[299] = 0.0; - out_30455509765476285[300] = 0.0; - out_30455509765476285[301] = 0.0; - out_30455509765476285[302] = 0.0; - out_30455509765476285[303] = 0.0; - out_30455509765476285[304] = 1.0; - out_30455509765476285[305] = 0.0; - out_30455509765476285[306] = 0.0; - out_30455509765476285[307] = 0.0; - out_30455509765476285[308] = 0.0; - out_30455509765476285[309] = 0.0; - out_30455509765476285[310] = 0.0; - out_30455509765476285[311] = 0.0; - out_30455509765476285[312] = 0.0; - out_30455509765476285[313] = 0.0; - out_30455509765476285[314] = 0.0; - out_30455509765476285[315] = 0.0; - out_30455509765476285[316] = 0.0; - out_30455509765476285[317] = 0.0; - out_30455509765476285[318] = 0.0; - out_30455509765476285[319] = 0.0; - out_30455509765476285[320] = 0.0; - out_30455509765476285[321] = 0.0; - out_30455509765476285[322] = 0.0; - out_30455509765476285[323] = 1.0; +void H_mod_fun(double *state, double *out_3177263273874987825) { + out_3177263273874987825[0] = 1.0; + out_3177263273874987825[1] = 0.0; + out_3177263273874987825[2] = 0.0; + out_3177263273874987825[3] = 0.0; + out_3177263273874987825[4] = 0.0; + out_3177263273874987825[5] = 0.0; + out_3177263273874987825[6] = 0.0; + out_3177263273874987825[7] = 0.0; + out_3177263273874987825[8] = 0.0; + out_3177263273874987825[9] = 0.0; + out_3177263273874987825[10] = 0.0; + out_3177263273874987825[11] = 0.0; + out_3177263273874987825[12] = 0.0; + out_3177263273874987825[13] = 0.0; + out_3177263273874987825[14] = 0.0; + out_3177263273874987825[15] = 0.0; + out_3177263273874987825[16] = 0.0; + out_3177263273874987825[17] = 0.0; + out_3177263273874987825[18] = 0.0; + out_3177263273874987825[19] = 1.0; + out_3177263273874987825[20] = 0.0; + out_3177263273874987825[21] = 0.0; + out_3177263273874987825[22] = 0.0; + out_3177263273874987825[23] = 0.0; + out_3177263273874987825[24] = 0.0; + out_3177263273874987825[25] = 0.0; + out_3177263273874987825[26] = 0.0; + out_3177263273874987825[27] = 0.0; + out_3177263273874987825[28] = 0.0; + out_3177263273874987825[29] = 0.0; + out_3177263273874987825[30] = 0.0; + out_3177263273874987825[31] = 0.0; + out_3177263273874987825[32] = 0.0; + out_3177263273874987825[33] = 0.0; + out_3177263273874987825[34] = 0.0; + out_3177263273874987825[35] = 0.0; + out_3177263273874987825[36] = 0.0; + out_3177263273874987825[37] = 0.0; + out_3177263273874987825[38] = 1.0; + out_3177263273874987825[39] = 0.0; + out_3177263273874987825[40] = 0.0; + out_3177263273874987825[41] = 0.0; + out_3177263273874987825[42] = 0.0; + out_3177263273874987825[43] = 0.0; + out_3177263273874987825[44] = 0.0; + out_3177263273874987825[45] = 0.0; + out_3177263273874987825[46] = 0.0; + out_3177263273874987825[47] = 0.0; + out_3177263273874987825[48] = 0.0; + out_3177263273874987825[49] = 0.0; + out_3177263273874987825[50] = 0.0; + out_3177263273874987825[51] = 0.0; + out_3177263273874987825[52] = 0.0; + out_3177263273874987825[53] = 0.0; + out_3177263273874987825[54] = 0.0; + out_3177263273874987825[55] = 0.0; + out_3177263273874987825[56] = 0.0; + out_3177263273874987825[57] = 1.0; + out_3177263273874987825[58] = 0.0; + out_3177263273874987825[59] = 0.0; + out_3177263273874987825[60] = 0.0; + out_3177263273874987825[61] = 0.0; + out_3177263273874987825[62] = 0.0; + out_3177263273874987825[63] = 0.0; + out_3177263273874987825[64] = 0.0; + out_3177263273874987825[65] = 0.0; + out_3177263273874987825[66] = 0.0; + out_3177263273874987825[67] = 0.0; + out_3177263273874987825[68] = 0.0; + out_3177263273874987825[69] = 0.0; + out_3177263273874987825[70] = 0.0; + out_3177263273874987825[71] = 0.0; + out_3177263273874987825[72] = 0.0; + out_3177263273874987825[73] = 0.0; + out_3177263273874987825[74] = 0.0; + out_3177263273874987825[75] = 0.0; + out_3177263273874987825[76] = 1.0; + out_3177263273874987825[77] = 0.0; + out_3177263273874987825[78] = 0.0; + out_3177263273874987825[79] = 0.0; + out_3177263273874987825[80] = 0.0; + out_3177263273874987825[81] = 0.0; + out_3177263273874987825[82] = 0.0; + out_3177263273874987825[83] = 0.0; + out_3177263273874987825[84] = 0.0; + out_3177263273874987825[85] = 0.0; + out_3177263273874987825[86] = 0.0; + out_3177263273874987825[87] = 0.0; + out_3177263273874987825[88] = 0.0; + out_3177263273874987825[89] = 0.0; + out_3177263273874987825[90] = 0.0; + out_3177263273874987825[91] = 0.0; + out_3177263273874987825[92] = 0.0; + out_3177263273874987825[93] = 0.0; + out_3177263273874987825[94] = 0.0; + out_3177263273874987825[95] = 1.0; + out_3177263273874987825[96] = 0.0; + out_3177263273874987825[97] = 0.0; + out_3177263273874987825[98] = 0.0; + out_3177263273874987825[99] = 0.0; + out_3177263273874987825[100] = 0.0; + out_3177263273874987825[101] = 0.0; + out_3177263273874987825[102] = 0.0; + out_3177263273874987825[103] = 0.0; + out_3177263273874987825[104] = 0.0; + out_3177263273874987825[105] = 0.0; + out_3177263273874987825[106] = 0.0; + out_3177263273874987825[107] = 0.0; + out_3177263273874987825[108] = 0.0; + out_3177263273874987825[109] = 0.0; + out_3177263273874987825[110] = 0.0; + out_3177263273874987825[111] = 0.0; + out_3177263273874987825[112] = 0.0; + out_3177263273874987825[113] = 0.0; + out_3177263273874987825[114] = 1.0; + out_3177263273874987825[115] = 0.0; + out_3177263273874987825[116] = 0.0; + out_3177263273874987825[117] = 0.0; + out_3177263273874987825[118] = 0.0; + out_3177263273874987825[119] = 0.0; + out_3177263273874987825[120] = 0.0; + out_3177263273874987825[121] = 0.0; + out_3177263273874987825[122] = 0.0; + out_3177263273874987825[123] = 0.0; + out_3177263273874987825[124] = 0.0; + out_3177263273874987825[125] = 0.0; + out_3177263273874987825[126] = 0.0; + out_3177263273874987825[127] = 0.0; + out_3177263273874987825[128] = 0.0; + out_3177263273874987825[129] = 0.0; + out_3177263273874987825[130] = 0.0; + out_3177263273874987825[131] = 0.0; + out_3177263273874987825[132] = 0.0; + out_3177263273874987825[133] = 1.0; + out_3177263273874987825[134] = 0.0; + out_3177263273874987825[135] = 0.0; + out_3177263273874987825[136] = 0.0; + out_3177263273874987825[137] = 0.0; + out_3177263273874987825[138] = 0.0; + out_3177263273874987825[139] = 0.0; + out_3177263273874987825[140] = 0.0; + out_3177263273874987825[141] = 0.0; + out_3177263273874987825[142] = 0.0; + out_3177263273874987825[143] = 0.0; + out_3177263273874987825[144] = 0.0; + out_3177263273874987825[145] = 0.0; + out_3177263273874987825[146] = 0.0; + out_3177263273874987825[147] = 0.0; + out_3177263273874987825[148] = 0.0; + out_3177263273874987825[149] = 0.0; + out_3177263273874987825[150] = 0.0; + out_3177263273874987825[151] = 0.0; + out_3177263273874987825[152] = 1.0; + out_3177263273874987825[153] = 0.0; + out_3177263273874987825[154] = 0.0; + out_3177263273874987825[155] = 0.0; + out_3177263273874987825[156] = 0.0; + out_3177263273874987825[157] = 0.0; + out_3177263273874987825[158] = 0.0; + out_3177263273874987825[159] = 0.0; + out_3177263273874987825[160] = 0.0; + out_3177263273874987825[161] = 0.0; + out_3177263273874987825[162] = 0.0; + out_3177263273874987825[163] = 0.0; + out_3177263273874987825[164] = 0.0; + out_3177263273874987825[165] = 0.0; + out_3177263273874987825[166] = 0.0; + out_3177263273874987825[167] = 0.0; + out_3177263273874987825[168] = 0.0; + out_3177263273874987825[169] = 0.0; + out_3177263273874987825[170] = 0.0; + out_3177263273874987825[171] = 1.0; + out_3177263273874987825[172] = 0.0; + out_3177263273874987825[173] = 0.0; + out_3177263273874987825[174] = 0.0; + out_3177263273874987825[175] = 0.0; + out_3177263273874987825[176] = 0.0; + out_3177263273874987825[177] = 0.0; + out_3177263273874987825[178] = 0.0; + out_3177263273874987825[179] = 0.0; + out_3177263273874987825[180] = 0.0; + out_3177263273874987825[181] = 0.0; + out_3177263273874987825[182] = 0.0; + out_3177263273874987825[183] = 0.0; + out_3177263273874987825[184] = 0.0; + out_3177263273874987825[185] = 0.0; + out_3177263273874987825[186] = 0.0; + out_3177263273874987825[187] = 0.0; + out_3177263273874987825[188] = 0.0; + out_3177263273874987825[189] = 0.0; + out_3177263273874987825[190] = 1.0; + out_3177263273874987825[191] = 0.0; + out_3177263273874987825[192] = 0.0; + out_3177263273874987825[193] = 0.0; + out_3177263273874987825[194] = 0.0; + out_3177263273874987825[195] = 0.0; + out_3177263273874987825[196] = 0.0; + out_3177263273874987825[197] = 0.0; + out_3177263273874987825[198] = 0.0; + out_3177263273874987825[199] = 0.0; + out_3177263273874987825[200] = 0.0; + out_3177263273874987825[201] = 0.0; + out_3177263273874987825[202] = 0.0; + out_3177263273874987825[203] = 0.0; + out_3177263273874987825[204] = 0.0; + out_3177263273874987825[205] = 0.0; + out_3177263273874987825[206] = 0.0; + out_3177263273874987825[207] = 0.0; + out_3177263273874987825[208] = 0.0; + out_3177263273874987825[209] = 1.0; + out_3177263273874987825[210] = 0.0; + out_3177263273874987825[211] = 0.0; + out_3177263273874987825[212] = 0.0; + out_3177263273874987825[213] = 0.0; + out_3177263273874987825[214] = 0.0; + out_3177263273874987825[215] = 0.0; + out_3177263273874987825[216] = 0.0; + out_3177263273874987825[217] = 0.0; + out_3177263273874987825[218] = 0.0; + out_3177263273874987825[219] = 0.0; + out_3177263273874987825[220] = 0.0; + out_3177263273874987825[221] = 0.0; + out_3177263273874987825[222] = 0.0; + out_3177263273874987825[223] = 0.0; + out_3177263273874987825[224] = 0.0; + out_3177263273874987825[225] = 0.0; + out_3177263273874987825[226] = 0.0; + out_3177263273874987825[227] = 0.0; + out_3177263273874987825[228] = 1.0; + out_3177263273874987825[229] = 0.0; + out_3177263273874987825[230] = 0.0; + out_3177263273874987825[231] = 0.0; + out_3177263273874987825[232] = 0.0; + out_3177263273874987825[233] = 0.0; + out_3177263273874987825[234] = 0.0; + out_3177263273874987825[235] = 0.0; + out_3177263273874987825[236] = 0.0; + out_3177263273874987825[237] = 0.0; + out_3177263273874987825[238] = 0.0; + out_3177263273874987825[239] = 0.0; + out_3177263273874987825[240] = 0.0; + out_3177263273874987825[241] = 0.0; + out_3177263273874987825[242] = 0.0; + out_3177263273874987825[243] = 0.0; + out_3177263273874987825[244] = 0.0; + out_3177263273874987825[245] = 0.0; + out_3177263273874987825[246] = 0.0; + out_3177263273874987825[247] = 1.0; + out_3177263273874987825[248] = 0.0; + out_3177263273874987825[249] = 0.0; + out_3177263273874987825[250] = 0.0; + out_3177263273874987825[251] = 0.0; + out_3177263273874987825[252] = 0.0; + out_3177263273874987825[253] = 0.0; + out_3177263273874987825[254] = 0.0; + out_3177263273874987825[255] = 0.0; + out_3177263273874987825[256] = 0.0; + out_3177263273874987825[257] = 0.0; + out_3177263273874987825[258] = 0.0; + out_3177263273874987825[259] = 0.0; + out_3177263273874987825[260] = 0.0; + out_3177263273874987825[261] = 0.0; + out_3177263273874987825[262] = 0.0; + out_3177263273874987825[263] = 0.0; + out_3177263273874987825[264] = 0.0; + out_3177263273874987825[265] = 0.0; + out_3177263273874987825[266] = 1.0; + out_3177263273874987825[267] = 0.0; + out_3177263273874987825[268] = 0.0; + out_3177263273874987825[269] = 0.0; + out_3177263273874987825[270] = 0.0; + out_3177263273874987825[271] = 0.0; + out_3177263273874987825[272] = 0.0; + out_3177263273874987825[273] = 0.0; + out_3177263273874987825[274] = 0.0; + out_3177263273874987825[275] = 0.0; + out_3177263273874987825[276] = 0.0; + out_3177263273874987825[277] = 0.0; + out_3177263273874987825[278] = 0.0; + out_3177263273874987825[279] = 0.0; + out_3177263273874987825[280] = 0.0; + out_3177263273874987825[281] = 0.0; + out_3177263273874987825[282] = 0.0; + out_3177263273874987825[283] = 0.0; + out_3177263273874987825[284] = 0.0; + out_3177263273874987825[285] = 1.0; + out_3177263273874987825[286] = 0.0; + out_3177263273874987825[287] = 0.0; + out_3177263273874987825[288] = 0.0; + out_3177263273874987825[289] = 0.0; + out_3177263273874987825[290] = 0.0; + out_3177263273874987825[291] = 0.0; + out_3177263273874987825[292] = 0.0; + out_3177263273874987825[293] = 0.0; + out_3177263273874987825[294] = 0.0; + out_3177263273874987825[295] = 0.0; + out_3177263273874987825[296] = 0.0; + out_3177263273874987825[297] = 0.0; + out_3177263273874987825[298] = 0.0; + out_3177263273874987825[299] = 0.0; + out_3177263273874987825[300] = 0.0; + out_3177263273874987825[301] = 0.0; + out_3177263273874987825[302] = 0.0; + out_3177263273874987825[303] = 0.0; + out_3177263273874987825[304] = 1.0; + out_3177263273874987825[305] = 0.0; + out_3177263273874987825[306] = 0.0; + out_3177263273874987825[307] = 0.0; + out_3177263273874987825[308] = 0.0; + out_3177263273874987825[309] = 0.0; + out_3177263273874987825[310] = 0.0; + out_3177263273874987825[311] = 0.0; + out_3177263273874987825[312] = 0.0; + out_3177263273874987825[313] = 0.0; + out_3177263273874987825[314] = 0.0; + out_3177263273874987825[315] = 0.0; + out_3177263273874987825[316] = 0.0; + out_3177263273874987825[317] = 0.0; + out_3177263273874987825[318] = 0.0; + out_3177263273874987825[319] = 0.0; + out_3177263273874987825[320] = 0.0; + out_3177263273874987825[321] = 0.0; + out_3177263273874987825[322] = 0.0; + out_3177263273874987825[323] = 1.0; } -void f_fun(double *state, double dt, double *out_8436412409497388657) { - out_8436412409497388657[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_8436412409497388657[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_8436412409497388657[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_8436412409497388657[3] = dt*state[12] + state[3]; - out_8436412409497388657[4] = dt*state[13] + state[4]; - out_8436412409497388657[5] = dt*state[14] + state[5]; - out_8436412409497388657[6] = state[6]; - out_8436412409497388657[7] = state[7]; - out_8436412409497388657[8] = state[8]; - out_8436412409497388657[9] = state[9]; - out_8436412409497388657[10] = state[10]; - out_8436412409497388657[11] = state[11]; - out_8436412409497388657[12] = state[12]; - out_8436412409497388657[13] = state[13]; - out_8436412409497388657[14] = state[14]; - out_8436412409497388657[15] = state[15]; - out_8436412409497388657[16] = state[16]; - out_8436412409497388657[17] = state[17]; +void f_fun(double *state, double dt, double *out_691237182481573573) { + out_691237182481573573[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_691237182481573573[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_691237182481573573[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_691237182481573573[3] = dt*state[12] + state[3]; + out_691237182481573573[4] = dt*state[13] + state[4]; + out_691237182481573573[5] = dt*state[14] + state[5]; + out_691237182481573573[6] = state[6]; + out_691237182481573573[7] = state[7]; + out_691237182481573573[8] = state[8]; + out_691237182481573573[9] = state[9]; + out_691237182481573573[10] = state[10]; + out_691237182481573573[11] = state[11]; + out_691237182481573573[12] = state[12]; + out_691237182481573573[13] = state[13]; + out_691237182481573573[14] = state[14]; + out_691237182481573573[15] = state[15]; + out_691237182481573573[16] = state[16]; + out_691237182481573573[17] = state[17]; } -void F_fun(double *state, double dt, double *out_7299824336461252759) { - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[2] = 0; - out_7299824336461252759[3] = 0; - out_7299824336461252759[4] = 0; - out_7299824336461252759[5] = 0; - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[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_7299824336461252759[9] = 0; - out_7299824336461252759[10] = 0; - out_7299824336461252759[11] = 0; - out_7299824336461252759[12] = 0; - out_7299824336461252759[13] = 0; - out_7299824336461252759[14] = 0; - out_7299824336461252759[15] = 0; - out_7299824336461252759[16] = 0; - out_7299824336461252759[17] = 0; - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[20] = 0; - out_7299824336461252759[21] = 0; - out_7299824336461252759[22] = 0; - out_7299824336461252759[23] = 0; - out_7299824336461252759[24] = 0; - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[27] = 0; - out_7299824336461252759[28] = 0; - out_7299824336461252759[29] = 0; - out_7299824336461252759[30] = 0; - out_7299824336461252759[31] = 0; - out_7299824336461252759[32] = 0; - out_7299824336461252759[33] = 0; - out_7299824336461252759[34] = 0; - out_7299824336461252759[35] = 0; - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[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_7299824336461252759[39] = 0; - out_7299824336461252759[40] = 0; - out_7299824336461252759[41] = 0; - out_7299824336461252759[42] = 0; - out_7299824336461252759[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_7299824336461252759[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_7299824336461252759[45] = 0; - out_7299824336461252759[46] = 0; - out_7299824336461252759[47] = 0; - out_7299824336461252759[48] = 0; - out_7299824336461252759[49] = 0; - out_7299824336461252759[50] = 0; - out_7299824336461252759[51] = 0; - out_7299824336461252759[52] = 0; - out_7299824336461252759[53] = 0; - out_7299824336461252759[54] = 0; - out_7299824336461252759[55] = 0; - out_7299824336461252759[56] = 0; - out_7299824336461252759[57] = 1; - out_7299824336461252759[58] = 0; - out_7299824336461252759[59] = 0; - out_7299824336461252759[60] = 0; - out_7299824336461252759[61] = 0; - out_7299824336461252759[62] = 0; - out_7299824336461252759[63] = 0; - out_7299824336461252759[64] = 0; - out_7299824336461252759[65] = 0; - out_7299824336461252759[66] = dt; - out_7299824336461252759[67] = 0; - out_7299824336461252759[68] = 0; - out_7299824336461252759[69] = 0; - out_7299824336461252759[70] = 0; - out_7299824336461252759[71] = 0; - out_7299824336461252759[72] = 0; - out_7299824336461252759[73] = 0; - out_7299824336461252759[74] = 0; - out_7299824336461252759[75] = 0; - out_7299824336461252759[76] = 1; - out_7299824336461252759[77] = 0; - out_7299824336461252759[78] = 0; - out_7299824336461252759[79] = 0; - out_7299824336461252759[80] = 0; - out_7299824336461252759[81] = 0; - out_7299824336461252759[82] = 0; - out_7299824336461252759[83] = 0; - out_7299824336461252759[84] = 0; - out_7299824336461252759[85] = dt; - out_7299824336461252759[86] = 0; - out_7299824336461252759[87] = 0; - out_7299824336461252759[88] = 0; - out_7299824336461252759[89] = 0; - out_7299824336461252759[90] = 0; - out_7299824336461252759[91] = 0; - out_7299824336461252759[92] = 0; - out_7299824336461252759[93] = 0; - out_7299824336461252759[94] = 0; - out_7299824336461252759[95] = 1; - out_7299824336461252759[96] = 0; - out_7299824336461252759[97] = 0; - out_7299824336461252759[98] = 0; - out_7299824336461252759[99] = 0; - out_7299824336461252759[100] = 0; - out_7299824336461252759[101] = 0; - out_7299824336461252759[102] = 0; - out_7299824336461252759[103] = 0; - out_7299824336461252759[104] = dt; - out_7299824336461252759[105] = 0; - out_7299824336461252759[106] = 0; - out_7299824336461252759[107] = 0; - out_7299824336461252759[108] = 0; - out_7299824336461252759[109] = 0; - out_7299824336461252759[110] = 0; - out_7299824336461252759[111] = 0; - out_7299824336461252759[112] = 0; - out_7299824336461252759[113] = 0; - out_7299824336461252759[114] = 1; - out_7299824336461252759[115] = 0; - out_7299824336461252759[116] = 0; - out_7299824336461252759[117] = 0; - out_7299824336461252759[118] = 0; - out_7299824336461252759[119] = 0; - out_7299824336461252759[120] = 0; - out_7299824336461252759[121] = 0; - out_7299824336461252759[122] = 0; - out_7299824336461252759[123] = 0; - out_7299824336461252759[124] = 0; - out_7299824336461252759[125] = 0; - out_7299824336461252759[126] = 0; - out_7299824336461252759[127] = 0; - out_7299824336461252759[128] = 0; - out_7299824336461252759[129] = 0; - out_7299824336461252759[130] = 0; - out_7299824336461252759[131] = 0; - out_7299824336461252759[132] = 0; - out_7299824336461252759[133] = 1; - out_7299824336461252759[134] = 0; - out_7299824336461252759[135] = 0; - out_7299824336461252759[136] = 0; - out_7299824336461252759[137] = 0; - out_7299824336461252759[138] = 0; - out_7299824336461252759[139] = 0; - out_7299824336461252759[140] = 0; - out_7299824336461252759[141] = 0; - out_7299824336461252759[142] = 0; - out_7299824336461252759[143] = 0; - out_7299824336461252759[144] = 0; - out_7299824336461252759[145] = 0; - out_7299824336461252759[146] = 0; - out_7299824336461252759[147] = 0; - out_7299824336461252759[148] = 0; - out_7299824336461252759[149] = 0; - out_7299824336461252759[150] = 0; - out_7299824336461252759[151] = 0; - out_7299824336461252759[152] = 1; - out_7299824336461252759[153] = 0; - out_7299824336461252759[154] = 0; - out_7299824336461252759[155] = 0; - out_7299824336461252759[156] = 0; - out_7299824336461252759[157] = 0; - out_7299824336461252759[158] = 0; - out_7299824336461252759[159] = 0; - out_7299824336461252759[160] = 0; - out_7299824336461252759[161] = 0; - out_7299824336461252759[162] = 0; - out_7299824336461252759[163] = 0; - out_7299824336461252759[164] = 0; - out_7299824336461252759[165] = 0; - out_7299824336461252759[166] = 0; - out_7299824336461252759[167] = 0; - out_7299824336461252759[168] = 0; - out_7299824336461252759[169] = 0; - out_7299824336461252759[170] = 0; - out_7299824336461252759[171] = 1; - out_7299824336461252759[172] = 0; - out_7299824336461252759[173] = 0; - out_7299824336461252759[174] = 0; - out_7299824336461252759[175] = 0; - out_7299824336461252759[176] = 0; - out_7299824336461252759[177] = 0; - out_7299824336461252759[178] = 0; - out_7299824336461252759[179] = 0; - out_7299824336461252759[180] = 0; - out_7299824336461252759[181] = 0; - out_7299824336461252759[182] = 0; - out_7299824336461252759[183] = 0; - out_7299824336461252759[184] = 0; - out_7299824336461252759[185] = 0; - out_7299824336461252759[186] = 0; - out_7299824336461252759[187] = 0; - out_7299824336461252759[188] = 0; - out_7299824336461252759[189] = 0; - out_7299824336461252759[190] = 1; - out_7299824336461252759[191] = 0; - out_7299824336461252759[192] = 0; - out_7299824336461252759[193] = 0; - out_7299824336461252759[194] = 0; - out_7299824336461252759[195] = 0; - out_7299824336461252759[196] = 0; - out_7299824336461252759[197] = 0; - out_7299824336461252759[198] = 0; - out_7299824336461252759[199] = 0; - out_7299824336461252759[200] = 0; - out_7299824336461252759[201] = 0; - out_7299824336461252759[202] = 0; - out_7299824336461252759[203] = 0; - out_7299824336461252759[204] = 0; - out_7299824336461252759[205] = 0; - out_7299824336461252759[206] = 0; - out_7299824336461252759[207] = 0; - out_7299824336461252759[208] = 0; - out_7299824336461252759[209] = 1; - out_7299824336461252759[210] = 0; - out_7299824336461252759[211] = 0; - out_7299824336461252759[212] = 0; - out_7299824336461252759[213] = 0; - out_7299824336461252759[214] = 0; - out_7299824336461252759[215] = 0; - out_7299824336461252759[216] = 0; - out_7299824336461252759[217] = 0; - out_7299824336461252759[218] = 0; - out_7299824336461252759[219] = 0; - out_7299824336461252759[220] = 0; - out_7299824336461252759[221] = 0; - out_7299824336461252759[222] = 0; - out_7299824336461252759[223] = 0; - out_7299824336461252759[224] = 0; - out_7299824336461252759[225] = 0; - out_7299824336461252759[226] = 0; - out_7299824336461252759[227] = 0; - out_7299824336461252759[228] = 1; - out_7299824336461252759[229] = 0; - out_7299824336461252759[230] = 0; - out_7299824336461252759[231] = 0; - out_7299824336461252759[232] = 0; - out_7299824336461252759[233] = 0; - out_7299824336461252759[234] = 0; - out_7299824336461252759[235] = 0; - out_7299824336461252759[236] = 0; - out_7299824336461252759[237] = 0; - out_7299824336461252759[238] = 0; - out_7299824336461252759[239] = 0; - out_7299824336461252759[240] = 0; - out_7299824336461252759[241] = 0; - out_7299824336461252759[242] = 0; - out_7299824336461252759[243] = 0; - out_7299824336461252759[244] = 0; - out_7299824336461252759[245] = 0; - out_7299824336461252759[246] = 0; - out_7299824336461252759[247] = 1; - out_7299824336461252759[248] = 0; - out_7299824336461252759[249] = 0; - out_7299824336461252759[250] = 0; - out_7299824336461252759[251] = 0; - out_7299824336461252759[252] = 0; - out_7299824336461252759[253] = 0; - out_7299824336461252759[254] = 0; - out_7299824336461252759[255] = 0; - out_7299824336461252759[256] = 0; - out_7299824336461252759[257] = 0; - out_7299824336461252759[258] = 0; - out_7299824336461252759[259] = 0; - out_7299824336461252759[260] = 0; - out_7299824336461252759[261] = 0; - out_7299824336461252759[262] = 0; - out_7299824336461252759[263] = 0; - out_7299824336461252759[264] = 0; - out_7299824336461252759[265] = 0; - out_7299824336461252759[266] = 1; - out_7299824336461252759[267] = 0; - out_7299824336461252759[268] = 0; - out_7299824336461252759[269] = 0; - out_7299824336461252759[270] = 0; - out_7299824336461252759[271] = 0; - out_7299824336461252759[272] = 0; - out_7299824336461252759[273] = 0; - out_7299824336461252759[274] = 0; - out_7299824336461252759[275] = 0; - out_7299824336461252759[276] = 0; - out_7299824336461252759[277] = 0; - out_7299824336461252759[278] = 0; - out_7299824336461252759[279] = 0; - out_7299824336461252759[280] = 0; - out_7299824336461252759[281] = 0; - out_7299824336461252759[282] = 0; - out_7299824336461252759[283] = 0; - out_7299824336461252759[284] = 0; - out_7299824336461252759[285] = 1; - out_7299824336461252759[286] = 0; - out_7299824336461252759[287] = 0; - out_7299824336461252759[288] = 0; - out_7299824336461252759[289] = 0; - out_7299824336461252759[290] = 0; - out_7299824336461252759[291] = 0; - out_7299824336461252759[292] = 0; - out_7299824336461252759[293] = 0; - out_7299824336461252759[294] = 0; - out_7299824336461252759[295] = 0; - out_7299824336461252759[296] = 0; - out_7299824336461252759[297] = 0; - out_7299824336461252759[298] = 0; - out_7299824336461252759[299] = 0; - out_7299824336461252759[300] = 0; - out_7299824336461252759[301] = 0; - out_7299824336461252759[302] = 0; - out_7299824336461252759[303] = 0; - out_7299824336461252759[304] = 1; - out_7299824336461252759[305] = 0; - out_7299824336461252759[306] = 0; - out_7299824336461252759[307] = 0; - out_7299824336461252759[308] = 0; - out_7299824336461252759[309] = 0; - out_7299824336461252759[310] = 0; - out_7299824336461252759[311] = 0; - out_7299824336461252759[312] = 0; - out_7299824336461252759[313] = 0; - out_7299824336461252759[314] = 0; - out_7299824336461252759[315] = 0; - out_7299824336461252759[316] = 0; - out_7299824336461252759[317] = 0; - out_7299824336461252759[318] = 0; - out_7299824336461252759[319] = 0; - out_7299824336461252759[320] = 0; - out_7299824336461252759[321] = 0; - out_7299824336461252759[322] = 0; - out_7299824336461252759[323] = 1; +void F_fun(double *state, double dt, double *out_5721468400791985323) { + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[2] = 0; + out_5721468400791985323[3] = 0; + out_5721468400791985323[4] = 0; + out_5721468400791985323[5] = 0; + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[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_5721468400791985323[9] = 0; + out_5721468400791985323[10] = 0; + out_5721468400791985323[11] = 0; + out_5721468400791985323[12] = 0; + out_5721468400791985323[13] = 0; + out_5721468400791985323[14] = 0; + out_5721468400791985323[15] = 0; + out_5721468400791985323[16] = 0; + out_5721468400791985323[17] = 0; + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[20] = 0; + out_5721468400791985323[21] = 0; + out_5721468400791985323[22] = 0; + out_5721468400791985323[23] = 0; + out_5721468400791985323[24] = 0; + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[27] = 0; + out_5721468400791985323[28] = 0; + out_5721468400791985323[29] = 0; + out_5721468400791985323[30] = 0; + out_5721468400791985323[31] = 0; + out_5721468400791985323[32] = 0; + out_5721468400791985323[33] = 0; + out_5721468400791985323[34] = 0; + out_5721468400791985323[35] = 0; + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[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_5721468400791985323[39] = 0; + out_5721468400791985323[40] = 0; + out_5721468400791985323[41] = 0; + out_5721468400791985323[42] = 0; + out_5721468400791985323[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_5721468400791985323[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_5721468400791985323[45] = 0; + out_5721468400791985323[46] = 0; + out_5721468400791985323[47] = 0; + out_5721468400791985323[48] = 0; + out_5721468400791985323[49] = 0; + out_5721468400791985323[50] = 0; + out_5721468400791985323[51] = 0; + out_5721468400791985323[52] = 0; + out_5721468400791985323[53] = 0; + out_5721468400791985323[54] = 0; + out_5721468400791985323[55] = 0; + out_5721468400791985323[56] = 0; + out_5721468400791985323[57] = 1; + out_5721468400791985323[58] = 0; + out_5721468400791985323[59] = 0; + out_5721468400791985323[60] = 0; + out_5721468400791985323[61] = 0; + out_5721468400791985323[62] = 0; + out_5721468400791985323[63] = 0; + out_5721468400791985323[64] = 0; + out_5721468400791985323[65] = 0; + out_5721468400791985323[66] = dt; + out_5721468400791985323[67] = 0; + out_5721468400791985323[68] = 0; + out_5721468400791985323[69] = 0; + out_5721468400791985323[70] = 0; + out_5721468400791985323[71] = 0; + out_5721468400791985323[72] = 0; + out_5721468400791985323[73] = 0; + out_5721468400791985323[74] = 0; + out_5721468400791985323[75] = 0; + out_5721468400791985323[76] = 1; + out_5721468400791985323[77] = 0; + out_5721468400791985323[78] = 0; + out_5721468400791985323[79] = 0; + out_5721468400791985323[80] = 0; + out_5721468400791985323[81] = 0; + out_5721468400791985323[82] = 0; + out_5721468400791985323[83] = 0; + out_5721468400791985323[84] = 0; + out_5721468400791985323[85] = dt; + out_5721468400791985323[86] = 0; + out_5721468400791985323[87] = 0; + out_5721468400791985323[88] = 0; + out_5721468400791985323[89] = 0; + out_5721468400791985323[90] = 0; + out_5721468400791985323[91] = 0; + out_5721468400791985323[92] = 0; + out_5721468400791985323[93] = 0; + out_5721468400791985323[94] = 0; + out_5721468400791985323[95] = 1; + out_5721468400791985323[96] = 0; + out_5721468400791985323[97] = 0; + out_5721468400791985323[98] = 0; + out_5721468400791985323[99] = 0; + out_5721468400791985323[100] = 0; + out_5721468400791985323[101] = 0; + out_5721468400791985323[102] = 0; + out_5721468400791985323[103] = 0; + out_5721468400791985323[104] = dt; + out_5721468400791985323[105] = 0; + out_5721468400791985323[106] = 0; + out_5721468400791985323[107] = 0; + out_5721468400791985323[108] = 0; + out_5721468400791985323[109] = 0; + out_5721468400791985323[110] = 0; + out_5721468400791985323[111] = 0; + out_5721468400791985323[112] = 0; + out_5721468400791985323[113] = 0; + out_5721468400791985323[114] = 1; + out_5721468400791985323[115] = 0; + out_5721468400791985323[116] = 0; + out_5721468400791985323[117] = 0; + out_5721468400791985323[118] = 0; + out_5721468400791985323[119] = 0; + out_5721468400791985323[120] = 0; + out_5721468400791985323[121] = 0; + out_5721468400791985323[122] = 0; + out_5721468400791985323[123] = 0; + out_5721468400791985323[124] = 0; + out_5721468400791985323[125] = 0; + out_5721468400791985323[126] = 0; + out_5721468400791985323[127] = 0; + out_5721468400791985323[128] = 0; + out_5721468400791985323[129] = 0; + out_5721468400791985323[130] = 0; + out_5721468400791985323[131] = 0; + out_5721468400791985323[132] = 0; + out_5721468400791985323[133] = 1; + out_5721468400791985323[134] = 0; + out_5721468400791985323[135] = 0; + out_5721468400791985323[136] = 0; + out_5721468400791985323[137] = 0; + out_5721468400791985323[138] = 0; + out_5721468400791985323[139] = 0; + out_5721468400791985323[140] = 0; + out_5721468400791985323[141] = 0; + out_5721468400791985323[142] = 0; + out_5721468400791985323[143] = 0; + out_5721468400791985323[144] = 0; + out_5721468400791985323[145] = 0; + out_5721468400791985323[146] = 0; + out_5721468400791985323[147] = 0; + out_5721468400791985323[148] = 0; + out_5721468400791985323[149] = 0; + out_5721468400791985323[150] = 0; + out_5721468400791985323[151] = 0; + out_5721468400791985323[152] = 1; + out_5721468400791985323[153] = 0; + out_5721468400791985323[154] = 0; + out_5721468400791985323[155] = 0; + out_5721468400791985323[156] = 0; + out_5721468400791985323[157] = 0; + out_5721468400791985323[158] = 0; + out_5721468400791985323[159] = 0; + out_5721468400791985323[160] = 0; + out_5721468400791985323[161] = 0; + out_5721468400791985323[162] = 0; + out_5721468400791985323[163] = 0; + out_5721468400791985323[164] = 0; + out_5721468400791985323[165] = 0; + out_5721468400791985323[166] = 0; + out_5721468400791985323[167] = 0; + out_5721468400791985323[168] = 0; + out_5721468400791985323[169] = 0; + out_5721468400791985323[170] = 0; + out_5721468400791985323[171] = 1; + out_5721468400791985323[172] = 0; + out_5721468400791985323[173] = 0; + out_5721468400791985323[174] = 0; + out_5721468400791985323[175] = 0; + out_5721468400791985323[176] = 0; + out_5721468400791985323[177] = 0; + out_5721468400791985323[178] = 0; + out_5721468400791985323[179] = 0; + out_5721468400791985323[180] = 0; + out_5721468400791985323[181] = 0; + out_5721468400791985323[182] = 0; + out_5721468400791985323[183] = 0; + out_5721468400791985323[184] = 0; + out_5721468400791985323[185] = 0; + out_5721468400791985323[186] = 0; + out_5721468400791985323[187] = 0; + out_5721468400791985323[188] = 0; + out_5721468400791985323[189] = 0; + out_5721468400791985323[190] = 1; + out_5721468400791985323[191] = 0; + out_5721468400791985323[192] = 0; + out_5721468400791985323[193] = 0; + out_5721468400791985323[194] = 0; + out_5721468400791985323[195] = 0; + out_5721468400791985323[196] = 0; + out_5721468400791985323[197] = 0; + out_5721468400791985323[198] = 0; + out_5721468400791985323[199] = 0; + out_5721468400791985323[200] = 0; + out_5721468400791985323[201] = 0; + out_5721468400791985323[202] = 0; + out_5721468400791985323[203] = 0; + out_5721468400791985323[204] = 0; + out_5721468400791985323[205] = 0; + out_5721468400791985323[206] = 0; + out_5721468400791985323[207] = 0; + out_5721468400791985323[208] = 0; + out_5721468400791985323[209] = 1; + out_5721468400791985323[210] = 0; + out_5721468400791985323[211] = 0; + out_5721468400791985323[212] = 0; + out_5721468400791985323[213] = 0; + out_5721468400791985323[214] = 0; + out_5721468400791985323[215] = 0; + out_5721468400791985323[216] = 0; + out_5721468400791985323[217] = 0; + out_5721468400791985323[218] = 0; + out_5721468400791985323[219] = 0; + out_5721468400791985323[220] = 0; + out_5721468400791985323[221] = 0; + out_5721468400791985323[222] = 0; + out_5721468400791985323[223] = 0; + out_5721468400791985323[224] = 0; + out_5721468400791985323[225] = 0; + out_5721468400791985323[226] = 0; + out_5721468400791985323[227] = 0; + out_5721468400791985323[228] = 1; + out_5721468400791985323[229] = 0; + out_5721468400791985323[230] = 0; + out_5721468400791985323[231] = 0; + out_5721468400791985323[232] = 0; + out_5721468400791985323[233] = 0; + out_5721468400791985323[234] = 0; + out_5721468400791985323[235] = 0; + out_5721468400791985323[236] = 0; + out_5721468400791985323[237] = 0; + out_5721468400791985323[238] = 0; + out_5721468400791985323[239] = 0; + out_5721468400791985323[240] = 0; + out_5721468400791985323[241] = 0; + out_5721468400791985323[242] = 0; + out_5721468400791985323[243] = 0; + out_5721468400791985323[244] = 0; + out_5721468400791985323[245] = 0; + out_5721468400791985323[246] = 0; + out_5721468400791985323[247] = 1; + out_5721468400791985323[248] = 0; + out_5721468400791985323[249] = 0; + out_5721468400791985323[250] = 0; + out_5721468400791985323[251] = 0; + out_5721468400791985323[252] = 0; + out_5721468400791985323[253] = 0; + out_5721468400791985323[254] = 0; + out_5721468400791985323[255] = 0; + out_5721468400791985323[256] = 0; + out_5721468400791985323[257] = 0; + out_5721468400791985323[258] = 0; + out_5721468400791985323[259] = 0; + out_5721468400791985323[260] = 0; + out_5721468400791985323[261] = 0; + out_5721468400791985323[262] = 0; + out_5721468400791985323[263] = 0; + out_5721468400791985323[264] = 0; + out_5721468400791985323[265] = 0; + out_5721468400791985323[266] = 1; + out_5721468400791985323[267] = 0; + out_5721468400791985323[268] = 0; + out_5721468400791985323[269] = 0; + out_5721468400791985323[270] = 0; + out_5721468400791985323[271] = 0; + out_5721468400791985323[272] = 0; + out_5721468400791985323[273] = 0; + out_5721468400791985323[274] = 0; + out_5721468400791985323[275] = 0; + out_5721468400791985323[276] = 0; + out_5721468400791985323[277] = 0; + out_5721468400791985323[278] = 0; + out_5721468400791985323[279] = 0; + out_5721468400791985323[280] = 0; + out_5721468400791985323[281] = 0; + out_5721468400791985323[282] = 0; + out_5721468400791985323[283] = 0; + out_5721468400791985323[284] = 0; + out_5721468400791985323[285] = 1; + out_5721468400791985323[286] = 0; + out_5721468400791985323[287] = 0; + out_5721468400791985323[288] = 0; + out_5721468400791985323[289] = 0; + out_5721468400791985323[290] = 0; + out_5721468400791985323[291] = 0; + out_5721468400791985323[292] = 0; + out_5721468400791985323[293] = 0; + out_5721468400791985323[294] = 0; + out_5721468400791985323[295] = 0; + out_5721468400791985323[296] = 0; + out_5721468400791985323[297] = 0; + out_5721468400791985323[298] = 0; + out_5721468400791985323[299] = 0; + out_5721468400791985323[300] = 0; + out_5721468400791985323[301] = 0; + out_5721468400791985323[302] = 0; + out_5721468400791985323[303] = 0; + out_5721468400791985323[304] = 1; + out_5721468400791985323[305] = 0; + out_5721468400791985323[306] = 0; + out_5721468400791985323[307] = 0; + out_5721468400791985323[308] = 0; + out_5721468400791985323[309] = 0; + out_5721468400791985323[310] = 0; + out_5721468400791985323[311] = 0; + out_5721468400791985323[312] = 0; + out_5721468400791985323[313] = 0; + out_5721468400791985323[314] = 0; + out_5721468400791985323[315] = 0; + out_5721468400791985323[316] = 0; + out_5721468400791985323[317] = 0; + out_5721468400791985323[318] = 0; + out_5721468400791985323[319] = 0; + out_5721468400791985323[320] = 0; + out_5721468400791985323[321] = 0; + out_5721468400791985323[322] = 0; + out_5721468400791985323[323] = 1; } -void h_4(double *state, double *unused, double *out_6774107777547476022) { - out_6774107777547476022[0] = state[6] + state[9]; - out_6774107777547476022[1] = state[7] + state[10]; - out_6774107777547476022[2] = state[8] + state[11]; +void h_4(double *state, double *unused, double *out_3930645532014992442) { + out_3930645532014992442[0] = state[6] + state[9]; + out_3930645532014992442[1] = state[7] + state[10]; + out_3930645532014992442[2] = state[8] + state[11]; } -void H_4(double *state, double *unused, double *out_1025057040572079440) { - out_1025057040572079440[0] = 0; - out_1025057040572079440[1] = 0; - out_1025057040572079440[2] = 0; - out_1025057040572079440[3] = 0; - out_1025057040572079440[4] = 0; - out_1025057040572079440[5] = 0; - out_1025057040572079440[6] = 1; - out_1025057040572079440[7] = 0; - out_1025057040572079440[8] = 0; - out_1025057040572079440[9] = 1; - out_1025057040572079440[10] = 0; - out_1025057040572079440[11] = 0; - out_1025057040572079440[12] = 0; - out_1025057040572079440[13] = 0; - out_1025057040572079440[14] = 0; - out_1025057040572079440[15] = 0; - out_1025057040572079440[16] = 0; - out_1025057040572079440[17] = 0; - out_1025057040572079440[18] = 0; - out_1025057040572079440[19] = 0; - out_1025057040572079440[20] = 0; - out_1025057040572079440[21] = 0; - out_1025057040572079440[22] = 0; - out_1025057040572079440[23] = 0; - out_1025057040572079440[24] = 0; - out_1025057040572079440[25] = 1; - out_1025057040572079440[26] = 0; - out_1025057040572079440[27] = 0; - out_1025057040572079440[28] = 1; - out_1025057040572079440[29] = 0; - out_1025057040572079440[30] = 0; - out_1025057040572079440[31] = 0; - out_1025057040572079440[32] = 0; - out_1025057040572079440[33] = 0; - out_1025057040572079440[34] = 0; - out_1025057040572079440[35] = 0; - out_1025057040572079440[36] = 0; - out_1025057040572079440[37] = 0; - out_1025057040572079440[38] = 0; - out_1025057040572079440[39] = 0; - out_1025057040572079440[40] = 0; - out_1025057040572079440[41] = 0; - out_1025057040572079440[42] = 0; - out_1025057040572079440[43] = 0; - out_1025057040572079440[44] = 1; - out_1025057040572079440[45] = 0; - out_1025057040572079440[46] = 0; - out_1025057040572079440[47] = 1; - out_1025057040572079440[48] = 0; - out_1025057040572079440[49] = 0; - out_1025057040572079440[50] = 0; - out_1025057040572079440[51] = 0; - out_1025057040572079440[52] = 0; - out_1025057040572079440[53] = 0; +void H_4(double *state, double *unused, double *out_1979315791992089721) { + out_1979315791992089721[0] = 0; + out_1979315791992089721[1] = 0; + out_1979315791992089721[2] = 0; + out_1979315791992089721[3] = 0; + out_1979315791992089721[4] = 0; + out_1979315791992089721[5] = 0; + out_1979315791992089721[6] = 1; + out_1979315791992089721[7] = 0; + out_1979315791992089721[8] = 0; + out_1979315791992089721[9] = 1; + out_1979315791992089721[10] = 0; + out_1979315791992089721[11] = 0; + out_1979315791992089721[12] = 0; + out_1979315791992089721[13] = 0; + out_1979315791992089721[14] = 0; + out_1979315791992089721[15] = 0; + out_1979315791992089721[16] = 0; + out_1979315791992089721[17] = 0; + out_1979315791992089721[18] = 0; + out_1979315791992089721[19] = 0; + out_1979315791992089721[20] = 0; + out_1979315791992089721[21] = 0; + out_1979315791992089721[22] = 0; + out_1979315791992089721[23] = 0; + out_1979315791992089721[24] = 0; + out_1979315791992089721[25] = 1; + out_1979315791992089721[26] = 0; + out_1979315791992089721[27] = 0; + out_1979315791992089721[28] = 1; + out_1979315791992089721[29] = 0; + out_1979315791992089721[30] = 0; + out_1979315791992089721[31] = 0; + out_1979315791992089721[32] = 0; + out_1979315791992089721[33] = 0; + out_1979315791992089721[34] = 0; + out_1979315791992089721[35] = 0; + out_1979315791992089721[36] = 0; + out_1979315791992089721[37] = 0; + out_1979315791992089721[38] = 0; + out_1979315791992089721[39] = 0; + out_1979315791992089721[40] = 0; + out_1979315791992089721[41] = 0; + out_1979315791992089721[42] = 0; + out_1979315791992089721[43] = 0; + out_1979315791992089721[44] = 1; + out_1979315791992089721[45] = 0; + out_1979315791992089721[46] = 0; + out_1979315791992089721[47] = 1; + out_1979315791992089721[48] = 0; + out_1979315791992089721[49] = 0; + out_1979315791992089721[50] = 0; + out_1979315791992089721[51] = 0; + out_1979315791992089721[52] = 0; + out_1979315791992089721[53] = 0; } -void h_10(double *state, double *unused, double *out_5889283512516384374) { - out_5889283512516384374[0] = 9.8100000000000005*sin(state[1]) - state[4]*state[8] + state[5]*state[7] + state[12] + state[15]; - out_5889283512516384374[1] = -9.8100000000000005*sin(state[0])*cos(state[1]) + state[3]*state[8] - state[5]*state[6] + state[13] + state[16]; - out_5889283512516384374[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_7266140832989971302) { + out_7266140832989971302[0] = 9.8100000000000005*sin(state[1]) - state[4]*state[8] + state[5]*state[7] + state[12] + state[15]; + out_7266140832989971302[1] = -9.8100000000000005*sin(state[0])*cos(state[1]) + state[3]*state[8] - state[5]*state[6] + state[13] + state[16]; + out_7266140832989971302[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_1898548047416842289) { - out_1898548047416842289[0] = 0; - out_1898548047416842289[1] = 9.8100000000000005*cos(state[1]); - out_1898548047416842289[2] = 0; - out_1898548047416842289[3] = 0; - out_1898548047416842289[4] = -state[8]; - out_1898548047416842289[5] = state[7]; - out_1898548047416842289[6] = 0; - out_1898548047416842289[7] = state[5]; - out_1898548047416842289[8] = -state[4]; - out_1898548047416842289[9] = 0; - out_1898548047416842289[10] = 0; - out_1898548047416842289[11] = 0; - out_1898548047416842289[12] = 1; - out_1898548047416842289[13] = 0; - out_1898548047416842289[14] = 0; - out_1898548047416842289[15] = 1; - out_1898548047416842289[16] = 0; - out_1898548047416842289[17] = 0; - out_1898548047416842289[18] = -9.8100000000000005*cos(state[0])*cos(state[1]); - out_1898548047416842289[19] = 9.8100000000000005*sin(state[0])*sin(state[1]); - out_1898548047416842289[20] = 0; - out_1898548047416842289[21] = state[8]; - out_1898548047416842289[22] = 0; - out_1898548047416842289[23] = -state[6]; - out_1898548047416842289[24] = -state[5]; - out_1898548047416842289[25] = 0; - out_1898548047416842289[26] = state[3]; - out_1898548047416842289[27] = 0; - out_1898548047416842289[28] = 0; - out_1898548047416842289[29] = 0; - out_1898548047416842289[30] = 0; - out_1898548047416842289[31] = 1; - out_1898548047416842289[32] = 0; - out_1898548047416842289[33] = 0; - out_1898548047416842289[34] = 1; - out_1898548047416842289[35] = 0; - out_1898548047416842289[36] = 9.8100000000000005*sin(state[0])*cos(state[1]); - out_1898548047416842289[37] = 9.8100000000000005*sin(state[1])*cos(state[0]); - out_1898548047416842289[38] = 0; - out_1898548047416842289[39] = -state[7]; - out_1898548047416842289[40] = state[6]; - out_1898548047416842289[41] = 0; - out_1898548047416842289[42] = state[4]; - out_1898548047416842289[43] = -state[3]; - out_1898548047416842289[44] = 0; - out_1898548047416842289[45] = 0; - out_1898548047416842289[46] = 0; - out_1898548047416842289[47] = 0; - out_1898548047416842289[48] = 0; - out_1898548047416842289[49] = 0; - out_1898548047416842289[50] = 1; - out_1898548047416842289[51] = 0; - out_1898548047416842289[52] = 0; - out_1898548047416842289[53] = 1; +void H_10(double *state, double *unused, double *out_5742539690088144716) { + out_5742539690088144716[0] = 0; + out_5742539690088144716[1] = 9.8100000000000005*cos(state[1]); + out_5742539690088144716[2] = 0; + out_5742539690088144716[3] = 0; + out_5742539690088144716[4] = -state[8]; + out_5742539690088144716[5] = state[7]; + out_5742539690088144716[6] = 0; + out_5742539690088144716[7] = state[5]; + out_5742539690088144716[8] = -state[4]; + out_5742539690088144716[9] = 0; + out_5742539690088144716[10] = 0; + out_5742539690088144716[11] = 0; + out_5742539690088144716[12] = 1; + out_5742539690088144716[13] = 0; + out_5742539690088144716[14] = 0; + out_5742539690088144716[15] = 1; + out_5742539690088144716[16] = 0; + out_5742539690088144716[17] = 0; + out_5742539690088144716[18] = -9.8100000000000005*cos(state[0])*cos(state[1]); + out_5742539690088144716[19] = 9.8100000000000005*sin(state[0])*sin(state[1]); + out_5742539690088144716[20] = 0; + out_5742539690088144716[21] = state[8]; + out_5742539690088144716[22] = 0; + out_5742539690088144716[23] = -state[6]; + out_5742539690088144716[24] = -state[5]; + out_5742539690088144716[25] = 0; + out_5742539690088144716[26] = state[3]; + out_5742539690088144716[27] = 0; + out_5742539690088144716[28] = 0; + out_5742539690088144716[29] = 0; + out_5742539690088144716[30] = 0; + out_5742539690088144716[31] = 1; + out_5742539690088144716[32] = 0; + out_5742539690088144716[33] = 0; + out_5742539690088144716[34] = 1; + out_5742539690088144716[35] = 0; + out_5742539690088144716[36] = 9.8100000000000005*sin(state[0])*cos(state[1]); + out_5742539690088144716[37] = 9.8100000000000005*sin(state[1])*cos(state[0]); + out_5742539690088144716[38] = 0; + out_5742539690088144716[39] = -state[7]; + out_5742539690088144716[40] = state[6]; + out_5742539690088144716[41] = 0; + out_5742539690088144716[42] = state[4]; + out_5742539690088144716[43] = -state[3]; + out_5742539690088144716[44] = 0; + out_5742539690088144716[45] = 0; + out_5742539690088144716[46] = 0; + out_5742539690088144716[47] = 0; + out_5742539690088144716[48] = 0; + out_5742539690088144716[49] = 0; + out_5742539690088144716[50] = 1; + out_5742539690088144716[51] = 0; + out_5742539690088144716[52] = 0; + out_5742539690088144716[53] = 1; } -void h_13(double *state, double *unused, double *out_2892049699464882933) { - out_2892049699464882933[0] = state[3]; - out_2892049699464882933[1] = state[4]; - out_2892049699464882933[2] = state[5]; +void h_13(double *state, double *unused, double *out_3951674911255468860) { + out_3951674911255468860[0] = state[3]; + out_3951674911255468860[1] = state[4]; + out_3951674911255468860[2] = state[5]; } -void H_13(double *state, double *unused, double *out_2187216784760253361) { - out_2187216784760253361[0] = 0; - out_2187216784760253361[1] = 0; - out_2187216784760253361[2] = 0; - out_2187216784760253361[3] = 1; - out_2187216784760253361[4] = 0; - out_2187216784760253361[5] = 0; - out_2187216784760253361[6] = 0; - out_2187216784760253361[7] = 0; - out_2187216784760253361[8] = 0; - out_2187216784760253361[9] = 0; - out_2187216784760253361[10] = 0; - out_2187216784760253361[11] = 0; - out_2187216784760253361[12] = 0; - out_2187216784760253361[13] = 0; - out_2187216784760253361[14] = 0; - out_2187216784760253361[15] = 0; - out_2187216784760253361[16] = 0; - out_2187216784760253361[17] = 0; - out_2187216784760253361[18] = 0; - out_2187216784760253361[19] = 0; - out_2187216784760253361[20] = 0; - out_2187216784760253361[21] = 0; - out_2187216784760253361[22] = 1; - out_2187216784760253361[23] = 0; - out_2187216784760253361[24] = 0; - out_2187216784760253361[25] = 0; - out_2187216784760253361[26] = 0; - out_2187216784760253361[27] = 0; - out_2187216784760253361[28] = 0; - out_2187216784760253361[29] = 0; - out_2187216784760253361[30] = 0; - out_2187216784760253361[31] = 0; - out_2187216784760253361[32] = 0; - out_2187216784760253361[33] = 0; - out_2187216784760253361[34] = 0; - out_2187216784760253361[35] = 0; - out_2187216784760253361[36] = 0; - out_2187216784760253361[37] = 0; - out_2187216784760253361[38] = 0; - out_2187216784760253361[39] = 0; - out_2187216784760253361[40] = 0; - out_2187216784760253361[41] = 1; - out_2187216784760253361[42] = 0; - out_2187216784760253361[43] = 0; - out_2187216784760253361[44] = 0; - out_2187216784760253361[45] = 0; - out_2187216784760253361[46] = 0; - out_2187216784760253361[47] = 0; - out_2187216784760253361[48] = 0; - out_2187216784760253361[49] = 0; - out_2187216784760253361[50] = 0; - out_2187216784760253361[51] = 0; - out_2187216784760253361[52] = 0; - out_2187216784760253361[53] = 0; +void H_13(double *state, double *unused, double *out_5813071255294613745) { + out_5813071255294613745[0] = 0; + out_5813071255294613745[1] = 0; + out_5813071255294613745[2] = 0; + out_5813071255294613745[3] = 1; + out_5813071255294613745[4] = 0; + out_5813071255294613745[5] = 0; + out_5813071255294613745[6] = 0; + out_5813071255294613745[7] = 0; + out_5813071255294613745[8] = 0; + out_5813071255294613745[9] = 0; + out_5813071255294613745[10] = 0; + out_5813071255294613745[11] = 0; + out_5813071255294613745[12] = 0; + out_5813071255294613745[13] = 0; + out_5813071255294613745[14] = 0; + out_5813071255294613745[15] = 0; + out_5813071255294613745[16] = 0; + out_5813071255294613745[17] = 0; + out_5813071255294613745[18] = 0; + out_5813071255294613745[19] = 0; + out_5813071255294613745[20] = 0; + out_5813071255294613745[21] = 0; + out_5813071255294613745[22] = 1; + out_5813071255294613745[23] = 0; + out_5813071255294613745[24] = 0; + out_5813071255294613745[25] = 0; + out_5813071255294613745[26] = 0; + out_5813071255294613745[27] = 0; + out_5813071255294613745[28] = 0; + out_5813071255294613745[29] = 0; + out_5813071255294613745[30] = 0; + out_5813071255294613745[31] = 0; + out_5813071255294613745[32] = 0; + out_5813071255294613745[33] = 0; + out_5813071255294613745[34] = 0; + out_5813071255294613745[35] = 0; + out_5813071255294613745[36] = 0; + out_5813071255294613745[37] = 0; + out_5813071255294613745[38] = 0; + out_5813071255294613745[39] = 0; + out_5813071255294613745[40] = 0; + out_5813071255294613745[41] = 1; + out_5813071255294613745[42] = 0; + out_5813071255294613745[43] = 0; + out_5813071255294613745[44] = 0; + out_5813071255294613745[45] = 0; + out_5813071255294613745[46] = 0; + out_5813071255294613745[47] = 0; + out_5813071255294613745[48] = 0; + out_5813071255294613745[49] = 0; + out_5813071255294613745[50] = 0; + out_5813071255294613745[51] = 0; + out_5813071255294613745[52] = 0; + out_5813071255294613745[53] = 0; } -void h_14(double *state, double *unused, double *out_1913422395156722151) { - out_1913422395156722151[0] = state[6]; - out_1913422395156722151[1] = state[7]; - out_1913422395156722151[2] = state[8]; +void h_14(double *state, double *unused, double *out_8796949500966616670) { + out_8796949500966616670[0] = state[6]; + out_8796949500966616670[1] = state[7]; + out_8796949500966616670[2] = state[8]; } -void H_14(double *state, double *unused, double *out_4107845472867451736) { - out_4107845472867451736[0] = 0; - out_4107845472867451736[1] = 0; - out_4107845472867451736[2] = 0; - out_4107845472867451736[3] = 0; - out_4107845472867451736[4] = 0; - out_4107845472867451736[5] = 0; - out_4107845472867451736[6] = 1; - out_4107845472867451736[7] = 0; - out_4107845472867451736[8] = 0; - out_4107845472867451736[9] = 0; - out_4107845472867451736[10] = 0; - out_4107845472867451736[11] = 0; - out_4107845472867451736[12] = 0; - out_4107845472867451736[13] = 0; - out_4107845472867451736[14] = 0; - out_4107845472867451736[15] = 0; - out_4107845472867451736[16] = 0; - out_4107845472867451736[17] = 0; - out_4107845472867451736[18] = 0; - out_4107845472867451736[19] = 0; - out_4107845472867451736[20] = 0; - out_4107845472867451736[21] = 0; - out_4107845472867451736[22] = 0; - out_4107845472867451736[23] = 0; - out_4107845472867451736[24] = 0; - out_4107845472867451736[25] = 1; - out_4107845472867451736[26] = 0; - out_4107845472867451736[27] = 0; - out_4107845472867451736[28] = 0; - out_4107845472867451736[29] = 0; - out_4107845472867451736[30] = 0; - out_4107845472867451736[31] = 0; - out_4107845472867451736[32] = 0; - out_4107845472867451736[33] = 0; - out_4107845472867451736[34] = 0; - out_4107845472867451736[35] = 0; - out_4107845472867451736[36] = 0; - out_4107845472867451736[37] = 0; - out_4107845472867451736[38] = 0; - out_4107845472867451736[39] = 0; - out_4107845472867451736[40] = 0; - out_4107845472867451736[41] = 0; - out_4107845472867451736[42] = 0; - out_4107845472867451736[43] = 0; - out_4107845472867451736[44] = 1; - out_4107845472867451736[45] = 0; - out_4107845472867451736[46] = 0; - out_4107845472867451736[47] = 0; - out_4107845472867451736[48] = 0; - out_4107845472867451736[49] = 0; - out_4107845472867451736[50] = 0; - out_4107845472867451736[51] = 0; - out_4107845472867451736[52] = 0; - out_4107845472867451736[53] = 0; +void H_14(double *state, double *unused, double *out_5062104224287462017) { + out_5062104224287462017[0] = 0; + out_5062104224287462017[1] = 0; + out_5062104224287462017[2] = 0; + out_5062104224287462017[3] = 0; + out_5062104224287462017[4] = 0; + out_5062104224287462017[5] = 0; + out_5062104224287462017[6] = 1; + out_5062104224287462017[7] = 0; + out_5062104224287462017[8] = 0; + out_5062104224287462017[9] = 0; + out_5062104224287462017[10] = 0; + out_5062104224287462017[11] = 0; + out_5062104224287462017[12] = 0; + out_5062104224287462017[13] = 0; + out_5062104224287462017[14] = 0; + out_5062104224287462017[15] = 0; + out_5062104224287462017[16] = 0; + out_5062104224287462017[17] = 0; + out_5062104224287462017[18] = 0; + out_5062104224287462017[19] = 0; + out_5062104224287462017[20] = 0; + out_5062104224287462017[21] = 0; + out_5062104224287462017[22] = 0; + out_5062104224287462017[23] = 0; + out_5062104224287462017[24] = 0; + out_5062104224287462017[25] = 1; + out_5062104224287462017[26] = 0; + out_5062104224287462017[27] = 0; + out_5062104224287462017[28] = 0; + out_5062104224287462017[29] = 0; + out_5062104224287462017[30] = 0; + out_5062104224287462017[31] = 0; + out_5062104224287462017[32] = 0; + out_5062104224287462017[33] = 0; + out_5062104224287462017[34] = 0; + out_5062104224287462017[35] = 0; + out_5062104224287462017[36] = 0; + out_5062104224287462017[37] = 0; + out_5062104224287462017[38] = 0; + out_5062104224287462017[39] = 0; + out_5062104224287462017[40] = 0; + out_5062104224287462017[41] = 0; + out_5062104224287462017[42] = 0; + out_5062104224287462017[43] = 0; + out_5062104224287462017[44] = 1; + out_5062104224287462017[45] = 0; + out_5062104224287462017[46] = 0; + out_5062104224287462017[47] = 0; + out_5062104224287462017[48] = 0; + out_5062104224287462017[49] = 0; + out_5062104224287462017[50] = 0; + out_5062104224287462017[51] = 0; + out_5062104224287462017[52] = 0; + out_5062104224287462017[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_4922672802559952531) { - err_fun(nom_x, delta_x, out_4922672802559952531); +void pose_err_fun(double *nom_x, double *delta_x, double *out_7822607448529633229) { + err_fun(nom_x, delta_x, out_7822607448529633229); } -void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4675286663206909820) { - inv_err_fun(nom_x, true_x, out_4675286663206909820); +void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4249233298537579143) { + inv_err_fun(nom_x, true_x, out_4249233298537579143); } -void pose_H_mod_fun(double *state, double *out_30455509765476285) { - H_mod_fun(state, out_30455509765476285); +void pose_H_mod_fun(double *state, double *out_3177263273874987825) { + H_mod_fun(state, out_3177263273874987825); } -void pose_f_fun(double *state, double dt, double *out_8436412409497388657) { - f_fun(state, dt, out_8436412409497388657); +void pose_f_fun(double *state, double dt, double *out_691237182481573573) { + f_fun(state, dt, out_691237182481573573); } -void pose_F_fun(double *state, double dt, double *out_7299824336461252759) { - F_fun(state, dt, out_7299824336461252759); +void pose_F_fun(double *state, double dt, double *out_5721468400791985323) { + F_fun(state, dt, out_5721468400791985323); } -void pose_h_4(double *state, double *unused, double *out_6774107777547476022) { - h_4(state, unused, out_6774107777547476022); +void pose_h_4(double *state, double *unused, double *out_3930645532014992442) { + h_4(state, unused, out_3930645532014992442); } -void pose_H_4(double *state, double *unused, double *out_1025057040572079440) { - H_4(state, unused, out_1025057040572079440); +void pose_H_4(double *state, double *unused, double *out_1979315791992089721) { + H_4(state, unused, out_1979315791992089721); } -void pose_h_10(double *state, double *unused, double *out_5889283512516384374) { - h_10(state, unused, out_5889283512516384374); +void pose_h_10(double *state, double *unused, double *out_7266140832989971302) { + h_10(state, unused, out_7266140832989971302); } -void pose_H_10(double *state, double *unused, double *out_1898548047416842289) { - H_10(state, unused, out_1898548047416842289); +void pose_H_10(double *state, double *unused, double *out_5742539690088144716) { + H_10(state, unused, out_5742539690088144716); } -void pose_h_13(double *state, double *unused, double *out_2892049699464882933) { - h_13(state, unused, out_2892049699464882933); +void pose_h_13(double *state, double *unused, double *out_3951674911255468860) { + h_13(state, unused, out_3951674911255468860); } -void pose_H_13(double *state, double *unused, double *out_2187216784760253361) { - H_13(state, unused, out_2187216784760253361); +void pose_H_13(double *state, double *unused, double *out_5813071255294613745) { + H_13(state, unused, out_5813071255294613745); } -void pose_h_14(double *state, double *unused, double *out_1913422395156722151) { - h_14(state, unused, out_1913422395156722151); +void pose_h_14(double *state, double *unused, double *out_8796949500966616670) { + h_14(state, unused, out_8796949500966616670); } -void pose_H_14(double *state, double *unused, double *out_4107845472867451736) { - H_14(state, unused, out_4107845472867451736); +void pose_H_14(double *state, double *unused, double *out_5062104224287462017) { + H_14(state, unused, out_5062104224287462017); } 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/openpilot/selfdrive/locationd/models/generated/pose.h b/openpilot/selfdrive/locationd/models/generated/pose.h index bb010089b..da3f8d7ea 100644 --- a/openpilot/selfdrive/locationd/models/generated/pose.h +++ b/openpilot/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_4922672802559952531); -void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4675286663206909820); -void pose_H_mod_fun(double *state, double *out_30455509765476285); -void pose_f_fun(double *state, double dt, double *out_8436412409497388657); -void pose_F_fun(double *state, double dt, double *out_7299824336461252759); -void pose_h_4(double *state, double *unused, double *out_6774107777547476022); -void pose_H_4(double *state, double *unused, double *out_1025057040572079440); -void pose_h_10(double *state, double *unused, double *out_5889283512516384374); -void pose_H_10(double *state, double *unused, double *out_1898548047416842289); -void pose_h_13(double *state, double *unused, double *out_2892049699464882933); -void pose_H_13(double *state, double *unused, double *out_2187216784760253361); -void pose_h_14(double *state, double *unused, double *out_1913422395156722151); -void pose_H_14(double *state, double *unused, double *out_4107845472867451736); +void pose_err_fun(double *nom_x, double *delta_x, double *out_7822607448529633229); +void pose_inv_err_fun(double *nom_x, double *true_x, double *out_4249233298537579143); +void pose_H_mod_fun(double *state, double *out_3177263273874987825); +void pose_f_fun(double *state, double dt, double *out_691237182481573573); +void pose_F_fun(double *state, double dt, double *out_5721468400791985323); +void pose_h_4(double *state, double *unused, double *out_3930645532014992442); +void pose_H_4(double *state, double *unused, double *out_1979315791992089721); +void pose_h_10(double *state, double *unused, double *out_7266140832989971302); +void pose_H_10(double *state, double *unused, double *out_5742539690088144716); +void pose_h_13(double *state, double *unused, double *out_3951674911255468860); +void pose_H_13(double *state, double *unused, double *out_5813071255294613745); +void pose_h_14(double *state, double *unused, double *out_8796949500966616670); +void pose_H_14(double *state, double *unused, double *out_5062104224287462017); void pose_predict(double *in_x, double *in_P, double *in_Q, double dt); } \ No newline at end of file diff --git a/openpilot/selfdrive/modeld/SConscript b/openpilot/selfdrive/modeld/SConscript index 8769ef69a..d19afd21d 100644 --- a/openpilot/selfdrive/modeld/SConscript +++ b/openpilot/selfdrive/modeld/SConscript @@ -10,11 +10,6 @@ from openpilot.selfdrive.modeld.constants import ModelConstants from openpilot.selfdrive.modeld.helpers import TG_INPUT_DEVICES_PATH, chestnut_present, modeld_pkl_path -CAMERA_CONFIGS = [ - (_ar_ox_fisheye.width, _ar_ox_fisheye.height), # tici: 1928x1208 - (_os_fisheye.width, _os_fisheye.height), # mici: 1344x760 -] - Import('env', 'arch') chunker_file = File("#openpilot/common/file_chunker.py") lenv = env.Clone() @@ -24,20 +19,22 @@ tinygrad_files = ["#"+x for x in glob.glob(env.Dir("#tinygrad_repo").relpath + " if 'pycache' not in x and os.path.isfile(os.path.join(tinygrad_root, x))] def estimate_pickle_max_size(onnx_size): - return 1.2 * onnx_size + 10 * 1024 * 1024 # 20% + 10MB is plenty + # QCOM programs for models with spatial recurrent features can approach 2x + # the ONNX size. Overestimating only adds an empty trailing chunk. + return 2.0 * onnx_size + 10 * 1024 * 1024 if arch == 'comma_arm64': + from openpilot.common.hardware import HARDWARE + camera = _os_fisheye if HARDWARE.get_device_type() == "mici" else _ar_ox_fisheye + camera_configs = [(camera.width, camera.height)] tg_backend = 'QCOM' tg_flags = f'DEV={tg_backend} IMAGE=1 FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 OPENPILOT_HACKS=1' else: + camera_configs = [(c.width, c.height) for c in (_ar_ox_fisheye, _os_fisheye)] tg_backend = 'CPU' tg_flags = f'DEV=CPU' if arch == 'Darwin' else 'DEV=CPU:LLVM' tg_devices = { # which device to put jit inputs to at runtime - 'openpilot.selfdrive.modeld.modeld': { - 'default': {'WARP_DEV': tg_backend, 'QUEUE_DEV': tg_backend}, - 'chestnut': {'WARP_DEV': tg_backend, 'QUEUE_DEV': 'AMD'} - }, 'openpilot.selfdrive.modeld.dmonitoringmodeld': { 'default': {'DEV': tg_backend} }, @@ -45,7 +42,7 @@ tg_devices = { # which device to put jit inputs to at runtime CHESTNUT = chestnut_present() if CHESTNUT: - chestnut_tg_flags = f'DEBUG=2 DEV=USB+AMD:LLVM WARP_DEV={tg_backend} FLOAT16=1 JIT_BATCH_SIZE=0 GMMU=0 TC_OPT=2' + chestnut_tg_flags = 'DEBUG=1 DEV=USB+AMD:LLVM FRAME_DEV=CPU FLOAT16=1 JIT_BATCH_SIZE=0 GMMU=0 TC_OPT=2 TC_OCCUPANCY_OPT=1' # the USB+AMD GPU takes an exclusive flock; serialize all targets that touch it chestnut_lock = File("models/.chestnut.lock").abspath @@ -76,10 +73,9 @@ frame_skip = ModelConstants.MODEL_RUN_FREQ // ModelConstants.MODEL_CONTEXT_FREQ if not os.getenv('SKIP_TINYGRAD_COMPILE'): for chestnut in [False, True] if CHESTNUT else [False]: target_pkl_path = File(modeld_pkl_path(chestnut)).abspath - # BIG_INTO_SMALL=1 builds the default target from the big model, e.g. to test it without a chestnut - file_prefix, cmd_flags = ('big_', chestnut_tg_flags) if chestnut else ('big_' if os.getenv('BIG_INTO_SMALL') else '', tg_flags) + file_prefix, cmd_flags = ('big_', chestnut_tg_flags) if chestnut else ('', tg_flags) driving_onnx_deps = get_existing_chunks(File(f"models/{file_prefix}driving_supercombo.onnx").abspath) - camera_res_args = ' '.join(f'{cw}x{ch}' for cw, ch in CAMERA_CONFIGS) + camera_res_args = ' '.join(f'{cw}x{ch}' for cw, ch in camera_configs) # CPU 7 is isolated with isolcpus on AGNOS, so explicitly pin the compiler to it. taskset = 'taskset -c 7 ' if arch == 'comma_arm64' else '' cmd = (f'{cmd_flags} {mac_brew_string} {taskset}python3 {modeld_dir}/compile_modeld.py ' @@ -107,7 +103,7 @@ if not os.getenv('SKIP_TINYGRAD_COMPILE'): actions = Action(do_compile, " [CHESTNUT] $TARGET") if chestnut else [cmd, Action(do_chunk, " [CHUNK] $TARGET")] node = lenv.Command( chunk_targets, - tinygrad_files + compile_modeld_script + driving_onnx_deps + [Value(chunk_targets), chunker_file], + tinygrad_files + compile_modeld_script + driving_onnx_deps + [Value(camera_res_args), Value(chunk_targets), chunker_file], actions, ) if chestnut: @@ -121,7 +117,7 @@ lenv.Command(fn + "_metadata.pkl", [fn + ".onnx"] + tinygrad_files + script_file dm_w, dm_h = DM_INPUT_SIZE compile_dm_warp_script = [File(f"{modeld_dir}/compile_dm_warp.py")] -for cam_w, cam_h in CAMERA_CONFIGS: +for cam_w, cam_h in camera_configs: dm_pkl_path = File(f"models/dm_warp_{cam_w}x{cam_h}_tinygrad.pkl").abspath cmd = (f'{tg_flags} {mac_brew_string} python3 {modeld_dir}/compile_dm_warp.py ' f'--camera-resolution {cam_w}x{cam_h} --warp-to {dm_w}x{dm_h} ' @@ -143,5 +139,4 @@ def tg_compile(flags, model_name): Action(do_chunk, " [CHUNK] $TARGET")], ) -if not os.getenv('SKIP_TINYGRAD_COMPILE'): - tg_compile(tg_flags, 'dmonitoring_model') +tg_compile(tg_flags, 'dmonitoring_model') diff --git a/openpilot/selfdrive/modeld/compile_modeld.py b/openpilot/selfdrive/modeld/compile_modeld.py index 2d27a4149..d851c3cc8 100755 --- a/openpilot/selfdrive/modeld/compile_modeld.py +++ b/openpilot/selfdrive/modeld/compile_modeld.py @@ -37,17 +37,12 @@ from tinygrad.engine.jit import TinyJit NV12Frame = namedtuple("NV12Frame", ['width', 'height', 'stride', 'y_height', 'uv_height', 'size']) -WARP_INPUTS = ['tfm', 'big_tfm'] -POLICY_INPUTS = ['img_q', 'big_img_q', 'feat_q', 'desire_q', 'packed_npy_inputs'] - -UV_SCALE_MATRIX = np.array([[0.5, 0, 0], [0, 0.5, 0], [0, 0, 1]], dtype=np.float32) -UV_SCALE_MATRIX_INV = np.linalg.inv(UV_SCALE_MATRIX) - -WARP_DEV = os.getenv('WARP_DEV') +MODELD_INPUTS = ['img_q', 'big_img_q', 'feat_q', 'desire_q', 'packed_npy_inputs'] -def make_random_images(keys, shape, device=None): - return {k: Tensor.randint(shape, low=0, high=256, dtype='uint8', device=device).realize() for k in keys} +def nv12_copy_size(stride: int, y_height: int, uv_height: int) -> int: + # Retain the padded Y and UV plane storage, but skip the trailing kernel/guard allocation. + return stride * (y_height + uv_height) def warp_perspective_tinygrad(src_flat, M_inv, dst_shape, src_shape, stride_pad, border_fill_val=None): @@ -99,7 +94,7 @@ def make_frame_prepare(nv12: NV12Frame, model_w, model_h): def frame_prepare_tinygrad(input_frame, M_inv): # UV_SCALE @ M_inv @ UV_SCALE_INV simplifies to elementwise scaling - M_inv_uv = M_inv * Tensor([[1.0, 1.0, 0.5], [1.0, 1.0, 0.5], [2.0, 2.0, 1.0]], device=WARP_DEV) + M_inv_uv = M_inv * Tensor([[1.0, 1.0, 0.5], [1.0, 1.0, 0.5], [2.0, 2.0, 1.0]], device=Device.DEFAULT) # deinterleave NV12 UV plane (UVUV... -> separate U, V) uv = input_frame[uv_offset:uv_offset + uv_height * stride].reshape(uv_height, stride) with Context(SPLIT_REDUCEOP=0): @@ -118,49 +113,43 @@ def make_frame_prepare(nv12: NV12Frame, model_w, model_h): return frame_prepare_tinygrad -def make_warp_input_queues(vision_input_shapes, frame_skip, device): - img = vision_input_shapes['img'] # (1, 12, 128, 256) - n_frames = img[1] // 6 - img_buf_shape = (frame_skip * (n_frames - 1) + 1, 6, img[2], img[3]) - - npy = { - 'tfm': np.zeros((3, 3), dtype=np.float32), - 'big_tfm': np.zeros((3, 3), dtype=np.float32), - } - input_queues = { - 'img_q': Tensor(np.zeros(img_buf_shape, dtype=np.uint8), device=device).contiguous().realize(), - 'big_img_q': Tensor(np.zeros(img_buf_shape, dtype=np.uint8), device=device).contiguous().realize(), - **{k: Tensor(v, device='NPY').realize() for k, v in npy.items()}, - } - return input_queues, npy - - def get_policy_npy_shapes(input_shapes): dp = input_shapes['desire_pulse'] # (1, 25, 8) tc = input_shapes['traffic_convention'] # (1, 2) at = input_shapes['action_t'] # (1, 2) - fb = input_shapes['features_buffer'] # (1, 24, 512) + fb = input_shapes['features_buffer'] # (1, T-1, ...) e.g. (1, 24, 32, 512) with spatial features + feat_dim = math.prod(fb[2:]) # TODO prev_feat shouldn't exist and be handled inside the JIT, but corrupt on QCOM for now - shapes = {'desire': (dp[2],), 'traffic_convention': tuple(tc), 'action_t': tuple(at), 'prev_feat': (fb[0], fb[2])} + shapes = {'desire': (dp[2],), 'traffic_convention': tuple(tc), 'action_t': tuple(at), 'prev_feat': (fb[0], feat_dim)} return shapes, [math.prod(s) for s in shapes.values()] -def make_input_queues(input_shapes, frame_skip, device): - input_queues, npy = make_warp_input_queues(input_shapes, frame_skip, device) - - fb = input_shapes['features_buffer'] # (1, 24, 512), past features only; the model appends the current frame's feature +def make_input_queues(input_shapes, frame_skip, device, frame_copy_size): + img = input_shapes['img'] # (1, 12, 128, 256) + fb = input_shapes['features_buffer'] # (1, T-1, ...), past features only; the model appends the current frame's feature + feat_dim = math.prod(fb[2:]) dp = input_shapes['desire_pulse'] # (1, 25, 8) + n_frames = img[1] // 6 + img_buf_shape = (frame_skip * (n_frames - 1) + 1, 6, img[2], img[3]) - shapes, sizes = get_policy_npy_shapes(input_shapes) - packed_npy_inputs = np.zeros(sum(sizes), dtype=np.float32) + policy_shapes, _ = get_policy_npy_shapes(input_shapes) + shapes = {'tfm': (3, 3), 'big_tfm': (3, 3)} | policy_shapes + sizes = [math.prod(s) for s in shapes.values()] + packed_npy_size = sum(sizes) * np.dtype(np.float32).itemsize + packed_input = np.zeros(packed_npy_size + 2 * frame_copy_size, dtype=np.uint8) + packed_npy_inputs = packed_input[:packed_npy_size].view(np.float32) + frames = packed_input[packed_npy_size:] + frame_views = {'img': frames[:frame_copy_size], 'big_img': frames[frame_copy_size:]} # views into the packed inputs, to be refilled at runtime - npy.update({k: v.reshape(s) for (k, s), v in zip(shapes.items(), np.split(packed_npy_inputs, np.cumsum(sizes[:-1])), strict=True)}) - input_queues.update({ - 'feat_q': Tensor(np.zeros((frame_skip * fb[1], fb[0], fb[2]), dtype=np.float32), device=device).contiguous().realize(), + npy = {k: v.reshape(s) for (k, s), v in zip(shapes.items(), np.split(packed_npy_inputs, np.cumsum(sizes[:-1])), strict=True)} + input_queues = { + 'img_q': Tensor(np.zeros(img_buf_shape, dtype=np.uint8), device=device).contiguous().realize(), + 'big_img_q': Tensor(np.zeros(img_buf_shape, dtype=np.uint8), device=device).contiguous().realize(), + 'feat_q': Tensor(np.zeros((frame_skip * fb[1], fb[0], feat_dim), dtype=np.float32), device=device).contiguous().realize(), 'desire_q': Tensor(np.zeros((frame_skip * dp[1], dp[0], dp[2]), dtype=np.float32), device=device).contiguous().realize(), - 'packed_npy_inputs': Tensor(packed_npy_inputs, device='NPY').realize(), - }) - return input_queues, npy + 'packed_npy_inputs': Tensor(packed_input, device='NPY').realize(), + } + return input_queues, npy, frame_views def shift_and_sample(buf, new_val, sample_fn): @@ -176,13 +165,15 @@ def sample_desire(buf, frame_skip): return buf.reshape(-1, frame_skip, *buf.shape[1:]).max(1).flatten(0, 1).unsqueeze(0) -def make_warp(nv12, model_w, model_h, frame_skip): +def make_warp(nv12, model_w, model_h): frame_prepare = make_frame_prepare(nv12, model_w, model_h) def warp(tfm, big_tfm, frame, big_frame): - tfm = tfm.to(WARP_DEV) - big_tfm = big_tfm.to(WARP_DEV) - Tensor.realize(tfm, big_tfm) + tfm = tfm.to(Device.DEFAULT) + big_tfm = big_tfm.to(Device.DEFAULT) + frame = frame.to(Device.DEFAULT) + big_frame = big_frame.to(Device.DEFAULT) + Tensor.realize(tfm, big_tfm, frame, big_frame) warped_frame = frame_prepare(frame, tfm).unsqueeze(0) warped_big_frame = frame_prepare(big_frame, big_tfm).unsqueeze(0) @@ -195,10 +186,10 @@ def make_run_policy(model_runner, model_metadata, frame_skip): sample_desire_fn = partial(sample_desire, frame_skip=frame_skip) sample_skip_fn = partial(sample_skip, frame_skip=frame_skip) npy_shapes, npy_sizes = get_policy_npy_shapes(model_metadata['input_shapes']) + model_input_dtypes = {name: spec.dtype for name, spec in model_runner.graph_inputs.items()} def run_policy(warped, img_q, big_img_q, feat_q, desire_q, packed_npy_inputs): packed_npy_inputs = packed_npy_inputs.to(Device.DEFAULT) - warped = warped.to(Device.DEFAULT) Tensor.realize(packed_npy_inputs, warped) img = shift_and_sample(img_q, warped[0:1], sample_skip_fn) @@ -211,33 +202,50 @@ def make_run_policy(model_runner, model_metadata, frame_skip): inputs = { 'img': img, 'big_img': big_img, - 'features_buffer': feat_buf, + 'features_buffer': feat_buf.reshape(model_metadata['input_shapes']['features_buffer']), 'desire_pulse': desire_buf, 'traffic_convention': traffic_convention, 'action_t': action_t, } + inputs = {name: value.cast(model_input_dtypes[name]) for name, value in inputs.items()} out = next(iter(model_runner(inputs).values())).cast('float32') return out, return run_policy -def compile_jit(jit, make_random_inputs, input_keys, make_queues): - SEED = 42 - def random_inputs_run(fn, seed, test_val=None, test_buffers=None, expect_match=True): - input_queues, npy = make_queues(Device.DEFAULT) - rng = np.random.default_rng(seed) - Tensor.manual_seed(seed) +def make_run_model(warp, run_policy, model_metadata, frame_copy_size): + _, policy_sizes = get_policy_npy_shapes(model_metadata['input_shapes']) + packed_npy_size = (18 + sum(policy_sizes)) * np.dtype(np.float32).itemsize - testing = test_val is not None or test_buffers is not None - n_runs = 1 if testing else 3 + def run_model(img_q, big_img_q, feat_q, desire_q, packed_npy_inputs): + packed_input = packed_npy_inputs.to(Device.DEFAULT) + Tensor.realize(packed_input) + packed_npy_inputs = packed_input[:packed_npy_size].bitcast('float32') + frame = packed_input[packed_npy_size:packed_npy_size + frame_copy_size] + big_frame = packed_input[packed_npy_size + frame_copy_size:] + tfm, big_tfm, policy_inputs = packed_npy_inputs.split([9, 9, sum(policy_sizes)]) + warped = warp(tfm.reshape(3, 3), big_tfm.reshape(3, 3), frame, big_frame) + return run_policy(warped, img_q, big_img_q, feat_q, desire_q, policy_inputs) + return run_model + + +def compile_jit(jit, input_keys, make_queues, benchmark_runs): + if benchmark_runs < 1: + raise ValueError("benchmark_runs must be at least 1") + + SEED = 42 + def random_inputs_run(fn, seed, n_runs, test_val=None, test_buffers=None, expect_match=True): + input_queues, npy, frame_views = make_queues(Device.DEFAULT) + rng = np.random.default_rng(seed) for i in range(n_runs): for v in npy.values(): v[:] = rng.standard_normal(v.shape).astype(v.dtype) + for v in frame_views.values(): + v[:] = rng.integers(0, 256, size=v.shape, dtype=np.uint8) Device.default.synchronize() - random_inputs = make_random_inputs() st = time.perf_counter() - outs = fn(**{k: input_queues[k] for k in input_keys}, **random_inputs) + outs = fn(**{k: input_queues[k] for k in input_keys}) mt = time.perf_counter() Device.default.synchronize() et = time.perf_counter() @@ -256,14 +264,15 @@ def compile_jit(jit, make_random_inputs, input_keys, make_queues): return val, buffers print('capture + replay') - test_val, test_buffers = random_inputs_run(jit, SEED) - print('pickle round trip') + test_val, test_buffers = random_inputs_run(jit, SEED, 3) + print(f'pickle round trip ({benchmark_runs} runs per seed)') with tempfile.TemporaryFile(dir=".") as f: dump_oob(jit, f) f.seek(0) - jit = load_oob(f) - random_inputs_run(jit, SEED, test_val, test_buffers, expect_match=True) - random_inputs_run(jit, SEED+1, test_val, test_buffers, expect_match=False) + loaded_jit = load_oob(f) + random_inputs_run(loaded_jit, SEED, benchmark_runs, test_val, test_buffers, expect_match=True) + random_inputs_run(loaded_jit, SEED+1, benchmark_runs, test_val, test_buffers, expect_match=False) + # Keep the original so per-resolution JITs share model weight buffers in the final pickle. return jit @@ -292,27 +301,31 @@ if __name__ == "__main__": p.add_argument('--onnx', required=True) p.add_argument('--output', required=True) p.add_argument('--frame-skip', type=int, required=True) + p.add_argument('--benchmark-runs', type=int, default=1, + help='timed loaded-JIT runs for each correctness seed') args = p.parse_args() model_path = read_file_chunked_to_disk(args.onnx) model_w, model_h = args.model_size model_runner = OnnxRunner(model_path) - out = {'metadata': make_metadata_dict(model_path)} + out = { + 'metadata': make_metadata_dict(model_path), + 'input_devices': {'model': Device.DEFAULT}, + 'run_model': {}, + } - run_policy_jit = TinyJit(make_run_policy(model_runner, out['metadata'], args.frame_skip), prune=True) - - make_policy_queues = partial(make_input_queues, out['metadata']['input_shapes'], args.frame_skip) - make_random_model_inputs = partial(make_random_images, keys=['warped'], shape=(2, 6, *out['metadata']['input_shapes']['img'][2:]), device=WARP_DEV) - out['run_policy'] = compile_jit(run_policy_jit, make_random_model_inputs, POLICY_INPUTS, - make_policy_queues) + run_policy = make_run_policy(model_runner, out['metadata'], args.frame_skip) for cam_w, cam_h in args.camera_resolutions: nv12 = NV12Frame(cam_w, cam_h, *get_nv12_info(cam_w, cam_h)) - make_random_warp_inputs = partial(make_random_images, keys=['frame', 'big_frame'], shape=nv12.size, device=WARP_DEV) - warp = TinyJit(make_warp(nv12, model_w, model_h, args.frame_skip), prune=True) - make_warp_queues = partial(make_warp_input_queues, out['metadata']['input_shapes'], args.frame_skip) - out[(cam_w,cam_h)] = compile_jit(warp, make_random_warp_inputs, WARP_INPUTS, make_warp_queues) + frame_copy_size = nv12_copy_size(nv12.stride, nv12.y_height, nv12.uv_height) + make_model_queues = partial(make_input_queues, out['metadata']['input_shapes'], args.frame_skip, + frame_copy_size=frame_copy_size) + warp = make_warp(nv12, model_w, model_h) + run_model_jit = TinyJit(make_run_model(warp, run_policy, out['metadata'], frame_copy_size), prune=True) + out['run_model'][(cam_w,cam_h)] = compile_jit(run_model_jit, MODELD_INPUTS, make_model_queues, + args.benchmark_runs) with open(args.output, "wb") as f: dump_oob(out, f) diff --git a/openpilot/selfdrive/modeld/fill_model_msg.py b/openpilot/selfdrive/modeld/fill_model_msg.py index 4d0069c87..1dfbf3c2f 100644 --- a/openpilot/selfdrive/modeld/fill_model_msg.py +++ b/openpilot/selfdrive/modeld/fill_model_msg.py @@ -64,6 +64,7 @@ def fill_driving_model_data(msg: capnp._DynamicStructBuilder, modelv2_send: capn driving_model_data.frameIdExtra = modelV2.frameIdExtra driving_model_data.frameDropPerc = modelV2.frameDropPerc driving_model_data.modelExecutionTime = modelV2.modelExecutionTime + driving_model_data.big = modelV2.big driving_model_data.action = modelV2.action driving_model_data.meta.laneChangeState = modelV2.meta.laneChangeState driving_model_data.meta.laneChangeDirection = modelV2.meta.laneChangeDirection diff --git a/openpilot/selfdrive/modeld/helpers.py b/openpilot/selfdrive/modeld/helpers.py index 84236f3fd..23eb6cbd2 100644 --- a/openpilot/selfdrive/modeld/helpers.py +++ b/openpilot/selfdrive/modeld/helpers.py @@ -7,10 +7,12 @@ import tempfile from pathlib import Path from openpilot.common.file_chunker import get_manifest_path -from openpilot.common.hardware.usb import CHESTNUT_FW_VERSION, CHESTNUT_USB_IDS, USB_DEVICES_PATH +from openpilot.common.hardware.usb import CHESTNUT_USB_PRODUCT, USB_DEVICES_PATH, is_chestnut_usb_id MODELS_DIR = Path(__file__).resolve().parent / 'models' TG_INPUT_DEVICES_PATH = MODELS_DIR / 'tg_input_devices.json' +CHESTNUT_POWERED_VOLTAGE = 5000 +CHESTNUT_PCIE_READY = 0x78 def get_tg_input_devices(process_name: str, chestnut: bool): @@ -50,7 +52,7 @@ def chestnut_present() -> bool: try: usb_id = (int((d / "idVendor").read_text(), 16), int((d / "idProduct").read_text(), 16)) product = (d / "product").read_text().strip() - if usb_id in CHESTNUT_USB_IDS and product == f"custom {CHESTNUT_FW_VERSION}-CLEAN": + if is_chestnut_usb_id(*usb_id) and product == CHESTNUT_USB_PRODUCT: return True except Exception: pass @@ -58,3 +60,7 @@ def chestnut_present() -> bool: def chestnut_compiled() -> bool: return Path(get_manifest_path(modeld_pkl_path(chestnut=True))).is_file() + + +def chestnut_ready(state) -> bool: + return state.supplyVoltage >= CHESTNUT_POWERED_VOLTAGE and not state.supplyFault and state.pcieLtssm == CHESTNUT_PCIE_READY diff --git a/openpilot/selfdrive/modeld/modeld.py b/openpilot/selfdrive/modeld/modeld.py index f3f639d6d..7e7fa7f58 100755 --- a/openpilot/selfdrive/modeld/modeld.py +++ b/openpilot/selfdrive/modeld/modeld.py @@ -4,8 +4,8 @@ import ctypes from functools import cached_property import os os.environ['GMMU'] = '0' # for chestnut fast loading, noop for qcom -from tinygrad.tensor import Tensor from tinygrad.device import Device +import usb1 import struct import threading import time @@ -28,17 +28,17 @@ from openpilot.common.transformations.model import get_warp_matrix from openpilot.selfdrive.controls.lib.desire_helper import DesireHelper from openpilot.selfdrive.controls.lib.drive_helpers import get_accel_from_plan, should_stop, smooth_value, get_curvature_from_plan from openpilot.selfdrive.modeld.parse_model_outputs import Parser -from openpilot.selfdrive.modeld.compile_modeld import make_input_queues, WARP_INPUTS, POLICY_INPUTS +from openpilot.selfdrive.modeld.compile_modeld import make_input_queues, nv12_copy_size, MODELD_INPUTS from openpilot.selfdrive.modeld.fill_model_msg import fill_model_msg, fill_driving_model_data, fill_pose_msg, PublishState from openpilot.common.file_chunker import open_file_chunked +from openpilot.common.hardware.usb import CHESTNUT_USB_IDS from openpilot.selfdrive.modeld.constants import ModelConstants, Plan -from openpilot.selfdrive.modeld.helpers import chestnut_present, chestnut_compiled, modeld_pkl_path, get_tg_input_devices, load_oob +from openpilot.selfdrive.modeld.helpers import chestnut_present, chestnut_compiled, chestnut_ready, modeld_pkl_path, load_oob from openpilot.sunnypilot.livedelay.helpers import get_lat_delay from openpilot.sunnypilot.modeld_v2.modeld_base import ModelStateBase from openpilot.sunnypilot.selfdrive.controls.lib.relc import RoadEdgeLaneChangeController -PROCESS_NAME = "openpilot.selfdrive.modeld.modeld" SEND_RAW_PRED = os.getenv('SEND_RAW_PRED') LAT_SMOOTH_SECONDS = 0.0 @@ -83,6 +83,37 @@ class ChestnutState: self.valid = True self.sends = 0 self.metrics = {} + self._asm_usb = None + + def _close_asm_usb(self) -> None: + if self._asm_usb is not None: + self._asm_usb.close() + self._asm_usb = None + + def _open_asm_usb(self): + context = usb1.USBContext() + for vendor_id, product_id in CHESTNUT_USB_IDS: + if (handle := context.openByVendorIDAndProductID(vendor_id, product_id, skip_on_error=True)) is not None: + return handle + context.close() + + def _read_ina(self) -> tuple[int, int, bool]: + if "AMD" in Device._opened_devices and self._asm_usb is None: + try: + raw = Device["AMD"].iface.pci_dev.usb.usb.control_read(0xC0, 5) + return struct.unpack(' int: @@ -118,13 +149,15 @@ class ChestnutState: setattr(state, k, v) asm_valid = False + try: + # ASM runs on USB-C power, these still read without a gpu + state.supplyVoltage, state.supplyCurrent, state.supplyFault = self._read_ina() + asm_valid = True + except Exception: + pass if "AMD" in Device._opened_devices: try: - # ASM runs on USB-C power, these still read without a gpu - asm = Device["AMD"].iface.pci_dev.usb - state.pcieLtssm = asm.read(0xB450, 1)[0] - state.supplyVoltage, state.supplyCurrent = struct.unpack(' dict[str, np.ndarray]: parsed_model_outputs = {k: model_outputs[np.newaxis, v] for k,v in output_slices.items()} @@ -173,14 +204,8 @@ class ModelState(ModelStateBase): def run(self, bufs: dict[str, VisionBuf], transforms: dict[str, np.ndarray], inputs: dict[str, np.ndarray], after_enqueue: Callable[[], None] | None = None) -> dict[str, np.ndarray]: - for key in bufs.keys(): - ptr = np.frombuffer(bufs[key].data, dtype=np.uint8).ctypes.data - yuv_size = self.frame_buf_params[key][3] - # There is a ringbuffer of imgs, just cache tensors pointing to all of them - cache_key = (key, ptr) - if cache_key not in self._blob_cache: - self._blob_cache[cache_key] = Tensor.from_blob(ptr, (yuv_size,), dtype='uint8', device=self.WARP_DEV) - self.full_frames[key] = self._blob_cache[cache_key] + for key, buf in bufs.items(): + np.copyto(self.frame_views[key], np.frombuffer(buf.data, dtype=np.uint8, count=self.frame_copy_size)) # Model decides when action is completed, so desire input is just a pulse triggered on rising edge inputs['desire_pulse'][0] = 0 @@ -191,11 +216,7 @@ class ModelState(ModelStateBase): self.npy['tfm'][:,:] = transforms['img'][:,:] self.npy['big_tfm'][:,:] = transforms['big_img'][:,:] - warped = self.warp(**{k: self.input_queues[k] for k in WARP_INPUTS}, frame=self.full_frames['img'], big_frame=self.full_frames['big_img']) - - outs, = self.run_policy( - **{k: self.input_queues[k] for k in POLICY_INPUTS if k in self.input_queues}, warped=warped - ) + outs, = self.run_model(**{k: self.input_queues[k] for k in MODELD_INPUTS}) if after_enqueue is not None: after_enqueue() model_output = outs.numpy()[0] @@ -209,25 +230,37 @@ class ModelState(ModelStateBase): return outputs_dict def warmup(self) -> None: - dummy_frames = {k: np.zeros(self.frame_buf_params[k][3], dtype=np.uint8) for k in self.vision_input_names} + dummy_frames = {k: np.zeros(self.frame_copy_size, dtype=np.uint8) for k in self.vision_input_names} eye = np.eye(3, dtype=np.float32) dims = {'desire_pulse': ModelConstants.DESIRE_LEN, 'traffic_convention': 2, 'action_t': 2} self.run(dummy_frames, dict.fromkeys(self.vision_input_names, eye), {k: np.zeros(v, dtype=np.float32) for k, v in dims.items()}) - self.input_queues, self.npy = make_input_queues(self.input_shapes, self.frame_skip, device=self.QUEUE_DEV) + self.input_queues, self.npy, self.frame_views = make_input_queues( + self.input_shapes, self.frame_skip, device=self.model_device, frame_copy_size=self.frame_copy_size) self.prev_desire[:] = 0 - self.full_frames.clear() - self._blob_cache.clear() def main(demo=False): cloudlog.warning("modeld init") - CHESTNUT = chestnut_present() and chestnut_compiled() + chestnut_available = chestnut_present() and chestnut_compiled() + CHESTNUT = False + if chestnut_available: + poller = messaging.Poller() + sock = messaging.sub_sock("chestnutState", poller=poller, conflate=True) + deadline = time.monotonic() + 4. / SERVICE_LIST['deviceState'].frequency + while not CHESTNUT and (remaining := deadline - time.monotonic()) > 0.: + if not poller.poll(round(remaining * 1000)): + break + msg = messaging.recv_one_or_none(sock) + CHESTNUT = msg is not None and msg.valid and chestnut_ready(msg.chestnutState) if CHESTNUT: os.environ['HCQDEV_WAIT_TIMEOUT_MS'] = '3000' params = Params() params.put_bool("ChestnutLoading", CHESTNUT) - params.remove("ChestnutActive") + if chestnut_available and not CHESTNUT: + params.put_bool("ChestnutActive", False) + else: + params.remove("ChestnutActive") config_realtime_process(7, 54) @@ -271,7 +304,11 @@ def main(demo=False): loader.start() loader.join(BIG_MODEL_TIMEOUT) model = big_model + if model is None: + params.put_bool("ChestnutModelError", True) params.put_bool("ChestnutActive", model is not None) + if model is not None: + params.remove("ChestnutModelError") small_model = ModelState(vipc_client_main.width, vipc_client_main.height, False) if model is None or CHESTNUT else None if model is None: @@ -405,6 +442,7 @@ def main(demo=False): raise # fallback to small model cloudlog.exception("big model failed, fall back to small") + params.put_bool("ChestnutModelError", True) params.put_bool("ChestnutActive", False) assert small_model is not None model = small_model @@ -431,12 +469,11 @@ def main(demo=False): l_lane_change_prob = desire_state[log.Desire.laneChangeLeft] r_lane_change_prob = desire_state[log.Desire.laneChangeRight] lane_change_prob = l_lane_change_prob + r_lane_change_prob - DH.update(sm['carState'], sm['carControl'].latActive, lane_change_prob) - modelv2_send.modelV2.meta.laneChangeState = DH.lane_change_state - modelv2_send.modelV2.meta.laneChangeDirection = DH.lane_change_direction - mdv2sp_send = messaging.new_message('modelDataV2SP') left_edge, right_edge = RELC.update_and_fill(modelv2_send.modelV2, mdv2sp_send.modelDataV2SP, v_ego) + DH.update(sm['carState'], sm['carControl'].latActive, lane_change_prob, left_edge, right_edge) + modelv2_send.modelV2.meta.laneChangeState = DH.lane_change_state + modelv2_send.modelV2.meta.laneChangeDirection = DH.lane_change_direction mdv2sp_send.modelDataV2SP.laneTurnDirection = DH.lane_turn_direction fill_driving_model_data(drivingdata_send, modelv2_send) diff --git a/openpilot/selfdrive/modeld/models/dm_warp_1928x1208_tinygrad.pkl b/openpilot/selfdrive/modeld/models/dm_warp_1928x1208_tinygrad.pkl index c4b055e88..1e903100f 100644 Binary files a/openpilot/selfdrive/modeld/models/dm_warp_1928x1208_tinygrad.pkl and b/openpilot/selfdrive/modeld/models/dm_warp_1928x1208_tinygrad.pkl differ diff --git a/openpilot/selfdrive/modeld/models/dmonitoring_model_tinygrad.pkl.chunk01of01 b/openpilot/selfdrive/modeld/models/dmonitoring_model_tinygrad.pkl.chunk01of01 index 0fd9a0e86..da895ed46 100644 Binary files a/openpilot/selfdrive/modeld/models/dmonitoring_model_tinygrad.pkl.chunk01of01 and b/openpilot/selfdrive/modeld/models/dmonitoring_model_tinygrad.pkl.chunk01of01 differ diff --git a/openpilot/selfdrive/modeld/models/tg_input_devices.json b/openpilot/selfdrive/modeld/models/tg_input_devices.json index 841659098..54a4586fa 100644 --- a/openpilot/selfdrive/modeld/models/tg_input_devices.json +++ b/openpilot/selfdrive/modeld/models/tg_input_devices.json @@ -1 +1 @@ -{"openpilot.selfdrive.modeld.modeld": {"default": {"WARP_DEV": "QCOM", "QUEUE_DEV": "QCOM"}, "usbgpu": {"WARP_DEV": "QCOM", "QUEUE_DEV": "AMD"}}, "openpilot.selfdrive.modeld.dmonitoringmodeld": {"default": {"DEV": "QCOM"}}} +{"openpilot.selfdrive.modeld.dmonitoringmodeld": {"default": {"DEV": "QCOM"}}} diff --git a/openpilot/selfdrive/pandad/pandad b/openpilot/selfdrive/pandad/pandad index bea0cb5ff..c58fb9abe 100755 Binary files a/openpilot/selfdrive/pandad/pandad and b/openpilot/selfdrive/pandad/pandad differ diff --git a/openpilot/selfdrive/pandad/pandad.cc b/openpilot/selfdrive/pandad/pandad.cc index ac87804bc..23df5d6a8 100644 --- a/openpilot/selfdrive/pandad/pandad.cc +++ b/openpilot/selfdrive/pandad/pandad.cc @@ -123,22 +123,22 @@ void fill_panda_state(cereal::PandaState::Builder &ps, cereal::PandaState::Panda ps.setUptime(health.uptime_pkt); ps.setSafetyTxBlocked(health.safety_tx_blocked_pkt); ps.setSafetyRxInvalid(health.safety_rx_invalid_pkt); - ps.setIgnitionLine(health.ignition_line_pkt); - ps.setIgnitionCan(health.ignition_can_pkt); - ps.setControlsAllowed(health.controls_allowed_pkt); + ps.setIgnitionLine((health.flags_pkt & HEALTH_FLAG_IGNITION_LINE) != 0U); + ps.setIgnitionCan((health.flags_pkt & HEALTH_FLAG_IGNITION_CAN) != 0U); + ps.setControlsAllowed((health.flags_pkt & HEALTH_FLAG_CONTROLS_ALLOWED) != 0U); ps.setTxBufferOverflow(health.tx_buffer_overflow_pkt); ps.setRxBufferOverflow(health.rx_buffer_overflow_pkt); ps.setPandaType(hw_type); ps.setSafetyModel(cereal::CarParams::SafetyModel(health.safety_mode_pkt)); ps.setSafetyParam(health.safety_param_pkt); ps.setFaultStatus(cereal::PandaState::FaultStatus(health.fault_status_pkt)); - ps.setPowerSaveEnabled((bool)(health.power_save_enabled_pkt)); - ps.setHeartbeatLost((bool)(health.heartbeat_lost_pkt)); + ps.setPowerSaveEnabled((health.flags_pkt & HEALTH_FLAG_POWER_SAVE_ENABLED) != 0U); + ps.setHeartbeatLost((health.flags_pkt & HEALTH_FLAG_HEARTBEAT_LOST) != 0U); ps.setAlternativeExperience(health.alternative_experience_pkt); ps.setHarnessStatus(cereal::PandaState::HarnessStatus(health.car_harness_status_pkt)); - ps.setInterruptLoad(health.interrupt_load_pkt); + ps.setInterruptLoad(health.interrupt_load_pkt / 255.0f); ps.setFanPower(health.fan_power); - ps.setSafetyRxChecksInvalid((bool)(health.safety_rx_checks_invalid_pkt)); + ps.setSafetyRxChecksInvalid((health.flags_pkt & HEALTH_FLAG_SAFETY_RX_CHECKS_INVALID) != 0U); ps.setSpiErrorCount(health.spi_error_count_pkt); ps.setSbu1Voltage(health.sbu1_voltage_mV / 1000.0f); ps.setSbu2Voltage(health.sbu2_voltage_mV / 1000.0f); @@ -198,10 +198,10 @@ std::optional send_panda_states(PubMaster *pm, Panda *panda, bool is_onroa } if (spoofing_started) { - health.ignition_line_pkt = 1; + health.flags_pkt |= HEALTH_FLAG_IGNITION_LINE; } - bool ignition_local = ((health.ignition_line_pkt != 0) || (health.ignition_can_pkt != 0)) && !always_offroad; + bool ignition_local = ((health.flags_pkt & (HEALTH_FLAG_IGNITION_LINE | HEALTH_FLAG_IGNITION_CAN)) != 0U) && !always_offroad; // Make sure CAN buses are live: safety_setter_thread does not work if Panda CAN are silent and there is only one other CAN node if (health.safety_mode_pkt == (uint8_t)(cereal::CarParams::SafetyModel::SILENT)) { @@ -209,7 +209,7 @@ std::optional send_panda_states(PubMaster *pm, Panda *panda, bool is_onroa } bool power_save_desired = !ignition_local; - if (health.power_save_enabled_pkt != power_save_desired) { + if (((health.flags_pkt & HEALTH_FLAG_POWER_SAVE_ENABLED) != 0U) != power_save_desired) { panda->set_power_saving(power_save_desired); } diff --git a/openpilot/selfdrive/selfdrived/alerts_offroad.json b/openpilot/selfdrive/selfdrived/alerts_offroad.json index 91a7ec8ab..b3b507782 100644 --- a/openpilot/selfdrive/selfdrived/alerts_offroad.json +++ b/openpilot/selfdrive/selfdrived/alerts_offroad.json @@ -19,6 +19,30 @@ }, "Offroad_ChestnutBranch": { "text": "Chestnut detected! Switch to the %1 branch to use chestnut-class models.", + "severity": -1 + }, + "Offroad_ChestnutNotDetected": { + "text": "Chestnut not detected. Check USB and 12V connections.", + "severity": 0 + }, + "Offroad_ChestnutOverheated": { + "text": "Chestnut overheated. Ensure good airflow. Current GPU temperature is %1.", + "severity": 0 + }, + "Offroad_ChestnutPcieUnavailable": { + "text": "%1", + "severity": 0 + }, + "Offroad_ChestnutUncompiled": { + "text": "Chestnut model not compiled. Keep ignition on and reboot the comma.", + "severity": 0 + }, + "Offroad_ChestnutUpdateFailed": { + "text": "Chestnut update failed. Check the USB cable.", + "severity": 0 + }, + "Offroad_ChestnutUsbSlow": { + "text": "Chestnut USB link is slow. Check the USB cable. The current speed is %1.", "severity": 0 }, "Offroad_UnregisteredHardware": { diff --git a/openpilot/selfdrive/test/process_replay/migration.py b/openpilot/selfdrive/test/process_replay/migration.py index 646728e67..1809331c1 100644 --- a/openpilot/selfdrive/test/process_replay/migration.py +++ b/openpilot/selfdrive/test/process_replay/migration.py @@ -152,7 +152,7 @@ def migrate_drivingModelData(msgs): add_ops = [] for _, msg in msgs: dmd = messaging.new_message('drivingModelData', valid=msg.valid, logMonoTime=msg.logMonoTime) - for field in ["frameId", "frameIdExtra", "frameDropPerc", "modelExecutionTime", "action"]: + for field in ["frameId", "frameIdExtra", "frameDropPerc", "modelExecutionTime", "big", "action"]: setattr(dmd.drivingModelData, field, getattr(msg.modelV2, field)) for meta_field in ["laneChangeState", "laneChangeState"]: setattr(dmd.drivingModelData.meta, meta_field, getattr(msg.modelV2.meta, meta_field)) diff --git a/openpilot/selfdrive/test/process_replay/model_replay.py b/openpilot/selfdrive/test/process_replay/model_replay.py index ba610c6a2..927c9b38f 100755 --- a/openpilot/selfdrive/test/process_replay/model_replay.py +++ b/openpilot/selfdrive/test/process_replay/model_replay.py @@ -33,9 +33,9 @@ MODEL_REPLAY_BUCKET="model_replay_master" GITHUB = GithubUtils(API_TOKEN, DATA_TOKEN) EXEC_TIMINGS = [ - # model, instant max, average max - ("modelV2", 0.05, 0.028), - ("driverStateV2", 0.05, 0.018), + # model, instant max, average max, chestnut average max + ("modelV2", 0.05, 0.03, 0.05), + ("driverStateV2", 0.05, 0.018, 0.018), ] def get_log_fn(test_route, ref="master"): @@ -169,11 +169,13 @@ def model_replay(lr, frs): dmonitoringmodeld_msgs = replay_process(dmonitoringmodeld, dmodeld_logs, frs) msgs = modeld_msgs + dmonitoringmodeld_msgs + chestnut = any(m.modelV2.big for m in modeld_msgs if m.which() == "modelV2") header = ['model', 'max instant', 'max instant allowed', 'average', 'max average allowed', 'test result'] rows = [] timings_ok = True - for (s, instant_max, avg_max) in EXEC_TIMINGS: + for (s, instant_max, avg_max, chestnut_avg_max) in EXEC_TIMINGS: + avg_max = chestnut_avg_max if chestnut else avg_max ts = [getattr(m, s).modelExecutionTime for m in msgs if m.which() == s] # TODO some init can happen in first iteration ts = ts[1:] diff --git a/openpilot/selfdrive/ui/body/layouts/onroad.py b/openpilot/selfdrive/ui/body/layouts/onroad.py index a48e52562..94f1342ab 100644 --- a/openpilot/selfdrive/ui/body/layouts/onroad.py +++ b/openpilot/selfdrive/ui/body/layouts/onroad.py @@ -1,7 +1,7 @@ import time import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.selfdrive.ui.ui_state import ui_state @@ -26,8 +26,8 @@ class BodyLayout(Widget): self._last_input_time = time.monotonic() self._was_active = False self._offroad_label = UnifiedLabel("turn on ignition to use", 95 if gui_app.big_ui() else 45, FontWeight.DISPLAY, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.MIDDLE) def draw_dot_grid(self, rect: rl.Rectangle, dots: list[tuple[int, int]], color: rl.Color): spacing = min(rect.height / GRID_ROWS, rect.width / GRID_COLS) diff --git a/openpilot/selfdrive/ui/layouts/home.py b/openpilot/selfdrive/ui/layouts/home.py index 3cf79ef79..aa8bc4cc4 100644 --- a/openpilot/selfdrive/ui/layouts/home.py +++ b/openpilot/selfdrive/ui/layouts/home.py @@ -8,7 +8,7 @@ from openpilot.selfdrive.ui.widgets.exp_mode_button import ExperimentalModeButto from openpilot.selfdrive.ui.widgets.prime import PrimeWidget from openpilot.selfdrive.ui.widgets.setup import SetupWidget from openpilot.system.ui.lib.text_measure import measure_text_cached -from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos +from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment from openpilot.system.ui.lib.multilang import tr, trn from openpilot.system.ui.widgets.label import gui_label from openpilot.system.ui.widgets import Widget @@ -180,7 +180,7 @@ class HomeLayout(Widget): version_rect = rl.Rectangle(self.header_rect.x + self.header_rect.width - version_text_width, self.header_rect.y, version_text_width, self.header_rect.height) - gui_label(version_rect, self._version_text, 48, rl.WHITE, alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT) + gui_label(version_rect, self._version_text, 48, rl.WHITE, alignment=TextAlignment.RIGHT) def _render_home_content(self): # Display banner + logo + welcome text centered in content area (3xl style) diff --git a/openpilot/selfdrive/ui/layouts/onboarding.py b/openpilot/selfdrive/ui/layouts/onboarding.py index df14415c6..0067160d0 100644 --- a/openpilot/selfdrive/ui/layouts/onboarding.py +++ b/openpilot/selfdrive/ui/layouts/onboarding.py @@ -5,7 +5,7 @@ from enum import IntEnum import pyray as rl from openpilot.common.basedir import BASEDIR -from openpilot.system.ui.lib.application import FontWeight, gui_app +from openpilot.system.ui.lib.application import FontWeight, TextAlignment, gui_app from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.button import Button, ButtonStyle @@ -115,9 +115,9 @@ class TermsPage(Widget): self._on_accept = on_accept self._on_decline = on_decline - self._title = Label(tr("Welcome to sunnypilot"), font_size=90, font_weight=FontWeight.BOLD, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT) + self._title = Label(tr("Welcome to sunnypilot"), font_size=90, font_weight=FontWeight.BOLD, text_alignment=TextAlignment.LEFT) self._desc = Label(tr("You must accept the Terms of Service to use sunnypilot. Read the latest terms at https://sunnypilot.ai/terms before continuing."), - font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT) + font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=TextAlignment.LEFT) self._decline_btn = Button(tr("Decline"), click_callback=on_decline) self._accept_btn = Button(tr("Agree"), button_style=ButtonStyle.PRIMARY, click_callback=on_accept) @@ -150,7 +150,7 @@ class DeclinePage(Widget): def __init__(self, back_callback=None): super().__init__() self._text = Label(tr("You must accept the Terms of Service in order to use sunnypilot."), - font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT) + font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=TextAlignment.LEFT) self._back_btn = Button(tr("Back"), click_callback=back_callback) self._uninstall_btn = Button(tr("Decline, uninstall sunnypilot"), button_style=ButtonStyle.DANGER, click_callback=self._on_uninstall_clicked) diff --git a/openpilot/selfdrive/ui/layouts/settings/software.py b/openpilot/selfdrive/ui/layouts/settings/software.py index f10e29600..826ebc867 100644 --- a/openpilot/selfdrive/ui/layouts/settings/software.py +++ b/openpilot/selfdrive/ui/layouts/settings/software.py @@ -198,6 +198,9 @@ class SoftwareLayout(Widget): selection = self._branch_dialog.selection ui_state.params.put("UpdaterTargetBranch", selection, block=True) self._branch_btn.action_item.set_value(selection) + self._download_btn.action_item.set_enabled(False) + self._waiting_for_updater = True + self._waiting_start_ts = time.monotonic() subprocess.run("pkill -SIGUSR1 -f openpilot.system.updated.updated", shell=True) self._branch_dialog = None diff --git a/openpilot/selfdrive/ui/mici/layouts/home.py b/openpilot/selfdrive/ui/mici/layouts/home.py index fce3db460..847cd42ed 100644 --- a/openpilot/selfdrive/ui/mici/layouts/home.py +++ b/openpilot/selfdrive/ui/mici/layouts/home.py @@ -1,4 +1,5 @@ import datetime +import math import time from openpilot.cereal import log @@ -8,7 +9,7 @@ from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.layouts import HBoxLayout from openpilot.system.ui.widgets.icon_widget import IconWidget from openpilot.system.ui.widgets.label import UnifiedLabel, gui_label -from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos +from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment, TextAlignmentVertical from openpilot.selfdrive.ui.ui_state import ui_state, ChestnutState from openpilot.common.version import RELEASE_BRANCHES @@ -69,8 +70,8 @@ class AlertsPill(Widget): count_rect = rl.Rectangle(self.rect.x + self.COUNT_OFFSET, self.rect.y, pill_w - self.COUNT_OFFSET, pill_h) gui_label(count_rect, str(alert_count), font_size=36, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.MIDDLE) class NetworkIcon(Widget): @@ -139,7 +140,9 @@ class MiciHomeLayout(Widget): self._version_text = self._get_version_text() self._experimental_icon = IconWidget("icons_mici/experimental_mode.png", (48, 48)) + self._usb_icon = IconWidget("icons_mici/usb.png", (62, 40)) self._chestnut_icon = IconWidget("icons_mici/chestnut_green.png", (68, 40)) + self._chestnut_loading_icon = IconWidget("icons_mici/chestnut.png", (68, 40)) self._chestnut_failed_icon = IconWidget("icons_mici/chestnut_orange.png", (68, 40)) self._mic_icon = IconWidget("icons_mici/microphone.png", (32, 46)) self._body_icon = IconWidget("icons_mici/body.png", (54, 37)) @@ -150,13 +153,15 @@ class MiciHomeLayout(Widget): IconWidget("icons_mici/settings.png", (48, 48), opacity=0.9), NetworkIcon(), self._experimental_icon, + self._usb_icon, self._chestnut_icon, + self._chestnut_loading_icon, self._chestnut_failed_icon, self._body_icon, self._mic_icon, ], spacing=18) - self._openpilot_label = UnifiedLabel("sunnypilot", font_size=96, font_weight=FontWeight.DISPLAY, max_width=480, wrap_text=False) + self._openpilot_label = UnifiedLabel("openpilot", font_size=96, font_weight=FontWeight.DISPLAY, max_width=480, wrap_text=False) self._version_label = UnifiedLabel("", font_size=36, font_weight=FontWeight.ROMAN, max_width=480, wrap_text=False) self._large_version_label = UnifiedLabel("", font_size=64, text_color=rl.GRAY, font_weight=FontWeight.ROMAN, max_width=480, wrap_text=False) self._date_label = UnifiedLabel("", font_size=36, text_color=rl.GRAY, font_weight=FontWeight.ROMAN, max_width=480, wrap_text=False) @@ -247,12 +252,20 @@ class MiciHomeLayout(Widget): self._version_commit_label.render() # ***** Center-aligned bottom section icons ***** + usb_connected = ui_state.usb_connected + usb_unknown = ui_state.usb_unknown + chestnut_state = ui_state.chestnut_state self._experimental_icon.set_visible(ui_state.experimental_mode) if gui_app.sunnypilot_ui(): self._set_chestnut_visibility() else: - self._chestnut_icon.set_visible(ui_state.chestnut_state in (ChestnutState.READY, ChestnutState.LOADING, ChestnutState.ACTIVE)) - self._chestnut_failed_icon.set_visible(ui_state.chestnut_state in (ChestnutState.UNCOMPILED, ChestnutState.FAILED)) + self._usb_icon.set_visible(usb_connected and usb_unknown) + self._chestnut_icon.set_visible(not usb_unknown and chestnut_state not in + (ChestnutState.LOADING, ChestnutState.UNCOMPILED, ChestnutState.FAILED) and + (usb_connected or chestnut_state in (ChestnutState.READY, ChestnutState.ACTIVE))) + self._chestnut_loading_icon.set_visible(not usb_unknown and chestnut_state == ChestnutState.LOADING) + self._chestnut_loading_icon.set_opacity(0.35 + 0.65 * (0.5 - 0.5 * math.cos(rl.get_time() * 6.0))) + self._chestnut_failed_icon.set_visible(not usb_unknown and chestnut_state in (ChestnutState.UNCOMPILED, ChestnutState.FAILED)) self._mic_icon.set_visible(ui_state.recording_audio) self._body_icon.set_visible(bool(ui_state.is_body)) diff --git a/openpilot/selfdrive/ui/mici/layouts/offroad_alerts.py b/openpilot/selfdrive/ui/mici/layouts/offroad_alerts.py index 879ac76df..de8286cae 100644 --- a/openpilot/selfdrive/ui/mici/layouts/offroad_alerts.py +++ b/openpilot/selfdrive/ui/mici/layouts/offroad_alerts.py @@ -11,7 +11,7 @@ from openpilot.common.hardware import HARDWARE from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.system.ui.widgets.scroller import Scroller -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.multilang import tr REFRESH_INTERVAL = 5.0 # seconds @@ -62,12 +62,12 @@ class AlertItem(Widget): self._icon_green = gui_app.texture("icons_mici/offroad_alerts/green_wheel.png", self.ICON_SIZE, self.ICON_SIZE) self._title_label = UnifiedLabel(text="", font_size=32, font_weight=FontWeight.SEMI_BOLD, text_color=self.TEXT_COLOR, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, line_height=0.95) + alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.TOP, line_height=0.95) self._body_label = UnifiedLabel(text="", font_size=28, font_weight=FontWeight.ROMAN, text_color=self.TEXT_COLOR, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM, line_height=0.95) + alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.BOTTOM, line_height=0.95) self._title_text = "" self._body_text = "" @@ -200,8 +200,8 @@ class MiciOffroadAlerts(Scroller): # Create empty state label self._empty_label = UnifiedLabel(tr("no alerts"), 65, FontWeight.DISPLAY, rl.WHITE, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.MIDDLE) # Build initial alert list self._build_alerts() diff --git a/openpilot/selfdrive/ui/mici/layouts/onboarding.py b/openpilot/selfdrive/ui/mici/layouts/onboarding.py index 80483d1b0..d138172da 100644 --- a/openpilot/selfdrive/ui/mici/layouts/onboarding.py +++ b/openpilot/selfdrive/ui/mici/layouts/onboarding.py @@ -4,7 +4,7 @@ import pyray as rl from collections.abc import Callable from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.qrcode import make_texture -from openpilot.system.ui.lib.application import FontWeight, gui_app +from openpilot.system.ui.lib.application import FontWeight, gui_app, TextAlignment from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.button import SmallCircleIconButton from openpilot.system.ui.widgets.scroller import NavScroller, Scroller @@ -35,7 +35,7 @@ class DriverCameraSetupDialog(BaseCabinCameraDialog): if not self._camera_view.frame: gui_label(rect, tr("camera starting"), font_size=64, font_weight=FontWeight.BOLD, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) + alignment=TextAlignment.CENTER) rl.end_scissor_mode() return diff --git a/openpilot/selfdrive/ui/mici/layouts/settings/software.py b/openpilot/selfdrive/ui/mici/layouts/settings/software.py index 35fc94142..2a4ae4459 100644 --- a/openpilot/selfdrive/ui/mici/layouts/settings/software.py +++ b/openpilot/selfdrive/ui/mici/layouts/settings/software.py @@ -74,6 +74,10 @@ class SoftwareInfoLayoutMici(Widget): class CheckUpdateButton(BigButton): + UPDATER_PROC = "openpilot.system.updated.updated" + CHECK_FOR_UPDATE = "SIGUSR1" + DOWNLOAD_UPDATE = "SIGHUP" + def __init__(self): self._txt_update_icon = gui_app.texture("icons_mici/settings/device/update.png", 64, 75) self._txt_up_to_date_icon = gui_app.texture("icons_mici/settings/device/up_to_date.png", 64, 64) @@ -97,15 +101,20 @@ class CheckUpdateButton(BigButton): gui_app.push_widget(dlg) return + self._signal_updater(self.DOWNLOAD_UPDATE if self.get_value() == "download update" else self.CHECK_FOR_UPDATE) + + def check_for_update(self): + self._signal_updater(self.CHECK_FOR_UPDATE) + + def _signal_updater(self, sig: str): self.set_enabled(False) self._state = UpdaterState.WAITING_FOR_UPDATER + self._hide_value_t = None + self.set_value("") self.set_icon(self._txt_update_icon) def run(): - if self.get_value() == "download update": - subprocess.run("pkill -SIGHUP -f openpilot.system.updated.updated", shell=True) - else: - subprocess.run("pkill -SIGUSR1 -f openpilot.system.updated.updated", shell=True) + subprocess.run(f"pkill -{sig} -f {self.UPDATER_PROC}", shell=True) threading.Thread(target=run, daemon=True).start() @@ -184,7 +193,7 @@ class CheckUpdateButton(BigButton): class InstallUpdateButton(BigButton): def __init__(self): - super().__init__("install update", "", gui_app.texture("icons_mici/settings/device/reboot.png", 64, 70)) + super().__init__("install now", "", gui_app.texture("icons_mici/settings/device/reboot.png", 64, 70)) self.set_visible(lambda: ui_state.is_offroad() and ui_state.params.get_bool("UpdateAvailable")) def _update_state(self): @@ -232,8 +241,9 @@ class BranchSelectPage(NavScroller): class TargetBranchButton(BigButton): - def __init__(self): + def __init__(self, check_update_btn: CheckUpdateButton): super().__init__("target branch", ui_state.params.get("UpdaterTargetBranch") or "") + self._check_update_btn = check_update_btn self.set_click_callback(self._on_click) self.set_visible(not ui_state.params.get_bool("IsTestedBranch")) self.set_enabled(lambda: ui_state.is_offroad()) @@ -246,12 +256,15 @@ class TargetBranchButton(BigButton): self.set_value(target) def _on_click(self): + if not ui_state.params.get("UpdaterAvailableBranches"): + gui_app.push_widget(BigDialog("", tr("Failed to get available branches. Ensure you're connected to the internet and try again."))) + return gui_app.push_widget(BranchSelectPage(self._on_select)) def _on_select(self, branch: str): ui_state.params.put("UpdaterTargetBranch", branch, block=True) self.set_value(branch) - subprocess.run("pkill -SIGUSR1 -f openpilot.system.updated.updated", shell=True) + self._check_update_btn.check_for_update() class SoftwareLayoutMici(NavScroller): @@ -265,10 +278,11 @@ class SoftwareLayoutMici(NavScroller): gui_app.texture("icons_mici/settings/device/uninstall.png", 64, 64), uninstall_openpilot_callback, exit_on_confirm=False) + check_update_btn = CheckUpdateButton() self._scroller.add_widgets([ SoftwareInfoLayoutMici(), - CheckUpdateButton(), + check_update_btn, InstallUpdateButton(), - TargetBranchButton(), + TargetBranchButton(check_update_btn), uninstall_openpilot_btn, ]) diff --git a/openpilot/selfdrive/ui/mici/onroad/alert_renderer.py b/openpilot/selfdrive/ui/mici/onroad/alert_renderer.py index c08778eaf..9665db4d1 100644 --- a/openpilot/selfdrive/ui/mici/onroad/alert_renderer.py +++ b/openpilot/selfdrive/ui/mici/onroad/alert_renderer.py @@ -10,7 +10,7 @@ from opendbc.car.structs import car from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.common.filter_simple import BounceFilter, FirstOrderFilter from openpilot.common.hardware import COMMA_HARDWARE -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import UnifiedLabel @@ -350,7 +350,7 @@ class AlertRenderer(Widget, SpeedLimitAlertRenderer): self._alert_text1_label.set_text(alert_text1) self._alert_text1_label.set_text_color(color) self._alert_text1_label.set_font_size(font_size) - self._alert_text1_label.set_alignment(rl.GuiTextAlignment.TEXT_ALIGN_LEFT if icon_side != 'left' else rl.GuiTextAlignment.TEXT_ALIGN_RIGHT) + self._alert_text1_label.set_alignment(TextAlignment.LEFT if icon_side != 'left' else TextAlignment.RIGHT) self._alert_text1_label.render(text_rect1) alert_text2 = alert.text2.lower() @@ -382,5 +382,5 @@ class AlertRenderer(Widget, SpeedLimitAlertRenderer): self._alert_text2_label.set_text(alert_text2) self._alert_text2_label.set_text_color(color) self._alert_text2_label.set_font_size(small_font_size) - self._alert_text2_label.set_alignment(rl.GuiTextAlignment.TEXT_ALIGN_LEFT if icon_side != 'left' else rl.GuiTextAlignment.TEXT_ALIGN_RIGHT) + self._alert_text2_label.set_alignment(TextAlignment.LEFT if icon_side != 'left' else TextAlignment.RIGHT) self._alert_text2_label.render(text_rect2) diff --git a/openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py b/openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py index e37e9b7ea..71ea7e8f8 100644 --- a/openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py +++ b/openpilot/selfdrive/ui/mici/onroad/augmented_road_view.py @@ -11,7 +11,7 @@ from openpilot.selfdrive.ui.mici.onroad.hud_renderer import HudRenderer from openpilot.selfdrive.ui.mici.onroad.model_renderer import ModelRenderer from openpilot.selfdrive.ui.mici.onroad.confidence_ball import ConfidenceBall from openpilot.selfdrive.ui.mici.onroad.cameraview import CameraView -from openpilot.system.ui.lib.application import FontWeight, gui_app, MousePos, MouseEvent +from openpilot.system.ui.lib.application import FontWeight, gui_app, MousePos, MouseEvent, TextAlignment, TextAlignmentVertical from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.system.ui.widgets import Widget from openpilot.common.filter_simple import BounceFilter @@ -158,8 +158,8 @@ class AugmentedRoadView(CameraView): self._confidence_ball = ConfidenceBall() self._offroad_label = UnifiedLabel("start the car to\nuse sunnypilot", 54, FontWeight.DISPLAY, text_color=rl.Color(255, 255, 255, int(255 * 0.9)), - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.MIDDLE) self._fade_texture = gui_app.texture("icons_mici/onroad/onroad_fade.png") diff --git a/openpilot/selfdrive/ui/mici/onroad/cabin_camera_dialog.py b/openpilot/selfdrive/ui/mici/onroad/cabin_camera_dialog.py index e86c0aa73..b0bdb9749 100644 --- a/openpilot/selfdrive/ui/mici/onroad/cabin_camera_dialog.py +++ b/openpilot/selfdrive/ui/mici/onroad/cabin_camera_dialog.py @@ -4,7 +4,7 @@ from openpilot.cereal.visionipc import VisionStreamType from openpilot.selfdrive.ui.mici.onroad.cameraview import CameraView from openpilot.selfdrive.ui.mici.onroad.driver_state import DriverStateRenderer from openpilot.selfdrive.ui.ui_state import ui_state, device -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.nav_widget import NavWidget @@ -76,7 +76,7 @@ class BaseCabinCameraDialog(Widget): if not self._camera_view.frame: gui_label(rect, tr("camera starting"), font_size=54, font_weight=FontWeight.BOLD, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) + alignment=TextAlignment.CENTER) rl.end_scissor_mode() self._publish_alert_sound(None) return @@ -124,12 +124,12 @@ class BaseCabinCameraDialog(Widget): awareness_pct = dm_state.visionPolicyState.awarenessPercent if is_vision else dm_state.wheeltouchPolicyState.awarenessPercent gui_label(rl.Rectangle(rect.x + 2, rect.y + 2, rect.width, rect.height), f"Awareness: {awareness_pct:.0f}%", font_size=44, font_weight=FontWeight.MEDIUM, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.RIGHT, + alignment_vertical=TextAlignmentVertical.TOP, color=rl.Color(0, 0, 0, 180)) gui_label(rect, f"Awareness: {awareness_pct:.0f}%", font_size=44, font_weight=FontWeight.MEDIUM, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.RIGHT, + alignment_vertical=TextAlignmentVertical.TOP, color=rl.Color(255, 255, 255, int(255 * 0.9))) if dm_state.alertLevel == log.DriverMonitoringState.AlertLevel.none: @@ -137,16 +137,16 @@ class BaseCabinCameraDialog(Widget): # Show alert level alert_level_str = f"{'Pay Attention' if is_vision else 'Touch Wheel'} - level {dm_state.alertLevel}" - alignment = rl.GuiTextAlignment.TEXT_ALIGN_RIGHT if self.driver_state_renderer.is_rhd else rl.GuiTextAlignment.TEXT_ALIGN_LEFT + alignment = TextAlignment.RIGHT if self.driver_state_renderer.is_rhd else TextAlignment.LEFT shadow_rect = rl.Rectangle(rect.x + 2, rect.y + 2, rect.width, rect.height) gui_label(shadow_rect, alert_level_str, font_size=40, font_weight=FontWeight.BOLD, alignment=alignment, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM, + alignment_vertical=TextAlignmentVertical.BOTTOM, color=rl.Color(0, 0, 0, 180)) gui_label(rect, alert_level_str, font_size=40, font_weight=FontWeight.BOLD, alignment=alignment, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM, + alignment_vertical=TextAlignmentVertical.BOTTOM, color=rl.Color(255, 255, 255, int(255 * 0.9))) def _load_eye_textures(self): diff --git a/openpilot/selfdrive/ui/mici/widgets/button.py b/openpilot/selfdrive/ui/mici/widgets/button.py index e2912d00c..59a3f9519 100644 --- a/openpilot/selfdrive/ui/mici/widgets/button.py +++ b/openpilot/selfdrive/ui/mici/widgets/button.py @@ -6,7 +6,7 @@ from collections.abc import Callable from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.system.ui.widgets.scroller import DO_ZOOM -from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos +from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignmentVertical from openpilot.common.filter_simple import BounceFilter if TYPE_CHECKING: @@ -125,10 +125,10 @@ class BigButton(Widget): self._rotate_icon_t: float | None = None self._label = UnifiedLabel(text, font_size=self._get_label_font_size(), font_weight=FontWeight.BOLD, - text_color=LABEL_COLOR, alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM, scroll=scroll, + text_color=LABEL_COLOR, alignment_vertical=TextAlignmentVertical.BOTTOM, scroll=scroll, line_height=0.9) self._sub_label = UnifiedLabel(value, font_size=COMPLICATION_SIZE, font_weight=FontWeight.ROMAN, - text_color=COMPLICATION_GREY, alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM) + text_color=COMPLICATION_GREY, alignment_vertical=TextAlignmentVertical.BOTTOM) self._update_label_layout() self._load_images() @@ -167,9 +167,9 @@ class BigButton(Widget): def _update_label_layout(self): self._label.set_font_size(self._get_label_font_size()) if self.value: - self._label.set_alignment_vertical(rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP) + self._label.set_alignment_vertical(TextAlignmentVertical.TOP) else: - self._label.set_alignment_vertical(rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM) + self._label.set_alignment_vertical(TextAlignmentVertical.BOTTOM) def set_text(self, text: str): self.text = text @@ -356,8 +356,8 @@ class GreyBigButton(BigButton): self._sub_label.set_font_size(36) self._sub_label.set_text_color(rl.Color(255, 255, 255, int(255 * 0.9))) self._sub_label.set_font_weight(FontWeight.DISPLAY_REGULAR) - self._sub_label.set_alignment_vertical(rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE if not self._label.text else - rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM) + self._sub_label.set_alignment_vertical(TextAlignmentVertical.MIDDLE if not self._label.text else + TextAlignmentVertical.BOTTOM) self._sub_label.set_line_height(0.95) @property diff --git a/openpilot/selfdrive/ui/onroad/alert_renderer.py b/openpilot/selfdrive/ui/onroad/alert_renderer.py index 6bdedaf01..835532550 100644 --- a/openpilot/selfdrive/ui/onroad/alert_renderer.py +++ b/openpilot/selfdrive/ui/onroad/alert_renderer.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from openpilot.cereal import messaging, log from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.common.hardware import COMMA_HARDWARE -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.widgets import Widget @@ -76,10 +76,10 @@ class AlertRenderer(Widget): self.font_bold: rl.Font = gui_app.font(FontWeight.BOLD) # font size is set dynamically - self._full_text1_label = Label("", font_size=0, font_weight=FontWeight.BOLD, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - text_alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP) - self._full_text2_label = Label("", font_size=ALERT_FONT_BIG, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - text_alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP) + self._full_text1_label = Label("", font_size=0, font_weight=FontWeight.BOLD, text_alignment=TextAlignment.CENTER, + text_alignment_vertical=TextAlignmentVertical.TOP) + self._full_text2_label = Label("", font_size=ALERT_FONT_BIG, text_alignment=TextAlignment.CENTER, + text_alignment_vertical=TextAlignmentVertical.TOP) def get_alert(self, sm: messaging.SubMaster) -> Alert | None: """Generate the current alert based on selfdrive state.""" diff --git a/openpilot/selfdrive/ui/onroad/cabin_camera_dialog.py b/openpilot/selfdrive/ui/onroad/cabin_camera_dialog.py index 7bb1917c3..58a645381 100644 --- a/openpilot/selfdrive/ui/onroad/cabin_camera_dialog.py +++ b/openpilot/selfdrive/ui/onroad/cabin_camera_dialog.py @@ -4,7 +4,7 @@ from openpilot.cereal.visionipc import VisionStreamType from openpilot.selfdrive.ui.onroad.cameraview import CameraView from openpilot.selfdrive.ui.onroad.driver_state import DriverStateRenderer from openpilot.selfdrive.ui.ui_state import ui_state, device -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets.label import gui_label @@ -38,7 +38,7 @@ class CabinCameraDialog(CameraView): tr("camera starting"), font_size=100, font_weight=FontWeight.BOLD, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, + alignment=TextAlignment.CENTER, ) return -1 diff --git a/openpilot/selfdrive/ui/sunnypilot/layouts/home.py b/openpilot/selfdrive/ui/sunnypilot/layouts/home.py index a8c0790d3..70a69ca17 100644 --- a/openpilot/selfdrive/ui/sunnypilot/layouts/home.py +++ b/openpilot/selfdrive/ui/sunnypilot/layouts/home.py @@ -6,7 +6,7 @@ See the LICENSE.md file in the root directory for more details. """ import pyray as rl from openpilot.selfdrive.ui.layouts.home import HomeLayout, HomeLayoutState, HEAD_BUTTON_FONT_SIZE, SPACING -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.lib.multilang import tr, trn from openpilot.system.ui.widgets.label import gui_label @@ -59,7 +59,7 @@ class HomeLayoutSP(HomeLayout): desc_size = measure_text_cached(gui_app.font(FontWeight.NORMAL), description, BRAND_FONT_SIZE) desc_width = desc_size.x desc_rect = rl.Rectangle(version_right - desc_width, self.header_rect.y, desc_width, self.header_rect.height) - gui_label(desc_rect, description, BRAND_FONT_SIZE, rl.WHITE, alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT) + gui_label(desc_rect, description, BRAND_FONT_SIZE, rl.WHITE, alignment=TextAlignment.RIGHT) brand_size = measure_text_cached(gui_app.font(FontWeight.AUDIOWIDE), brand, BRAND_FONT_SIZE) spacing = BRAND_DESC_SPACING if description else 0 diff --git a/openpilot/selfdrive/ui/sunnypilot/layouts/onboarding.py b/openpilot/selfdrive/ui/sunnypilot/layouts/onboarding.py index ee4b479af..a23140dc9 100644 --- a/openpilot/selfdrive/ui/sunnypilot/layouts/onboarding.py +++ b/openpilot/selfdrive/ui/sunnypilot/layouts/onboarding.py @@ -6,7 +6,7 @@ See the LICENSE.md file in the root directory for more details. """ import pyray as rl from openpilot.selfdrive.ui.ui_state import ui_state -from openpilot.system.ui.lib.application import FontWeight +from openpilot.system.ui.lib.application import FontWeight, TextAlignment from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.button import Button, ButtonStyle @@ -20,7 +20,7 @@ class SunnylinkConsentPage(Widget): self._done_callback = done_callback self._step = 0 - self._title = self._child(Label(tr("sunnylink"), font_size=90, font_weight=FontWeight.AUDIOWIDE, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT)) + self._title = self._child(Label(tr("sunnylink"), font_size=90, font_weight=FontWeight.AUDIOWIDE, text_alignment=TextAlignment.LEFT)) self._content = [ { @@ -43,7 +43,7 @@ class SunnylinkConsentPage(Widget): self._primary_btn = self._child(Button("", button_style=ButtonStyle.PRIMARY, click_callback=lambda: self._handle_choice("enable"))) self._secondary_btn = self._child(Button("", button_style=ButtonStyle.NORMAL, click_callback=lambda: self._handle_choice("secondary"))) self._danger_btn = self._child(Button("", button_style=ButtonStyle.DANGER, click_callback=lambda: self._handle_choice("disable"))) - self._desc = self._child(Label("", font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT)) + self._desc = self._child(Label("", font_size=90, font_weight=FontWeight.MEDIUM, text_alignment=TextAlignment.LEFT)) def _handle_choice(self, choice): if choice == "enable": diff --git a/openpilot/selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py b/openpilot/selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py index 92648d752..8170507d6 100644 --- a/openpilot/selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py +++ b/openpilot/selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py @@ -9,7 +9,7 @@ from openpilot.cereal import custom from openpilot.selfdrive.ui.sunnypilot.layouts.onboarding import SunnylinkConsentPage from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.sunnypilot.sunnylink.api import UNREGISTERED_SUNNYLINK_DONGLE_ID -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.sunnypilot.widgets.list_view import button_item_sp from openpilot.system.ui.sunnypilot.widgets.list_view import toggle_item_sp @@ -32,8 +32,8 @@ class SunnylinkHeader(Widget): font_size=90, font_weight=FontWeight.AUDIOWIDE, text_color=rl.WHITE, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.TOP, wrap_text=False, elide=False ) @@ -43,8 +43,8 @@ class SunnylinkHeader(Widget): font_size=40, font_weight=FontWeight.NORMAL, text_color=rl.Color(0, 255, 0, 255), # Green - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.TOP, wrap_text=True, elide=False ) @@ -55,8 +55,8 @@ class SunnylinkHeader(Widget): font_size=35, font_weight=FontWeight.NORMAL, text_color=rl.Color(255, 165, 0, 255), # Orange - alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.TOP, wrap_text=True, elide=False ) @@ -109,8 +109,8 @@ class SunnylinkDescriptionItem(Widget): font_size=40, font_weight=FontWeight.NORMAL, text_color=rl.WHITE, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.TOP, wrap_text=True, elide=False, ) diff --git a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py index 8efb6c80e..62dea4267 100644 --- a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py +++ b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py @@ -11,7 +11,6 @@ import pyray as rl from openpilot.selfdrive.ui.mici.layouts.home import MiciHomeLayout from openpilot.selfdrive.ui.ui_state import ui_state, ChestnutState from openpilot.system.ui.lib.application import FontWeight -from openpilot.system.ui.widgets.icon_widget import IconWidget from openpilot.system.ui.widgets.label import UnifiedLabel @@ -19,16 +18,16 @@ class MiciHomeLayoutSP(MiciHomeLayout): def __init__(self): super().__init__() self._openpilot_label = UnifiedLabel("sunnypilot", font_size=88, font_weight=FontWeight.AUDIOWIDE, max_width=480, wrap_text=False) - self._chestnut_loading_icon = IconWidget("icons_mici/chestnut.png", (68, 40)) - self._chestnut_loading_icon.set_visible(False) - failed_idx = self._status_bar_layout.widgets.index(self._chestnut_failed_icon) - self._status_bar_layout.widgets.insert(failed_idx + 1, self._chestnut_loading_icon) def _set_chestnut_visibility(self): - # stock has no loading tier: it shows green from the moment a big model is available. keep the - # pulse so the status bar and the onroad HUD agree on what loading looks like. - loading = ui_state.chestnut_state == ChestnutState.LOADING - self._chestnut_loading_icon._opacity = 0.35 + 0.65 * (0.5 - 0.5 * math.cos(rl.get_time() * 6.0)) - self._chestnut_loading_icon.set_visible(loading) - self._chestnut_icon.set_visible(not loading and ui_state.chestnut_state in (ChestnutState.READY, ChestnutState.ACTIVE)) - self._chestnut_failed_icon.set_visible(ui_state.chestnut_state in (ChestnutState.UNCOMPILED, ChestnutState.FAILED)) + usb_connected = ui_state.usb_connected + usb_unknown = ui_state.usb_unknown + chestnut_state = ui_state.chestnut_state + loading = chestnut_state == ChestnutState.LOADING + + self._usb_icon.set_visible(usb_connected and usb_unknown) + self._chestnut_loading_icon.set_opacity(0.35 + 0.65 * (0.5 - 0.5 * math.cos(rl.get_time() * 6.0))) + self._chestnut_loading_icon.set_visible(not usb_unknown and loading) + self._chestnut_icon.set_visible(not usb_unknown and not loading and + chestnut_state in (ChestnutState.READY, ChestnutState.ACTIVE)) + self._chestnut_failed_icon.set_visible(not usb_unknown and chestnut_state in (ChestnutState.UNCOMPILED, ChestnutState.FAILED)) diff --git a/openpilot/selfdrive/ui/ui_state.py b/openpilot/selfdrive/ui/ui_state.py index 4d93e1aac..a101f93d5 100644 --- a/openpilot/selfdrive/ui/ui_state.py +++ b/openpilot/selfdrive/ui/ui_state.py @@ -12,6 +12,7 @@ from openpilot.common.swaglog import cloudlog from openpilot.selfdrive.ui.lib.prime_state import PrimeState from openpilot.system.ui.lib.application import gui_app from openpilot.common.hardware import HARDWARE, PC +from openpilot.common.hardware.usb import TYPEC_CC_ORIENTATION_PATH, get_usb_state, is_chestnut_usb_id, read_int from openpilot.selfdrive.modeld.helpers import chestnut_compiled from openpilot.selfdrive.ui.sunnypilot.ui_state import UIStateSP, DeviceSP @@ -95,6 +96,10 @@ class UIState(UIStateSP): self.chestnut_compiled: bool = chestnut_compiled() self.chestnut_active: bool | None = None self.chestnut_loading: bool = False + self.usb_connected: bool = False + self.usb_connected_ts: float | None = None + self.usb_disconnected_ts: float | None = None + self.usb_unknown: bool = False self.chestnut_state = ChestnutState.DISCONNECTED self.started: bool = False self.ignition: bool = False @@ -254,6 +259,23 @@ class UIState(UIStateSP): self.chestnut_compiled = chestnut_compiled() self.chestnut_active = self.params.get("ChestnutActive") self.chestnut_loading = self.params.get_bool("ChestnutLoading") + now = time.monotonic() + if read_int(TYPEC_CC_ORIENTATION_PATH) != 0: + self.usb_disconnected_ts = None + if not self.usb_connected: + self.usb_connected = True + self.usb_connected_ts = now + self.usb_unknown = False + elif self.usb_connected_ts is not None and now - self.usb_connected_ts > 10.: + self.usb_unknown = not any(is_chestnut_usb_id(d["vendorId"], d["productId"], True) for d in get_usb_state()) + self.usb_connected_ts = None + elif self.usb_connected: + if self.usb_disconnected_ts is None: + self.usb_disconnected_ts = now + elif now - self.usb_disconnected_ts > PARAM_UPDATE_TIME: + self.usb_connected = False + self.usb_connected_ts = None + self.usb_unknown = False UIStateSP.update_params(self) diff --git a/openpilot/sunnypilot/modeld_v2/tests/test_combined_pkl_loader.py b/openpilot/sunnypilot/modeld_v2/tests/test_combined_pkl_loader.py index 7f40c19eb..e3a686a73 100644 --- a/openpilot/sunnypilot/modeld_v2/tests/test_combined_pkl_loader.py +++ b/openpilot/sunnypilot/modeld_v2/tests/test_combined_pkl_loader.py @@ -75,11 +75,11 @@ class TestStockEquivalence(OpenpilotTestCase): frame_skip = derive_frame_skip(SPLIT_VISION_INPUT_SHAPES, SPLIT_POLICY_INPUT_SHAPES) stock_shapes = {**SPLIT_VISION_INPUT_SHAPES, **SPLIT_POLICY_INPUT_SHAPES, 'action_t': (1, 2)} - stock_queues, stock_npy = make_input_queues(stock_shapes, frame_skip, device='NPY') + stock_queues, stock_npy, _frame_views = make_input_queues(stock_shapes, frame_skip, device='NPY', frame_copy_size=49152) - assert set(state.input_queues.keys()) == set(stock_queues.keys()) + # sunnypilot split pipeline has tfm/big_tfm as queues (stock has them in npy only) + assert set(stock_queues.keys()) <= set(state.input_queues.keys()) assert {'desire', 'traffic_convention'} <= set(state.numpy_inputs.keys()) - assert set(state.numpy_inputs.keys()) == set(stock_npy.keys()) - {'action_t', 'prev_feat'} def test_split_queue_keys_work_with_desire_key(self, model_state_factory): from openpilot.sunnypilot.modeld_v2.compile_modeld import derive_frame_skip, make_split_input_queues diff --git a/openpilot/sunnypilot/modeld_v2/tests/test_compile_modeld.py b/openpilot/sunnypilot/modeld_v2/tests/test_compile_modeld.py index 86974b14f..7f6636fb9 100644 --- a/openpilot/sunnypilot/modeld_v2/tests/test_compile_modeld.py +++ b/openpilot/sunnypilot/modeld_v2/tests/test_compile_modeld.py @@ -7,6 +7,7 @@ See the LICENSE.md file in the root directory for more details. import os import tempfile +import unittest from pathlib import Path import numpy as np @@ -248,23 +249,27 @@ class TestStockCompileModeldEquivalence(OpenpilotTestCase): input_shapes = { 'img': (1, 12, 128, 256), 'desire_pulse': (1, 25, 8), - 'features_buffer': (1, 24, 512), # when https://github.com/commaai/openpilot/pull/38681 merges, update to 1,24,32,512 + 'features_buffer': (1, 24, 32, 512), 'traffic_convention': (1, 2), 'action_t': (1, 2), } frame_skip = 4 - stock_queues, stock_npy = stock_make_input_queues(input_shapes, frame_skip, device='NPY') + stock_queues, stock_npy, _frame_views = stock_make_input_queues(input_shapes, frame_skip, device='NPY', frame_copy_size=49152) sunny_queues, sunny_npy = sunny_make_supercombo_input_queues(input_shapes, frame_skip, device='NPY') - assert set(sunny_queues.keys()) == set(stock_queues.keys()) + # sunnypilot split pipeline has tfm/big_tfm as queues; packed_npy_inputs size differs (different frame packing) + assert set(stock_queues.keys()) <= set(sunny_queues.keys()) for key in stock_queues: + if key == 'packed_npy_inputs': + continue assert sunny_queues[key].shape == stock_queues[key].shape, \ f"Queue shape mismatch for {key}: sunny {sunny_queues[key].shape} != stock {stock_queues[key].shape}" - assert set(sunny_npy.keys()) == set(stock_npy.keys()) + assert set(stock_npy.keys()) <= set(sunny_npy.keys()) for key in stock_npy: assert sunny_npy[key].shape == stock_npy[key].shape, \ f"Numpy array shape mismatch for {key}: sunny {sunny_npy[key].shape} != stock {stock_npy[key].shape}" + @unittest.skip("upstream removed make_warp_input_queues — warp merged into run_model") def test_make_warp_queues_stock_equivalence(self): from openpilot.selfdrive.modeld.compile_modeld import make_warp_input_queues as stock_make_warp_queues from openpilot.sunnypilot.modeld_v2.compile_modeld import make_warp_queues as sunny_make_warp_queues diff --git a/openpilot/sunnypilot/models/default_model.py b/openpilot/sunnypilot/models/default_model.py index 84e962cdc..5aacea12b 100755 --- a/openpilot/sunnypilot/models/default_model.py +++ b/openpilot/sunnypilot/models/default_model.py @@ -25,9 +25,22 @@ SUPERCOMBO_ONNX_PATH = os.path.join(BASEDIR, "openpilot", "selfdrive", "modeld", BIG_SUPERCOMBO_ONNX_PATH = os.path.join(BASEDIR, "openpilot", "selfdrive", "modeld", "models", "big_driving_supercombo.onnx") +def _read_model_name_fields(): + with open(DEFAULT_MODEL_NAME_PATH) as f: + content = f.read() + fields = {} + for line in content.splitlines(): + if "=" in line: + key, val = line.split("=", 1) + fields[key.strip()] = val.strip().strip('"') + return fields + + def update_model_hash(): + fields = _read_model_name_fields() supercombo_hash = get_file_hash(SUPERCOMBO_ONNX_PATH) - combined_hash = hashlib.sha256(supercombo_hash.encode()).hexdigest() + fingerprint = f"{supercombo_hash}:{fields.get('DEFAULT_MODEL', '')}:{fields.get('DEFAULT_MODEL_REF', '')}" + combined_hash = hashlib.sha256(fingerprint.encode()).hexdigest() with open(MODEL_HASH_PATH, "w") as f: f.write(combined_hash) @@ -39,7 +52,8 @@ def update_model_hash(): rel = os.path.relpath(BIG_SUPERCOMBO_ONNX_PATH, os.getcwd()) pointer = subprocess.check_output(["git", "show", f"HEAD:{rel}"], text=True) oid = next(l.split(":", 1)[1] for l in pointer.splitlines() if l.startswith("oid sha256:")) - big_combined_hash = hashlib.sha256(oid.encode()).hexdigest() + big_fingerprint = f"{oid}:{fields.get('DEFAULT_BIG_MODEL', '')}:{fields.get('DEFAULT_BIG_MODEL_REF', '')}" + big_combined_hash = hashlib.sha256(big_fingerprint.encode()).hexdigest() with open(BIG_MODEL_HASH_PATH, "w") as f: f.write(big_combined_hash) diff --git a/openpilot/sunnypilot/models/model_name.py b/openpilot/sunnypilot/models/model_name.py index fce14d099..342039182 100644 --- a/openpilot/sunnypilot/models/model_name.py +++ b/openpilot/sunnypilot/models/model_name.py @@ -1,4 +1,4 @@ DEFAULT_MODEL = "CD210" DEFAULT_MODEL_REF = "5b6436a90cf6902b8aaa71c2b6f3d7164d8ae391" -DEFAULT_BIG_MODEL = "Lebowski" -DEFAULT_BIG_MODEL_REF = "fa0c6876d3cf070e91e25e5353ceadc68a5b3285" +DEFAULT_BIG_MODEL = "BMRLNAP Model v4" +DEFAULT_BIG_MODEL_REF = "f877d7a0ccc3cce943c76e285214c020cd65c899" diff --git a/openpilot/sunnypilot/models/tests/big_model_hash b/openpilot/sunnypilot/models/tests/big_model_hash index e957940fd..308096afe 100644 --- a/openpilot/sunnypilot/models/tests/big_model_hash +++ b/openpilot/sunnypilot/models/tests/big_model_hash @@ -1 +1 @@ -8bba37156aa17d49210cad028744c839ea9ed7b1f19428a8ecfafdc1e07a73b6 \ No newline at end of file +2c814f08a2c51323b87839fbf8d2c2a9853a2b5536271b3d67f7b7a2de7f9374 \ No newline at end of file diff --git a/openpilot/sunnypilot/models/tests/model_hash b/openpilot/sunnypilot/models/tests/model_hash index 13a16294f..ffe44d3bf 100644 --- a/openpilot/sunnypilot/models/tests/model_hash +++ b/openpilot/sunnypilot/models/tests/model_hash @@ -1 +1 @@ -49133798d9cd9cacf47085c7ef8122bfee88cd9c6192a8314c81bfb1b37f5809 \ No newline at end of file +c5be11d2fb1115be953c541f30c50f7c71a00bc4a0e128e19aa11b60689317fc \ No newline at end of file diff --git a/openpilot/sunnypilot/models/tests/test_default_model.py b/openpilot/sunnypilot/models/tests/test_default_model.py index c322d3b69..71a18fc61 100644 --- a/openpilot/sunnypilot/models/tests/test_default_model.py +++ b/openpilot/sunnypilot/models/tests/test_default_model.py @@ -10,7 +10,7 @@ import subprocess from openpilot.sunnypilot import get_file_hash from openpilot.sunnypilot.models.default_model import MODEL_HASH_PATH, SUPERCOMBO_ONNX_PATH, BIG_MODEL_HASH_PATH, \ - BIG_SUPERCOMBO_ONNX_PATH + BIG_SUPERCOMBO_ONNX_PATH, _read_model_name_fields import hashlib from openpilot.common.test import OpenpilotTestCase @@ -26,9 +26,10 @@ def _get_lfs_oid(path: str) -> str: class TestDefaultModel(OpenpilotTestCase): def test_compare_onnx_hashes(self): + fields = _read_model_name_fields() supercombo_hash = get_file_hash(SUPERCOMBO_ONNX_PATH) - - combined_hash = hashlib.sha256(supercombo_hash.encode()).hexdigest() + fingerprint = f"{supercombo_hash}:{fields.get('DEFAULT_MODEL', '')}:{fields.get('DEFAULT_MODEL_REF', '')}" + combined_hash = hashlib.sha256(fingerprint.encode()).hexdigest() with open(MODEL_HASH_PATH) as f: current_hash = f.read().strip() @@ -39,8 +40,10 @@ class TestDefaultModel(OpenpilotTestCase): if not os.path.exists(BIG_SUPERCOMBO_ONNX_PATH): self.skipTest("big_driving_supercombo.onnx not present") + fields = _read_model_name_fields() oid = _get_lfs_oid(os.path.relpath(BIG_SUPERCOMBO_ONNX_PATH, os.getcwd())) - combined_hash = hashlib.sha256(oid.encode()).hexdigest() + big_fingerprint = f"{oid}:{fields.get('DEFAULT_BIG_MODEL', '')}:{fields.get('DEFAULT_BIG_MODEL_REF', '')}" + combined_hash = hashlib.sha256(big_fingerprint.encode()).hexdigest() with open(BIG_MODEL_HASH_PATH) as f: current_hash = f.read().strip() diff --git a/openpilot/sunnypilot/selfdrive/locationd/locationd b/openpilot/sunnypilot/selfdrive/locationd/locationd index 31dea5464..1f21e3b74 100755 Binary files a/openpilot/sunnypilot/selfdrive/locationd/locationd and b/openpilot/sunnypilot/selfdrive/locationd/locationd differ diff --git a/openpilot/sunnypilot/selfdrive/locationd/models/generated/liblive.so b/openpilot/sunnypilot/selfdrive/locationd/models/generated/liblive.so index 6207cc1c2..c2517161f 100755 Binary files a/openpilot/sunnypilot/selfdrive/locationd/models/generated/liblive.so and b/openpilot/sunnypilot/selfdrive/locationd/models/generated/liblive.so differ diff --git a/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.cpp b/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.cpp index b33b19b75..d0f264a1b 100644 --- a/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.cpp +++ b/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.cpp @@ -22,1683 +22,1683 @@ const static double MAHA_THRESH_33 = 7.814727903251177; * * * This file is part of 'ekf' * ******************************************************************************/ -void H(double *in_vec, double *out_4141618569674559553) { - out_4141618569674559553[0] = 0; - out_4141618569674559553[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5]; - out_4141618569674559553[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; - out_4141618569674559553[3] = cos(in_vec[1])*cos(in_vec[2]); - out_4141618569674559553[4] = sin(in_vec[2])*cos(in_vec[1]); - out_4141618569674559553[5] = -sin(in_vec[1]); - out_4141618569674559553[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5]; - out_4141618569674559553[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; - out_4141618569674559553[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4]; - out_4141618569674559553[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); - out_4141618569674559553[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); - out_4141618569674559553[11] = sin(in_vec[0])*cos(in_vec[1]); - out_4141618569674559553[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5]; - out_4141618569674559553[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; - out_4141618569674559553[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3]; - out_4141618569674559553[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); - out_4141618569674559553[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); - out_4141618569674559553[17] = cos(in_vec[0])*cos(in_vec[1]); +void H(double *in_vec, double *out_47804104617978308) { + out_47804104617978308[0] = 0; + out_47804104617978308[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5]; + out_47804104617978308[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4]; + out_47804104617978308[3] = cos(in_vec[1])*cos(in_vec[2]); + out_47804104617978308[4] = sin(in_vec[2])*cos(in_vec[1]); + out_47804104617978308[5] = -sin(in_vec[1]); + out_47804104617978308[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5]; + out_47804104617978308[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; + out_47804104617978308[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4]; + out_47804104617978308[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]); + out_47804104617978308[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]); + out_47804104617978308[11] = sin(in_vec[0])*cos(in_vec[1]); + out_47804104617978308[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5]; + out_47804104617978308[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3]; + out_47804104617978308[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3]; + out_47804104617978308[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]); + out_47804104617978308[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]); + out_47804104617978308[17] = cos(in_vec[0])*cos(in_vec[1]); } -void err_fun(double *nom_x, double *delta_x, double *out_336104914132035225) { - out_336104914132035225[0] = delta_x[0] + nom_x[0]; - out_336104914132035225[1] = delta_x[1] + nom_x[1]; - out_336104914132035225[2] = delta_x[2] + nom_x[2]; - out_336104914132035225[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3]; - out_336104914132035225[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4]; - out_336104914132035225[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5]; - out_336104914132035225[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6]; - out_336104914132035225[7] = delta_x[6] + nom_x[7]; - out_336104914132035225[8] = delta_x[7] + nom_x[8]; - out_336104914132035225[9] = delta_x[8] + nom_x[9]; - out_336104914132035225[10] = delta_x[9] + nom_x[10]; - out_336104914132035225[11] = delta_x[10] + nom_x[11]; - out_336104914132035225[12] = delta_x[11] + nom_x[12]; - out_336104914132035225[13] = delta_x[12] + nom_x[13]; - out_336104914132035225[14] = delta_x[13] + nom_x[14]; - out_336104914132035225[15] = delta_x[14] + nom_x[15]; - out_336104914132035225[16] = delta_x[15] + nom_x[16]; - out_336104914132035225[17] = delta_x[16] + nom_x[17]; - out_336104914132035225[18] = delta_x[17] + nom_x[18]; - out_336104914132035225[19] = delta_x[18] + nom_x[19]; - out_336104914132035225[20] = delta_x[19] + nom_x[20]; - out_336104914132035225[21] = delta_x[20] + nom_x[21]; +void err_fun(double *nom_x, double *delta_x, double *out_3044735197278814730) { + out_3044735197278814730[0] = delta_x[0] + nom_x[0]; + out_3044735197278814730[1] = delta_x[1] + nom_x[1]; + out_3044735197278814730[2] = delta_x[2] + nom_x[2]; + out_3044735197278814730[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3]; + out_3044735197278814730[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4]; + out_3044735197278814730[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5]; + out_3044735197278814730[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6]; + out_3044735197278814730[7] = delta_x[6] + nom_x[7]; + out_3044735197278814730[8] = delta_x[7] + nom_x[8]; + out_3044735197278814730[9] = delta_x[8] + nom_x[9]; + out_3044735197278814730[10] = delta_x[9] + nom_x[10]; + out_3044735197278814730[11] = delta_x[10] + nom_x[11]; + out_3044735197278814730[12] = delta_x[11] + nom_x[12]; + out_3044735197278814730[13] = delta_x[12] + nom_x[13]; + out_3044735197278814730[14] = delta_x[13] + nom_x[14]; + out_3044735197278814730[15] = delta_x[14] + nom_x[15]; + out_3044735197278814730[16] = delta_x[15] + nom_x[16]; + out_3044735197278814730[17] = delta_x[16] + nom_x[17]; + out_3044735197278814730[18] = delta_x[17] + nom_x[18]; + out_3044735197278814730[19] = delta_x[18] + nom_x[19]; + out_3044735197278814730[20] = delta_x[19] + nom_x[20]; + out_3044735197278814730[21] = delta_x[20] + nom_x[21]; } -void inv_err_fun(double *nom_x, double *true_x, double *out_7271859698776574756) { - out_7271859698776574756[0] = -nom_x[0] + true_x[0]; - out_7271859698776574756[1] = -nom_x[1] + true_x[1]; - out_7271859698776574756[2] = -nom_x[2] + true_x[2]; - out_7271859698776574756[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5]; - out_7271859698776574756[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4]; - out_7271859698776574756[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3]; - out_7271859698776574756[6] = -nom_x[7] + true_x[7]; - out_7271859698776574756[7] = -nom_x[8] + true_x[8]; - out_7271859698776574756[8] = -nom_x[9] + true_x[9]; - out_7271859698776574756[9] = -nom_x[10] + true_x[10]; - out_7271859698776574756[10] = -nom_x[11] + true_x[11]; - out_7271859698776574756[11] = -nom_x[12] + true_x[12]; - out_7271859698776574756[12] = -nom_x[13] + true_x[13]; - out_7271859698776574756[13] = -nom_x[14] + true_x[14]; - out_7271859698776574756[14] = -nom_x[15] + true_x[15]; - out_7271859698776574756[15] = -nom_x[16] + true_x[16]; - out_7271859698776574756[16] = -nom_x[17] + true_x[17]; - out_7271859698776574756[17] = -nom_x[18] + true_x[18]; - out_7271859698776574756[18] = -nom_x[19] + true_x[19]; - out_7271859698776574756[19] = -nom_x[20] + true_x[20]; - out_7271859698776574756[20] = -nom_x[21] + true_x[21]; +void inv_err_fun(double *nom_x, double *true_x, double *out_1197418404864356272) { + out_1197418404864356272[0] = -nom_x[0] + true_x[0]; + out_1197418404864356272[1] = -nom_x[1] + true_x[1]; + out_1197418404864356272[2] = -nom_x[2] + true_x[2]; + out_1197418404864356272[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5]; + out_1197418404864356272[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4]; + out_1197418404864356272[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3]; + out_1197418404864356272[6] = -nom_x[7] + true_x[7]; + out_1197418404864356272[7] = -nom_x[8] + true_x[8]; + out_1197418404864356272[8] = -nom_x[9] + true_x[9]; + out_1197418404864356272[9] = -nom_x[10] + true_x[10]; + out_1197418404864356272[10] = -nom_x[11] + true_x[11]; + out_1197418404864356272[11] = -nom_x[12] + true_x[12]; + out_1197418404864356272[12] = -nom_x[13] + true_x[13]; + out_1197418404864356272[13] = -nom_x[14] + true_x[14]; + out_1197418404864356272[14] = -nom_x[15] + true_x[15]; + out_1197418404864356272[15] = -nom_x[16] + true_x[16]; + out_1197418404864356272[16] = -nom_x[17] + true_x[17]; + out_1197418404864356272[17] = -nom_x[18] + true_x[18]; + out_1197418404864356272[18] = -nom_x[19] + true_x[19]; + out_1197418404864356272[19] = -nom_x[20] + true_x[20]; + out_1197418404864356272[20] = -nom_x[21] + true_x[21]; } -void H_mod_fun(double *state, double *out_5296745522040587483) { - out_5296745522040587483[0] = 1.0; - out_5296745522040587483[1] = 0; - out_5296745522040587483[2] = 0; - out_5296745522040587483[3] = 0.0; - out_5296745522040587483[4] = 0.0; - out_5296745522040587483[5] = 0.0; - out_5296745522040587483[6] = 0.0; - out_5296745522040587483[7] = 0.0; - out_5296745522040587483[8] = 0.0; - out_5296745522040587483[9] = 0.0; - out_5296745522040587483[10] = 0.0; - out_5296745522040587483[11] = 0.0; - out_5296745522040587483[12] = 0.0; - out_5296745522040587483[13] = 0.0; - out_5296745522040587483[14] = 0.0; - out_5296745522040587483[15] = 0.0; - out_5296745522040587483[16] = 0.0; - out_5296745522040587483[17] = 0.0; - out_5296745522040587483[18] = 0.0; - out_5296745522040587483[19] = 0.0; - out_5296745522040587483[20] = 0.0; - out_5296745522040587483[21] = 0; - out_5296745522040587483[22] = 1.0; - out_5296745522040587483[23] = 0; - out_5296745522040587483[24] = 0.0; - out_5296745522040587483[25] = 0.0; - out_5296745522040587483[26] = 0.0; - out_5296745522040587483[27] = 0.0; - out_5296745522040587483[28] = 0.0; - out_5296745522040587483[29] = 0.0; - out_5296745522040587483[30] = 0.0; - out_5296745522040587483[31] = 0.0; - out_5296745522040587483[32] = 0.0; - out_5296745522040587483[33] = 0.0; - out_5296745522040587483[34] = 0.0; - out_5296745522040587483[35] = 0.0; - out_5296745522040587483[36] = 0.0; - out_5296745522040587483[37] = 0.0; - out_5296745522040587483[38] = 0.0; - out_5296745522040587483[39] = 0.0; - out_5296745522040587483[40] = 0.0; - out_5296745522040587483[41] = 0.0; - out_5296745522040587483[42] = 0; - out_5296745522040587483[43] = 0; - out_5296745522040587483[44] = 1.0; - out_5296745522040587483[45] = 0.0; - out_5296745522040587483[46] = 0.0; - out_5296745522040587483[47] = 0.0; - out_5296745522040587483[48] = 0.0; - out_5296745522040587483[49] = 0.0; - out_5296745522040587483[50] = 0.0; - out_5296745522040587483[51] = 0.0; - out_5296745522040587483[52] = 0.0; - out_5296745522040587483[53] = 0.0; - out_5296745522040587483[54] = 0.0; - out_5296745522040587483[55] = 0.0; - out_5296745522040587483[56] = 0.0; - out_5296745522040587483[57] = 0.0; - out_5296745522040587483[58] = 0.0; - out_5296745522040587483[59] = 0.0; - out_5296745522040587483[60] = 0.0; - out_5296745522040587483[61] = 0.0; - out_5296745522040587483[62] = 0.0; - out_5296745522040587483[63] = 0.0; - out_5296745522040587483[64] = 0.0; - out_5296745522040587483[65] = 0.0; - out_5296745522040587483[66] = -0.5*state[4]; - out_5296745522040587483[67] = -0.5*state[5]; - out_5296745522040587483[68] = -0.5*state[6]; - out_5296745522040587483[69] = 0.0; - out_5296745522040587483[70] = 0.0; - out_5296745522040587483[71] = 0.0; - out_5296745522040587483[72] = 0.0; - out_5296745522040587483[73] = 0.0; - out_5296745522040587483[74] = 0.0; - out_5296745522040587483[75] = 0.0; - out_5296745522040587483[76] = 0.0; - out_5296745522040587483[77] = 0.0; - out_5296745522040587483[78] = 0.0; - out_5296745522040587483[79] = 0.0; - out_5296745522040587483[80] = 0.0; - out_5296745522040587483[81] = 0.0; - out_5296745522040587483[82] = 0.0; - out_5296745522040587483[83] = 0.0; - out_5296745522040587483[84] = 0.0; - out_5296745522040587483[85] = 0.0; - out_5296745522040587483[86] = 0.0; - out_5296745522040587483[87] = 0.5*state[3]; - out_5296745522040587483[88] = 0.5*state[6]; - out_5296745522040587483[89] = -0.5*state[5]; - out_5296745522040587483[90] = 0.0; - out_5296745522040587483[91] = 0.0; - out_5296745522040587483[92] = 0.0; - out_5296745522040587483[93] = 0.0; - out_5296745522040587483[94] = 0.0; - out_5296745522040587483[95] = 0.0; - out_5296745522040587483[96] = 0.0; - out_5296745522040587483[97] = 0.0; - out_5296745522040587483[98] = 0.0; - out_5296745522040587483[99] = 0.0; - out_5296745522040587483[100] = 0.0; - out_5296745522040587483[101] = 0.0; - out_5296745522040587483[102] = 0.0; - out_5296745522040587483[103] = 0.0; - out_5296745522040587483[104] = 0.0; - out_5296745522040587483[105] = 0.0; - out_5296745522040587483[106] = 0.0; - out_5296745522040587483[107] = 0.0; - out_5296745522040587483[108] = -0.5*state[6]; - out_5296745522040587483[109] = 0.5*state[3]; - out_5296745522040587483[110] = 0.5*state[4]; - out_5296745522040587483[111] = 0.0; - out_5296745522040587483[112] = 0.0; - out_5296745522040587483[113] = 0.0; - out_5296745522040587483[114] = 0.0; - out_5296745522040587483[115] = 0.0; - out_5296745522040587483[116] = 0.0; - out_5296745522040587483[117] = 0.0; - out_5296745522040587483[118] = 0.0; - out_5296745522040587483[119] = 0.0; - out_5296745522040587483[120] = 0.0; - out_5296745522040587483[121] = 0.0; - out_5296745522040587483[122] = 0.0; - out_5296745522040587483[123] = 0.0; - out_5296745522040587483[124] = 0.0; - out_5296745522040587483[125] = 0.0; - out_5296745522040587483[126] = 0.0; - out_5296745522040587483[127] = 0.0; - out_5296745522040587483[128] = 0.0; - out_5296745522040587483[129] = 0.5*state[5]; - out_5296745522040587483[130] = -0.5*state[4]; - out_5296745522040587483[131] = 0.5*state[3]; - out_5296745522040587483[132] = 0.0; - out_5296745522040587483[133] = 0.0; - out_5296745522040587483[134] = 0.0; - out_5296745522040587483[135] = 0.0; - out_5296745522040587483[136] = 0.0; - out_5296745522040587483[137] = 0.0; - out_5296745522040587483[138] = 0.0; - out_5296745522040587483[139] = 0.0; - out_5296745522040587483[140] = 0.0; - out_5296745522040587483[141] = 0.0; - out_5296745522040587483[142] = 0.0; - out_5296745522040587483[143] = 0.0; - out_5296745522040587483[144] = 0.0; - out_5296745522040587483[145] = 0.0; - out_5296745522040587483[146] = 0.0; - out_5296745522040587483[147] = 0.0; - out_5296745522040587483[148] = 0.0; - out_5296745522040587483[149] = 0.0; - out_5296745522040587483[150] = 0.0; - out_5296745522040587483[151] = 0.0; - out_5296745522040587483[152] = 0.0; - out_5296745522040587483[153] = 1.0; - out_5296745522040587483[154] = 0; - out_5296745522040587483[155] = 0; - out_5296745522040587483[156] = 0; - out_5296745522040587483[157] = 0; - out_5296745522040587483[158] = 0; - out_5296745522040587483[159] = 0; - out_5296745522040587483[160] = 0; - out_5296745522040587483[161] = 0; - out_5296745522040587483[162] = 0; - out_5296745522040587483[163] = 0; - out_5296745522040587483[164] = 0; - out_5296745522040587483[165] = 0; - out_5296745522040587483[166] = 0; - out_5296745522040587483[167] = 0; - out_5296745522040587483[168] = 0.0; - out_5296745522040587483[169] = 0.0; - out_5296745522040587483[170] = 0.0; - out_5296745522040587483[171] = 0.0; - out_5296745522040587483[172] = 0.0; - out_5296745522040587483[173] = 0.0; - out_5296745522040587483[174] = 0; - out_5296745522040587483[175] = 1.0; - out_5296745522040587483[176] = 0; - out_5296745522040587483[177] = 0; - out_5296745522040587483[178] = 0; - out_5296745522040587483[179] = 0; - out_5296745522040587483[180] = 0; - out_5296745522040587483[181] = 0; - out_5296745522040587483[182] = 0; - out_5296745522040587483[183] = 0; - out_5296745522040587483[184] = 0; - out_5296745522040587483[185] = 0; - out_5296745522040587483[186] = 0; - out_5296745522040587483[187] = 0; - out_5296745522040587483[188] = 0; - out_5296745522040587483[189] = 0.0; - out_5296745522040587483[190] = 0.0; - out_5296745522040587483[191] = 0.0; - out_5296745522040587483[192] = 0.0; - out_5296745522040587483[193] = 0.0; - out_5296745522040587483[194] = 0.0; - out_5296745522040587483[195] = 0; - out_5296745522040587483[196] = 0; - out_5296745522040587483[197] = 1.0; - out_5296745522040587483[198] = 0; - out_5296745522040587483[199] = 0; - out_5296745522040587483[200] = 0; - out_5296745522040587483[201] = 0; - out_5296745522040587483[202] = 0; - out_5296745522040587483[203] = 0; - out_5296745522040587483[204] = 0; - out_5296745522040587483[205] = 0; - out_5296745522040587483[206] = 0; - out_5296745522040587483[207] = 0; - out_5296745522040587483[208] = 0; - out_5296745522040587483[209] = 0; - out_5296745522040587483[210] = 0.0; - out_5296745522040587483[211] = 0.0; - out_5296745522040587483[212] = 0.0; - out_5296745522040587483[213] = 0.0; - out_5296745522040587483[214] = 0.0; - out_5296745522040587483[215] = 0.0; - out_5296745522040587483[216] = 0; - out_5296745522040587483[217] = 0; - out_5296745522040587483[218] = 0; - out_5296745522040587483[219] = 1.0; - out_5296745522040587483[220] = 0; - out_5296745522040587483[221] = 0; - out_5296745522040587483[222] = 0; - out_5296745522040587483[223] = 0; - out_5296745522040587483[224] = 0; - out_5296745522040587483[225] = 0; - out_5296745522040587483[226] = 0; - out_5296745522040587483[227] = 0; - out_5296745522040587483[228] = 0; - out_5296745522040587483[229] = 0; - out_5296745522040587483[230] = 0; - out_5296745522040587483[231] = 0.0; - out_5296745522040587483[232] = 0.0; - out_5296745522040587483[233] = 0.0; - out_5296745522040587483[234] = 0.0; - out_5296745522040587483[235] = 0.0; - out_5296745522040587483[236] = 0.0; - out_5296745522040587483[237] = 0; - out_5296745522040587483[238] = 0; - out_5296745522040587483[239] = 0; - out_5296745522040587483[240] = 0; - out_5296745522040587483[241] = 1.0; - out_5296745522040587483[242] = 0; - out_5296745522040587483[243] = 0; - out_5296745522040587483[244] = 0; - out_5296745522040587483[245] = 0; - out_5296745522040587483[246] = 0; - out_5296745522040587483[247] = 0; - out_5296745522040587483[248] = 0; - out_5296745522040587483[249] = 0; - out_5296745522040587483[250] = 0; - out_5296745522040587483[251] = 0; - out_5296745522040587483[252] = 0.0; - out_5296745522040587483[253] = 0.0; - out_5296745522040587483[254] = 0.0; - out_5296745522040587483[255] = 0.0; - out_5296745522040587483[256] = 0.0; - out_5296745522040587483[257] = 0.0; - out_5296745522040587483[258] = 0; - out_5296745522040587483[259] = 0; - out_5296745522040587483[260] = 0; - out_5296745522040587483[261] = 0; - out_5296745522040587483[262] = 0; - out_5296745522040587483[263] = 1.0; - out_5296745522040587483[264] = 0; - out_5296745522040587483[265] = 0; - out_5296745522040587483[266] = 0; - out_5296745522040587483[267] = 0; - out_5296745522040587483[268] = 0; - out_5296745522040587483[269] = 0; - out_5296745522040587483[270] = 0; - out_5296745522040587483[271] = 0; - out_5296745522040587483[272] = 0; - out_5296745522040587483[273] = 0.0; - out_5296745522040587483[274] = 0.0; - out_5296745522040587483[275] = 0.0; - out_5296745522040587483[276] = 0.0; - out_5296745522040587483[277] = 0.0; - out_5296745522040587483[278] = 0.0; - out_5296745522040587483[279] = 0; - out_5296745522040587483[280] = 0; - out_5296745522040587483[281] = 0; - out_5296745522040587483[282] = 0; - out_5296745522040587483[283] = 0; - out_5296745522040587483[284] = 0; - out_5296745522040587483[285] = 1.0; - out_5296745522040587483[286] = 0; - out_5296745522040587483[287] = 0; - out_5296745522040587483[288] = 0; - out_5296745522040587483[289] = 0; - out_5296745522040587483[290] = 0; - out_5296745522040587483[291] = 0; - out_5296745522040587483[292] = 0; - out_5296745522040587483[293] = 0; - out_5296745522040587483[294] = 0.0; - out_5296745522040587483[295] = 0.0; - out_5296745522040587483[296] = 0.0; - out_5296745522040587483[297] = 0.0; - out_5296745522040587483[298] = 0.0; - out_5296745522040587483[299] = 0.0; - out_5296745522040587483[300] = 0; - out_5296745522040587483[301] = 0; - out_5296745522040587483[302] = 0; - out_5296745522040587483[303] = 0; - out_5296745522040587483[304] = 0; - out_5296745522040587483[305] = 0; - out_5296745522040587483[306] = 0; - out_5296745522040587483[307] = 1.0; - out_5296745522040587483[308] = 0; - out_5296745522040587483[309] = 0; - out_5296745522040587483[310] = 0; - out_5296745522040587483[311] = 0; - out_5296745522040587483[312] = 0; - out_5296745522040587483[313] = 0; - out_5296745522040587483[314] = 0; - out_5296745522040587483[315] = 0.0; - out_5296745522040587483[316] = 0.0; - out_5296745522040587483[317] = 0.0; - out_5296745522040587483[318] = 0.0; - out_5296745522040587483[319] = 0.0; - out_5296745522040587483[320] = 0.0; - out_5296745522040587483[321] = 0; - out_5296745522040587483[322] = 0; - out_5296745522040587483[323] = 0; - out_5296745522040587483[324] = 0; - out_5296745522040587483[325] = 0; - out_5296745522040587483[326] = 0; - out_5296745522040587483[327] = 0; - out_5296745522040587483[328] = 0; - out_5296745522040587483[329] = 1.0; - out_5296745522040587483[330] = 0; - out_5296745522040587483[331] = 0; - out_5296745522040587483[332] = 0; - out_5296745522040587483[333] = 0; - out_5296745522040587483[334] = 0; - out_5296745522040587483[335] = 0; - out_5296745522040587483[336] = 0.0; - out_5296745522040587483[337] = 0.0; - out_5296745522040587483[338] = 0.0; - out_5296745522040587483[339] = 0.0; - out_5296745522040587483[340] = 0.0; - out_5296745522040587483[341] = 0.0; - out_5296745522040587483[342] = 0; - out_5296745522040587483[343] = 0; - out_5296745522040587483[344] = 0; - out_5296745522040587483[345] = 0; - out_5296745522040587483[346] = 0; - out_5296745522040587483[347] = 0; - out_5296745522040587483[348] = 0; - out_5296745522040587483[349] = 0; - out_5296745522040587483[350] = 0; - out_5296745522040587483[351] = 1.0; - out_5296745522040587483[352] = 0; - out_5296745522040587483[353] = 0; - out_5296745522040587483[354] = 0; - out_5296745522040587483[355] = 0; - out_5296745522040587483[356] = 0; - out_5296745522040587483[357] = 0.0; - out_5296745522040587483[358] = 0.0; - out_5296745522040587483[359] = 0.0; - out_5296745522040587483[360] = 0.0; - out_5296745522040587483[361] = 0.0; - out_5296745522040587483[362] = 0.0; - out_5296745522040587483[363] = 0; - out_5296745522040587483[364] = 0; - out_5296745522040587483[365] = 0; - out_5296745522040587483[366] = 0; - out_5296745522040587483[367] = 0; - out_5296745522040587483[368] = 0; - out_5296745522040587483[369] = 0; - out_5296745522040587483[370] = 0; - out_5296745522040587483[371] = 0; - out_5296745522040587483[372] = 0; - out_5296745522040587483[373] = 1.0; - out_5296745522040587483[374] = 0; - out_5296745522040587483[375] = 0; - out_5296745522040587483[376] = 0; - out_5296745522040587483[377] = 0; - out_5296745522040587483[378] = 0.0; - out_5296745522040587483[379] = 0.0; - out_5296745522040587483[380] = 0.0; - out_5296745522040587483[381] = 0.0; - out_5296745522040587483[382] = 0.0; - out_5296745522040587483[383] = 0.0; - out_5296745522040587483[384] = 0; - out_5296745522040587483[385] = 0; - out_5296745522040587483[386] = 0; - out_5296745522040587483[387] = 0; - out_5296745522040587483[388] = 0; - out_5296745522040587483[389] = 0; - out_5296745522040587483[390] = 0; - out_5296745522040587483[391] = 0; - out_5296745522040587483[392] = 0; - out_5296745522040587483[393] = 0; - out_5296745522040587483[394] = 0; - out_5296745522040587483[395] = 1.0; - out_5296745522040587483[396] = 0; - out_5296745522040587483[397] = 0; - out_5296745522040587483[398] = 0; - out_5296745522040587483[399] = 0.0; - out_5296745522040587483[400] = 0.0; - out_5296745522040587483[401] = 0.0; - out_5296745522040587483[402] = 0.0; - out_5296745522040587483[403] = 0.0; - out_5296745522040587483[404] = 0.0; - out_5296745522040587483[405] = 0; - out_5296745522040587483[406] = 0; - out_5296745522040587483[407] = 0; - out_5296745522040587483[408] = 0; - out_5296745522040587483[409] = 0; - out_5296745522040587483[410] = 0; - out_5296745522040587483[411] = 0; - out_5296745522040587483[412] = 0; - out_5296745522040587483[413] = 0; - out_5296745522040587483[414] = 0; - out_5296745522040587483[415] = 0; - out_5296745522040587483[416] = 0; - out_5296745522040587483[417] = 1.0; - out_5296745522040587483[418] = 0; - out_5296745522040587483[419] = 0; - out_5296745522040587483[420] = 0.0; - out_5296745522040587483[421] = 0.0; - out_5296745522040587483[422] = 0.0; - out_5296745522040587483[423] = 0.0; - out_5296745522040587483[424] = 0.0; - out_5296745522040587483[425] = 0.0; - out_5296745522040587483[426] = 0; - out_5296745522040587483[427] = 0; - out_5296745522040587483[428] = 0; - out_5296745522040587483[429] = 0; - out_5296745522040587483[430] = 0; - out_5296745522040587483[431] = 0; - out_5296745522040587483[432] = 0; - out_5296745522040587483[433] = 0; - out_5296745522040587483[434] = 0; - out_5296745522040587483[435] = 0; - out_5296745522040587483[436] = 0; - out_5296745522040587483[437] = 0; - out_5296745522040587483[438] = 0; - out_5296745522040587483[439] = 1.0; - out_5296745522040587483[440] = 0; - out_5296745522040587483[441] = 0.0; - out_5296745522040587483[442] = 0.0; - out_5296745522040587483[443] = 0.0; - out_5296745522040587483[444] = 0.0; - out_5296745522040587483[445] = 0.0; - out_5296745522040587483[446] = 0.0; - out_5296745522040587483[447] = 0; - out_5296745522040587483[448] = 0; - out_5296745522040587483[449] = 0; - out_5296745522040587483[450] = 0; - out_5296745522040587483[451] = 0; - out_5296745522040587483[452] = 0; - out_5296745522040587483[453] = 0; - out_5296745522040587483[454] = 0; - out_5296745522040587483[455] = 0; - out_5296745522040587483[456] = 0; - out_5296745522040587483[457] = 0; - out_5296745522040587483[458] = 0; - out_5296745522040587483[459] = 0; - out_5296745522040587483[460] = 0; - out_5296745522040587483[461] = 1.0; +void H_mod_fun(double *state, double *out_4480637621689338596) { + out_4480637621689338596[0] = 1.0; + out_4480637621689338596[1] = 0; + out_4480637621689338596[2] = 0; + out_4480637621689338596[3] = 0.0; + out_4480637621689338596[4] = 0.0; + out_4480637621689338596[5] = 0.0; + out_4480637621689338596[6] = 0.0; + out_4480637621689338596[7] = 0.0; + out_4480637621689338596[8] = 0.0; + out_4480637621689338596[9] = 0.0; + out_4480637621689338596[10] = 0.0; + out_4480637621689338596[11] = 0.0; + out_4480637621689338596[12] = 0.0; + out_4480637621689338596[13] = 0.0; + out_4480637621689338596[14] = 0.0; + out_4480637621689338596[15] = 0.0; + out_4480637621689338596[16] = 0.0; + out_4480637621689338596[17] = 0.0; + out_4480637621689338596[18] = 0.0; + out_4480637621689338596[19] = 0.0; + out_4480637621689338596[20] = 0.0; + out_4480637621689338596[21] = 0; + out_4480637621689338596[22] = 1.0; + out_4480637621689338596[23] = 0; + out_4480637621689338596[24] = 0.0; + out_4480637621689338596[25] = 0.0; + out_4480637621689338596[26] = 0.0; + out_4480637621689338596[27] = 0.0; + out_4480637621689338596[28] = 0.0; + out_4480637621689338596[29] = 0.0; + out_4480637621689338596[30] = 0.0; + out_4480637621689338596[31] = 0.0; + out_4480637621689338596[32] = 0.0; + out_4480637621689338596[33] = 0.0; + out_4480637621689338596[34] = 0.0; + out_4480637621689338596[35] = 0.0; + out_4480637621689338596[36] = 0.0; + out_4480637621689338596[37] = 0.0; + out_4480637621689338596[38] = 0.0; + out_4480637621689338596[39] = 0.0; + out_4480637621689338596[40] = 0.0; + out_4480637621689338596[41] = 0.0; + out_4480637621689338596[42] = 0; + out_4480637621689338596[43] = 0; + out_4480637621689338596[44] = 1.0; + out_4480637621689338596[45] = 0.0; + out_4480637621689338596[46] = 0.0; + out_4480637621689338596[47] = 0.0; + out_4480637621689338596[48] = 0.0; + out_4480637621689338596[49] = 0.0; + out_4480637621689338596[50] = 0.0; + out_4480637621689338596[51] = 0.0; + out_4480637621689338596[52] = 0.0; + out_4480637621689338596[53] = 0.0; + out_4480637621689338596[54] = 0.0; + out_4480637621689338596[55] = 0.0; + out_4480637621689338596[56] = 0.0; + out_4480637621689338596[57] = 0.0; + out_4480637621689338596[58] = 0.0; + out_4480637621689338596[59] = 0.0; + out_4480637621689338596[60] = 0.0; + out_4480637621689338596[61] = 0.0; + out_4480637621689338596[62] = 0.0; + out_4480637621689338596[63] = 0.0; + out_4480637621689338596[64] = 0.0; + out_4480637621689338596[65] = 0.0; + out_4480637621689338596[66] = -0.5*state[4]; + out_4480637621689338596[67] = -0.5*state[5]; + out_4480637621689338596[68] = -0.5*state[6]; + out_4480637621689338596[69] = 0.0; + out_4480637621689338596[70] = 0.0; + out_4480637621689338596[71] = 0.0; + out_4480637621689338596[72] = 0.0; + out_4480637621689338596[73] = 0.0; + out_4480637621689338596[74] = 0.0; + out_4480637621689338596[75] = 0.0; + out_4480637621689338596[76] = 0.0; + out_4480637621689338596[77] = 0.0; + out_4480637621689338596[78] = 0.0; + out_4480637621689338596[79] = 0.0; + out_4480637621689338596[80] = 0.0; + out_4480637621689338596[81] = 0.0; + out_4480637621689338596[82] = 0.0; + out_4480637621689338596[83] = 0.0; + out_4480637621689338596[84] = 0.0; + out_4480637621689338596[85] = 0.0; + out_4480637621689338596[86] = 0.0; + out_4480637621689338596[87] = 0.5*state[3]; + out_4480637621689338596[88] = 0.5*state[6]; + out_4480637621689338596[89] = -0.5*state[5]; + out_4480637621689338596[90] = 0.0; + out_4480637621689338596[91] = 0.0; + out_4480637621689338596[92] = 0.0; + out_4480637621689338596[93] = 0.0; + out_4480637621689338596[94] = 0.0; + out_4480637621689338596[95] = 0.0; + out_4480637621689338596[96] = 0.0; + out_4480637621689338596[97] = 0.0; + out_4480637621689338596[98] = 0.0; + out_4480637621689338596[99] = 0.0; + out_4480637621689338596[100] = 0.0; + out_4480637621689338596[101] = 0.0; + out_4480637621689338596[102] = 0.0; + out_4480637621689338596[103] = 0.0; + out_4480637621689338596[104] = 0.0; + out_4480637621689338596[105] = 0.0; + out_4480637621689338596[106] = 0.0; + out_4480637621689338596[107] = 0.0; + out_4480637621689338596[108] = -0.5*state[6]; + out_4480637621689338596[109] = 0.5*state[3]; + out_4480637621689338596[110] = 0.5*state[4]; + out_4480637621689338596[111] = 0.0; + out_4480637621689338596[112] = 0.0; + out_4480637621689338596[113] = 0.0; + out_4480637621689338596[114] = 0.0; + out_4480637621689338596[115] = 0.0; + out_4480637621689338596[116] = 0.0; + out_4480637621689338596[117] = 0.0; + out_4480637621689338596[118] = 0.0; + out_4480637621689338596[119] = 0.0; + out_4480637621689338596[120] = 0.0; + out_4480637621689338596[121] = 0.0; + out_4480637621689338596[122] = 0.0; + out_4480637621689338596[123] = 0.0; + out_4480637621689338596[124] = 0.0; + out_4480637621689338596[125] = 0.0; + out_4480637621689338596[126] = 0.0; + out_4480637621689338596[127] = 0.0; + out_4480637621689338596[128] = 0.0; + out_4480637621689338596[129] = 0.5*state[5]; + out_4480637621689338596[130] = -0.5*state[4]; + out_4480637621689338596[131] = 0.5*state[3]; + out_4480637621689338596[132] = 0.0; + out_4480637621689338596[133] = 0.0; + out_4480637621689338596[134] = 0.0; + out_4480637621689338596[135] = 0.0; + out_4480637621689338596[136] = 0.0; + out_4480637621689338596[137] = 0.0; + out_4480637621689338596[138] = 0.0; + out_4480637621689338596[139] = 0.0; + out_4480637621689338596[140] = 0.0; + out_4480637621689338596[141] = 0.0; + out_4480637621689338596[142] = 0.0; + out_4480637621689338596[143] = 0.0; + out_4480637621689338596[144] = 0.0; + out_4480637621689338596[145] = 0.0; + out_4480637621689338596[146] = 0.0; + out_4480637621689338596[147] = 0.0; + out_4480637621689338596[148] = 0.0; + out_4480637621689338596[149] = 0.0; + out_4480637621689338596[150] = 0.0; + out_4480637621689338596[151] = 0.0; + out_4480637621689338596[152] = 0.0; + out_4480637621689338596[153] = 1.0; + out_4480637621689338596[154] = 0; + out_4480637621689338596[155] = 0; + out_4480637621689338596[156] = 0; + out_4480637621689338596[157] = 0; + out_4480637621689338596[158] = 0; + out_4480637621689338596[159] = 0; + out_4480637621689338596[160] = 0; + out_4480637621689338596[161] = 0; + out_4480637621689338596[162] = 0; + out_4480637621689338596[163] = 0; + out_4480637621689338596[164] = 0; + out_4480637621689338596[165] = 0; + out_4480637621689338596[166] = 0; + out_4480637621689338596[167] = 0; + out_4480637621689338596[168] = 0.0; + out_4480637621689338596[169] = 0.0; + out_4480637621689338596[170] = 0.0; + out_4480637621689338596[171] = 0.0; + out_4480637621689338596[172] = 0.0; + out_4480637621689338596[173] = 0.0; + out_4480637621689338596[174] = 0; + out_4480637621689338596[175] = 1.0; + out_4480637621689338596[176] = 0; + out_4480637621689338596[177] = 0; + out_4480637621689338596[178] = 0; + out_4480637621689338596[179] = 0; + out_4480637621689338596[180] = 0; + out_4480637621689338596[181] = 0; + out_4480637621689338596[182] = 0; + out_4480637621689338596[183] = 0; + out_4480637621689338596[184] = 0; + out_4480637621689338596[185] = 0; + out_4480637621689338596[186] = 0; + out_4480637621689338596[187] = 0; + out_4480637621689338596[188] = 0; + out_4480637621689338596[189] = 0.0; + out_4480637621689338596[190] = 0.0; + out_4480637621689338596[191] = 0.0; + out_4480637621689338596[192] = 0.0; + out_4480637621689338596[193] = 0.0; + out_4480637621689338596[194] = 0.0; + out_4480637621689338596[195] = 0; + out_4480637621689338596[196] = 0; + out_4480637621689338596[197] = 1.0; + out_4480637621689338596[198] = 0; + out_4480637621689338596[199] = 0; + out_4480637621689338596[200] = 0; + out_4480637621689338596[201] = 0; + out_4480637621689338596[202] = 0; + out_4480637621689338596[203] = 0; + out_4480637621689338596[204] = 0; + out_4480637621689338596[205] = 0; + out_4480637621689338596[206] = 0; + out_4480637621689338596[207] = 0; + out_4480637621689338596[208] = 0; + out_4480637621689338596[209] = 0; + out_4480637621689338596[210] = 0.0; + out_4480637621689338596[211] = 0.0; + out_4480637621689338596[212] = 0.0; + out_4480637621689338596[213] = 0.0; + out_4480637621689338596[214] = 0.0; + out_4480637621689338596[215] = 0.0; + out_4480637621689338596[216] = 0; + out_4480637621689338596[217] = 0; + out_4480637621689338596[218] = 0; + out_4480637621689338596[219] = 1.0; + out_4480637621689338596[220] = 0; + out_4480637621689338596[221] = 0; + out_4480637621689338596[222] = 0; + out_4480637621689338596[223] = 0; + out_4480637621689338596[224] = 0; + out_4480637621689338596[225] = 0; + out_4480637621689338596[226] = 0; + out_4480637621689338596[227] = 0; + out_4480637621689338596[228] = 0; + out_4480637621689338596[229] = 0; + out_4480637621689338596[230] = 0; + out_4480637621689338596[231] = 0.0; + out_4480637621689338596[232] = 0.0; + out_4480637621689338596[233] = 0.0; + out_4480637621689338596[234] = 0.0; + out_4480637621689338596[235] = 0.0; + out_4480637621689338596[236] = 0.0; + out_4480637621689338596[237] = 0; + out_4480637621689338596[238] = 0; + out_4480637621689338596[239] = 0; + out_4480637621689338596[240] = 0; + out_4480637621689338596[241] = 1.0; + out_4480637621689338596[242] = 0; + out_4480637621689338596[243] = 0; + out_4480637621689338596[244] = 0; + out_4480637621689338596[245] = 0; + out_4480637621689338596[246] = 0; + out_4480637621689338596[247] = 0; + out_4480637621689338596[248] = 0; + out_4480637621689338596[249] = 0; + out_4480637621689338596[250] = 0; + out_4480637621689338596[251] = 0; + out_4480637621689338596[252] = 0.0; + out_4480637621689338596[253] = 0.0; + out_4480637621689338596[254] = 0.0; + out_4480637621689338596[255] = 0.0; + out_4480637621689338596[256] = 0.0; + out_4480637621689338596[257] = 0.0; + out_4480637621689338596[258] = 0; + out_4480637621689338596[259] = 0; + out_4480637621689338596[260] = 0; + out_4480637621689338596[261] = 0; + out_4480637621689338596[262] = 0; + out_4480637621689338596[263] = 1.0; + out_4480637621689338596[264] = 0; + out_4480637621689338596[265] = 0; + out_4480637621689338596[266] = 0; + out_4480637621689338596[267] = 0; + out_4480637621689338596[268] = 0; + out_4480637621689338596[269] = 0; + out_4480637621689338596[270] = 0; + out_4480637621689338596[271] = 0; + out_4480637621689338596[272] = 0; + out_4480637621689338596[273] = 0.0; + out_4480637621689338596[274] = 0.0; + out_4480637621689338596[275] = 0.0; + out_4480637621689338596[276] = 0.0; + out_4480637621689338596[277] = 0.0; + out_4480637621689338596[278] = 0.0; + out_4480637621689338596[279] = 0; + out_4480637621689338596[280] = 0; + out_4480637621689338596[281] = 0; + out_4480637621689338596[282] = 0; + out_4480637621689338596[283] = 0; + out_4480637621689338596[284] = 0; + out_4480637621689338596[285] = 1.0; + out_4480637621689338596[286] = 0; + out_4480637621689338596[287] = 0; + out_4480637621689338596[288] = 0; + out_4480637621689338596[289] = 0; + out_4480637621689338596[290] = 0; + out_4480637621689338596[291] = 0; + out_4480637621689338596[292] = 0; + out_4480637621689338596[293] = 0; + out_4480637621689338596[294] = 0.0; + out_4480637621689338596[295] = 0.0; + out_4480637621689338596[296] = 0.0; + out_4480637621689338596[297] = 0.0; + out_4480637621689338596[298] = 0.0; + out_4480637621689338596[299] = 0.0; + out_4480637621689338596[300] = 0; + out_4480637621689338596[301] = 0; + out_4480637621689338596[302] = 0; + out_4480637621689338596[303] = 0; + out_4480637621689338596[304] = 0; + out_4480637621689338596[305] = 0; + out_4480637621689338596[306] = 0; + out_4480637621689338596[307] = 1.0; + out_4480637621689338596[308] = 0; + out_4480637621689338596[309] = 0; + out_4480637621689338596[310] = 0; + out_4480637621689338596[311] = 0; + out_4480637621689338596[312] = 0; + out_4480637621689338596[313] = 0; + out_4480637621689338596[314] = 0; + out_4480637621689338596[315] = 0.0; + out_4480637621689338596[316] = 0.0; + out_4480637621689338596[317] = 0.0; + out_4480637621689338596[318] = 0.0; + out_4480637621689338596[319] = 0.0; + out_4480637621689338596[320] = 0.0; + out_4480637621689338596[321] = 0; + out_4480637621689338596[322] = 0; + out_4480637621689338596[323] = 0; + out_4480637621689338596[324] = 0; + out_4480637621689338596[325] = 0; + out_4480637621689338596[326] = 0; + out_4480637621689338596[327] = 0; + out_4480637621689338596[328] = 0; + out_4480637621689338596[329] = 1.0; + out_4480637621689338596[330] = 0; + out_4480637621689338596[331] = 0; + out_4480637621689338596[332] = 0; + out_4480637621689338596[333] = 0; + out_4480637621689338596[334] = 0; + out_4480637621689338596[335] = 0; + out_4480637621689338596[336] = 0.0; + out_4480637621689338596[337] = 0.0; + out_4480637621689338596[338] = 0.0; + out_4480637621689338596[339] = 0.0; + out_4480637621689338596[340] = 0.0; + out_4480637621689338596[341] = 0.0; + out_4480637621689338596[342] = 0; + out_4480637621689338596[343] = 0; + out_4480637621689338596[344] = 0; + out_4480637621689338596[345] = 0; + out_4480637621689338596[346] = 0; + out_4480637621689338596[347] = 0; + out_4480637621689338596[348] = 0; + out_4480637621689338596[349] = 0; + out_4480637621689338596[350] = 0; + out_4480637621689338596[351] = 1.0; + out_4480637621689338596[352] = 0; + out_4480637621689338596[353] = 0; + out_4480637621689338596[354] = 0; + out_4480637621689338596[355] = 0; + out_4480637621689338596[356] = 0; + out_4480637621689338596[357] = 0.0; + out_4480637621689338596[358] = 0.0; + out_4480637621689338596[359] = 0.0; + out_4480637621689338596[360] = 0.0; + out_4480637621689338596[361] = 0.0; + out_4480637621689338596[362] = 0.0; + out_4480637621689338596[363] = 0; + out_4480637621689338596[364] = 0; + out_4480637621689338596[365] = 0; + out_4480637621689338596[366] = 0; + out_4480637621689338596[367] = 0; + out_4480637621689338596[368] = 0; + out_4480637621689338596[369] = 0; + out_4480637621689338596[370] = 0; + out_4480637621689338596[371] = 0; + out_4480637621689338596[372] = 0; + out_4480637621689338596[373] = 1.0; + out_4480637621689338596[374] = 0; + out_4480637621689338596[375] = 0; + out_4480637621689338596[376] = 0; + out_4480637621689338596[377] = 0; + out_4480637621689338596[378] = 0.0; + out_4480637621689338596[379] = 0.0; + out_4480637621689338596[380] = 0.0; + out_4480637621689338596[381] = 0.0; + out_4480637621689338596[382] = 0.0; + out_4480637621689338596[383] = 0.0; + out_4480637621689338596[384] = 0; + out_4480637621689338596[385] = 0; + out_4480637621689338596[386] = 0; + out_4480637621689338596[387] = 0; + out_4480637621689338596[388] = 0; + out_4480637621689338596[389] = 0; + out_4480637621689338596[390] = 0; + out_4480637621689338596[391] = 0; + out_4480637621689338596[392] = 0; + out_4480637621689338596[393] = 0; + out_4480637621689338596[394] = 0; + out_4480637621689338596[395] = 1.0; + out_4480637621689338596[396] = 0; + out_4480637621689338596[397] = 0; + out_4480637621689338596[398] = 0; + out_4480637621689338596[399] = 0.0; + out_4480637621689338596[400] = 0.0; + out_4480637621689338596[401] = 0.0; + out_4480637621689338596[402] = 0.0; + out_4480637621689338596[403] = 0.0; + out_4480637621689338596[404] = 0.0; + out_4480637621689338596[405] = 0; + out_4480637621689338596[406] = 0; + out_4480637621689338596[407] = 0; + out_4480637621689338596[408] = 0; + out_4480637621689338596[409] = 0; + out_4480637621689338596[410] = 0; + out_4480637621689338596[411] = 0; + out_4480637621689338596[412] = 0; + out_4480637621689338596[413] = 0; + out_4480637621689338596[414] = 0; + out_4480637621689338596[415] = 0; + out_4480637621689338596[416] = 0; + out_4480637621689338596[417] = 1.0; + out_4480637621689338596[418] = 0; + out_4480637621689338596[419] = 0; + out_4480637621689338596[420] = 0.0; + out_4480637621689338596[421] = 0.0; + out_4480637621689338596[422] = 0.0; + out_4480637621689338596[423] = 0.0; + out_4480637621689338596[424] = 0.0; + out_4480637621689338596[425] = 0.0; + out_4480637621689338596[426] = 0; + out_4480637621689338596[427] = 0; + out_4480637621689338596[428] = 0; + out_4480637621689338596[429] = 0; + out_4480637621689338596[430] = 0; + out_4480637621689338596[431] = 0; + out_4480637621689338596[432] = 0; + out_4480637621689338596[433] = 0; + out_4480637621689338596[434] = 0; + out_4480637621689338596[435] = 0; + out_4480637621689338596[436] = 0; + out_4480637621689338596[437] = 0; + out_4480637621689338596[438] = 0; + out_4480637621689338596[439] = 1.0; + out_4480637621689338596[440] = 0; + out_4480637621689338596[441] = 0.0; + out_4480637621689338596[442] = 0.0; + out_4480637621689338596[443] = 0.0; + out_4480637621689338596[444] = 0.0; + out_4480637621689338596[445] = 0.0; + out_4480637621689338596[446] = 0.0; + out_4480637621689338596[447] = 0; + out_4480637621689338596[448] = 0; + out_4480637621689338596[449] = 0; + out_4480637621689338596[450] = 0; + out_4480637621689338596[451] = 0; + out_4480637621689338596[452] = 0; + out_4480637621689338596[453] = 0; + out_4480637621689338596[454] = 0; + out_4480637621689338596[455] = 0; + out_4480637621689338596[456] = 0; + out_4480637621689338596[457] = 0; + out_4480637621689338596[458] = 0; + out_4480637621689338596[459] = 0; + out_4480637621689338596[460] = 0; + out_4480637621689338596[461] = 1.0; } -void f_fun(double *state, double dt, double *out_6190173082560003234) { - out_6190173082560003234[0] = dt*state[7] + state[0]; - out_6190173082560003234[1] = dt*state[8] + state[1]; - out_6190173082560003234[2] = dt*state[9] + state[2]; - out_6190173082560003234[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; - out_6190173082560003234[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; - out_6190173082560003234[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; - out_6190173082560003234[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; - out_6190173082560003234[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7]; - out_6190173082560003234[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8]; - out_6190173082560003234[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9]; - out_6190173082560003234[10] = state[10]; - out_6190173082560003234[11] = state[11]; - out_6190173082560003234[12] = state[12]; - out_6190173082560003234[13] = state[13]; - out_6190173082560003234[14] = state[14]; - out_6190173082560003234[15] = state[15]; - out_6190173082560003234[16] = state[16]; - out_6190173082560003234[17] = state[17]; - out_6190173082560003234[18] = state[18]; - out_6190173082560003234[19] = state[19]; - out_6190173082560003234[20] = state[20]; - out_6190173082560003234[21] = state[21]; +void f_fun(double *state, double dt, double *out_7252882908104132962) { + out_7252882908104132962[0] = dt*state[7] + state[0]; + out_7252882908104132962[1] = dt*state[8] + state[1]; + out_7252882908104132962[2] = dt*state[9] + state[2]; + out_7252882908104132962[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3]; + out_7252882908104132962[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4]; + out_7252882908104132962[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5]; + out_7252882908104132962[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6]; + out_7252882908104132962[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7]; + out_7252882908104132962[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8]; + out_7252882908104132962[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9]; + out_7252882908104132962[10] = state[10]; + out_7252882908104132962[11] = state[11]; + out_7252882908104132962[12] = state[12]; + out_7252882908104132962[13] = state[13]; + out_7252882908104132962[14] = state[14]; + out_7252882908104132962[15] = state[15]; + out_7252882908104132962[16] = state[16]; + out_7252882908104132962[17] = state[17]; + out_7252882908104132962[18] = state[18]; + out_7252882908104132962[19] = state[19]; + out_7252882908104132962[20] = state[20]; + out_7252882908104132962[21] = state[21]; } -void F_fun(double *state, double dt, double *out_1775290298854174806) { - out_1775290298854174806[0] = 1; - out_1775290298854174806[1] = 0; - out_1775290298854174806[2] = 0; - out_1775290298854174806[3] = 0; - out_1775290298854174806[4] = 0; - out_1775290298854174806[5] = 0; - out_1775290298854174806[6] = dt; - out_1775290298854174806[7] = 0; - out_1775290298854174806[8] = 0; - out_1775290298854174806[9] = 0; - out_1775290298854174806[10] = 0; - out_1775290298854174806[11] = 0; - out_1775290298854174806[12] = 0; - out_1775290298854174806[13] = 0; - out_1775290298854174806[14] = 0; - out_1775290298854174806[15] = 0; - out_1775290298854174806[16] = 0; - out_1775290298854174806[17] = 0; - out_1775290298854174806[18] = 0; - out_1775290298854174806[19] = 0; - out_1775290298854174806[20] = 0; - out_1775290298854174806[21] = 0; - out_1775290298854174806[22] = 1; - out_1775290298854174806[23] = 0; - out_1775290298854174806[24] = 0; - out_1775290298854174806[25] = 0; - out_1775290298854174806[26] = 0; - out_1775290298854174806[27] = 0; - out_1775290298854174806[28] = dt; - out_1775290298854174806[29] = 0; - out_1775290298854174806[30] = 0; - out_1775290298854174806[31] = 0; - out_1775290298854174806[32] = 0; - out_1775290298854174806[33] = 0; - out_1775290298854174806[34] = 0; - out_1775290298854174806[35] = 0; - out_1775290298854174806[36] = 0; - out_1775290298854174806[37] = 0; - out_1775290298854174806[38] = 0; - out_1775290298854174806[39] = 0; - out_1775290298854174806[40] = 0; - out_1775290298854174806[41] = 0; - out_1775290298854174806[42] = 0; - out_1775290298854174806[43] = 0; - out_1775290298854174806[44] = 1; - out_1775290298854174806[45] = 0; - out_1775290298854174806[46] = 0; - out_1775290298854174806[47] = 0; - out_1775290298854174806[48] = 0; - out_1775290298854174806[49] = 0; - out_1775290298854174806[50] = dt; - out_1775290298854174806[51] = 0; - out_1775290298854174806[52] = 0; - out_1775290298854174806[53] = 0; - out_1775290298854174806[54] = 0; - out_1775290298854174806[55] = 0; - out_1775290298854174806[56] = 0; - out_1775290298854174806[57] = 0; - out_1775290298854174806[58] = 0; - out_1775290298854174806[59] = 0; - out_1775290298854174806[60] = 0; - out_1775290298854174806[61] = 0; - out_1775290298854174806[62] = 0; - out_1775290298854174806[63] = 0; - out_1775290298854174806[64] = 0; - out_1775290298854174806[65] = 0; - out_1775290298854174806[66] = 1; - out_1775290298854174806[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); - out_1775290298854174806[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]); - out_1775290298854174806[69] = 0; - out_1775290298854174806[70] = 0; - out_1775290298854174806[71] = 0; - out_1775290298854174806[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_1775290298854174806[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_1775290298854174806[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_1775290298854174806[75] = 0; - out_1775290298854174806[76] = 0; - out_1775290298854174806[77] = 0; - out_1775290298854174806[78] = 0; - out_1775290298854174806[79] = 0; - out_1775290298854174806[80] = 0; - out_1775290298854174806[81] = 0; - out_1775290298854174806[82] = 0; - out_1775290298854174806[83] = 0; - out_1775290298854174806[84] = 0; - out_1775290298854174806[85] = 0; - out_1775290298854174806[86] = 0; - out_1775290298854174806[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); - out_1775290298854174806[88] = 1; - out_1775290298854174806[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]); - out_1775290298854174806[90] = 0; - out_1775290298854174806[91] = 0; - out_1775290298854174806[92] = 0; - out_1775290298854174806[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_1775290298854174806[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_1775290298854174806[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_1775290298854174806[96] = 0; - out_1775290298854174806[97] = 0; - out_1775290298854174806[98] = 0; - out_1775290298854174806[99] = 0; - out_1775290298854174806[100] = 0; - out_1775290298854174806[101] = 0; - out_1775290298854174806[102] = 0; - out_1775290298854174806[103] = 0; - out_1775290298854174806[104] = 0; - out_1775290298854174806[105] = 0; - out_1775290298854174806[106] = 0; - out_1775290298854174806[107] = 0; - out_1775290298854174806[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]); - out_1775290298854174806[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]); - out_1775290298854174806[110] = 1; - out_1775290298854174806[111] = 0; - out_1775290298854174806[112] = 0; - out_1775290298854174806[113] = 0; - out_1775290298854174806[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_1775290298854174806[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_1775290298854174806[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_1775290298854174806[117] = 0; - out_1775290298854174806[118] = 0; - out_1775290298854174806[119] = 0; - out_1775290298854174806[120] = 0; - out_1775290298854174806[121] = 0; - out_1775290298854174806[122] = 0; - out_1775290298854174806[123] = 0; - out_1775290298854174806[124] = 0; - out_1775290298854174806[125] = 0; - out_1775290298854174806[126] = 0; - out_1775290298854174806[127] = 0; - out_1775290298854174806[128] = 0; - out_1775290298854174806[129] = 0; - out_1775290298854174806[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); - out_1775290298854174806[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]); - out_1775290298854174806[132] = 1; - out_1775290298854174806[133] = 0; - out_1775290298854174806[134] = 0; - out_1775290298854174806[135] = 0; - out_1775290298854174806[136] = 0; - out_1775290298854174806[137] = 0; - out_1775290298854174806[138] = 0; - out_1775290298854174806[139] = 0; - out_1775290298854174806[140] = 0; - out_1775290298854174806[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_1775290298854174806[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); - out_1775290298854174806[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); - out_1775290298854174806[144] = 0; - out_1775290298854174806[145] = 0; - out_1775290298854174806[146] = 0; - out_1775290298854174806[147] = 0; - out_1775290298854174806[148] = 0; - out_1775290298854174806[149] = 0; - out_1775290298854174806[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); - out_1775290298854174806[151] = 0; - out_1775290298854174806[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]); - out_1775290298854174806[153] = 0; - out_1775290298854174806[154] = 1; - out_1775290298854174806[155] = 0; - out_1775290298854174806[156] = 0; - out_1775290298854174806[157] = 0; - out_1775290298854174806[158] = 0; - out_1775290298854174806[159] = 0; - out_1775290298854174806[160] = 0; - out_1775290298854174806[161] = 0; - out_1775290298854174806[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); - out_1775290298854174806[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_1775290298854174806[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); - out_1775290298854174806[165] = 0; - out_1775290298854174806[166] = 0; - out_1775290298854174806[167] = 0; - out_1775290298854174806[168] = 0; - out_1775290298854174806[169] = 0; - out_1775290298854174806[170] = 0; - out_1775290298854174806[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]); - out_1775290298854174806[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]); - out_1775290298854174806[173] = 0; - out_1775290298854174806[174] = 0; - out_1775290298854174806[175] = 0; - out_1775290298854174806[176] = 1; - out_1775290298854174806[177] = 0; - out_1775290298854174806[178] = 0; - out_1775290298854174806[179] = 0; - out_1775290298854174806[180] = 0; - out_1775290298854174806[181] = 0; - out_1775290298854174806[182] = 0; - out_1775290298854174806[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); - out_1775290298854174806[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); - out_1775290298854174806[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_1775290298854174806[186] = 0; - out_1775290298854174806[187] = 0; - out_1775290298854174806[188] = 0; - out_1775290298854174806[189] = 0; - out_1775290298854174806[190] = 0; - out_1775290298854174806[191] = 0; - out_1775290298854174806[192] = 0; - out_1775290298854174806[193] = 0; - out_1775290298854174806[194] = 0; - out_1775290298854174806[195] = 0; - out_1775290298854174806[196] = 0; - out_1775290298854174806[197] = 0; - out_1775290298854174806[198] = 1; - out_1775290298854174806[199] = 0; - out_1775290298854174806[200] = 0; - out_1775290298854174806[201] = 0; - out_1775290298854174806[202] = 0; - out_1775290298854174806[203] = 0; - out_1775290298854174806[204] = 0; - out_1775290298854174806[205] = 0; - out_1775290298854174806[206] = 0; - out_1775290298854174806[207] = 0; - out_1775290298854174806[208] = 0; - out_1775290298854174806[209] = 0; - out_1775290298854174806[210] = 0; - out_1775290298854174806[211] = 0; - out_1775290298854174806[212] = 0; - out_1775290298854174806[213] = 0; - out_1775290298854174806[214] = 0; - out_1775290298854174806[215] = 0; - out_1775290298854174806[216] = 0; - out_1775290298854174806[217] = 0; - out_1775290298854174806[218] = 0; - out_1775290298854174806[219] = 0; - out_1775290298854174806[220] = 1; - out_1775290298854174806[221] = 0; - out_1775290298854174806[222] = 0; - out_1775290298854174806[223] = 0; - out_1775290298854174806[224] = 0; - out_1775290298854174806[225] = 0; - out_1775290298854174806[226] = 0; - out_1775290298854174806[227] = 0; - out_1775290298854174806[228] = 0; - out_1775290298854174806[229] = 0; - out_1775290298854174806[230] = 0; - out_1775290298854174806[231] = 0; - out_1775290298854174806[232] = 0; - out_1775290298854174806[233] = 0; - out_1775290298854174806[234] = 0; - out_1775290298854174806[235] = 0; - out_1775290298854174806[236] = 0; - out_1775290298854174806[237] = 0; - out_1775290298854174806[238] = 0; - out_1775290298854174806[239] = 0; - out_1775290298854174806[240] = 0; - out_1775290298854174806[241] = 0; - out_1775290298854174806[242] = 1; - out_1775290298854174806[243] = 0; - out_1775290298854174806[244] = 0; - out_1775290298854174806[245] = 0; - out_1775290298854174806[246] = 0; - out_1775290298854174806[247] = 0; - out_1775290298854174806[248] = 0; - out_1775290298854174806[249] = 0; - out_1775290298854174806[250] = 0; - out_1775290298854174806[251] = 0; - out_1775290298854174806[252] = 0; - out_1775290298854174806[253] = 0; - out_1775290298854174806[254] = 0; - out_1775290298854174806[255] = 0; - out_1775290298854174806[256] = 0; - out_1775290298854174806[257] = 0; - out_1775290298854174806[258] = 0; - out_1775290298854174806[259] = 0; - out_1775290298854174806[260] = 0; - out_1775290298854174806[261] = 0; - out_1775290298854174806[262] = 0; - out_1775290298854174806[263] = 0; - out_1775290298854174806[264] = 1; - out_1775290298854174806[265] = 0; - out_1775290298854174806[266] = 0; - out_1775290298854174806[267] = 0; - out_1775290298854174806[268] = 0; - out_1775290298854174806[269] = 0; - out_1775290298854174806[270] = 0; - out_1775290298854174806[271] = 0; - out_1775290298854174806[272] = 0; - out_1775290298854174806[273] = 0; - out_1775290298854174806[274] = 0; - out_1775290298854174806[275] = 0; - out_1775290298854174806[276] = 0; - out_1775290298854174806[277] = 0; - out_1775290298854174806[278] = 0; - out_1775290298854174806[279] = 0; - out_1775290298854174806[280] = 0; - out_1775290298854174806[281] = 0; - out_1775290298854174806[282] = 0; - out_1775290298854174806[283] = 0; - out_1775290298854174806[284] = 0; - out_1775290298854174806[285] = 0; - out_1775290298854174806[286] = 1; - out_1775290298854174806[287] = 0; - out_1775290298854174806[288] = 0; - out_1775290298854174806[289] = 0; - out_1775290298854174806[290] = 0; - out_1775290298854174806[291] = 0; - out_1775290298854174806[292] = 0; - out_1775290298854174806[293] = 0; - out_1775290298854174806[294] = 0; - out_1775290298854174806[295] = 0; - out_1775290298854174806[296] = 0; - out_1775290298854174806[297] = 0; - out_1775290298854174806[298] = 0; - out_1775290298854174806[299] = 0; - out_1775290298854174806[300] = 0; - out_1775290298854174806[301] = 0; - out_1775290298854174806[302] = 0; - out_1775290298854174806[303] = 0; - out_1775290298854174806[304] = 0; - out_1775290298854174806[305] = 0; - out_1775290298854174806[306] = 0; - out_1775290298854174806[307] = 0; - out_1775290298854174806[308] = 1; - out_1775290298854174806[309] = 0; - out_1775290298854174806[310] = 0; - out_1775290298854174806[311] = 0; - out_1775290298854174806[312] = 0; - out_1775290298854174806[313] = 0; - out_1775290298854174806[314] = 0; - out_1775290298854174806[315] = 0; - out_1775290298854174806[316] = 0; - out_1775290298854174806[317] = 0; - out_1775290298854174806[318] = 0; - out_1775290298854174806[319] = 0; - out_1775290298854174806[320] = 0; - out_1775290298854174806[321] = 0; - out_1775290298854174806[322] = 0; - out_1775290298854174806[323] = 0; - out_1775290298854174806[324] = 0; - out_1775290298854174806[325] = 0; - out_1775290298854174806[326] = 0; - out_1775290298854174806[327] = 0; - out_1775290298854174806[328] = 0; - out_1775290298854174806[329] = 0; - out_1775290298854174806[330] = 1; - out_1775290298854174806[331] = 0; - out_1775290298854174806[332] = 0; - out_1775290298854174806[333] = 0; - out_1775290298854174806[334] = 0; - out_1775290298854174806[335] = 0; - out_1775290298854174806[336] = 0; - out_1775290298854174806[337] = 0; - out_1775290298854174806[338] = 0; - out_1775290298854174806[339] = 0; - out_1775290298854174806[340] = 0; - out_1775290298854174806[341] = 0; - out_1775290298854174806[342] = 0; - out_1775290298854174806[343] = 0; - out_1775290298854174806[344] = 0; - out_1775290298854174806[345] = 0; - out_1775290298854174806[346] = 0; - out_1775290298854174806[347] = 0; - out_1775290298854174806[348] = 0; - out_1775290298854174806[349] = 0; - out_1775290298854174806[350] = 0; - out_1775290298854174806[351] = 0; - out_1775290298854174806[352] = 1; - out_1775290298854174806[353] = 0; - out_1775290298854174806[354] = 0; - out_1775290298854174806[355] = 0; - out_1775290298854174806[356] = 0; - out_1775290298854174806[357] = 0; - out_1775290298854174806[358] = 0; - out_1775290298854174806[359] = 0; - out_1775290298854174806[360] = 0; - out_1775290298854174806[361] = 0; - out_1775290298854174806[362] = 0; - out_1775290298854174806[363] = 0; - out_1775290298854174806[364] = 0; - out_1775290298854174806[365] = 0; - out_1775290298854174806[366] = 0; - out_1775290298854174806[367] = 0; - out_1775290298854174806[368] = 0; - out_1775290298854174806[369] = 0; - out_1775290298854174806[370] = 0; - out_1775290298854174806[371] = 0; - out_1775290298854174806[372] = 0; - out_1775290298854174806[373] = 0; - out_1775290298854174806[374] = 1; - out_1775290298854174806[375] = 0; - out_1775290298854174806[376] = 0; - out_1775290298854174806[377] = 0; - out_1775290298854174806[378] = 0; - out_1775290298854174806[379] = 0; - out_1775290298854174806[380] = 0; - out_1775290298854174806[381] = 0; - out_1775290298854174806[382] = 0; - out_1775290298854174806[383] = 0; - out_1775290298854174806[384] = 0; - out_1775290298854174806[385] = 0; - out_1775290298854174806[386] = 0; - out_1775290298854174806[387] = 0; - out_1775290298854174806[388] = 0; - out_1775290298854174806[389] = 0; - out_1775290298854174806[390] = 0; - out_1775290298854174806[391] = 0; - out_1775290298854174806[392] = 0; - out_1775290298854174806[393] = 0; - out_1775290298854174806[394] = 0; - out_1775290298854174806[395] = 0; - out_1775290298854174806[396] = 1; - out_1775290298854174806[397] = 0; - out_1775290298854174806[398] = 0; - out_1775290298854174806[399] = 0; - out_1775290298854174806[400] = 0; - out_1775290298854174806[401] = 0; - out_1775290298854174806[402] = 0; - out_1775290298854174806[403] = 0; - out_1775290298854174806[404] = 0; - out_1775290298854174806[405] = 0; - out_1775290298854174806[406] = 0; - out_1775290298854174806[407] = 0; - out_1775290298854174806[408] = 0; - out_1775290298854174806[409] = 0; - out_1775290298854174806[410] = 0; - out_1775290298854174806[411] = 0; - out_1775290298854174806[412] = 0; - out_1775290298854174806[413] = 0; - out_1775290298854174806[414] = 0; - out_1775290298854174806[415] = 0; - out_1775290298854174806[416] = 0; - out_1775290298854174806[417] = 0; - out_1775290298854174806[418] = 1; - out_1775290298854174806[419] = 0; - out_1775290298854174806[420] = 0; - out_1775290298854174806[421] = 0; - out_1775290298854174806[422] = 0; - out_1775290298854174806[423] = 0; - out_1775290298854174806[424] = 0; - out_1775290298854174806[425] = 0; - out_1775290298854174806[426] = 0; - out_1775290298854174806[427] = 0; - out_1775290298854174806[428] = 0; - out_1775290298854174806[429] = 0; - out_1775290298854174806[430] = 0; - out_1775290298854174806[431] = 0; - out_1775290298854174806[432] = 0; - out_1775290298854174806[433] = 0; - out_1775290298854174806[434] = 0; - out_1775290298854174806[435] = 0; - out_1775290298854174806[436] = 0; - out_1775290298854174806[437] = 0; - out_1775290298854174806[438] = 0; - out_1775290298854174806[439] = 0; - out_1775290298854174806[440] = 1; +void F_fun(double *state, double dt, double *out_8296291579486998584) { + out_8296291579486998584[0] = 1; + out_8296291579486998584[1] = 0; + out_8296291579486998584[2] = 0; + out_8296291579486998584[3] = 0; + out_8296291579486998584[4] = 0; + out_8296291579486998584[5] = 0; + out_8296291579486998584[6] = dt; + out_8296291579486998584[7] = 0; + out_8296291579486998584[8] = 0; + out_8296291579486998584[9] = 0; + out_8296291579486998584[10] = 0; + out_8296291579486998584[11] = 0; + out_8296291579486998584[12] = 0; + out_8296291579486998584[13] = 0; + out_8296291579486998584[14] = 0; + out_8296291579486998584[15] = 0; + out_8296291579486998584[16] = 0; + out_8296291579486998584[17] = 0; + out_8296291579486998584[18] = 0; + out_8296291579486998584[19] = 0; + out_8296291579486998584[20] = 0; + out_8296291579486998584[21] = 0; + out_8296291579486998584[22] = 1; + out_8296291579486998584[23] = 0; + out_8296291579486998584[24] = 0; + out_8296291579486998584[25] = 0; + out_8296291579486998584[26] = 0; + out_8296291579486998584[27] = 0; + out_8296291579486998584[28] = dt; + out_8296291579486998584[29] = 0; + out_8296291579486998584[30] = 0; + out_8296291579486998584[31] = 0; + out_8296291579486998584[32] = 0; + out_8296291579486998584[33] = 0; + out_8296291579486998584[34] = 0; + out_8296291579486998584[35] = 0; + out_8296291579486998584[36] = 0; + out_8296291579486998584[37] = 0; + out_8296291579486998584[38] = 0; + out_8296291579486998584[39] = 0; + out_8296291579486998584[40] = 0; + out_8296291579486998584[41] = 0; + out_8296291579486998584[42] = 0; + out_8296291579486998584[43] = 0; + out_8296291579486998584[44] = 1; + out_8296291579486998584[45] = 0; + out_8296291579486998584[46] = 0; + out_8296291579486998584[47] = 0; + out_8296291579486998584[48] = 0; + out_8296291579486998584[49] = 0; + out_8296291579486998584[50] = dt; + out_8296291579486998584[51] = 0; + out_8296291579486998584[52] = 0; + out_8296291579486998584[53] = 0; + out_8296291579486998584[54] = 0; + out_8296291579486998584[55] = 0; + out_8296291579486998584[56] = 0; + out_8296291579486998584[57] = 0; + out_8296291579486998584[58] = 0; + out_8296291579486998584[59] = 0; + out_8296291579486998584[60] = 0; + out_8296291579486998584[61] = 0; + out_8296291579486998584[62] = 0; + out_8296291579486998584[63] = 0; + out_8296291579486998584[64] = 0; + out_8296291579486998584[65] = 0; + out_8296291579486998584[66] = 1; + out_8296291579486998584[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); + out_8296291579486998584[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]); + out_8296291579486998584[69] = 0; + out_8296291579486998584[70] = 0; + out_8296291579486998584[71] = 0; + out_8296291579486998584[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_8296291579486998584[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_8296291579486998584[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_8296291579486998584[75] = 0; + out_8296291579486998584[76] = 0; + out_8296291579486998584[77] = 0; + out_8296291579486998584[78] = 0; + out_8296291579486998584[79] = 0; + out_8296291579486998584[80] = 0; + out_8296291579486998584[81] = 0; + out_8296291579486998584[82] = 0; + out_8296291579486998584[83] = 0; + out_8296291579486998584[84] = 0; + out_8296291579486998584[85] = 0; + out_8296291579486998584[86] = 0; + out_8296291579486998584[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]); + out_8296291579486998584[88] = 1; + out_8296291579486998584[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]); + out_8296291579486998584[90] = 0; + out_8296291579486998584[91] = 0; + out_8296291579486998584[92] = 0; + out_8296291579486998584[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_8296291579486998584[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_8296291579486998584[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_8296291579486998584[96] = 0; + out_8296291579486998584[97] = 0; + out_8296291579486998584[98] = 0; + out_8296291579486998584[99] = 0; + out_8296291579486998584[100] = 0; + out_8296291579486998584[101] = 0; + out_8296291579486998584[102] = 0; + out_8296291579486998584[103] = 0; + out_8296291579486998584[104] = 0; + out_8296291579486998584[105] = 0; + out_8296291579486998584[106] = 0; + out_8296291579486998584[107] = 0; + out_8296291579486998584[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]); + out_8296291579486998584[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]); + out_8296291579486998584[110] = 1; + out_8296291579486998584[111] = 0; + out_8296291579486998584[112] = 0; + out_8296291579486998584[113] = 0; + out_8296291579486998584[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_8296291579486998584[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_8296291579486998584[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_8296291579486998584[117] = 0; + out_8296291579486998584[118] = 0; + out_8296291579486998584[119] = 0; + out_8296291579486998584[120] = 0; + out_8296291579486998584[121] = 0; + out_8296291579486998584[122] = 0; + out_8296291579486998584[123] = 0; + out_8296291579486998584[124] = 0; + out_8296291579486998584[125] = 0; + out_8296291579486998584[126] = 0; + out_8296291579486998584[127] = 0; + out_8296291579486998584[128] = 0; + out_8296291579486998584[129] = 0; + out_8296291579486998584[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); + out_8296291579486998584[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]); + out_8296291579486998584[132] = 1; + out_8296291579486998584[133] = 0; + out_8296291579486998584[134] = 0; + out_8296291579486998584[135] = 0; + out_8296291579486998584[136] = 0; + out_8296291579486998584[137] = 0; + out_8296291579486998584[138] = 0; + out_8296291579486998584[139] = 0; + out_8296291579486998584[140] = 0; + out_8296291579486998584[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_8296291579486998584[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]); + out_8296291579486998584[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]); + out_8296291579486998584[144] = 0; + out_8296291579486998584[145] = 0; + out_8296291579486998584[146] = 0; + out_8296291579486998584[147] = 0; + out_8296291579486998584[148] = 0; + out_8296291579486998584[149] = 0; + out_8296291579486998584[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]); + out_8296291579486998584[151] = 0; + out_8296291579486998584[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]); + out_8296291579486998584[153] = 0; + out_8296291579486998584[154] = 1; + out_8296291579486998584[155] = 0; + out_8296291579486998584[156] = 0; + out_8296291579486998584[157] = 0; + out_8296291579486998584[158] = 0; + out_8296291579486998584[159] = 0; + out_8296291579486998584[160] = 0; + out_8296291579486998584[161] = 0; + out_8296291579486998584[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]); + out_8296291579486998584[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_8296291579486998584[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]); + out_8296291579486998584[165] = 0; + out_8296291579486998584[166] = 0; + out_8296291579486998584[167] = 0; + out_8296291579486998584[168] = 0; + out_8296291579486998584[169] = 0; + out_8296291579486998584[170] = 0; + out_8296291579486998584[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]); + out_8296291579486998584[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]); + out_8296291579486998584[173] = 0; + out_8296291579486998584[174] = 0; + out_8296291579486998584[175] = 0; + out_8296291579486998584[176] = 1; + out_8296291579486998584[177] = 0; + out_8296291579486998584[178] = 0; + out_8296291579486998584[179] = 0; + out_8296291579486998584[180] = 0; + out_8296291579486998584[181] = 0; + out_8296291579486998584[182] = 0; + out_8296291579486998584[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]); + out_8296291579486998584[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]); + out_8296291579486998584[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_8296291579486998584[186] = 0; + out_8296291579486998584[187] = 0; + out_8296291579486998584[188] = 0; + out_8296291579486998584[189] = 0; + out_8296291579486998584[190] = 0; + out_8296291579486998584[191] = 0; + out_8296291579486998584[192] = 0; + out_8296291579486998584[193] = 0; + out_8296291579486998584[194] = 0; + out_8296291579486998584[195] = 0; + out_8296291579486998584[196] = 0; + out_8296291579486998584[197] = 0; + out_8296291579486998584[198] = 1; + out_8296291579486998584[199] = 0; + out_8296291579486998584[200] = 0; + out_8296291579486998584[201] = 0; + out_8296291579486998584[202] = 0; + out_8296291579486998584[203] = 0; + out_8296291579486998584[204] = 0; + out_8296291579486998584[205] = 0; + out_8296291579486998584[206] = 0; + out_8296291579486998584[207] = 0; + out_8296291579486998584[208] = 0; + out_8296291579486998584[209] = 0; + out_8296291579486998584[210] = 0; + out_8296291579486998584[211] = 0; + out_8296291579486998584[212] = 0; + out_8296291579486998584[213] = 0; + out_8296291579486998584[214] = 0; + out_8296291579486998584[215] = 0; + out_8296291579486998584[216] = 0; + out_8296291579486998584[217] = 0; + out_8296291579486998584[218] = 0; + out_8296291579486998584[219] = 0; + out_8296291579486998584[220] = 1; + out_8296291579486998584[221] = 0; + out_8296291579486998584[222] = 0; + out_8296291579486998584[223] = 0; + out_8296291579486998584[224] = 0; + out_8296291579486998584[225] = 0; + out_8296291579486998584[226] = 0; + out_8296291579486998584[227] = 0; + out_8296291579486998584[228] = 0; + out_8296291579486998584[229] = 0; + out_8296291579486998584[230] = 0; + out_8296291579486998584[231] = 0; + out_8296291579486998584[232] = 0; + out_8296291579486998584[233] = 0; + out_8296291579486998584[234] = 0; + out_8296291579486998584[235] = 0; + out_8296291579486998584[236] = 0; + out_8296291579486998584[237] = 0; + out_8296291579486998584[238] = 0; + out_8296291579486998584[239] = 0; + out_8296291579486998584[240] = 0; + out_8296291579486998584[241] = 0; + out_8296291579486998584[242] = 1; + out_8296291579486998584[243] = 0; + out_8296291579486998584[244] = 0; + out_8296291579486998584[245] = 0; + out_8296291579486998584[246] = 0; + out_8296291579486998584[247] = 0; + out_8296291579486998584[248] = 0; + out_8296291579486998584[249] = 0; + out_8296291579486998584[250] = 0; + out_8296291579486998584[251] = 0; + out_8296291579486998584[252] = 0; + out_8296291579486998584[253] = 0; + out_8296291579486998584[254] = 0; + out_8296291579486998584[255] = 0; + out_8296291579486998584[256] = 0; + out_8296291579486998584[257] = 0; + out_8296291579486998584[258] = 0; + out_8296291579486998584[259] = 0; + out_8296291579486998584[260] = 0; + out_8296291579486998584[261] = 0; + out_8296291579486998584[262] = 0; + out_8296291579486998584[263] = 0; + out_8296291579486998584[264] = 1; + out_8296291579486998584[265] = 0; + out_8296291579486998584[266] = 0; + out_8296291579486998584[267] = 0; + out_8296291579486998584[268] = 0; + out_8296291579486998584[269] = 0; + out_8296291579486998584[270] = 0; + out_8296291579486998584[271] = 0; + out_8296291579486998584[272] = 0; + out_8296291579486998584[273] = 0; + out_8296291579486998584[274] = 0; + out_8296291579486998584[275] = 0; + out_8296291579486998584[276] = 0; + out_8296291579486998584[277] = 0; + out_8296291579486998584[278] = 0; + out_8296291579486998584[279] = 0; + out_8296291579486998584[280] = 0; + out_8296291579486998584[281] = 0; + out_8296291579486998584[282] = 0; + out_8296291579486998584[283] = 0; + out_8296291579486998584[284] = 0; + out_8296291579486998584[285] = 0; + out_8296291579486998584[286] = 1; + out_8296291579486998584[287] = 0; + out_8296291579486998584[288] = 0; + out_8296291579486998584[289] = 0; + out_8296291579486998584[290] = 0; + out_8296291579486998584[291] = 0; + out_8296291579486998584[292] = 0; + out_8296291579486998584[293] = 0; + out_8296291579486998584[294] = 0; + out_8296291579486998584[295] = 0; + out_8296291579486998584[296] = 0; + out_8296291579486998584[297] = 0; + out_8296291579486998584[298] = 0; + out_8296291579486998584[299] = 0; + out_8296291579486998584[300] = 0; + out_8296291579486998584[301] = 0; + out_8296291579486998584[302] = 0; + out_8296291579486998584[303] = 0; + out_8296291579486998584[304] = 0; + out_8296291579486998584[305] = 0; + out_8296291579486998584[306] = 0; + out_8296291579486998584[307] = 0; + out_8296291579486998584[308] = 1; + out_8296291579486998584[309] = 0; + out_8296291579486998584[310] = 0; + out_8296291579486998584[311] = 0; + out_8296291579486998584[312] = 0; + out_8296291579486998584[313] = 0; + out_8296291579486998584[314] = 0; + out_8296291579486998584[315] = 0; + out_8296291579486998584[316] = 0; + out_8296291579486998584[317] = 0; + out_8296291579486998584[318] = 0; + out_8296291579486998584[319] = 0; + out_8296291579486998584[320] = 0; + out_8296291579486998584[321] = 0; + out_8296291579486998584[322] = 0; + out_8296291579486998584[323] = 0; + out_8296291579486998584[324] = 0; + out_8296291579486998584[325] = 0; + out_8296291579486998584[326] = 0; + out_8296291579486998584[327] = 0; + out_8296291579486998584[328] = 0; + out_8296291579486998584[329] = 0; + out_8296291579486998584[330] = 1; + out_8296291579486998584[331] = 0; + out_8296291579486998584[332] = 0; + out_8296291579486998584[333] = 0; + out_8296291579486998584[334] = 0; + out_8296291579486998584[335] = 0; + out_8296291579486998584[336] = 0; + out_8296291579486998584[337] = 0; + out_8296291579486998584[338] = 0; + out_8296291579486998584[339] = 0; + out_8296291579486998584[340] = 0; + out_8296291579486998584[341] = 0; + out_8296291579486998584[342] = 0; + out_8296291579486998584[343] = 0; + out_8296291579486998584[344] = 0; + out_8296291579486998584[345] = 0; + out_8296291579486998584[346] = 0; + out_8296291579486998584[347] = 0; + out_8296291579486998584[348] = 0; + out_8296291579486998584[349] = 0; + out_8296291579486998584[350] = 0; + out_8296291579486998584[351] = 0; + out_8296291579486998584[352] = 1; + out_8296291579486998584[353] = 0; + out_8296291579486998584[354] = 0; + out_8296291579486998584[355] = 0; + out_8296291579486998584[356] = 0; + out_8296291579486998584[357] = 0; + out_8296291579486998584[358] = 0; + out_8296291579486998584[359] = 0; + out_8296291579486998584[360] = 0; + out_8296291579486998584[361] = 0; + out_8296291579486998584[362] = 0; + out_8296291579486998584[363] = 0; + out_8296291579486998584[364] = 0; + out_8296291579486998584[365] = 0; + out_8296291579486998584[366] = 0; + out_8296291579486998584[367] = 0; + out_8296291579486998584[368] = 0; + out_8296291579486998584[369] = 0; + out_8296291579486998584[370] = 0; + out_8296291579486998584[371] = 0; + out_8296291579486998584[372] = 0; + out_8296291579486998584[373] = 0; + out_8296291579486998584[374] = 1; + out_8296291579486998584[375] = 0; + out_8296291579486998584[376] = 0; + out_8296291579486998584[377] = 0; + out_8296291579486998584[378] = 0; + out_8296291579486998584[379] = 0; + out_8296291579486998584[380] = 0; + out_8296291579486998584[381] = 0; + out_8296291579486998584[382] = 0; + out_8296291579486998584[383] = 0; + out_8296291579486998584[384] = 0; + out_8296291579486998584[385] = 0; + out_8296291579486998584[386] = 0; + out_8296291579486998584[387] = 0; + out_8296291579486998584[388] = 0; + out_8296291579486998584[389] = 0; + out_8296291579486998584[390] = 0; + out_8296291579486998584[391] = 0; + out_8296291579486998584[392] = 0; + out_8296291579486998584[393] = 0; + out_8296291579486998584[394] = 0; + out_8296291579486998584[395] = 0; + out_8296291579486998584[396] = 1; + out_8296291579486998584[397] = 0; + out_8296291579486998584[398] = 0; + out_8296291579486998584[399] = 0; + out_8296291579486998584[400] = 0; + out_8296291579486998584[401] = 0; + out_8296291579486998584[402] = 0; + out_8296291579486998584[403] = 0; + out_8296291579486998584[404] = 0; + out_8296291579486998584[405] = 0; + out_8296291579486998584[406] = 0; + out_8296291579486998584[407] = 0; + out_8296291579486998584[408] = 0; + out_8296291579486998584[409] = 0; + out_8296291579486998584[410] = 0; + out_8296291579486998584[411] = 0; + out_8296291579486998584[412] = 0; + out_8296291579486998584[413] = 0; + out_8296291579486998584[414] = 0; + out_8296291579486998584[415] = 0; + out_8296291579486998584[416] = 0; + out_8296291579486998584[417] = 0; + out_8296291579486998584[418] = 1; + out_8296291579486998584[419] = 0; + out_8296291579486998584[420] = 0; + out_8296291579486998584[421] = 0; + out_8296291579486998584[422] = 0; + out_8296291579486998584[423] = 0; + out_8296291579486998584[424] = 0; + out_8296291579486998584[425] = 0; + out_8296291579486998584[426] = 0; + out_8296291579486998584[427] = 0; + out_8296291579486998584[428] = 0; + out_8296291579486998584[429] = 0; + out_8296291579486998584[430] = 0; + out_8296291579486998584[431] = 0; + out_8296291579486998584[432] = 0; + out_8296291579486998584[433] = 0; + out_8296291579486998584[434] = 0; + out_8296291579486998584[435] = 0; + out_8296291579486998584[436] = 0; + out_8296291579486998584[437] = 0; + out_8296291579486998584[438] = 0; + out_8296291579486998584[439] = 0; + out_8296291579486998584[440] = 1; } -void h_4(double *state, double *unused, double *out_3381985302175387771) { - out_3381985302175387771[0] = state[10] + state[13]; - out_3381985302175387771[1] = state[11] + state[14]; - out_3381985302175387771[2] = state[12] + state[15]; +void h_4(double *state, double *unused, double *out_74524857013721926) { + out_74524857013721926[0] = state[10] + state[13]; + out_74524857013721926[1] = state[11] + state[14]; + out_74524857013721926[2] = state[12] + state[15]; } -void H_4(double *state, double *unused, double *out_7369325968571334034) { - out_7369325968571334034[0] = 0; - out_7369325968571334034[1] = 0; - out_7369325968571334034[2] = 0; - out_7369325968571334034[3] = 0; - out_7369325968571334034[4] = 0; - out_7369325968571334034[5] = 0; - out_7369325968571334034[6] = 0; - out_7369325968571334034[7] = 0; - out_7369325968571334034[8] = 0; - out_7369325968571334034[9] = 0; - out_7369325968571334034[10] = 1; - out_7369325968571334034[11] = 0; - out_7369325968571334034[12] = 0; - out_7369325968571334034[13] = 1; - out_7369325968571334034[14] = 0; - out_7369325968571334034[15] = 0; - out_7369325968571334034[16] = 0; - out_7369325968571334034[17] = 0; - out_7369325968571334034[18] = 0; - out_7369325968571334034[19] = 0; - out_7369325968571334034[20] = 0; - out_7369325968571334034[21] = 0; - out_7369325968571334034[22] = 0; - out_7369325968571334034[23] = 0; - out_7369325968571334034[24] = 0; - out_7369325968571334034[25] = 0; - out_7369325968571334034[26] = 0; - out_7369325968571334034[27] = 0; - out_7369325968571334034[28] = 0; - out_7369325968571334034[29] = 0; - out_7369325968571334034[30] = 0; - out_7369325968571334034[31] = 0; - out_7369325968571334034[32] = 0; - out_7369325968571334034[33] = 1; - out_7369325968571334034[34] = 0; - out_7369325968571334034[35] = 0; - out_7369325968571334034[36] = 1; - out_7369325968571334034[37] = 0; - out_7369325968571334034[38] = 0; - out_7369325968571334034[39] = 0; - out_7369325968571334034[40] = 0; - out_7369325968571334034[41] = 0; - out_7369325968571334034[42] = 0; - out_7369325968571334034[43] = 0; - out_7369325968571334034[44] = 0; - out_7369325968571334034[45] = 0; - out_7369325968571334034[46] = 0; - out_7369325968571334034[47] = 0; - out_7369325968571334034[48] = 0; - out_7369325968571334034[49] = 0; - out_7369325968571334034[50] = 0; - out_7369325968571334034[51] = 0; - out_7369325968571334034[52] = 0; - out_7369325968571334034[53] = 0; - out_7369325968571334034[54] = 0; - out_7369325968571334034[55] = 0; - out_7369325968571334034[56] = 1; - out_7369325968571334034[57] = 0; - out_7369325968571334034[58] = 0; - out_7369325968571334034[59] = 1; - out_7369325968571334034[60] = 0; - out_7369325968571334034[61] = 0; - out_7369325968571334034[62] = 0; - out_7369325968571334034[63] = 0; - out_7369325968571334034[64] = 0; - out_7369325968571334034[65] = 0; +void H_4(double *state, double *unused, double *out_1894733852524476939) { + out_1894733852524476939[0] = 0; + out_1894733852524476939[1] = 0; + out_1894733852524476939[2] = 0; + out_1894733852524476939[3] = 0; + out_1894733852524476939[4] = 0; + out_1894733852524476939[5] = 0; + out_1894733852524476939[6] = 0; + out_1894733852524476939[7] = 0; + out_1894733852524476939[8] = 0; + out_1894733852524476939[9] = 0; + out_1894733852524476939[10] = 1; + out_1894733852524476939[11] = 0; + out_1894733852524476939[12] = 0; + out_1894733852524476939[13] = 1; + out_1894733852524476939[14] = 0; + out_1894733852524476939[15] = 0; + out_1894733852524476939[16] = 0; + out_1894733852524476939[17] = 0; + out_1894733852524476939[18] = 0; + out_1894733852524476939[19] = 0; + out_1894733852524476939[20] = 0; + out_1894733852524476939[21] = 0; + out_1894733852524476939[22] = 0; + out_1894733852524476939[23] = 0; + out_1894733852524476939[24] = 0; + out_1894733852524476939[25] = 0; + out_1894733852524476939[26] = 0; + out_1894733852524476939[27] = 0; + out_1894733852524476939[28] = 0; + out_1894733852524476939[29] = 0; + out_1894733852524476939[30] = 0; + out_1894733852524476939[31] = 0; + out_1894733852524476939[32] = 0; + out_1894733852524476939[33] = 1; + out_1894733852524476939[34] = 0; + out_1894733852524476939[35] = 0; + out_1894733852524476939[36] = 1; + out_1894733852524476939[37] = 0; + out_1894733852524476939[38] = 0; + out_1894733852524476939[39] = 0; + out_1894733852524476939[40] = 0; + out_1894733852524476939[41] = 0; + out_1894733852524476939[42] = 0; + out_1894733852524476939[43] = 0; + out_1894733852524476939[44] = 0; + out_1894733852524476939[45] = 0; + out_1894733852524476939[46] = 0; + out_1894733852524476939[47] = 0; + out_1894733852524476939[48] = 0; + out_1894733852524476939[49] = 0; + out_1894733852524476939[50] = 0; + out_1894733852524476939[51] = 0; + out_1894733852524476939[52] = 0; + out_1894733852524476939[53] = 0; + out_1894733852524476939[54] = 0; + out_1894733852524476939[55] = 0; + out_1894733852524476939[56] = 1; + out_1894733852524476939[57] = 0; + out_1894733852524476939[58] = 0; + out_1894733852524476939[59] = 1; + out_1894733852524476939[60] = 0; + out_1894733852524476939[61] = 0; + out_1894733852524476939[62] = 0; + out_1894733852524476939[63] = 0; + out_1894733852524476939[64] = 0; + out_1894733852524476939[65] = 0; } -void h_9(double *state, double *unused, double *out_3366596944174975637) { - out_3366596944174975637[0] = state[10]; - out_3366596944174975637[1] = state[11]; - out_3366596944174975637[2] = state[12]; +void h_9(double *state, double *unused, double *out_6538024057642950278) { + out_6538024057642950278[0] = state[10]; + out_6538024057642950278[1] = state[11]; + out_6538024057642950278[2] = state[12]; } -void H_9(double *state, double *unused, double *out_7128136321941743389) { - out_7128136321941743389[0] = 0; - out_7128136321941743389[1] = 0; - out_7128136321941743389[2] = 0; - out_7128136321941743389[3] = 0; - out_7128136321941743389[4] = 0; - out_7128136321941743389[5] = 0; - out_7128136321941743389[6] = 0; - out_7128136321941743389[7] = 0; - out_7128136321941743389[8] = 0; - out_7128136321941743389[9] = 0; - out_7128136321941743389[10] = 1; - out_7128136321941743389[11] = 0; - out_7128136321941743389[12] = 0; - out_7128136321941743389[13] = 0; - out_7128136321941743389[14] = 0; - out_7128136321941743389[15] = 0; - out_7128136321941743389[16] = 0; - out_7128136321941743389[17] = 0; - out_7128136321941743389[18] = 0; - out_7128136321941743389[19] = 0; - out_7128136321941743389[20] = 0; - out_7128136321941743389[21] = 0; - out_7128136321941743389[22] = 0; - out_7128136321941743389[23] = 0; - out_7128136321941743389[24] = 0; - out_7128136321941743389[25] = 0; - out_7128136321941743389[26] = 0; - out_7128136321941743389[27] = 0; - out_7128136321941743389[28] = 0; - out_7128136321941743389[29] = 0; - out_7128136321941743389[30] = 0; - out_7128136321941743389[31] = 0; - out_7128136321941743389[32] = 0; - out_7128136321941743389[33] = 1; - out_7128136321941743389[34] = 0; - out_7128136321941743389[35] = 0; - out_7128136321941743389[36] = 0; - out_7128136321941743389[37] = 0; - out_7128136321941743389[38] = 0; - out_7128136321941743389[39] = 0; - out_7128136321941743389[40] = 0; - out_7128136321941743389[41] = 0; - out_7128136321941743389[42] = 0; - out_7128136321941743389[43] = 0; - out_7128136321941743389[44] = 0; - out_7128136321941743389[45] = 0; - out_7128136321941743389[46] = 0; - out_7128136321941743389[47] = 0; - out_7128136321941743389[48] = 0; - out_7128136321941743389[49] = 0; - out_7128136321941743389[50] = 0; - out_7128136321941743389[51] = 0; - out_7128136321941743389[52] = 0; - out_7128136321941743389[53] = 0; - out_7128136321941743389[54] = 0; - out_7128136321941743389[55] = 0; - out_7128136321941743389[56] = 1; - out_7128136321941743389[57] = 0; - out_7128136321941743389[58] = 0; - out_7128136321941743389[59] = 0; - out_7128136321941743389[60] = 0; - out_7128136321941743389[61] = 0; - out_7128136321941743389[62] = 0; - out_7128136321941743389[63] = 0; - out_7128136321941743389[64] = 0; - out_7128136321941743389[65] = 0; +void H_9(double *state, double *unused, double *out_5392485082739970531) { + out_5392485082739970531[0] = 0; + out_5392485082739970531[1] = 0; + out_5392485082739970531[2] = 0; + out_5392485082739970531[3] = 0; + out_5392485082739970531[4] = 0; + out_5392485082739970531[5] = 0; + out_5392485082739970531[6] = 0; + out_5392485082739970531[7] = 0; + out_5392485082739970531[8] = 0; + out_5392485082739970531[9] = 0; + out_5392485082739970531[10] = 1; + out_5392485082739970531[11] = 0; + out_5392485082739970531[12] = 0; + out_5392485082739970531[13] = 0; + out_5392485082739970531[14] = 0; + out_5392485082739970531[15] = 0; + out_5392485082739970531[16] = 0; + out_5392485082739970531[17] = 0; + out_5392485082739970531[18] = 0; + out_5392485082739970531[19] = 0; + out_5392485082739970531[20] = 0; + out_5392485082739970531[21] = 0; + out_5392485082739970531[22] = 0; + out_5392485082739970531[23] = 0; + out_5392485082739970531[24] = 0; + out_5392485082739970531[25] = 0; + out_5392485082739970531[26] = 0; + out_5392485082739970531[27] = 0; + out_5392485082739970531[28] = 0; + out_5392485082739970531[29] = 0; + out_5392485082739970531[30] = 0; + out_5392485082739970531[31] = 0; + out_5392485082739970531[32] = 0; + out_5392485082739970531[33] = 1; + out_5392485082739970531[34] = 0; + out_5392485082739970531[35] = 0; + out_5392485082739970531[36] = 0; + out_5392485082739970531[37] = 0; + out_5392485082739970531[38] = 0; + out_5392485082739970531[39] = 0; + out_5392485082739970531[40] = 0; + out_5392485082739970531[41] = 0; + out_5392485082739970531[42] = 0; + out_5392485082739970531[43] = 0; + out_5392485082739970531[44] = 0; + out_5392485082739970531[45] = 0; + out_5392485082739970531[46] = 0; + out_5392485082739970531[47] = 0; + out_5392485082739970531[48] = 0; + out_5392485082739970531[49] = 0; + out_5392485082739970531[50] = 0; + out_5392485082739970531[51] = 0; + out_5392485082739970531[52] = 0; + out_5392485082739970531[53] = 0; + out_5392485082739970531[54] = 0; + out_5392485082739970531[55] = 0; + out_5392485082739970531[56] = 1; + out_5392485082739970531[57] = 0; + out_5392485082739970531[58] = 0; + out_5392485082739970531[59] = 0; + out_5392485082739970531[60] = 0; + out_5392485082739970531[61] = 0; + out_5392485082739970531[62] = 0; + out_5392485082739970531[63] = 0; + out_5392485082739970531[64] = 0; + out_5392485082739970531[65] = 0; } -void h_10(double *state, double *unused, double *out_5820461675875995871) { - out_5820461675875995871[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19]; - out_5820461675875995871[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20]; - out_5820461675875995871[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21]; +void h_10(double *state, double *unused, double *out_3055894436910046000) { + out_3055894436910046000[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19]; + out_3055894436910046000[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20]; + out_3055894436910046000[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21]; } -void H_10(double *state, double *unused, double *out_237044267078725450) { - out_237044267078725450[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); - out_237044267078725450[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; - out_237044267078725450[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2]; - out_237044267078725450[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_237044267078725450[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_237044267078725450[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_237044267078725450[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_237044267078725450[7] = 0; - out_237044267078725450[8] = 0; - out_237044267078725450[9] = 0; - out_237044267078725450[10] = 0; - out_237044267078725450[11] = 0; - out_237044267078725450[12] = 0; - out_237044267078725450[13] = 0; - out_237044267078725450[14] = 0; - out_237044267078725450[15] = 0; - out_237044267078725450[16] = 1; - out_237044267078725450[17] = 0; - out_237044267078725450[18] = 0; - out_237044267078725450[19] = 1; - out_237044267078725450[20] = 0; - out_237044267078725450[21] = 0; - out_237044267078725450[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; - out_237044267078725450[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); - out_237044267078725450[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2]; - out_237044267078725450[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_237044267078725450[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_237044267078725450[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_237044267078725450[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_237044267078725450[29] = 0; - out_237044267078725450[30] = 0; - out_237044267078725450[31] = 0; - out_237044267078725450[32] = 0; - out_237044267078725450[33] = 0; - out_237044267078725450[34] = 0; - out_237044267078725450[35] = 0; - out_237044267078725450[36] = 0; - out_237044267078725450[37] = 0; - out_237044267078725450[38] = 0; - out_237044267078725450[39] = 1; - out_237044267078725450[40] = 0; - out_237044267078725450[41] = 0; - out_237044267078725450[42] = 1; - out_237044267078725450[43] = 0; - out_237044267078725450[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2]; - out_237044267078725450[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2]; - out_237044267078725450[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); - out_237044267078725450[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; - out_237044267078725450[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; - out_237044267078725450[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; - out_237044267078725450[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; - out_237044267078725450[51] = 0; - out_237044267078725450[52] = 0; - out_237044267078725450[53] = 0; - out_237044267078725450[54] = 0; - out_237044267078725450[55] = 0; - out_237044267078725450[56] = 0; - out_237044267078725450[57] = 0; - out_237044267078725450[58] = 0; - out_237044267078725450[59] = 0; - out_237044267078725450[60] = 0; - out_237044267078725450[61] = 0; - out_237044267078725450[62] = 1; - out_237044267078725450[63] = 0; - out_237044267078725450[64] = 0; - out_237044267078725450[65] = 1; +void H_10(double *state, double *unused, double *out_4874795283076868029) { + out_4874795283076868029[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2)); + out_4874795283076868029[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; + out_4874795283076868029[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2]; + out_4874795283076868029[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_4874795283076868029[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_4874795283076868029[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_4874795283076868029[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_4874795283076868029[7] = 0; + out_4874795283076868029[8] = 0; + out_4874795283076868029[9] = 0; + out_4874795283076868029[10] = 0; + out_4874795283076868029[11] = 0; + out_4874795283076868029[12] = 0; + out_4874795283076868029[13] = 0; + out_4874795283076868029[14] = 0; + out_4874795283076868029[15] = 0; + out_4874795283076868029[16] = 1; + out_4874795283076868029[17] = 0; + out_4874795283076868029[18] = 0; + out_4874795283076868029[19] = 1; + out_4874795283076868029[20] = 0; + out_4874795283076868029[21] = 0; + out_4874795283076868029[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1]; + out_4874795283076868029[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2)); + out_4874795283076868029[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2]; + out_4874795283076868029[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_4874795283076868029[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_4874795283076868029[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_4874795283076868029[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_4874795283076868029[29] = 0; + out_4874795283076868029[30] = 0; + out_4874795283076868029[31] = 0; + out_4874795283076868029[32] = 0; + out_4874795283076868029[33] = 0; + out_4874795283076868029[34] = 0; + out_4874795283076868029[35] = 0; + out_4874795283076868029[36] = 0; + out_4874795283076868029[37] = 0; + out_4874795283076868029[38] = 0; + out_4874795283076868029[39] = 1; + out_4874795283076868029[40] = 0; + out_4874795283076868029[41] = 0; + out_4874795283076868029[42] = 1; + out_4874795283076868029[43] = 0; + out_4874795283076868029[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2]; + out_4874795283076868029[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2]; + out_4874795283076868029[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2)); + out_4874795283076868029[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3]; + out_4874795283076868029[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4]; + out_4874795283076868029[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5]; + out_4874795283076868029[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6]; + out_4874795283076868029[51] = 0; + out_4874795283076868029[52] = 0; + out_4874795283076868029[53] = 0; + out_4874795283076868029[54] = 0; + out_4874795283076868029[55] = 0; + out_4874795283076868029[56] = 0; + out_4874795283076868029[57] = 0; + out_4874795283076868029[58] = 0; + out_4874795283076868029[59] = 0; + out_4874795283076868029[60] = 0; + out_4874795283076868029[61] = 0; + out_4874795283076868029[62] = 1; + out_4874795283076868029[63] = 0; + out_4874795283076868029[64] = 0; + out_4874795283076868029[65] = 1; } -void h_12(double *state, double *unused, double *out_6013134882881217907) { - out_6013134882881217907[0] = state[0]; - out_6013134882881217907[1] = state[1]; - out_6013134882881217907[2] = state[2]; +void h_12(double *state, double *unused, double *out_5593242706850216274) { + out_5593242706850216274[0] = state[0]; + out_5593242706850216274[1] = state[1]; + out_5593242706850216274[2] = state[2]; } -void H_12(double *state, double *unused, double *out_2349869560539372239) { - out_2349869560539372239[0] = 1; - out_2349869560539372239[1] = 0; - out_2349869560539372239[2] = 0; - out_2349869560539372239[3] = 0; - out_2349869560539372239[4] = 0; - out_2349869560539372239[5] = 0; - out_2349869560539372239[6] = 0; - out_2349869560539372239[7] = 0; - out_2349869560539372239[8] = 0; - out_2349869560539372239[9] = 0; - out_2349869560539372239[10] = 0; - out_2349869560539372239[11] = 0; - out_2349869560539372239[12] = 0; - out_2349869560539372239[13] = 0; - out_2349869560539372239[14] = 0; - out_2349869560539372239[15] = 0; - out_2349869560539372239[16] = 0; - out_2349869560539372239[17] = 0; - out_2349869560539372239[18] = 0; - out_2349869560539372239[19] = 0; - out_2349869560539372239[20] = 0; - out_2349869560539372239[21] = 0; - out_2349869560539372239[22] = 0; - out_2349869560539372239[23] = 1; - out_2349869560539372239[24] = 0; - out_2349869560539372239[25] = 0; - out_2349869560539372239[26] = 0; - out_2349869560539372239[27] = 0; - out_2349869560539372239[28] = 0; - out_2349869560539372239[29] = 0; - out_2349869560539372239[30] = 0; - out_2349869560539372239[31] = 0; - out_2349869560539372239[32] = 0; - out_2349869560539372239[33] = 0; - out_2349869560539372239[34] = 0; - out_2349869560539372239[35] = 0; - out_2349869560539372239[36] = 0; - out_2349869560539372239[37] = 0; - out_2349869560539372239[38] = 0; - out_2349869560539372239[39] = 0; - out_2349869560539372239[40] = 0; - out_2349869560539372239[41] = 0; - out_2349869560539372239[42] = 0; - out_2349869560539372239[43] = 0; - out_2349869560539372239[44] = 0; - out_2349869560539372239[45] = 0; - out_2349869560539372239[46] = 1; - out_2349869560539372239[47] = 0; - out_2349869560539372239[48] = 0; - out_2349869560539372239[49] = 0; - out_2349869560539372239[50] = 0; - out_2349869560539372239[51] = 0; - out_2349869560539372239[52] = 0; - out_2349869560539372239[53] = 0; - out_2349869560539372239[54] = 0; - out_2349869560539372239[55] = 0; - out_2349869560539372239[56] = 0; - out_2349869560539372239[57] = 0; - out_2349869560539372239[58] = 0; - out_2349869560539372239[59] = 0; - out_2349869560539372239[60] = 0; - out_2349869560539372239[61] = 0; - out_2349869560539372239[62] = 0; - out_2349869560539372239[63] = 0; - out_2349869560539372239[64] = 0; - out_2349869560539372239[65] = 0; +void H_12(double *state, double *unused, double *out_8275992229567209935) { + out_8275992229567209935[0] = 1; + out_8275992229567209935[1] = 0; + out_8275992229567209935[2] = 0; + out_8275992229567209935[3] = 0; + out_8275992229567209935[4] = 0; + out_8275992229567209935[5] = 0; + out_8275992229567209935[6] = 0; + out_8275992229567209935[7] = 0; + out_8275992229567209935[8] = 0; + out_8275992229567209935[9] = 0; + out_8275992229567209935[10] = 0; + out_8275992229567209935[11] = 0; + out_8275992229567209935[12] = 0; + out_8275992229567209935[13] = 0; + out_8275992229567209935[14] = 0; + out_8275992229567209935[15] = 0; + out_8275992229567209935[16] = 0; + out_8275992229567209935[17] = 0; + out_8275992229567209935[18] = 0; + out_8275992229567209935[19] = 0; + out_8275992229567209935[20] = 0; + out_8275992229567209935[21] = 0; + out_8275992229567209935[22] = 0; + out_8275992229567209935[23] = 1; + out_8275992229567209935[24] = 0; + out_8275992229567209935[25] = 0; + out_8275992229567209935[26] = 0; + out_8275992229567209935[27] = 0; + out_8275992229567209935[28] = 0; + out_8275992229567209935[29] = 0; + out_8275992229567209935[30] = 0; + out_8275992229567209935[31] = 0; + out_8275992229567209935[32] = 0; + out_8275992229567209935[33] = 0; + out_8275992229567209935[34] = 0; + out_8275992229567209935[35] = 0; + out_8275992229567209935[36] = 0; + out_8275992229567209935[37] = 0; + out_8275992229567209935[38] = 0; + out_8275992229567209935[39] = 0; + out_8275992229567209935[40] = 0; + out_8275992229567209935[41] = 0; + out_8275992229567209935[42] = 0; + out_8275992229567209935[43] = 0; + out_8275992229567209935[44] = 0; + out_8275992229567209935[45] = 0; + out_8275992229567209935[46] = 1; + out_8275992229567209935[47] = 0; + out_8275992229567209935[48] = 0; + out_8275992229567209935[49] = 0; + out_8275992229567209935[50] = 0; + out_8275992229567209935[51] = 0; + out_8275992229567209935[52] = 0; + out_8275992229567209935[53] = 0; + out_8275992229567209935[54] = 0; + out_8275992229567209935[55] = 0; + out_8275992229567209935[56] = 0; + out_8275992229567209935[57] = 0; + out_8275992229567209935[58] = 0; + out_8275992229567209935[59] = 0; + out_8275992229567209935[60] = 0; + out_8275992229567209935[61] = 0; + out_8275992229567209935[62] = 0; + out_8275992229567209935[63] = 0; + out_8275992229567209935[64] = 0; + out_8275992229567209935[65] = 0; } -void h_35(double *state, double *unused, double *out_4168878862868689688) { - out_4168878862868689688[0] = state[7]; - out_4168878862868689688[1] = state[8]; - out_4168878862868689688[2] = state[9]; +void h_35(double *state, double *unused, double *out_4109558175979041229) { + out_4109558175979041229[0] = state[7]; + out_4109558175979041229[1] = state[8]; + out_4109558175979041229[2] = state[9]; } -void H_35(double *state, double *unused, double *out_395693471785641470) { - out_395693471785641470[0] = 0; - out_395693471785641470[1] = 0; - out_395693471785641470[2] = 0; - out_395693471785641470[3] = 0; - out_395693471785641470[4] = 0; - out_395693471785641470[5] = 0; - out_395693471785641470[6] = 0; - out_395693471785641470[7] = 1; - out_395693471785641470[8] = 0; - out_395693471785641470[9] = 0; - out_395693471785641470[10] = 0; - out_395693471785641470[11] = 0; - out_395693471785641470[12] = 0; - out_395693471785641470[13] = 0; - out_395693471785641470[14] = 0; - out_395693471785641470[15] = 0; - out_395693471785641470[16] = 0; - out_395693471785641470[17] = 0; - out_395693471785641470[18] = 0; - out_395693471785641470[19] = 0; - out_395693471785641470[20] = 0; - out_395693471785641470[21] = 0; - out_395693471785641470[22] = 0; - out_395693471785641470[23] = 0; - out_395693471785641470[24] = 0; - out_395693471785641470[25] = 0; - out_395693471785641470[26] = 0; - out_395693471785641470[27] = 0; - out_395693471785641470[28] = 0; - out_395693471785641470[29] = 0; - out_395693471785641470[30] = 1; - out_395693471785641470[31] = 0; - out_395693471785641470[32] = 0; - out_395693471785641470[33] = 0; - out_395693471785641470[34] = 0; - out_395693471785641470[35] = 0; - out_395693471785641470[36] = 0; - out_395693471785641470[37] = 0; - out_395693471785641470[38] = 0; - out_395693471785641470[39] = 0; - out_395693471785641470[40] = 0; - out_395693471785641470[41] = 0; - out_395693471785641470[42] = 0; - out_395693471785641470[43] = 0; - out_395693471785641470[44] = 0; - out_395693471785641470[45] = 0; - out_395693471785641470[46] = 0; - out_395693471785641470[47] = 0; - out_395693471785641470[48] = 0; - out_395693471785641470[49] = 0; - out_395693471785641470[50] = 0; - out_395693471785641470[51] = 0; - out_395693471785641470[52] = 0; - out_395693471785641470[53] = 1; - out_395693471785641470[54] = 0; - out_395693471785641470[55] = 0; - out_395693471785641470[56] = 0; - out_395693471785641470[57] = 0; - out_395693471785641470[58] = 0; - out_395693471785641470[59] = 0; - out_395693471785641470[60] = 0; - out_395693471785641470[61] = 0; - out_395693471785641470[62] = 0; - out_395693471785641470[63] = 0; - out_395693471785641470[64] = 0; - out_395693471785641470[65] = 0; +void H_35(double *state, double *unused, double *out_1471928204848130437) { + out_1471928204848130437[0] = 0; + out_1471928204848130437[1] = 0; + out_1471928204848130437[2] = 0; + out_1471928204848130437[3] = 0; + out_1471928204848130437[4] = 0; + out_1471928204848130437[5] = 0; + out_1471928204848130437[6] = 0; + out_1471928204848130437[7] = 1; + out_1471928204848130437[8] = 0; + out_1471928204848130437[9] = 0; + out_1471928204848130437[10] = 0; + out_1471928204848130437[11] = 0; + out_1471928204848130437[12] = 0; + out_1471928204848130437[13] = 0; + out_1471928204848130437[14] = 0; + out_1471928204848130437[15] = 0; + out_1471928204848130437[16] = 0; + out_1471928204848130437[17] = 0; + out_1471928204848130437[18] = 0; + out_1471928204848130437[19] = 0; + out_1471928204848130437[20] = 0; + out_1471928204848130437[21] = 0; + out_1471928204848130437[22] = 0; + out_1471928204848130437[23] = 0; + out_1471928204848130437[24] = 0; + out_1471928204848130437[25] = 0; + out_1471928204848130437[26] = 0; + out_1471928204848130437[27] = 0; + out_1471928204848130437[28] = 0; + out_1471928204848130437[29] = 0; + out_1471928204848130437[30] = 1; + out_1471928204848130437[31] = 0; + out_1471928204848130437[32] = 0; + out_1471928204848130437[33] = 0; + out_1471928204848130437[34] = 0; + out_1471928204848130437[35] = 0; + out_1471928204848130437[36] = 0; + out_1471928204848130437[37] = 0; + out_1471928204848130437[38] = 0; + out_1471928204848130437[39] = 0; + out_1471928204848130437[40] = 0; + out_1471928204848130437[41] = 0; + out_1471928204848130437[42] = 0; + out_1471928204848130437[43] = 0; + out_1471928204848130437[44] = 0; + out_1471928204848130437[45] = 0; + out_1471928204848130437[46] = 0; + out_1471928204848130437[47] = 0; + out_1471928204848130437[48] = 0; + out_1471928204848130437[49] = 0; + out_1471928204848130437[50] = 0; + out_1471928204848130437[51] = 0; + out_1471928204848130437[52] = 0; + out_1471928204848130437[53] = 1; + out_1471928204848130437[54] = 0; + out_1471928204848130437[55] = 0; + out_1471928204848130437[56] = 0; + out_1471928204848130437[57] = 0; + out_1471928204848130437[58] = 0; + out_1471928204848130437[59] = 0; + out_1471928204848130437[60] = 0; + out_1471928204848130437[61] = 0; + out_1471928204848130437[62] = 0; + out_1471928204848130437[63] = 0; + out_1471928204848130437[64] = 0; + out_1471928204848130437[65] = 0; } -void h_32(double *state, double *unused, double *out_4936970720163542471) { - out_4936970720163542471[0] = state[3]; - out_4936970720163542471[1] = state[4]; - out_4936970720163542471[2] = state[5]; - out_4936970720163542471[3] = state[6]; +void h_32(double *state, double *unused, double *out_2434572600123179808) { + out_2434572600123179808[0] = state[3]; + out_2434572600123179808[1] = state[4]; + out_2434572600123179808[2] = state[5]; + out_2434572600123179808[3] = state[6]; } -void H_32(double *state, double *unused, double *out_3668749623942104845) { - out_3668749623942104845[0] = 0; - out_3668749623942104845[1] = 0; - out_3668749623942104845[2] = 0; - out_3668749623942104845[3] = 1; - out_3668749623942104845[4] = 0; - out_3668749623942104845[5] = 0; - out_3668749623942104845[6] = 0; - out_3668749623942104845[7] = 0; - out_3668749623942104845[8] = 0; - out_3668749623942104845[9] = 0; - out_3668749623942104845[10] = 0; - out_3668749623942104845[11] = 0; - out_3668749623942104845[12] = 0; - out_3668749623942104845[13] = 0; - out_3668749623942104845[14] = 0; - out_3668749623942104845[15] = 0; - out_3668749623942104845[16] = 0; - out_3668749623942104845[17] = 0; - out_3668749623942104845[18] = 0; - out_3668749623942104845[19] = 0; - out_3668749623942104845[20] = 0; - out_3668749623942104845[21] = 0; - out_3668749623942104845[22] = 0; - out_3668749623942104845[23] = 0; - out_3668749623942104845[24] = 0; - out_3668749623942104845[25] = 0; - out_3668749623942104845[26] = 1; - out_3668749623942104845[27] = 0; - out_3668749623942104845[28] = 0; - out_3668749623942104845[29] = 0; - out_3668749623942104845[30] = 0; - out_3668749623942104845[31] = 0; - out_3668749623942104845[32] = 0; - out_3668749623942104845[33] = 0; - out_3668749623942104845[34] = 0; - out_3668749623942104845[35] = 0; - out_3668749623942104845[36] = 0; - out_3668749623942104845[37] = 0; - out_3668749623942104845[38] = 0; - out_3668749623942104845[39] = 0; - out_3668749623942104845[40] = 0; - out_3668749623942104845[41] = 0; - out_3668749623942104845[42] = 0; - out_3668749623942104845[43] = 0; - out_3668749623942104845[44] = 0; - out_3668749623942104845[45] = 0; - out_3668749623942104845[46] = 0; - out_3668749623942104845[47] = 0; - out_3668749623942104845[48] = 0; - out_3668749623942104845[49] = 1; - out_3668749623942104845[50] = 0; - out_3668749623942104845[51] = 0; - out_3668749623942104845[52] = 0; - out_3668749623942104845[53] = 0; - out_3668749623942104845[54] = 0; - out_3668749623942104845[55] = 0; - out_3668749623942104845[56] = 0; - out_3668749623942104845[57] = 0; - out_3668749623942104845[58] = 0; - out_3668749623942104845[59] = 0; - out_3668749623942104845[60] = 0; - out_3668749623942104845[61] = 0; - out_3668749623942104845[62] = 0; - out_3668749623942104845[63] = 0; - out_3668749623942104845[64] = 0; - out_3668749623942104845[65] = 0; - out_3668749623942104845[66] = 0; - out_3668749623942104845[67] = 0; - out_3668749623942104845[68] = 0; - out_3668749623942104845[69] = 0; - out_3668749623942104845[70] = 0; - out_3668749623942104845[71] = 0; - out_3668749623942104845[72] = 1; - out_3668749623942104845[73] = 0; - out_3668749623942104845[74] = 0; - out_3668749623942104845[75] = 0; - out_3668749623942104845[76] = 0; - out_3668749623942104845[77] = 0; - out_3668749623942104845[78] = 0; - out_3668749623942104845[79] = 0; - out_3668749623942104845[80] = 0; - out_3668749623942104845[81] = 0; - out_3668749623942104845[82] = 0; - out_3668749623942104845[83] = 0; - out_3668749623942104845[84] = 0; - out_3668749623942104845[85] = 0; - out_3668749623942104845[86] = 0; - out_3668749623942104845[87] = 0; +void H_32(double *state, double *unused, double *out_1603092989788870906) { + out_1603092989788870906[0] = 0; + out_1603092989788870906[1] = 0; + out_1603092989788870906[2] = 0; + out_1603092989788870906[3] = 1; + out_1603092989788870906[4] = 0; + out_1603092989788870906[5] = 0; + out_1603092989788870906[6] = 0; + out_1603092989788870906[7] = 0; + out_1603092989788870906[8] = 0; + out_1603092989788870906[9] = 0; + out_1603092989788870906[10] = 0; + out_1603092989788870906[11] = 0; + out_1603092989788870906[12] = 0; + out_1603092989788870906[13] = 0; + out_1603092989788870906[14] = 0; + out_1603092989788870906[15] = 0; + out_1603092989788870906[16] = 0; + out_1603092989788870906[17] = 0; + out_1603092989788870906[18] = 0; + out_1603092989788870906[19] = 0; + out_1603092989788870906[20] = 0; + out_1603092989788870906[21] = 0; + out_1603092989788870906[22] = 0; + out_1603092989788870906[23] = 0; + out_1603092989788870906[24] = 0; + out_1603092989788870906[25] = 0; + out_1603092989788870906[26] = 1; + out_1603092989788870906[27] = 0; + out_1603092989788870906[28] = 0; + out_1603092989788870906[29] = 0; + out_1603092989788870906[30] = 0; + out_1603092989788870906[31] = 0; + out_1603092989788870906[32] = 0; + out_1603092989788870906[33] = 0; + out_1603092989788870906[34] = 0; + out_1603092989788870906[35] = 0; + out_1603092989788870906[36] = 0; + out_1603092989788870906[37] = 0; + out_1603092989788870906[38] = 0; + out_1603092989788870906[39] = 0; + out_1603092989788870906[40] = 0; + out_1603092989788870906[41] = 0; + out_1603092989788870906[42] = 0; + out_1603092989788870906[43] = 0; + out_1603092989788870906[44] = 0; + out_1603092989788870906[45] = 0; + out_1603092989788870906[46] = 0; + out_1603092989788870906[47] = 0; + out_1603092989788870906[48] = 0; + out_1603092989788870906[49] = 1; + out_1603092989788870906[50] = 0; + out_1603092989788870906[51] = 0; + out_1603092989788870906[52] = 0; + out_1603092989788870906[53] = 0; + out_1603092989788870906[54] = 0; + out_1603092989788870906[55] = 0; + out_1603092989788870906[56] = 0; + out_1603092989788870906[57] = 0; + out_1603092989788870906[58] = 0; + out_1603092989788870906[59] = 0; + out_1603092989788870906[60] = 0; + out_1603092989788870906[61] = 0; + out_1603092989788870906[62] = 0; + out_1603092989788870906[63] = 0; + out_1603092989788870906[64] = 0; + out_1603092989788870906[65] = 0; + out_1603092989788870906[66] = 0; + out_1603092989788870906[67] = 0; + out_1603092989788870906[68] = 0; + out_1603092989788870906[69] = 0; + out_1603092989788870906[70] = 0; + out_1603092989788870906[71] = 0; + out_1603092989788870906[72] = 1; + out_1603092989788870906[73] = 0; + out_1603092989788870906[74] = 0; + out_1603092989788870906[75] = 0; + out_1603092989788870906[76] = 0; + out_1603092989788870906[77] = 0; + out_1603092989788870906[78] = 0; + out_1603092989788870906[79] = 0; + out_1603092989788870906[80] = 0; + out_1603092989788870906[81] = 0; + out_1603092989788870906[82] = 0; + out_1603092989788870906[83] = 0; + out_1603092989788870906[84] = 0; + out_1603092989788870906[85] = 0; + out_1603092989788870906[86] = 0; + out_1603092989788870906[87] = 0; } -void h_13(double *state, double *unused, double *out_7665680987382498567) { - out_7665680987382498567[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7]; - out_7665680987382498567[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8]; - out_7665680987382498567[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9]; +void h_13(double *state, double *unused, double *out_8296318041343750975) { + out_8296318041343750975[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7]; + out_8296318041343750975[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8]; + out_8296318041343750975[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9]; } -void H_13(double *state, double *unused, double *out_7055416705305814551) { - out_7055416705305814551[0] = 0; - out_7055416705305814551[1] = 0; - out_7055416705305814551[2] = 0; - out_7055416705305814551[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_7055416705305814551[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_7055416705305814551[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; - out_7055416705305814551[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_7055416705305814551[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); - out_7055416705305814551[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; - out_7055416705305814551[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; - out_7055416705305814551[10] = 0; - out_7055416705305814551[11] = 0; - out_7055416705305814551[12] = 0; - out_7055416705305814551[13] = 0; - out_7055416705305814551[14] = 0; - out_7055416705305814551[15] = 0; - out_7055416705305814551[16] = 0; - out_7055416705305814551[17] = 0; - out_7055416705305814551[18] = 0; - out_7055416705305814551[19] = 0; - out_7055416705305814551[20] = 0; - out_7055416705305814551[21] = 0; - out_7055416705305814551[22] = 0; - out_7055416705305814551[23] = 0; - out_7055416705305814551[24] = 0; - out_7055416705305814551[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; - out_7055416705305814551[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_7055416705305814551[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_7055416705305814551[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; - out_7055416705305814551[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; - out_7055416705305814551[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); - out_7055416705305814551[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; - out_7055416705305814551[32] = 0; - out_7055416705305814551[33] = 0; - out_7055416705305814551[34] = 0; - out_7055416705305814551[35] = 0; - out_7055416705305814551[36] = 0; - out_7055416705305814551[37] = 0; - out_7055416705305814551[38] = 0; - out_7055416705305814551[39] = 0; - out_7055416705305814551[40] = 0; - out_7055416705305814551[41] = 0; - out_7055416705305814551[42] = 0; - out_7055416705305814551[43] = 0; - out_7055416705305814551[44] = 0; - out_7055416705305814551[45] = 0; - out_7055416705305814551[46] = 0; - out_7055416705305814551[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; - out_7055416705305814551[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; - out_7055416705305814551[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; - out_7055416705305814551[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; - out_7055416705305814551[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; - out_7055416705305814551[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; - out_7055416705305814551[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); - out_7055416705305814551[54] = 0; - out_7055416705305814551[55] = 0; - out_7055416705305814551[56] = 0; - out_7055416705305814551[57] = 0; - out_7055416705305814551[58] = 0; - out_7055416705305814551[59] = 0; - out_7055416705305814551[60] = 0; - out_7055416705305814551[61] = 0; - out_7055416705305814551[62] = 0; - out_7055416705305814551[63] = 0; - out_7055416705305814551[64] = 0; - out_7055416705305814551[65] = 0; +void H_13(double *state, double *unused, double *out_8810526556892616038) { + out_8810526556892616038[0] = 0; + out_8810526556892616038[1] = 0; + out_8810526556892616038[2] = 0; + out_8810526556892616038[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_8810526556892616038[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8810526556892616038[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7]; + out_8810526556892616038[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_8810526556892616038[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2); + out_8810526556892616038[8] = 2*state[3]*state[6] + 2*state[4]*state[5]; + out_8810526556892616038[9] = -2*state[3]*state[5] + 2*state[4]*state[6]; + out_8810526556892616038[10] = 0; + out_8810526556892616038[11] = 0; + out_8810526556892616038[12] = 0; + out_8810526556892616038[13] = 0; + out_8810526556892616038[14] = 0; + out_8810526556892616038[15] = 0; + out_8810526556892616038[16] = 0; + out_8810526556892616038[17] = 0; + out_8810526556892616038[18] = 0; + out_8810526556892616038[19] = 0; + out_8810526556892616038[20] = 0; + out_8810526556892616038[21] = 0; + out_8810526556892616038[22] = 0; + out_8810526556892616038[23] = 0; + out_8810526556892616038[24] = 0; + out_8810526556892616038[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7]; + out_8810526556892616038[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_8810526556892616038[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8810526556892616038[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8]; + out_8810526556892616038[29] = -2*state[3]*state[6] + 2*state[4]*state[5]; + out_8810526556892616038[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2); + out_8810526556892616038[31] = 2*state[3]*state[4] + 2*state[5]*state[6]; + out_8810526556892616038[32] = 0; + out_8810526556892616038[33] = 0; + out_8810526556892616038[34] = 0; + out_8810526556892616038[35] = 0; + out_8810526556892616038[36] = 0; + out_8810526556892616038[37] = 0; + out_8810526556892616038[38] = 0; + out_8810526556892616038[39] = 0; + out_8810526556892616038[40] = 0; + out_8810526556892616038[41] = 0; + out_8810526556892616038[42] = 0; + out_8810526556892616038[43] = 0; + out_8810526556892616038[44] = 0; + out_8810526556892616038[45] = 0; + out_8810526556892616038[46] = 0; + out_8810526556892616038[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7]; + out_8810526556892616038[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7]; + out_8810526556892616038[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8]; + out_8810526556892616038[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9]; + out_8810526556892616038[51] = 2*state[3]*state[5] + 2*state[4]*state[6]; + out_8810526556892616038[52] = -2*state[3]*state[4] + 2*state[5]*state[6]; + out_8810526556892616038[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2); + out_8810526556892616038[54] = 0; + out_8810526556892616038[55] = 0; + out_8810526556892616038[56] = 0; + out_8810526556892616038[57] = 0; + out_8810526556892616038[58] = 0; + out_8810526556892616038[59] = 0; + out_8810526556892616038[60] = 0; + out_8810526556892616038[61] = 0; + out_8810526556892616038[62] = 0; + out_8810526556892616038[63] = 0; + out_8810526556892616038[64] = 0; + out_8810526556892616038[65] = 0; } -void h_14(double *state, double *unused, double *out_3366596944174975637) { - out_3366596944174975637[0] = state[10]; - out_3366596944174975637[1] = state[11]; - out_3366596944174975637[2] = state[12]; +void h_14(double *state, double *unused, double *out_6538024057642950278) { + out_6538024057642950278[0] = state[10]; + out_6538024057642950278[1] = state[11]; + out_6538024057642950278[2] = state[12]; } -void H_14(double *state, double *unused, double *out_7128136321941743389) { - out_7128136321941743389[0] = 0; - out_7128136321941743389[1] = 0; - out_7128136321941743389[2] = 0; - out_7128136321941743389[3] = 0; - out_7128136321941743389[4] = 0; - out_7128136321941743389[5] = 0; - out_7128136321941743389[6] = 0; - out_7128136321941743389[7] = 0; - out_7128136321941743389[8] = 0; - out_7128136321941743389[9] = 0; - out_7128136321941743389[10] = 1; - out_7128136321941743389[11] = 0; - out_7128136321941743389[12] = 0; - out_7128136321941743389[13] = 0; - out_7128136321941743389[14] = 0; - out_7128136321941743389[15] = 0; - out_7128136321941743389[16] = 0; - out_7128136321941743389[17] = 0; - out_7128136321941743389[18] = 0; - out_7128136321941743389[19] = 0; - out_7128136321941743389[20] = 0; - out_7128136321941743389[21] = 0; - out_7128136321941743389[22] = 0; - out_7128136321941743389[23] = 0; - out_7128136321941743389[24] = 0; - out_7128136321941743389[25] = 0; - out_7128136321941743389[26] = 0; - out_7128136321941743389[27] = 0; - out_7128136321941743389[28] = 0; - out_7128136321941743389[29] = 0; - out_7128136321941743389[30] = 0; - out_7128136321941743389[31] = 0; - out_7128136321941743389[32] = 0; - out_7128136321941743389[33] = 1; - out_7128136321941743389[34] = 0; - out_7128136321941743389[35] = 0; - out_7128136321941743389[36] = 0; - out_7128136321941743389[37] = 0; - out_7128136321941743389[38] = 0; - out_7128136321941743389[39] = 0; - out_7128136321941743389[40] = 0; - out_7128136321941743389[41] = 0; - out_7128136321941743389[42] = 0; - out_7128136321941743389[43] = 0; - out_7128136321941743389[44] = 0; - out_7128136321941743389[45] = 0; - out_7128136321941743389[46] = 0; - out_7128136321941743389[47] = 0; - out_7128136321941743389[48] = 0; - out_7128136321941743389[49] = 0; - out_7128136321941743389[50] = 0; - out_7128136321941743389[51] = 0; - out_7128136321941743389[52] = 0; - out_7128136321941743389[53] = 0; - out_7128136321941743389[54] = 0; - out_7128136321941743389[55] = 0; - out_7128136321941743389[56] = 1; - out_7128136321941743389[57] = 0; - out_7128136321941743389[58] = 0; - out_7128136321941743389[59] = 0; - out_7128136321941743389[60] = 0; - out_7128136321941743389[61] = 0; - out_7128136321941743389[62] = 0; - out_7128136321941743389[63] = 0; - out_7128136321941743389[64] = 0; - out_7128136321941743389[65] = 0; +void H_14(double *state, double *unused, double *out_5392485082739970531) { + out_5392485082739970531[0] = 0; + out_5392485082739970531[1] = 0; + out_5392485082739970531[2] = 0; + out_5392485082739970531[3] = 0; + out_5392485082739970531[4] = 0; + out_5392485082739970531[5] = 0; + out_5392485082739970531[6] = 0; + out_5392485082739970531[7] = 0; + out_5392485082739970531[8] = 0; + out_5392485082739970531[9] = 0; + out_5392485082739970531[10] = 1; + out_5392485082739970531[11] = 0; + out_5392485082739970531[12] = 0; + out_5392485082739970531[13] = 0; + out_5392485082739970531[14] = 0; + out_5392485082739970531[15] = 0; + out_5392485082739970531[16] = 0; + out_5392485082739970531[17] = 0; + out_5392485082739970531[18] = 0; + out_5392485082739970531[19] = 0; + out_5392485082739970531[20] = 0; + out_5392485082739970531[21] = 0; + out_5392485082739970531[22] = 0; + out_5392485082739970531[23] = 0; + out_5392485082739970531[24] = 0; + out_5392485082739970531[25] = 0; + out_5392485082739970531[26] = 0; + out_5392485082739970531[27] = 0; + out_5392485082739970531[28] = 0; + out_5392485082739970531[29] = 0; + out_5392485082739970531[30] = 0; + out_5392485082739970531[31] = 0; + out_5392485082739970531[32] = 0; + out_5392485082739970531[33] = 1; + out_5392485082739970531[34] = 0; + out_5392485082739970531[35] = 0; + out_5392485082739970531[36] = 0; + out_5392485082739970531[37] = 0; + out_5392485082739970531[38] = 0; + out_5392485082739970531[39] = 0; + out_5392485082739970531[40] = 0; + out_5392485082739970531[41] = 0; + out_5392485082739970531[42] = 0; + out_5392485082739970531[43] = 0; + out_5392485082739970531[44] = 0; + out_5392485082739970531[45] = 0; + out_5392485082739970531[46] = 0; + out_5392485082739970531[47] = 0; + out_5392485082739970531[48] = 0; + out_5392485082739970531[49] = 0; + out_5392485082739970531[50] = 0; + out_5392485082739970531[51] = 0; + out_5392485082739970531[52] = 0; + out_5392485082739970531[53] = 0; + out_5392485082739970531[54] = 0; + out_5392485082739970531[55] = 0; + out_5392485082739970531[56] = 1; + out_5392485082739970531[57] = 0; + out_5392485082739970531[58] = 0; + out_5392485082739970531[59] = 0; + out_5392485082739970531[60] = 0; + out_5392485082739970531[61] = 0; + out_5392485082739970531[62] = 0; + out_5392485082739970531[63] = 0; + out_5392485082739970531[64] = 0; + out_5392485082739970531[65] = 0; } -void h_33(double *state, double *unused, double *out_38641774376781073) { - out_38641774376781073[0] = state[16]; - out_38641774376781073[1] = state[17]; - out_38641774376781073[2] = state[18]; +void h_33(double *state, double *unused, double *out_3199735378693798971) { + out_3199735378693798971[0] = state[16]; + out_3199735378693798971[1] = state[17]; + out_3199735378693798971[2] = state[18]; } -void H_33(double *state, double *unused, double *out_3546250476424499074) { - out_3546250476424499074[0] = 0; - out_3546250476424499074[1] = 0; - out_3546250476424499074[2] = 0; - out_3546250476424499074[3] = 0; - out_3546250476424499074[4] = 0; - out_3546250476424499074[5] = 0; - out_3546250476424499074[6] = 0; - out_3546250476424499074[7] = 0; - out_3546250476424499074[8] = 0; - out_3546250476424499074[9] = 0; - out_3546250476424499074[10] = 0; - out_3546250476424499074[11] = 0; - out_3546250476424499074[12] = 0; - out_3546250476424499074[13] = 0; - out_3546250476424499074[14] = 0; - out_3546250476424499074[15] = 0; - out_3546250476424499074[16] = 1; - out_3546250476424499074[17] = 0; - out_3546250476424499074[18] = 0; - out_3546250476424499074[19] = 0; - out_3546250476424499074[20] = 0; - out_3546250476424499074[21] = 0; - out_3546250476424499074[22] = 0; - out_3546250476424499074[23] = 0; - out_3546250476424499074[24] = 0; - out_3546250476424499074[25] = 0; - out_3546250476424499074[26] = 0; - out_3546250476424499074[27] = 0; - out_3546250476424499074[28] = 0; - out_3546250476424499074[29] = 0; - out_3546250476424499074[30] = 0; - out_3546250476424499074[31] = 0; - out_3546250476424499074[32] = 0; - out_3546250476424499074[33] = 0; - out_3546250476424499074[34] = 0; - out_3546250476424499074[35] = 0; - out_3546250476424499074[36] = 0; - out_3546250476424499074[37] = 0; - out_3546250476424499074[38] = 0; - out_3546250476424499074[39] = 1; - out_3546250476424499074[40] = 0; - out_3546250476424499074[41] = 0; - out_3546250476424499074[42] = 0; - out_3546250476424499074[43] = 0; - out_3546250476424499074[44] = 0; - out_3546250476424499074[45] = 0; - out_3546250476424499074[46] = 0; - out_3546250476424499074[47] = 0; - out_3546250476424499074[48] = 0; - out_3546250476424499074[49] = 0; - out_3546250476424499074[50] = 0; - out_3546250476424499074[51] = 0; - out_3546250476424499074[52] = 0; - out_3546250476424499074[53] = 0; - out_3546250476424499074[54] = 0; - out_3546250476424499074[55] = 0; - out_3546250476424499074[56] = 0; - out_3546250476424499074[57] = 0; - out_3546250476424499074[58] = 0; - out_3546250476424499074[59] = 0; - out_3546250476424499074[60] = 0; - out_3546250476424499074[61] = 0; - out_3546250476424499074[62] = 1; - out_3546250476424499074[63] = 0; - out_3546250476424499074[64] = 0; - out_3546250476424499074[65] = 0; +void H_33(double *state, double *unused, double *out_4622485209486988041) { + out_4622485209486988041[0] = 0; + out_4622485209486988041[1] = 0; + out_4622485209486988041[2] = 0; + out_4622485209486988041[3] = 0; + out_4622485209486988041[4] = 0; + out_4622485209486988041[5] = 0; + out_4622485209486988041[6] = 0; + out_4622485209486988041[7] = 0; + out_4622485209486988041[8] = 0; + out_4622485209486988041[9] = 0; + out_4622485209486988041[10] = 0; + out_4622485209486988041[11] = 0; + out_4622485209486988041[12] = 0; + out_4622485209486988041[13] = 0; + out_4622485209486988041[14] = 0; + out_4622485209486988041[15] = 0; + out_4622485209486988041[16] = 1; + out_4622485209486988041[17] = 0; + out_4622485209486988041[18] = 0; + out_4622485209486988041[19] = 0; + out_4622485209486988041[20] = 0; + out_4622485209486988041[21] = 0; + out_4622485209486988041[22] = 0; + out_4622485209486988041[23] = 0; + out_4622485209486988041[24] = 0; + out_4622485209486988041[25] = 0; + out_4622485209486988041[26] = 0; + out_4622485209486988041[27] = 0; + out_4622485209486988041[28] = 0; + out_4622485209486988041[29] = 0; + out_4622485209486988041[30] = 0; + out_4622485209486988041[31] = 0; + out_4622485209486988041[32] = 0; + out_4622485209486988041[33] = 0; + out_4622485209486988041[34] = 0; + out_4622485209486988041[35] = 0; + out_4622485209486988041[36] = 0; + out_4622485209486988041[37] = 0; + out_4622485209486988041[38] = 0; + out_4622485209486988041[39] = 1; + out_4622485209486988041[40] = 0; + out_4622485209486988041[41] = 0; + out_4622485209486988041[42] = 0; + out_4622485209486988041[43] = 0; + out_4622485209486988041[44] = 0; + out_4622485209486988041[45] = 0; + out_4622485209486988041[46] = 0; + out_4622485209486988041[47] = 0; + out_4622485209486988041[48] = 0; + out_4622485209486988041[49] = 0; + out_4622485209486988041[50] = 0; + out_4622485209486988041[51] = 0; + out_4622485209486988041[52] = 0; + out_4622485209486988041[53] = 0; + out_4622485209486988041[54] = 0; + out_4622485209486988041[55] = 0; + out_4622485209486988041[56] = 0; + out_4622485209486988041[57] = 0; + out_4622485209486988041[58] = 0; + out_4622485209486988041[59] = 0; + out_4622485209486988041[60] = 0; + out_4622485209486988041[61] = 0; + out_4622485209486988041[62] = 1; + out_4622485209486988041[63] = 0; + out_4622485209486988041[64] = 0; + out_4622485209486988041[65] = 0; } #include #include @@ -1855,77 +1855,77 @@ void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, doub void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { update<3, 3, 0>(in_x, in_P, h_33, H_33, NULL, in_z, in_R, in_ea, MAHA_THRESH_33); } -void live_H(double *in_vec, double *out_4141618569674559553) { - H(in_vec, out_4141618569674559553); +void live_H(double *in_vec, double *out_47804104617978308) { + H(in_vec, out_47804104617978308); } -void live_err_fun(double *nom_x, double *delta_x, double *out_336104914132035225) { - err_fun(nom_x, delta_x, out_336104914132035225); +void live_err_fun(double *nom_x, double *delta_x, double *out_3044735197278814730) { + err_fun(nom_x, delta_x, out_3044735197278814730); } -void live_inv_err_fun(double *nom_x, double *true_x, double *out_7271859698776574756) { - inv_err_fun(nom_x, true_x, out_7271859698776574756); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_1197418404864356272) { + inv_err_fun(nom_x, true_x, out_1197418404864356272); } -void live_H_mod_fun(double *state, double *out_5296745522040587483) { - H_mod_fun(state, out_5296745522040587483); +void live_H_mod_fun(double *state, double *out_4480637621689338596) { + H_mod_fun(state, out_4480637621689338596); } -void live_f_fun(double *state, double dt, double *out_6190173082560003234) { - f_fun(state, dt, out_6190173082560003234); +void live_f_fun(double *state, double dt, double *out_7252882908104132962) { + f_fun(state, dt, out_7252882908104132962); } -void live_F_fun(double *state, double dt, double *out_1775290298854174806) { - F_fun(state, dt, out_1775290298854174806); +void live_F_fun(double *state, double dt, double *out_8296291579486998584) { + F_fun(state, dt, out_8296291579486998584); } -void live_h_4(double *state, double *unused, double *out_3381985302175387771) { - h_4(state, unused, out_3381985302175387771); +void live_h_4(double *state, double *unused, double *out_74524857013721926) { + h_4(state, unused, out_74524857013721926); } -void live_H_4(double *state, double *unused, double *out_7369325968571334034) { - H_4(state, unused, out_7369325968571334034); +void live_H_4(double *state, double *unused, double *out_1894733852524476939) { + H_4(state, unused, out_1894733852524476939); } -void live_h_9(double *state, double *unused, double *out_3366596944174975637) { - h_9(state, unused, out_3366596944174975637); +void live_h_9(double *state, double *unused, double *out_6538024057642950278) { + h_9(state, unused, out_6538024057642950278); } -void live_H_9(double *state, double *unused, double *out_7128136321941743389) { - H_9(state, unused, out_7128136321941743389); +void live_H_9(double *state, double *unused, double *out_5392485082739970531) { + H_9(state, unused, out_5392485082739970531); } -void live_h_10(double *state, double *unused, double *out_5820461675875995871) { - h_10(state, unused, out_5820461675875995871); +void live_h_10(double *state, double *unused, double *out_3055894436910046000) { + h_10(state, unused, out_3055894436910046000); } -void live_H_10(double *state, double *unused, double *out_237044267078725450) { - H_10(state, unused, out_237044267078725450); +void live_H_10(double *state, double *unused, double *out_4874795283076868029) { + H_10(state, unused, out_4874795283076868029); } -void live_h_12(double *state, double *unused, double *out_6013134882881217907) { - h_12(state, unused, out_6013134882881217907); +void live_h_12(double *state, double *unused, double *out_5593242706850216274) { + h_12(state, unused, out_5593242706850216274); } -void live_H_12(double *state, double *unused, double *out_2349869560539372239) { - H_12(state, unused, out_2349869560539372239); +void live_H_12(double *state, double *unused, double *out_8275992229567209935) { + H_12(state, unused, out_8275992229567209935); } -void live_h_35(double *state, double *unused, double *out_4168878862868689688) { - h_35(state, unused, out_4168878862868689688); +void live_h_35(double *state, double *unused, double *out_4109558175979041229) { + h_35(state, unused, out_4109558175979041229); } -void live_H_35(double *state, double *unused, double *out_395693471785641470) { - H_35(state, unused, out_395693471785641470); +void live_H_35(double *state, double *unused, double *out_1471928204848130437) { + H_35(state, unused, out_1471928204848130437); } -void live_h_32(double *state, double *unused, double *out_4936970720163542471) { - h_32(state, unused, out_4936970720163542471); +void live_h_32(double *state, double *unused, double *out_2434572600123179808) { + h_32(state, unused, out_2434572600123179808); } -void live_H_32(double *state, double *unused, double *out_3668749623942104845) { - H_32(state, unused, out_3668749623942104845); +void live_H_32(double *state, double *unused, double *out_1603092989788870906) { + H_32(state, unused, out_1603092989788870906); } -void live_h_13(double *state, double *unused, double *out_7665680987382498567) { - h_13(state, unused, out_7665680987382498567); +void live_h_13(double *state, double *unused, double *out_8296318041343750975) { + h_13(state, unused, out_8296318041343750975); } -void live_H_13(double *state, double *unused, double *out_7055416705305814551) { - H_13(state, unused, out_7055416705305814551); +void live_H_13(double *state, double *unused, double *out_8810526556892616038) { + H_13(state, unused, out_8810526556892616038); } -void live_h_14(double *state, double *unused, double *out_3366596944174975637) { - h_14(state, unused, out_3366596944174975637); +void live_h_14(double *state, double *unused, double *out_6538024057642950278) { + h_14(state, unused, out_6538024057642950278); } -void live_H_14(double *state, double *unused, double *out_7128136321941743389) { - H_14(state, unused, out_7128136321941743389); +void live_H_14(double *state, double *unused, double *out_5392485082739970531) { + H_14(state, unused, out_5392485082739970531); } -void live_h_33(double *state, double *unused, double *out_38641774376781073) { - h_33(state, unused, out_38641774376781073); +void live_h_33(double *state, double *unused, double *out_3199735378693798971) { + h_33(state, unused, out_3199735378693798971); } -void live_H_33(double *state, double *unused, double *out_3546250476424499074) { - H_33(state, unused, out_3546250476424499074); +void live_H_33(double *state, double *unused, double *out_4622485209486988041) { + H_33(state, unused, out_4622485209486988041); } void live_predict(double *in_x, double *in_P, double *in_Q, double dt) { predict(in_x, in_P, in_Q, dt); diff --git a/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.h b/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.h index 6dd1dd529..0f36ffd16 100644 --- a/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.h +++ b/openpilot/sunnypilot/selfdrive/locationd/models/generated/live.h @@ -10,29 +10,29 @@ void live_update_32(double *in_x, double *in_P, double *in_z, double *in_R, doub void live_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea); -void live_H(double *in_vec, double *out_4141618569674559553); -void live_err_fun(double *nom_x, double *delta_x, double *out_336104914132035225); -void live_inv_err_fun(double *nom_x, double *true_x, double *out_7271859698776574756); -void live_H_mod_fun(double *state, double *out_5296745522040587483); -void live_f_fun(double *state, double dt, double *out_6190173082560003234); -void live_F_fun(double *state, double dt, double *out_1775290298854174806); -void live_h_4(double *state, double *unused, double *out_3381985302175387771); -void live_H_4(double *state, double *unused, double *out_7369325968571334034); -void live_h_9(double *state, double *unused, double *out_3366596944174975637); -void live_H_9(double *state, double *unused, double *out_7128136321941743389); -void live_h_10(double *state, double *unused, double *out_5820461675875995871); -void live_H_10(double *state, double *unused, double *out_237044267078725450); -void live_h_12(double *state, double *unused, double *out_6013134882881217907); -void live_H_12(double *state, double *unused, double *out_2349869560539372239); -void live_h_35(double *state, double *unused, double *out_4168878862868689688); -void live_H_35(double *state, double *unused, double *out_395693471785641470); -void live_h_32(double *state, double *unused, double *out_4936970720163542471); -void live_H_32(double *state, double *unused, double *out_3668749623942104845); -void live_h_13(double *state, double *unused, double *out_7665680987382498567); -void live_H_13(double *state, double *unused, double *out_7055416705305814551); -void live_h_14(double *state, double *unused, double *out_3366596944174975637); -void live_H_14(double *state, double *unused, double *out_7128136321941743389); -void live_h_33(double *state, double *unused, double *out_38641774376781073); -void live_H_33(double *state, double *unused, double *out_3546250476424499074); +void live_H(double *in_vec, double *out_47804104617978308); +void live_err_fun(double *nom_x, double *delta_x, double *out_3044735197278814730); +void live_inv_err_fun(double *nom_x, double *true_x, double *out_1197418404864356272); +void live_H_mod_fun(double *state, double *out_4480637621689338596); +void live_f_fun(double *state, double dt, double *out_7252882908104132962); +void live_F_fun(double *state, double dt, double *out_8296291579486998584); +void live_h_4(double *state, double *unused, double *out_74524857013721926); +void live_H_4(double *state, double *unused, double *out_1894733852524476939); +void live_h_9(double *state, double *unused, double *out_6538024057642950278); +void live_H_9(double *state, double *unused, double *out_5392485082739970531); +void live_h_10(double *state, double *unused, double *out_3055894436910046000); +void live_H_10(double *state, double *unused, double *out_4874795283076868029); +void live_h_12(double *state, double *unused, double *out_5593242706850216274); +void live_H_12(double *state, double *unused, double *out_8275992229567209935); +void live_h_35(double *state, double *unused, double *out_4109558175979041229); +void live_H_35(double *state, double *unused, double *out_1471928204848130437); +void live_h_32(double *state, double *unused, double *out_2434572600123179808); +void live_H_32(double *state, double *unused, double *out_1603092989788870906); +void live_h_13(double *state, double *unused, double *out_8296318041343750975); +void live_H_13(double *state, double *unused, double *out_8810526556892616038); +void live_h_14(double *state, double *unused, double *out_6538024057642950278); +void live_H_14(double *state, double *unused, double *out_5392485082739970531); +void live_h_33(double *state, double *unused, double *out_3199735378693798971); +void live_H_33(double *state, double *unused, double *out_4622485209486988041); void live_predict(double *in_x, double *in_P, double *in_Q, double dt); } \ No newline at end of file diff --git a/openpilot/system/camerad/camerad b/openpilot/system/camerad/camerad index 74ccaeb2b..02fd01c0e 100755 Binary files a/openpilot/system/camerad/camerad and b/openpilot/system/camerad/camerad differ diff --git a/openpilot/system/hardware/chestnut/status.py b/openpilot/system/hardware/chestnut/status.py new file mode 100644 index 000000000..393d989da --- /dev/null +++ b/openpilot/system/hardware/chestnut/status.py @@ -0,0 +1,101 @@ +import time + +from openpilot.common.hardware.usb import CHESTNUT_USB_PRODUCT, is_chestnut_usb_id +from openpilot.common.version import get_build_metadata, CHESTNUT_BRANCHES +from openpilot.selfdrive.modeld.helpers import MODELS_DIR, chestnut_compiled + + +CHESTNUT_RELEASE_BRANCHES = ("release-chestnut", "release-chestnut-staging") +CHESTNUT_POWERED_VOLTAGE = 5000 +GPU_TEMP_LIMIT = 100. +MEMORY_TEMP_LIMIT = 95. +TEMP_HYSTERESIS = 5. + + +class ChestnutStatus: + def __init__(self): + self.started = time.monotonic() + self.offroad = True + self.pcie_failed = False + self.power_seen = False + self.power_unavailable = False + self.power_lost = False + self.power_restored = False + self.link_failures = 0 + self.model_loading_seen = False + self.model_attempted = False + self.overheated = False + self.usb_seen = False + self.usb_failed = False + + def update(self, offroad: bool, branch: str, usb_state: list[dict], firmware_failed: bool, + model_loading: bool, model_active: bool | None, state, set_alert) -> None: + detected = [d for d in usb_state if is_chestnut_usb_id(d["vendorId"], d["productId"], include_bootloader=True)] + devices = [d for d in detected if is_chestnut_usb_id(d["vendorId"], d["productId"])] + firmware_ok = len(devices) == 1 and devices[0]["product"] == CHESTNUT_USB_PRODUCT + + if self.offroad and not offroad: + self.pcie_failed = False + self.power_seen = False + self.power_unavailable = False + self.power_lost = False + self.power_restored = False + self.link_failures = 0 + self.model_loading_seen = False + self.model_attempted = False + self.usb_seen = firmware_ok + self.usb_failed = False + + self.model_loading_seen |= model_loading + self.model_attempted |= self.model_loading_seen and not model_loading and model_active is not None + + if not offroad and self.usb_seen and not firmware_ok: + self.usb_failed = True + + if not offroad and state is not None: + powered = state.supplyVoltage >= CHESTNUT_POWERED_VOLTAGE + power_lost = state.supplyFault or not powered + if self.model_attempted and power_lost and not self.power_lost: + self.power_unavailable = not self.power_seen + self.power_seen |= powered + + if not offroad and self.model_attempted and state is not None: + self.link_failures = self.link_failures + 1 if state.pcieLtssm != 0x78 else 0 + self.pcie_failed |= self.link_failures >= 2 or power_lost + self.power_lost |= power_lost + + if self.pcie_failed and self.power_lost and state is not None: + self.power_restored |= not state.supplyFault and state.supplyVoltage >= CHESTNUT_POWERED_VOLTAGE + if self.usb_failed: + self.pcie_failed = False + self.power_seen = False + self.power_unavailable = False + self.power_lost = False + self.power_restored = False + + if state is not None: + gpu_limit = GPU_TEMP_LIMIT - (TEMP_HYSTERESIS if self.overheated else 0.) + memory_limit = MEMORY_TEMP_LIMIT - (TEMP_HYSTERESIS if self.overheated else 0.) + self.overheated = state.tempC >= gpu_limit or state.memoryTempC >= memory_limit + + release = branch in CHESTNUT_RELEASE_BRANCHES + missing = self.usb_failed or (offroad and release and time.monotonic() - self.started > 10. and len(detected) != 1) + slow_usb = offroad and len(devices) == 1 and devices[0]["speedMbps"] < 5000 + big_model_available = (MODELS_DIR / 'big_driving_supercombo.onnx').is_file() or chestnut_compiled() + current_channel = get_build_metadata().channel + chestnut_target = CHESTNUT_BRANCHES.get(current_channel) + chestnut_needs_switch = len(devices) == 1 and not big_model_available and chestnut_target is not None + set_alert("Offroad_ChestnutBranch", chestnut_needs_switch, chestnut_target if chestnut_needs_switch else None) + set_alert("Offroad_ChestnutNotDetected", missing) + set_alert("Offroad_ChestnutOverheated", self.overheated, f"{state.tempC:.0f} °C" if state is not None else None) + set_alert("Offroad_ChestnutUsbSlow", slow_usb, f"{devices[0]['speedMbps']} Mbps" if slow_usb else None) + if self.power_lost: + pcie_alert = ("Chestnut power restored. 12V is stable again, cycle ignition." if self.power_restored else + "Chestnut power disconnected. Check 12V connection, then cycle ignition." if self.power_unavailable else + "Chestnut power lost. Possibly caused by an engine-crank voltage drop. Check 12V connection, then cycle ignition.") + else: + pcie_alert = "Chestnut GPU unavailable. PCIe link is not up. Check the GPU is securely seated." + set_alert("Offroad_ChestnutPcieUnavailable", self.pcie_failed, pcie_alert) + set_alert("Offroad_ChestnutUncompiled", offroad and firmware_ok and not chestnut_compiled()) + set_alert("Offroad_ChestnutUpdateFailed", offroad and firmware_failed) + self.offroad = offroad diff --git a/openpilot/system/hardware/hardwared.py b/openpilot/system/hardware/hardwared.py index d0fbd0fac..6c588e753 100755 --- a/openpilot/system/hardware/hardwared.py +++ b/openpilot/system/hardware/hardwared.py @@ -16,19 +16,19 @@ from openpilot.common.utils import strip_deprecated_keys from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.params import Params from openpilot.common.realtime import DT_HW -from openpilot.selfdrive.modeld.helpers import MODELS_DIR, chestnut_compiled from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert from openpilot.common.hardware import HARDWARE, COMMA_HARDWARE from openpilot.common.basedir import BASEDIR -from openpilot.common.hardware.usb import CHESTNUT_FW_VERSION, CHESTNUT_ROM_USB_IDS, CHESTNUT_USB_IDS, get_usb_state, get_usb_topology, set_usb_state +from openpilot.common.git import get_short_branch +from openpilot.common.hardware.usb import CHESTNUT_FW_VERSION, CHESTNUT_USB_PRODUCT, get_usb_state, get_usb_topology, is_chestnut_usb_id, set_usb_state from openpilot.common.linux import LinuxSystemStats from openpilot.system.loggerd.config import get_available_percent from openpilot.common.swaglog import cloudlog from openpilot.sunnypilot.system.statsd import statlog from openpilot.system.hardware.power_monitoring import PowerMonitoring from openpilot.system.hardware.fan_controller import FanController -from openpilot.common.version import terms_version, training_version, get_build_metadata, terms_version_sp, CHESTNUT_BRANCHES - +from openpilot.system.hardware.chestnut.status import ChestnutStatus +from openpilot.common.version import terms_version, training_version, get_build_metadata, terms_version_sp ThermalStatus = log.DeviceState.ThermalStatus NetworkType = log.DeviceState.NetworkType @@ -49,6 +49,11 @@ class Chestnut: self.attempts = 0 self.last_attempt = 0. self.flashed = False + self.mismatch = False + + @property + def failed(self) -> bool: + return self.mismatch and self.attempts >= self.MAX_ATTEMPTS and self.thread is not None and not self.thread.is_alive() and not self.flashed def flash(self) -> None: ret = subprocess.run(["sudo", sys.executable, os.path.join(BASEDIR, "openpilot/system/hardware/chestnut/flash.py"), CHESTNUT_FW_VERSION], @@ -57,9 +62,9 @@ class Chestnut: self.flashed = ret.returncode == 0 def update(self, offroad: bool, usb_state: list[dict]) -> None: - mismatch = any((d["vendorId"], d["productId"]) in CHESTNUT_USB_IDS + CHESTNUT_ROM_USB_IDS and - d["product"] != f"custom {CHESTNUT_FW_VERSION}-CLEAN" for d in usb_state) - if not mismatch: + self.mismatch = any(is_chestnut_usb_id(d["vendorId"], d["productId"], include_bootloader=True) and + d["product"] != CHESTNUT_USB_PRODUCT for d in usb_state) + if not self.mismatch: self.flashed = False return @@ -191,7 +196,7 @@ def hw_state_thread(end_event, hw_queue): def hardware_thread(end_event, hw_queue) -> None: system_stats = LinuxSystemStats() pm = messaging.PubMaster(['deviceState']) - sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "selfdriveState", "pandaStates"], poll="pandaStates") + sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "selfdriveState", "pandaStates", "chestnutState"], poll="pandaStates") count = 0 @@ -239,7 +244,8 @@ def hardware_thread(end_event, hw_queue) -> None: fan_controller = FanController(int(1./DT_HW)) chestnut = Chestnut() - big_model_available = (MODELS_DIR / 'big_driving_supercombo.onnx').is_file() or chestnut_compiled() + chestnut_status = ChestnutStatus() + branch = get_short_branch() while not end_event.is_set(): sm.update(PANDA_STATES_TIMEOUT) @@ -301,12 +307,11 @@ def hardware_thread(end_event, hw_queue) -> None: set_usb_state(msg.deviceState, last_hw_state.usb_state) chestnut.update(started_ts is None, last_hw_state.usb_state) - current_channel = get_build_metadata().channel - chestnut_target = CHESTNUT_BRANCHES.get(current_channel) - chestnut_needs_switch = msg.deviceState.chestnutPresent and not big_model_available and chestnut_target is not None - set_offroad_alert_if_changed("Offroad_ChestnutBranch", chestnut_needs_switch, - extra_text=chestnut_target if chestnut_needs_switch else None) - + chestnut_state = sm["chestnutState"] + chestnut_valid = sm.alive["chestnutState"] and sm.valid["chestnutState"] + chestnut_status.update(started_ts is None, branch, last_hw_state.usb_state, chestnut.failed, + params.get_bool("ChestnutLoading"), params.get("ChestnutActive"), + chestnut_state if chestnut_valid else None, set_offroad_alert_if_changed) # this subset is only used for offroad temp_sources = [ msg.deviceState.memoryTempC, diff --git a/openpilot/system/loggerd/bootlog b/openpilot/system/loggerd/bootlog index e49ae9693..184093a31 100755 Binary files a/openpilot/system/loggerd/bootlog and b/openpilot/system/loggerd/bootlog differ diff --git a/openpilot/system/loggerd/encoderd b/openpilot/system/loggerd/encoderd index 34de9abe7..3953d3e07 100755 Binary files a/openpilot/system/loggerd/encoderd and b/openpilot/system/loggerd/encoderd differ diff --git a/openpilot/system/loggerd/loggerd b/openpilot/system/loggerd/loggerd index 831eeb5ac..98c54bcce 100755 Binary files a/openpilot/system/loggerd/loggerd and b/openpilot/system/loggerd/loggerd differ diff --git a/openpilot/system/ui/lib/application.py b/openpilot/system/ui/lib/application.py index 6fea0037c..93e43c1d4 100644 --- a/openpilot/system/ui/lib/application.py +++ b/openpilot/system/ui/lib/application.py @@ -13,7 +13,7 @@ import subprocess from contextlib import contextmanager from collections.abc import Callable from collections import deque -from enum import StrEnum +from enum import IntEnum, StrEnum from pathlib import Path from typing import NamedTuple from importlib.resources import as_file, files @@ -118,6 +118,18 @@ class FontWeight(StrEnum): DISPLAY = "Inter-Bold.ttf" +class TextAlignment(IntEnum): + LEFT = 0 + CENTER = 1 + RIGHT = 2 + + +class TextAlignmentVertical(IntEnum): + TOP = 0 + MIDDLE = 1 + BOTTOM = 2 + + def font_fallback(font: rl.Font) -> rl.Font: """Use a Noto fallback for languages not covered by Inter.""" if multilang.requires_font_fallback(): @@ -335,7 +347,6 @@ class GuiApplication(GuiApplicationExt): rl.set_target_fps(0 if OFFSCREEN or vblank_control else fps) self._target_fps = fps - self._set_styles() self._load_fonts() self._patch_text_functions() self._patch_scissor_mode() @@ -748,14 +759,6 @@ class GuiApplication(GuiApplicationExt): self._fonts[font_weight_file] = font if multilang.requires_font_fallback(): self.fallback_font() - rl.gui_set_font(self._fonts[FontWeight.NORMAL]) - - def _set_styles(self): - rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiControlProperty.BORDER_WIDTH, 0) - rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.TEXT_SIZE, DEFAULT_TEXT_SIZE) - rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.BACKGROUND_COLOR, rl.color_to_int(rl.BLACK)) - rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_COLOR_NORMAL, rl.color_to_int(DEFAULT_TEXT_COLOR)) - rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiControlProperty.BASE_COLOR_NORMAL, rl.color_to_int(rl.Color(50, 50, 50, 255))) def _patch_text_functions(self): # Wrap pyray text APIs to apply a global text size scale so our px sizes match Qt diff --git a/openpilot/system/ui/lib/utils.py b/openpilot/system/ui/lib/utils.py deleted file mode 100644 index e97b3ba9d..000000000 --- a/openpilot/system/ui/lib/utils.py +++ /dev/null @@ -1,19 +0,0 @@ -import pyray as rl -from collections.abc import Sequence - - -class GuiStyleContext: - def __init__(self, styles: Sequence[tuple[int, int, int]]): - """styles is a list of tuples (control, prop, new_value)""" - self.styles = styles - self.prev_styles: list[tuple[int, int, int]] = [] - - def __enter__(self): - for control, prop, new_value in self.styles: - prev_value = rl.gui_get_style(control, prop) - self.prev_styles.append((control, prop, prev_value)) - rl.gui_set_style(control, prop, new_value) - - def __exit__(self, exc_type, exc_value, traceback): - for control, prop, prev_value in self.prev_styles: - rl.gui_set_style(control, prop, prev_value) diff --git a/openpilot/system/ui/mici_setup.py b/openpilot/system/ui/mici_setup.py index efec377dd..3e88e1942 100755 --- a/openpilot/system/ui/mici_setup.py +++ b/openpilot/system/ui/mici_setup.py @@ -18,7 +18,7 @@ from openpilot.common.realtime import config_realtime_process, set_core_affinity from openpilot.common.swaglog import cloudlog from openpilot.common.time_helpers import system_time_valid from openpilot.common.utils import run_cmd -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.wifi_manager import WifiManager, ConnectStatus from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.nav_widget import NavWidget @@ -105,8 +105,8 @@ class StartPage(Widget): super().__init__() self._title = UnifiedLabel("start", 64, text_color=rl.Color(255, 255, 255, int(255 * 0.9)), - font_weight=FontWeight.DISPLAY, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + font_weight=FontWeight.DISPLAY, alignment=TextAlignment.CENTER, + alignment_vertical=TextAlignmentVertical.MIDDLE) self._start_bg_txt = gui_app.texture("icons_mici/setup/start_button.png", 500, 224, keep_aspect_ratio=False) self._start_bg_pressed_txt = gui_app.texture("icons_mici/setup/start_button_pressed.png", 500, 224, keep_aspect_ratio=False) @@ -197,7 +197,7 @@ class DownloadingPage(NavWidget): self._title_label = UnifiedLabel("downloading...", 64, text_color=rl.Color(255, 255, 255, int(255 * 0.9)), font_weight=FontWeight.DISPLAY) self._progress_label = UnifiedLabel("", 132, text_color=rl.Color(255, 255, 255, int(255 * 0.9 * 0.65)), - font_weight=FontWeight.ROMAN, alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM) + font_weight=FontWeight.ROMAN, alignment_vertical=TextAlignmentVertical.BOTTOM) self._progress = 0 def _back_enabled(self) -> bool: @@ -261,8 +261,8 @@ class BigPillButton(BigButton): super().__init__(*args, **kwargs) self._label.set_font_size(48) - self._label.set_alignment(rl.GuiTextAlignment.TEXT_ALIGN_CENTER) - self._label.set_alignment_vertical(rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + self._label.set_alignment(TextAlignment.CENTER) + self._label.set_alignment_vertical(TextAlignmentVertical.MIDDLE) def _load_images(self): if self._green: diff --git a/openpilot/system/ui/mici_updater.py b/openpilot/system/ui/mici_updater.py index d9009b825..cc1614579 100755 --- a/openpilot/system/ui/mici_updater.py +++ b/openpilot/system/ui/mici_updater.py @@ -7,7 +7,7 @@ import pyray as rl from openpilot.common.realtime import config_realtime_process, set_core_affinity from openpilot.common.hardware import HARDWARE, COMMA_HARDWARE from openpilot.common.swaglog import cloudlog -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignmentVertical from openpilot.system.ui.widgets.nav_widget import NavWidget from openpilot.system.ui.widgets.scroller import Scroller from openpilot.system.ui.widgets.label import UnifiedLabel @@ -30,7 +30,7 @@ class ProgressPage(NavWidget): font_weight=FontWeight.DISPLAY, line_height=0.8) self._progress_percent_label = UnifiedLabel("", 132, text_color=rl.Color(255, 255, 255, int(255 * 0.9 * 0.65)), font_weight=FontWeight.ROMAN, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM) + alignment_vertical=TextAlignmentVertical.BOTTOM) def _back_enabled(self) -> bool: return False diff --git a/openpilot/system/ui/sunnypilot/lib/utils.py b/openpilot/system/ui/sunnypilot/lib/utils.py index 6ae30d13a..30493ad27 100644 --- a/openpilot/system/ui/sunnypilot/lib/utils.py +++ b/openpilot/system/ui/sunnypilot/lib/utils.py @@ -8,7 +8,7 @@ from collections.abc import Callable import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignmentVertical from openpilot.system.ui.sunnypilot.lib.styles import style from openpilot.system.ui.sunnypilot.widgets.list_view import ButtonActionSP from openpilot.system.ui.widgets.label import ScrollState, UnifiedLabel @@ -40,7 +40,7 @@ class ScrollingButtonAction(ButtonActionSP): super().__init__(text=text, width=width, enabled=enabled) self._value_label = UnifiedLabelSP("", font_size=style.ITEM_TEXT_FONT_SIZE, font_weight=FontWeight.NORMAL, text_color=self._value_color, scroll=True, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment_vertical=TextAlignmentVertical.MIDDLE) def set_value(self, value: str | Callable[[], str], color: rl.Color = style.ITEM_TEXT_VALUE_COLOR): if self.value != _resolve_value(value, ""): diff --git a/openpilot/system/ui/sunnypilot/widgets/download_status.py b/openpilot/system/ui/sunnypilot/widgets/download_status.py index 135bd151a..c85814d0e 100644 --- a/openpilot/system/ui/sunnypilot/widgets/download_status.py +++ b/openpilot/system/ui/sunnypilot/widgets/download_status.py @@ -9,6 +9,8 @@ import math import numpy as np import pyray as rl +from openpilot.system.ui.lib.application import TextAlignment, TextAlignmentVertical + from openpilot.common.filter_simple import FirstOrderFilter from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.shader_polygon import draw_polygon, Gradient @@ -61,11 +63,11 @@ class DownloadStatusAction(ItemAction): self._sweep = 0.0 self._name_label = UnifiedLabel("", font_size=FONT_SIZE, font_weight=FontWeight.NORMAL, text_color=TEXT_COLOR, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.MIDDLE) self._percent_label = UnifiedLabel("", font_size=FONT_SIZE, font_weight=FontWeight.NORMAL, text_color=TEXT_COLOR, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.RIGHT, + alignment_vertical=TextAlignmentVertical.MIDDLE) def update(self, name, downloading=False, progress=0.0, status_text="", text_color=rl.GRAY, icon=None, icon_color=None, segments=None): self.segments = segments diff --git a/openpilot/system/ui/sunnypilot/widgets/list_view.py b/openpilot/system/ui/sunnypilot/widgets/list_view.py index ff4b8c13d..7d5529a34 100644 --- a/openpilot/system/ui/sunnypilot/widgets/list_view.py +++ b/openpilot/system/ui/sunnypilot/widgets/list_view.py @@ -8,7 +8,7 @@ from collections.abc import Callable, Sequence import pyray as rl from openpilot.common.params import Params -from openpilot.system.ui.lib.application import gui_app, MousePos, FontWeight +from openpilot.system.ui.lib.application import gui_app, MousePos, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.sunnypilot.widgets.toggle import ToggleSP from openpilot.system.ui.widgets import Widget @@ -90,8 +90,8 @@ class ButtonActionSP(ButtonAction): if value_text: value_rect = rl.Rectangle(rect.x, rect.y, rect.width - BUTTON_WIDTH - TEXT_PADDING, rect.height) gui_label(value_rect, value_text, font_size=style.ITEM_TEXT_FONT_SIZE, color=self._value_color, - font_weight=FontWeight.NORMAL, alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + font_weight=FontWeight.NORMAL, alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.MIDDLE) pressed = self._pressed self._pressed = False @@ -319,7 +319,7 @@ class ListItemSP(ListItem): ) if value_rect.width > 0: gui_label(value_rect, value_text, font_size=style.ITEM_TEXT_FONT_SIZE, color=self._right_value_color, font_weight=FontWeight.NORMAL, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + alignment=TextAlignment.RIGHT, alignment_vertical=TextAlignmentVertical.MIDDLE) # Render toggle and handle callback if self.action_item.render(left_rect) and self.action_item.enabled: diff --git a/openpilot/system/ui/sunnypilot/widgets/tree_dialog.py b/openpilot/system/ui/sunnypilot/widgets/tree_dialog.py index 97150e102..7a0d47895 100644 --- a/openpilot/system/ui/sunnypilot/widgets/tree_dialog.py +++ b/openpilot/system/ui/sunnypilot/widgets/tree_dialog.py @@ -8,6 +8,7 @@ from dataclasses import dataclass, field import pyray as rl from openpilot.common.params import Params +from openpilot.system.ui.lib.application import TextAlignment from openpilot.system.ui.lib.application import FontWeight from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import DialogResult @@ -35,7 +36,7 @@ class TreeFolder: class TreeItemWidget(Button): def __init__(self, text, ref, is_folder=False, indent_level=0, click_callback=None, favorite_callback=None, is_favorite=False, is_expanded=False): - super().__init__(text, click_callback, button_style=ButtonStyle.NORMAL, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, + super().__init__(text, click_callback, button_style=ButtonStyle.NORMAL, text_alignment=TextAlignment.LEFT, text_padding=20 + indent_level * 30, elide_right=True) self.text = text self.ref = ref diff --git a/openpilot/system/ui/tici_reset.py b/openpilot/system/ui/tici_reset.py index 5c175dbfa..ffe90bbb8 100755 --- a/openpilot/system/ui/tici_reset.py +++ b/openpilot/system/ui/tici_reset.py @@ -11,7 +11,7 @@ from openpilot.common.hardware import PC from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.button import Button, ButtonStyle -from openpilot.system.ui.widgets.label import gui_label, gui_text_box +from openpilot.system.ui.widgets.label import UnifiedLabel, gui_label USERDATA = "/dev/disk/by-partlabel/userdata" TIMEOUT = 3*60 @@ -38,6 +38,7 @@ class Reset(Widget): self._cancel_button = Button("Cancel", gui_app.request_close) self._confirm_button = Button("Confirm", self._confirm, button_style=ButtonStyle.PRIMARY) self._reboot_button = Button("Reboot", self._reboot) + self._body_label = UnifiedLabel(self._get_body_text, 90, line_height=1 / 0.9) @staticmethod def _reboot() -> None: @@ -75,7 +76,7 @@ class Reset(Widget): gui_label(label_rect, "System Reset", 100, font_weight=FontWeight.BOLD) text_rect = rl.Rectangle(content_rect.x + 140, content_rect.y + 140, content_rect.width - 280, content_rect.height - 90 - 100 * FONT_SCALE) - gui_text_box(text_rect, self._get_body_text(), 90) + self._body_label.render(text_rect) button_height = 160 button_spacing = 50 diff --git a/openpilot/system/ui/tici_setup.py b/openpilot/system/ui/tici_setup.py index 36f47ccf1..17c3cf5e6 100755 --- a/openpilot/system/ui/tici_setup.py +++ b/openpilot/system/ui/tici_setup.py @@ -13,7 +13,7 @@ import pyray as rl from openpilot.cereal import log from openpilot.common.hardware import HARDWARE from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel -from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE +from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE, TextAlignment, TextAlignmentVertical from openpilot.system.ui.widgets import DialogResult, Widget from openpilot.system.ui.widgets.button import Button, ButtonStyle, ButtonRadio from openpilot.system.ui.widgets.keyboard import Keyboard @@ -67,17 +67,17 @@ class Setup(Widget): self.warning = gui_app.texture("icons/warning.png", 150, 150) self.checkmark = gui_app.texture("icons/circled_check.png", 100, 100) - self._low_voltage_title_label = Label("WARNING: Low Voltage", TITLE_FONT_SIZE, FontWeight.MEDIUM, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, + self._low_voltage_title_label = Label("WARNING: Low Voltage", TITLE_FONT_SIZE, FontWeight.MEDIUM, TextAlignment.LEFT, text_color=rl.Color(255, 89, 79, 255), text_padding=20) self._low_voltage_body_label = Label("Power your device in a car with a harness or proceed at your own risk.", BODY_FONT_SIZE, - text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + text_alignment=TextAlignment.LEFT, text_padding=20) self._low_voltage_continue_button = Button("Continue", self._low_voltage_continue_button_callback) self._low_voltage_poweroff_button = Button("Power Off", HARDWARE.shutdown) self._getting_started_button = Button("", self._getting_started_button_callback, button_style=ButtonStyle.PRIMARY, border_radius=0) - self._getting_started_title_label = Label("Getting Started", TITLE_FONT_SIZE, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + self._getting_started_title_label = Label("Getting Started", TITLE_FONT_SIZE, FontWeight.BOLD, TextAlignment.LEFT, text_padding=20) self._getting_started_body_label = Label("Before we get on the road, let's finish installation and cover some details.", - BODY_FONT_SIZE, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + BODY_FONT_SIZE, text_alignment=TextAlignment.LEFT, text_padding=20) self._software_selection_openpilot_button = ButtonRadio("openpilot", self.checkmark, font_size=BODY_FONT_SIZE, text_padding=80) self._software_selection_custom_software_button = ButtonRadio("Custom Software", self.checkmark, font_size=BODY_FONT_SIZE, text_padding=80) @@ -85,32 +85,32 @@ class Setup(Widget): button_style=ButtonStyle.PRIMARY) self._software_selection_continue_button.set_enabled(False) self._software_selection_back_button = Button("Back", self._software_selection_back_button_callback) - self._software_selection_title_label = Label("Choose Software to Use", TITLE_FONT_SIZE, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, + self._software_selection_title_label = Label("Choose Software to Use", TITLE_FONT_SIZE, FontWeight.BOLD, TextAlignment.LEFT, text_padding=20) self._download_failed_reboot_button = Button("Reboot device", HARDWARE.reboot) self._download_failed_startover_button = Button("Start over", self._download_failed_startover_button_callback, button_style=ButtonStyle.PRIMARY) - self._download_failed_title_label = Label("Download Failed", TITLE_FONT_SIZE, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) - self._download_failed_url_label = Label("", 52, FontWeight.NORMAL, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) - self._download_failed_body_label = Label("", BODY_FONT_SIZE, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + self._download_failed_title_label = Label("Download Failed", TITLE_FONT_SIZE, FontWeight.BOLD, TextAlignment.LEFT, text_padding=20) + self._download_failed_url_label = Label("", 52, FontWeight.NORMAL, TextAlignment.LEFT, text_padding=20) + self._download_failed_body_label = Label("", BODY_FONT_SIZE, text_alignment=TextAlignment.LEFT, text_padding=20) self._network_setup_back_button = Button("Back", self._network_setup_back_button_callback) self._network_setup_continue_button = Button("Waiting for internet", self._network_setup_continue_button_callback, button_style=ButtonStyle.PRIMARY) self._network_setup_continue_button.set_enabled(False) - self._network_setup_title_label = Label("Connect to Wi-Fi", TITLE_FONT_SIZE, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + self._network_setup_title_label = Label("Connect to Wi-Fi", TITLE_FONT_SIZE, FontWeight.BOLD, TextAlignment.LEFT, text_padding=20) self._custom_software_warning_continue_button = Button("Scroll to continue", self._custom_software_warning_continue_button_callback, button_style=ButtonStyle.PRIMARY) self._custom_software_warning_continue_button.set_enabled(False) self._custom_software_warning_back_button = Button("Back", self._custom_software_warning_back_button_callback) - self._custom_software_warning_title_label = Label("WARNING: Custom Software", 81, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, + self._custom_software_warning_title_label = Label("WARNING: Custom Software", 81, FontWeight.BOLD, TextAlignment.LEFT, text_color=rl.Color(255, 89, 79, 255), text_padding=60) self._yellow_warning_icon = gui_app.texture("icons/yellow_warning.png", int(68 * FONT_SCALE), int(68 * FONT_SCALE)) self._custom_software_warning_body_labels = [ - Label(text, 68, text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - text_alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + Label(text, 68, text_alignment=TextAlignment.LEFT, + text_alignment_vertical=TextAlignmentVertical.TOP, text_padding=60, icon=self._yellow_warning_icon if has_icon else None) for text, has_icon in [ ("Use caution when installing third-party software.", False), diff --git a/openpilot/system/ui/tici_updater.py b/openpilot/system/ui/tici_updater.py index 27cf6579a..2cb86cca8 100755 --- a/openpilot/system/ui/tici_updater.py +++ b/openpilot/system/ui/tici_updater.py @@ -10,7 +10,7 @@ from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE from openpilot.system.ui.lib.wifi_manager import WifiManager from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.button import Button, ButtonStyle -from openpilot.system.ui.widgets.label import gui_text_box, gui_label +from openpilot.system.ui.widgets.label import UnifiedLabel, gui_label from openpilot.system.ui.widgets.network import WifiManagerUI # Constants @@ -50,6 +50,8 @@ class Updater(Widget): self._install_button = Button("Install", click_callback=self.install_update, button_style=ButtonStyle.PRIMARY) self._back_button = Button("Back", click_callback=lambda: self.set_current_screen(Screen.PROMPT)) self._reboot_button = Button("Reboot", click_callback=lambda: HARDWARE.reboot()) + self._desc_label = UnifiedLabel("An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. " + + "The download size is approximately 1GB.", BODY_FONT_SIZE, line_height=1 / 0.9) def set_current_screen(self, screen: Screen): self.current_screen = screen @@ -99,11 +101,8 @@ class Updater(Widget): gui_label(title_rect, "Update Required", TITLE_FONT_SIZE, font_weight=FontWeight.BOLD) # Description - desc_text = ("An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. " + - "The download size is approximately 1GB.") - desc_rect = rl.Rectangle(MARGIN + 50, 250 + TITLE_FONT_SIZE * FONT_SCALE + 75, rect.width - MARGIN * 2 - 100, BODY_FONT_SIZE * FONT_SCALE * 4) - gui_text_box(desc_rect, desc_text, BODY_FONT_SIZE) + self._desc_label.render(desc_rect) # Buttons at the bottom button_y = rect.height - MARGIN - BUTTON_HEIGHT diff --git a/openpilot/system/ui/widgets/button.py b/openpilot/system/ui/widgets/button.py index 36ef3beda..c031b2f14 100644 --- a/openpilot/system/ui/widgets/button.py +++ b/openpilot/system/ui/widgets/button.py @@ -3,7 +3,7 @@ from enum import IntEnum import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos +from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import Label from openpilot.common.filter_simple import FirstOrderFilter @@ -86,7 +86,7 @@ class Button(Widget): font_weight: FontWeight = FontWeight.MEDIUM, button_style: ButtonStyle = ButtonStyle.NORMAL, border_radius: int = 10, - text_alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_CENTER, + text_alignment: int = TextAlignment.CENTER, text_padding: int = 20, icon=None, elide_right: bool = False, @@ -139,7 +139,7 @@ class ButtonRadio(Button): icon, click_callback: Callable[[], None] | None = None, font_size: int = DEFAULT_BUTTON_FONT_SIZE, - text_alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_LEFT, + text_alignment: int = TextAlignment.LEFT, border_radius: int = 10, text_padding: int = 20, ): diff --git a/openpilot/system/ui/widgets/icon_widget.py b/openpilot/system/ui/widgets/icon_widget.py index bf7790b93..f6f8a4723 100644 --- a/openpilot/system/ui/widgets/icon_widget.py +++ b/openpilot/system/ui/widgets/icon_widget.py @@ -14,3 +14,6 @@ class IconWidget(Widget): def _render(self, _) -> None: color = rl.Color(255, 255, 255, int(self._opacity * 255)) rl.draw_texture_ex(self._texture, rl.Vector2(self._rect.x, self._rect.y), 0.0, 1.0, color) + + def set_opacity(self, opacity: float) -> None: + self._opacity = opacity diff --git a/openpilot/system/ui/widgets/keyboard.py b/openpilot/system/ui/widgets/keyboard.py index 49c59a431..c9d2187cb 100644 --- a/openpilot/system/ui/widgets/keyboard.py +++ b/openpilot/system/ui/widgets/keyboard.py @@ -5,7 +5,7 @@ from collections.abc import Callable import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import DialogResult, Widget from openpilot.system.ui.widgets.button import ButtonStyle, Button @@ -65,8 +65,8 @@ class Keyboard(Widget): self._layout_name: Literal["lowercase", "uppercase", "numbers", "specials"] = "lowercase" self._caps_lock = False self._last_shift_press_time = 0 - self._title = Label("", 90, FontWeight.BOLD, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) - self._sub_title = Label("", 55, FontWeight.NORMAL, rl.GuiTextAlignment.TEXT_ALIGN_LEFT, text_padding=20) + self._title = Label("", 90, FontWeight.BOLD, TextAlignment.LEFT, text_padding=20) + self._sub_title = Label("", 55, FontWeight.NORMAL, TextAlignment.LEFT, text_padding=20) self._max_text_size = max_text_size self._min_text_size = min_text_size diff --git a/openpilot/system/ui/widgets/label.py b/openpilot/system/ui/widgets/label.py index a3e827321..60fa3e25e 100644 --- a/openpilot/system/ui/widgets/label.py +++ b/openpilot/system/ui/widgets/label.py @@ -4,10 +4,9 @@ from collections.abc import Callable from typing import Union import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_COLOR, FONT_SCALE +from openpilot.system.ui.lib.application import gui_app, FontWeight, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_COLOR, FONT_SCALE, TextAlignment, TextAlignmentVertical from openpilot.system.ui.widgets import Widget from openpilot.system.ui.lib.text_measure import measure_text_cached -from openpilot.system.ui.lib.utils import GuiStyleContext from openpilot.system.ui.lib.wrap_text import wrap_text ICON_PADDING = 15 @@ -32,8 +31,8 @@ def gui_label( font_size: int = DEFAULT_TEXT_SIZE, color: rl.Color = DEFAULT_TEXT_COLOR, font_weight: FontWeight = FontWeight.NORMAL, - alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE, + alignment: int = TextAlignment.LEFT, + alignment_vertical: int = TextAlignmentVertical.MIDDLE, elide_right: bool = True ): font = gui_app.font(font_weight) @@ -57,16 +56,16 @@ def gui_label( # Calculate horizontal position based on alignment text_x = rect.x + { - rl.GuiTextAlignment.TEXT_ALIGN_LEFT: 0, - rl.GuiTextAlignment.TEXT_ALIGN_CENTER: (rect.width - text_size.x) / 2, - rl.GuiTextAlignment.TEXT_ALIGN_RIGHT: rect.width - text_size.x, + TextAlignment.LEFT: 0, + TextAlignment.CENTER: (rect.width - text_size.x) / 2, + TextAlignment.RIGHT: rect.width - text_size.x, }.get(alignment, 0) # Calculate vertical position based on alignment text_y = rect.y + { - rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP: 0, - rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE: (rect.height - text_size.y) / 2, - rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM: rect.height - text_size.y, + TextAlignmentVertical.TOP: 0, + TextAlignmentVertical.MIDDLE: (rect.height - text_size.y) / 2, + TextAlignmentVertical.BOTTOM: rect.height - text_size.y, }.get(alignment_vertical, 0) # Draw the text in the specified rectangle @@ -74,42 +73,14 @@ def gui_label( rl.draw_text_ex(font, display_text, rl.Vector2(text_x, text_y), font_size, 0, color) -def gui_text_box( - rect: rl.Rectangle, - text: str, - font_size: int = DEFAULT_TEXT_SIZE, - color: rl.Color = DEFAULT_TEXT_COLOR, - alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, - font_weight: FontWeight = FontWeight.NORMAL, - line_scale: float = 1.0, -): - styles = [ - (rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_COLOR_NORMAL, rl.color_to_int(color)), - (rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.TEXT_SIZE, round(font_size * FONT_SCALE)), - (rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.TEXT_LINE_SPACING, round(font_size * FONT_SCALE * line_scale)), - (rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_ALIGNMENT, alignment), - (rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.TEXT_ALIGNMENT_VERTICAL, alignment_vertical), - (rl.GuiControl.DEFAULT, rl.GuiDefaultProperty.TEXT_WRAP_MODE, rl.GuiTextWrapMode.TEXT_WRAP_WORD) - ] - if font_weight != FontWeight.NORMAL: - rl.gui_set_font(gui_app.font(font_weight)) - - with GuiStyleContext(styles): - rl.gui_label(rect, text) - - if font_weight != FontWeight.NORMAL: - rl.gui_set_font(gui_app.font(FontWeight.NORMAL)) - - # Non-interactive text area. Can render an optional specified icon. class Label(Widget): def __init__(self, text: str | Callable[[], str], font_size: int = DEFAULT_TEXT_SIZE, font_weight: FontWeight = FontWeight.NORMAL, - text_alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_CENTER, - text_alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE, + text_alignment: int = TextAlignment.CENTER, + text_alignment_vertical: int = TextAlignmentVertical.MIDDLE, text_padding: int = 0, text_color: rl.Color = DEFAULT_TEXT_COLOR, icon: Union[rl.Texture, None] = None, @@ -181,10 +152,10 @@ class Label(Widget): self._update_text(self._text) text_size = self._text_size[0] if self._text_size else rl.Vector2(0.0, 0.0) - if self._text_alignment_vertical == rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE: + if self._text_alignment_vertical == TextAlignmentVertical.MIDDLE: total_text_height = sum(ts.y for ts in self._text_size) or self._font_size * FONT_SCALE text_pos = rl.Vector2(self._rect.x, (self._rect.y + (self._rect.height - total_text_height) // 2)) - elif self._text_alignment_vertical == rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM: + elif self._text_alignment_vertical == TextAlignmentVertical.BOTTOM: total_text_height = sum(ts.y for ts in self._text_size) or self._font_size * FONT_SCALE text_pos = rl.Vector2(self._rect.x, self._rect.y + self._rect.height - total_text_height) else: @@ -193,10 +164,10 @@ class Label(Widget): if self._icon: icon_y = self._rect.y + (self._rect.height - self._icon.height) / 2 if len(self._text_wrapped) > 0: - if self._text_alignment == rl.GuiTextAlignment.TEXT_ALIGN_LEFT: + if self._text_alignment == TextAlignment.LEFT: icon_x = self._rect.x + self._text_padding text_pos.x = self._rect.x + self._icon.width + ICON_PADDING - elif self._text_alignment == rl.GuiTextAlignment.TEXT_ALIGN_CENTER: + elif self._text_alignment == TextAlignment.CENTER: total_width = self._icon.width + ICON_PADDING + text_size.x icon_x = self._rect.x + (self._rect.width - total_width) / 2 text_pos.x = self._rect.x + self._icon.width + ICON_PADDING @@ -208,11 +179,11 @@ class Label(Widget): for text, text_size in zip(self._text_wrapped, self._text_size, strict=True): line_pos = rl.Vector2(text_pos.x, text_pos.y) - if self._text_alignment == rl.GuiTextAlignment.TEXT_ALIGN_LEFT: + if self._text_alignment == TextAlignment.LEFT: line_pos.x += self._text_padding - elif self._text_alignment == rl.GuiTextAlignment.TEXT_ALIGN_CENTER: + elif self._text_alignment == TextAlignment.CENTER: line_pos.x += (self._rect.width - text_size.x) // 2 - elif self._text_alignment == rl.GuiTextAlignment.TEXT_ALIGN_RIGHT: + elif self._text_alignment == TextAlignment.RIGHT: line_pos.x += self._rect.width - text_size.x - self._text_padding rl.draw_text_ex(self._font, text, line_pos, self._font_size, 0, self._text_color) @@ -221,7 +192,7 @@ class Label(Widget): class UnifiedLabel(Widget): """ - Unified label widget that combines functionality from gui_label, gui_text_box, and Label. + Unified label widget that combines functionality from gui_label and Label. Supports: - Text wrapping @@ -241,8 +212,8 @@ class UnifiedLabel(Widget): font_size: int = DEFAULT_TEXT_SIZE, font_weight: FontWeight = FontWeight.NORMAL, text_color: rl.Color = DEFAULT_TEXT_COLOR, - alignment: int = rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP, + alignment: int = TextAlignment.LEFT, + alignment_vertical: int = TextAlignmentVertical.TOP, text_padding: int = 0, max_width: int | None = None, elide: bool = True, @@ -561,9 +532,9 @@ class UnifiedLabel(Widget): total_visible_height += size.y * self._line_height # Calculate vertical alignment offset - if self._alignment_vertical == rl.GuiTextAlignmentVertical.TEXT_ALIGN_TOP: + if self._alignment_vertical == TextAlignmentVertical.TOP: start_y = self._rect.y - elif self._alignment_vertical == rl.GuiTextAlignmentVertical.TEXT_ALIGN_BOTTOM: + elif self._alignment_vertical == TextAlignmentVertical.BOTTOM: start_y = self._rect.y + self._rect.height - total_visible_height else: # TEXT_ALIGN_MIDDLE start_y = self._rect.y + (self._rect.height - total_visible_height) / 2 @@ -640,11 +611,11 @@ class UnifiedLabel(Widget): def _render_line(self, line, size, current_y, x_offset=0.0): # Calculate horizontal position - if self._alignment == rl.GuiTextAlignment.TEXT_ALIGN_LEFT: + if self._alignment == TextAlignment.LEFT: line_x = self._rect.x + self._text_padding - elif self._alignment == rl.GuiTextAlignment.TEXT_ALIGN_CENTER: + elif self._alignment == TextAlignment.CENTER: line_x = self._rect.x + (self._rect.width - size.x) / 2 - elif self._alignment == rl.GuiTextAlignment.TEXT_ALIGN_RIGHT: + elif self._alignment == TextAlignment.RIGHT: line_x = self._rect.x + self._rect.width - size.x - self._text_padding else: line_x = self._rect.x + self._text_padding @@ -662,9 +633,9 @@ class UnifiedLabel(Widget): def _render_line_shimmer(self, line, line_x, current_y): # Shimmer range based on widest line so sweep is even across all lines max_width = self.text_width - if self._alignment == rl.GuiTextAlignment.TEXT_ALIGN_RIGHT: + if self._alignment == TextAlignment.RIGHT: shimmer_left = self._rect.x + self._rect.width - self._text_padding - max_width - elif self._alignment == rl.GuiTextAlignment.TEXT_ALIGN_CENTER: + elif self._alignment == TextAlignment.CENTER: shimmer_left = self._rect.x + (self._rect.width - max_width) / 2 else: shimmer_left = self._rect.x + self._text_padding diff --git a/openpilot/system/ui/widgets/list_view.py b/openpilot/system/ui/widgets/list_view.py index 61c77b760..b376928c5 100644 --- a/openpilot/system/ui/widgets/list_view.py +++ b/openpilot/system/ui/widgets/list_view.py @@ -3,7 +3,7 @@ import os import pyray as rl from collections.abc import Callable, Sequence from abc import ABC -from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos +from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, TextAlignment, TextAlignmentVertical from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.widgets import Widget @@ -139,8 +139,8 @@ class ButtonAction(ItemAction): if value_text: value_rect = rl.Rectangle(rect.x, rect.y, rect.width - BUTTON_WIDTH - TEXT_PADDING, rect.height) gui_label(value_rect, value_text, font_size=ITEM_TEXT_FONT_SIZE, color=ITEM_TEXT_VALUE_COLOR, - font_weight=FontWeight.NORMAL, alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + font_weight=FontWeight.NORMAL, alignment=TextAlignment.LEFT, + alignment_vertical=TextAlignmentVertical.MIDDLE) # TODO: just use the generic Widget click callbacks everywhere, no returning from render pressed = self._pressed @@ -168,8 +168,8 @@ class TextAction(ItemAction): def _render(self, rect: rl.Rectangle) -> bool: gui_label(self._rect, self.text, font_size=ITEM_TEXT_FONT_SIZE, color=self.color, - font_weight=FontWeight.NORMAL, alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE) + font_weight=FontWeight.NORMAL, alignment=TextAlignment.RIGHT, + alignment_vertical=TextAlignmentVertical.MIDDLE) return False def set_text(self, text: str | Callable[[], str]): diff --git a/openpilot/system/ui/widgets/network.py b/openpilot/system/ui/widgets/network.py index fb999c044..2a7d97cd6 100644 --- a/openpilot/system/ui/widgets/network.py +++ b/openpilot/system/ui/widgets/network.py @@ -3,7 +3,7 @@ from functools import partial from typing import Any, cast import pyray as rl -from openpilot.system.ui.lib.application import gui_app +from openpilot.system.ui.lib.application import gui_app, TextAlignment from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel from openpilot.system.ui.lib.wifi_manager import WifiManager, SecurityType, Network, MeteredType, normalize_ssid @@ -67,7 +67,7 @@ class NavButton(Widget): def _render(self, _): color = rl.Color(74, 74, 74, 255) if self.is_pressed else rl.Color(57, 57, 57, 255) rl.draw_rectangle_rounded(self._rect, 0.6, 10, color) - gui_label(self.rect, self.text, font_size=60, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) + gui_label(self.rect, self.text, font_size=60, alignment=TextAlignment.CENTER) class NetworkUI(Widget): @@ -315,7 +315,7 @@ class WifiManagerUI(Widget): def _render(self, rect: rl.Rectangle): if not self._networks: - gui_label(rect, tr("Scanning Wi-Fi networks..."), 72, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) + gui_label(rect, tr("Scanning Wi-Fi networks..."), 72, alignment=TextAlignment.CENTER) return if self.state == UIState.NEEDS_AUTH and self._state_network: @@ -389,7 +389,7 @@ class WifiManagerUI(Widget): if status_text: status_text_rect = rl.Rectangle(security_icon_rect.x - 410, rect.y, 410, ITEM_HEIGHT) - gui_label(status_text_rect, status_text, font_size=48, alignment=rl.GuiTextAlignment.TEXT_ALIGN_CENTER) + gui_label(status_text_rect, status_text, font_size=48, alignment=TextAlignment.CENTER) else: # If the network is saved, show the "Forget" button if self._wifi_manager.is_connection_saved(network.ssid): @@ -455,7 +455,7 @@ class WifiManagerUI(Widget): self._networks = networks for n in self._networks: self._networks_buttons[n.ssid] = Button(normalize_ssid(n.ssid), partial(self._networks_buttons_callback, n), font_size=55, - text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, button_style=ButtonStyle.TRANSPARENT_WHITE_TEXT) + text_alignment=TextAlignment.LEFT, button_style=ButtonStyle.TRANSPARENT_WHITE_TEXT) self._networks_buttons[n.ssid].set_touch_valid_callback(lambda: self.scroll_panel.is_touch_valid()) self._forget_networks_buttons[n.ssid] = Button(tr("Forget"), partial(self._forget_networks_buttons_callback, n), button_style=ButtonStyle.FORGET_WIFI, font_size=45) diff --git a/openpilot/system/ui/widgets/option_dialog.py b/openpilot/system/ui/widgets/option_dialog.py index 206400a74..816503c4a 100644 --- a/openpilot/system/ui/widgets/option_dialog.py +++ b/openpilot/system/ui/widgets/option_dialog.py @@ -1,6 +1,6 @@ import pyray as rl from collections.abc import Callable -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget, DialogResult from openpilot.system.ui.widgets.button import Button, ButtonStyle @@ -29,7 +29,7 @@ class MultiOptionDialog(Widget): # Create scroller with option buttons self.option_buttons = [Button(option, click_callback=lambda opt=option: self._on_option_clicked(opt), font_weight=option_font_weight, - text_alignment=rl.GuiTextAlignment.TEXT_ALIGN_LEFT, button_style=ButtonStyle.NORMAL, + text_alignment=TextAlignment.LEFT, button_style=ButtonStyle.NORMAL, text_padding=50, elide_right=True) for option in options] self.scroller = Scroller(self.option_buttons, spacing=LIST_ITEM_SPACING) diff --git a/openpilot/system/ui/widgets/slider.py b/openpilot/system/ui/widgets/slider.py index bf965954f..7bdf05621 100644 --- a/openpilot/system/ui/widgets/slider.py +++ b/openpilot/system/ui/widgets/slider.py @@ -3,7 +3,7 @@ from collections.abc import Callable import pyray as rl -from openpilot.system.ui.lib.application import gui_app, FontWeight +from openpilot.system.ui.lib.application import gui_app, FontWeight, TextAlignment, TextAlignmentVertical from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.common.filter_simple import FirstOrderFilter, BounceFilter @@ -41,8 +41,8 @@ class SliderBase(Widget, abc.ABC): self._is_dragging_circle = False self._label = self._child(UnifiedLabel(title, font_size=36, font_weight=FontWeight.SEMI_BOLD, text_color=rl.WHITE, - alignment=rl.GuiTextAlignment.TEXT_ALIGN_RIGHT, - alignment_vertical=rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE, line_height=0.9, shimmer=True)) + alignment=TextAlignment.RIGHT, + alignment_vertical=TextAlignmentVertical.MIDDLE, line_height=0.9, shimmer=True)) @abc.abstractmethod def _load_assets(self): diff --git a/openpilot/tools/replay/py_downloader.cc b/openpilot/tools/replay/py_downloader.cc index a265dfd6a..db2b2be12 100644 --- a/openpilot/tools/replay/py_downloader.cc +++ b/openpilot/tools/replay/py_downloader.cc @@ -2,8 +2,11 @@ #include #include +#include +#include #include #include +#include #include #include @@ -14,8 +17,15 @@ namespace { static std::mutex handler_mutex; static DownloadProgressHandler progress_handler = nullptr; -// Run a Python command and capture stdout. Stderr is left attached to the parent. -// Returns stdout content. If abort is signaled, kills the child process. +void reportProgress(const char *line) { + uint64_t cur = 0, total = 0; + if (sscanf(line, "PROGRESS:%llu:%llu", (unsigned long long *)&cur, (unsigned long long *)&total) != 2) return; + std::lock_guard lk(handler_mutex); + if (progress_handler && total > 0) progress_handler(cur, total, true); +} + +// Run a Python command and capture stdout. Stderr is scanned for PROGRESS lines and otherwise passed +// through to the parent's stderr. Returns stdout content. If abort is signaled, kills the child process. std::string runPython(const std::vector &args, std::atomic *abort = nullptr) { // Build argv for execvp std::vector argv; @@ -27,16 +37,22 @@ std::string runPython(const std::vector &args, std::atomic *a } argv.push_back(nullptr); - int stdout_pipe[2]; + int stdout_pipe[2], stderr_pipe[2]; if (pipe(stdout_pipe) != 0) { rWarning("py_downloader: pipe() failed"); return {}; } + if (pipe(stderr_pipe) != 0) { + rWarning("py_downloader: pipe() failed"); + close(stdout_pipe[0]); close(stdout_pipe[1]); + return {}; + } pid_t pid = fork(); if (pid < 0) { rWarning("py_downloader: fork() failed"); close(stdout_pipe[0]); close(stdout_pipe[1]); + close(stderr_pipe[0]); close(stderr_pipe[1]); return {}; } @@ -57,6 +73,9 @@ std::string runPython(const std::vector &args, std::atomic *a close(stdout_pipe[0]); dup2(stdout_pipe[1], STDOUT_FILENO); close(stdout_pipe[1]); + close(stderr_pipe[0]); + dup2(stderr_pipe[1], STDERR_FILENO); + close(stderr_pipe[1]); execvp("python3", const_cast(argv.data())); _exit(127); @@ -64,6 +83,27 @@ std::string runPython(const std::vector &args, std::atomic *a // Parent process close(stdout_pipe[1]); + close(stderr_pipe[1]); + + // stderr carries the progress lines, so a thread reads it while the loop below waits on stdout + std::thread stderr_thread([fd = stderr_pipe[0]]() { + FILE *f = fdopen(fd, "r"); + if (!f) { + close(fd); + return; + } + char *line = nullptr; + size_t cap = 0; + while (getline(&line, &cap, f) > 0) { + if (strncmp(line, "PROGRESS:", 9) == 0) { + reportProgress(line); + } else { + fputs(line, stderr); + } + } + free(line); + fclose(f); + }); std::string stdout_data; char buf[4096]; @@ -102,6 +142,7 @@ std::string runPython(const std::vector &args, std::atomic *a stdout_data.append(buf, n); } close(stdout_pipe[0]); + stderr_thread.join(); int status; waitpid(pid, &status, 0); diff --git a/panda/board/health.h b/panda/board/health.h index 8b26acbd9..d18f123bb 100644 --- a/panda/board/health.h +++ b/panda/board/health.h @@ -1,34 +1,36 @@ #pragma once +#define HEALTH_FLAG_IGNITION_LINE (1U << 0) +#define HEALTH_FLAG_IGNITION_CAN (1U << 1) +#define HEALTH_FLAG_CONTROLS_ALLOWED (1U << 2) +#define HEALTH_FLAG_POWER_SAVE_ENABLED (1U << 3) +#define HEALTH_FLAG_HEARTBEAT_LOST (1U << 4) +#define HEALTH_FLAG_SAFETY_RX_CHECKS_INVALID (1U << 5) +#define HEALTH_FLAG_SOM_RESET_TRIGGERED (1U << 6) + struct __attribute__((packed)) health_t { uint32_t uptime_pkt; - uint32_t voltage_pkt; - uint32_t current_pkt; + uint16_t voltage_pkt; + uint16_t current_pkt; uint32_t safety_tx_blocked_pkt; uint32_t safety_rx_invalid_pkt; uint32_t tx_buffer_overflow_pkt; uint32_t rx_buffer_overflow_pkt; uint32_t faults_pkt; - uint8_t ignition_line_pkt; - uint8_t ignition_can_pkt; - uint8_t controls_allowed_pkt; + uint16_t flags_pkt; uint8_t car_harness_status_pkt; uint8_t safety_mode_pkt; uint16_t safety_param_pkt; uint8_t fault_status_pkt; - uint8_t power_save_enabled_pkt; - uint8_t heartbeat_lost_pkt; uint16_t alternative_experience_pkt; - float interrupt_load_pkt; + uint8_t interrupt_load_pkt; uint8_t fan_power; - uint8_t safety_rx_checks_invalid_pkt; uint16_t spi_error_count_pkt; uint16_t sbu1_voltage_mV; uint16_t sbu2_voltage_mV; - uint8_t som_reset_triggered; uint16_t sound_output_level_pkt; + uint8_t temperature_pkt; uint8_t controls_allowed_sp_pkt; - float temperature; }; typedef struct __attribute__((packed)) { diff --git a/panda/board/main_comms.h b/panda/board/main_comms.h index 09f811865..b11a99bea 100644 --- a/panda/board/main_comms.h +++ b/panda/board/main_comms.h @@ -9,13 +9,18 @@ static int get_health_pkt(void *dat) { struct health_t * health = (struct health_t*)dat; health->uptime_pkt = uptime_cnt; - health->voltage_pkt = current_board->read_voltage_mV(); - health->current_pkt = current_board->read_current_mA(); + health->voltage_pkt = (uint16_t)MIN(current_board->read_voltage_mV(), 0xFFFFU); + health->current_pkt = (uint16_t)MIN(current_board->read_current_mA(), 0xFFFFU); - health->ignition_line_pkt = (uint8_t)(harness_check_ignition()); - health->ignition_can_pkt = ignition_can; + health->flags_pkt = 0U; + health->flags_pkt |= harness_check_ignition() ? HEALTH_FLAG_IGNITION_LINE : 0U; + health->flags_pkt |= ignition_can ? HEALTH_FLAG_IGNITION_CAN : 0U; + health->flags_pkt |= controls_allowed ? HEALTH_FLAG_CONTROLS_ALLOWED : 0U; + health->flags_pkt |= power_save_enabled ? HEALTH_FLAG_POWER_SAVE_ENABLED : 0U; + health->flags_pkt |= heartbeat_lost ? HEALTH_FLAG_HEARTBEAT_LOST : 0U; + health->flags_pkt |= safety_rx_checks_invalid ? HEALTH_FLAG_SAFETY_RX_CHECKS_INVALID : 0U; + health->flags_pkt |= bootkick_reset_triggered ? HEALTH_FLAG_SOM_RESET_TRIGGERED : 0U; - health->controls_allowed_pkt = controls_allowed; health->safety_tx_blocked_pkt = safety_tx_blocked; health->safety_rx_invalid_pkt = safety_rx_invalid; health->tx_buffer_overflow_pkt = tx_buffer_overflow; @@ -24,29 +29,26 @@ static int get_health_pkt(void *dat) { health->safety_mode_pkt = (uint8_t)(current_safety_mode); health->safety_param_pkt = current_safety_param; health->alternative_experience_pkt = alternative_experience; - health->power_save_enabled_pkt = power_save_enabled; - health->heartbeat_lost_pkt = heartbeat_lost; - health->safety_rx_checks_invalid_pkt = safety_rx_checks_invalid; health->spi_error_count_pkt = spi_error_count; health->fault_status_pkt = fault_status; health->faults_pkt = faults; - health->interrupt_load_pkt = interrupt_load; + float interrupt_load_scaled = (CLAMP(interrupt_load, 0.0f, 1.0f) * 255.0f) + 0.5f; + health->interrupt_load_pkt = (uint8_t)interrupt_load_scaled; health->fan_power = fan_state.power; health->sbu1_voltage_mV = harness.sbu1_voltage_mV; health->sbu2_voltage_mV = harness.sbu2_voltage_mV; - health->som_reset_triggered = bootkick_reset_triggered; - health->sound_output_level_pkt = sound_output_level; - health->controls_allowed_sp_pkt = (uint8_t)(((controls_allowed || controls_allowed_lateral) ? 1U : 0U) | (controls_allowed ? 2U : 0U)); + float temperature_encoded = (CLAMP(dts_get_temperature(), -40.0f, 214.5f) + 40.0f) + 0.5f; + health->temperature_pkt = (uint8_t)temperature_encoded; - health->temperature = dts_get_temperature(); + health->controls_allowed_sp_pkt = (uint8_t)(((controls_allowed || controls_allowed_lateral) ? 1U : 0U) | (controls_allowed ? 2U : 0U)); return sizeof(*health); } diff --git a/panda/board/obj/body_h7.bin.signed b/panda/board/obj/body_h7.bin.signed index fba5c607d..cbf8c6295 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 490706ff7..aa91293ad 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 e3f79bbe0..613b2e122 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 b19eb13b1..9d34a6d1c 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 66107609b..318d31557 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_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index 6eee4e0c8..c391422c0 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_jungle_h7.bin b/panda/board/obj/bootstub.panda_jungle_h7.bin index f1495941b..296f73223 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/gitversion.h b/panda/board/obj/gitversion.h index 5a66d68f4..f370adb7f 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-dc833705-DEBUG"; +const uint8_t gitversion[19] = "DEV-462b3a88-DEBUG"; diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index 3d149b4e1..008caa0b2 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 8b52f0e53..661b1ad78 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 89d8582c6..0adbbd0dd 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 23e95a57a..8e4d9e3c0 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_jungle_h7.bin.signed b/panda/board/obj/panda_jungle_h7.bin.signed index 95d277b25..452c36987 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 2275467fd..2e853c64f 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 4e9161d8e..fc2c5f93e 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 baef9743a..4ab958e73 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/version b/panda/board/obj/version index 609ce11b7..193f2f363 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-dc833705-DEBUG \ No newline at end of file +DEV-462b3a88-DEBUG \ No newline at end of file diff --git a/panda/python/__init__.py b/panda/python/__init__.py index f0e3d5221..186b5b1a3 100644 --- a/panda/python/__init__.py +++ b/panda/python/__init__.py @@ -141,6 +141,14 @@ class Panda: HEALTH_STRUCT = _parse_c_struct(os.path.join(BASEDIR, "board/health.h"), "health_t") CAN_HEALTH_STRUCT = struct.Struct("> 1) & 1, - "temperature": a[27], + "ignition_line": bool(flags & self.HEALTH_FLAG_IGNITION_LINE), + "ignition_can": bool(flags & self.HEALTH_FLAG_IGNITION_CAN), + "controls_allowed": bool(flags & self.HEALTH_FLAG_CONTROLS_ALLOWED), + "car_harness_status": a[9], + "safety_mode": a[10], + "safety_param": a[11], + "fault_status": a[12], + "power_save_enabled": bool(flags & self.HEALTH_FLAG_POWER_SAVE_ENABLED), + "heartbeat_lost": bool(flags & self.HEALTH_FLAG_HEARTBEAT_LOST), + "alternative_experience": a[13], + "interrupt_load": a[14] / 255.0, + "fan_power": a[15], + "safety_rx_checks_invalid": bool(flags & self.HEALTH_FLAG_SAFETY_RX_CHECKS_INVALID), + "spi_error_count": a[16], + "sbu1_voltage_mV": a[17], + "sbu2_voltage_mV": a[18], + "som_reset_triggered": bool(flags & self.HEALTH_FLAG_SOM_RESET_TRIGGERED), + "sound_output_level": a[19], + "temperature": a[20] - 40.0, + "controls_allowed_lateral": a[21] & 1, + "controls_allowed_longitudinal": (a[21] >> 1) & 1, } @ensure_health_packet_version @@ -654,8 +663,8 @@ class Panda: # ******************* configuration ******************* - def set_alternative_experience(self, alternative_experience, safety_param_sp=0): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xdf, int(alternative_experience), int(safety_param_sp), b'') + def set_alternative_experience(self, alternative_experience): + self._handle.controlWrite(Panda.REQUEST_OUT, 0xdf, int(alternative_experience), 0, b'') def set_power_save(self, power_save_enabled=0): self._handle.controlWrite(Panda.REQUEST_OUT, 0xe7, int(power_save_enabled), 0, b'') @@ -763,8 +772,8 @@ class Panda: ret += self._handle.bulkWrite(2, struct.pack("B", port_number) + ln[i:i + 0x20]) return ret - def send_heartbeat(self, engaged=True, engaged_mads=True): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xf3, engaged, engaged_mads, b'') + def send_heartbeat(self, engaged=True): + self._handle.controlWrite(Panda.REQUEST_OUT, 0xf3, engaged, 0, b'') # disable heartbeat checks for use outside of openpilot # sending a heartbeat will reenable the checks diff --git a/panda/tests/libpanda/libpanda.so b/panda/tests/libpanda/libpanda.so index 393c713ce..f30e4996c 100755 Binary files a/panda/tests/libpanda/libpanda.so and b/panda/tests/libpanda/libpanda.so differ diff --git a/rednose_repo/rednose/helpers/ekf_sym_pyx.cpp b/rednose_repo/rednose/helpers/ekf_sym_pyx.cpp index 4b8a10fb6..a243e96e4 100644 --- a/rednose_repo/rednose/helpers/ekf_sym_pyx.cpp +++ b/rednose_repo/rednose/helpers/ekf_sym_pyx.cpp @@ -25848,7 +25848,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0); (void)__Pyx_modinit_variable_import_code(__pyx_mstate); (void)__Pyx_modinit_function_import_code(__pyx_mstate); /*--- Execution code ---*/ - __Pyx_TraceStartFunc("PyInit_ekf_sym_pyx", __pyx_f[0], 1, 1, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error)); + __Pyx_TraceStartFunc("PyInit_ekf_sym_pyx", __pyx_f[0], 1, 0, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error)); /* "View.MemoryView":108 * @@ -26647,7 +26647,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0); __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_TraceReturnValue(Py_None, 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); + __Pyx_TraceReturnValue(Py_None, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error)); __Pyx_PyMonitoring_ExitScope(0); /*--- Wrapped vars code ---*/ @@ -26657,7 +26657,7 @@ __Pyx_RefNannySetupContext("PyInit_ekf_sym_pyx", 0); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_TraceException(__pyx_lineno, 0, 0); - __Pyx_TraceExceptionUnwind(1, 0); + __Pyx_TraceExceptionUnwind(0, 0); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init rednose.helpers.ekf_sym_pyx", __pyx_clineno, __pyx_lineno, __pyx_filename); diff --git a/uv.lock b/uv.lock index 54e2ac008..8f6db14fe 100644 --- a/uv.lock +++ b/uv.lock @@ -234,15 +234,15 @@ wheels = [ [[package]] name = "comma-deps-raylib" -version = "6.0.0.1.post98" +version = "6.0.0.1.post101" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/9c/21/59509b2758e3612c63336df5534ea3b36e472e06c18a50f0b96c32e8e3e0/comma_deps_raylib-6.0.0.1.post98-py3-none-macosx_11_0_arm64.whl", hash = "sha256:838a6115f508ee4ca0e4c84975c0892d67c10f94b11dd2bc0e023ad65138d010", size = 2004199, upload-time = "2026-07-23T17:03:17.648Z" }, - { url = "https://files.pythonhosted.org/packages/c2/f5/84e135ac611a6dfe8b95ff989097c200770907907afba78455d4c863981e/comma_deps_raylib-6.0.0.1.post98-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:9347fe18799c209dd1af746a44a94433bae69d4644de10e11dcc307aecd87fb1", size = 7203023, upload-time = "2026-07-23T17:03:21.525Z" }, - { url = "https://files.pythonhosted.org/packages/fe/1b/ae0959dac622f7169de230ec98c6555870ae0ad4f61e7b8d32922fa960ed/comma_deps_raylib-6.0.0.1.post98-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:f9fd393fbaf1f16d7785be0b2252ef3b14a953c93d89296ed9a67bc7063de882", size = 5055448, upload-time = "2026-07-23T17:03:25.737Z" }, + { url = "https://files.pythonhosted.org/packages/ff/90/e289acd1725d71c792c33399422f1052c4b0c38aeb4222a866d30c4a2cad/comma_deps_raylib-6.0.0.1.post101-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fa69d5093a92d7d2bfd2714a1afccca63b94d4c55fae88e61b80e8841de6a6cd", size = 1885392, upload-time = "2026-08-27T18:24:37.25Z" }, + { url = "https://files.pythonhosted.org/packages/a1/17/12977631f6d86d1daa4f67a310cfdf2783ba288f42d444d6a89b2297a0a4/comma_deps_raylib-6.0.0.1.post101-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:c93ff9b45df414620b3011280da77151764c027e2f95d384fe255615d78872cc", size = 21707644, upload-time = "2026-08-27T18:24:41.282Z" }, + { url = "https://files.pythonhosted.org/packages/c0/ca/ef33aff790b37dfc925f94fbb3a86da19f67929c15b3725ddb18afb91e96/comma_deps_raylib-6.0.0.1.post101-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:8f2a1ffe5f60cac06170b144d6ce84925c91657e7ada3ae35bc5df6ccbe0b461", size = 20722616, upload-time = "2026-08-27T18:24:45.803Z" }, ] [[package]]