모종의 음모/CAN2025. 4. 1. 14:34

이거 머 보다가 나온거지 -ㅁ-?

FC-SAN 쪽에서 CIP로 시작한 것 같은데 기억이...

 

The Common Industrial Protocol (CIP) is an industrial protocol for industrial automation applications. It is supported by ODVA.
Previously known as Control and Information Protocol,[1] CIP encompasses a comprehensive suite of messages and services for the collection of manufacturing automation applications – control, safety, synchronization, motion, configuration and information. It allows users to integrate these manufacturing applications with enterprise-level Ethernet networks and the Internet. It is supported by hundreds of vendors around the world,[2] and is media-independent. CIP provides a unified communication architecture throughout the manufacturing enterprise. It is used in EtherNet/IP, DeviceNet, CompoNet and ControlNet.
ODVA is the organization that supports network technologies built on the Common Industrial Protocol (CIP). These also currently include application extensions to CIP: CIP Safety, CIP Motion and CIP Sync.

[링크 : https://en.m.wikipedia.org/wiki/Common_Industrial_Protocol]

 

DeviceNet is a network protocol used in the automation industry to interconnect control devices for data exchange. It utilizes the Common Industrial Protocol over a Controller Area Network media layer and defines an application layer to cover a range of device profiles. Typical applications include information exchange, safety devices, and large I/O control networks.[1]

[링크 : https://en.m.wikipedia.org/wiki/DeviceNet]

'모종의 음모 > CAN' 카테고리의 다른 글

candump, cansend와 vcan  (0) 2025.02.19
linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
Posted by 구차니
모종의 음모/CAN2025. 2. 19. 16:35

 

$ modprobe vcan
modprobe: ERROR: could not insert 'vcan': Operation not permitted

$ sudo modprobe vcan
sudo ip link add dev vcan0 type vcan

$ ifconfig
br-638c83b169eb: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:d5:e6:f1:21  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:40:63:97:cb  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enxf8e43b9b776b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.108  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::81f4:65ad:f7cc:2f2c  prefixlen 64  scopeid 0x20<link>
        ether f8:e4:3b:9b:77:6b  txqueuelen 1000  (Ethernet)
        RX packets 3619726  bytes 2156366501 (2.1 GB)
        RX errors 0  dropped 106170  overruns 0  frame 0
        TX packets 1452518  bytes 317915291 (317.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 160829  bytes 14028478 (14.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 160829  bytes 14028478 (14.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.107  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::104b:d69c:878f:cfaa  prefixlen 64  scopeid 0x20<link>
        ether 8c:55:4a:28:25:bc  txqueuelen 1000  (Ethernet)
        RX packets 809871  bytes 90255020 (90.2 MB)
        RX errors 0  dropped 99865  overruns 0  frame 0
        TX packets 53067  bytes 6125665 (6.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ ifconfig -a
br-638c83b169eb: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:d5:e6:f1:21  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:40:63:97:cb  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enxf8e43b9b776b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.108  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::81f4:65ad:f7cc:2f2c  prefixlen 64  scopeid 0x20<link>
        ether f8:e4:3b:9b:77:6b  txqueuelen 1000  (Ethernet)
        RX packets 3620125  bytes 2156544266 (2.1 GB)
        RX errors 0  dropped 106183  overruns 0  frame 0
        TX packets 1452676  bytes 317938700 (317.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 160841  bytes 14030154 (14.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 160841  bytes 14030154 (14.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vcan0: flags=128<NOARP>  mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.107  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::104b:d69c:878f:cfaa  prefixlen 64  scopeid 0x20<link>
        ether 8c:55:4a:28:25:bc  txqueuelen 1000  (Ethernet)
        RX packets 809990  bytes 90270371 (90.2 MB)
        RX errors 0  dropped 99877  overruns 0  frame 0
        TX packets 53074  bytes 6126348 (6.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ sudo ifconfig vcan0 up
$ ifconfig
br-638c83b169eb: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:d5:e6:f1:21  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:40:63:97:cb  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enxf8e43b9b776b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.108  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::81f4:65ad:f7cc:2f2c  prefixlen 64  scopeid 0x20<link>
        ether f8:e4:3b:9b:77:6b  txqueuelen 1000  (Ethernet)
        RX packets 3620430  bytes 2156573250 (2.1 GB)
        RX errors 0  dropped 106197  overruns 0  frame 0
        TX packets 1452764  bytes 317953427 (317.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 160841  bytes 14030154 (14.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 160841  bytes 14030154 (14.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vcan0: flags=193<UP,RUNNING,NOARP>  mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.220.107  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::104b:d69c:878f:cfaa  prefixlen 64  scopeid 0x20<link>
        ether 8c:55:4a:28:25:bc  txqueuelen 1000  (Ethernet)
        RX packets 810099  bytes 90278671 (90.2 MB)
        RX errors 0  dropped 99889  overruns 0  frame 0
        TX packets 53074  bytes 6126348 (6.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[링크 : https://ola-page.tistory.com/66]

 

 

 

$ candump 
candump - dump CAN bus traffic.

Usage: candump [options] <CAN interface>+
  (use CTRL-C to terminate candump)

Options:
         -t <type>   (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)
         -H          (read hardware timestamps instead of system timestamps)
         -c          (increment color mode level)
         -i          (binary output - may exceed 80 chars/line)
         -a          (enable additional ASCII output)
         -S          (swap byte order in printed CAN data[] - marked with '`' )
         -s <level>  (silent mode - 0: off (default) 1: animation 2: silent)
         -l          (log CAN-frames into file. Sets '-s 2' by default)
         -L          (use log file format on stdout)
         -n <count>  (terminate after reception of <count> CAN frames)
         -r <size>   (set socket receive buffer to <size>)
         -D          (Don't exit if a "detected" can device goes down.
         -d          (monitor dropped CAN frames)
         -e          (dump CAN error frames in human-readable format)
         -x          (print extra message infos, rx/tx brs esi)
         -T <msecs>  (terminate after <msecs> without any reception)

Up to 16 CAN interfaces with optional filter sets can be specified
on the commandline in the form: <ifname>[,filter]*

Filters:
  Comma separated filters can be specified for each given CAN interface:
    <can_id>:<can_mask>
         (matches when <received_can_id> & mask == can_id & mask)
    <can_id>~<can_mask>
         (matches when <received_can_id> & mask != can_id & mask)
    #<error_mask>
         (set error frame filter, see include/linux/can/error.h)
    [j|J]
         (join the given CAN filters - logical AND semantic)

CAN IDs, masks and data content are given and expected in hexadecimal values.
When the can_id is 8 digits long the CAN_EFF_FLAG is set for 29 bit EFF format.
Without any given filter all data frames are received ('0:0' default filter).

Use interface name 'any' to receive from all CAN interfaces.

Examples:
candump -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8

candump -l any,0~0,#FFFFFFFF
         (log only error frames but no(!) data frames)
candump -l any,0:0,#FFFFFFFF
         (log error frames and also all data frames)
candump vcan2,12345678:DFFFFFFF
         (match only for extended CAN ID 12345678)
candump vcan2,123:7FF
         (matches CAN ID 123 - including EFF and RTR frames)
candump vcan2,123:C00007FF
         (matches CAN ID 123 - only SFF and non-RTR frames)

 

$ cansend vcan0
cansend - send CAN-frames via CAN_RAW sockets.

Usage: cansend <device> <can_frame>.

<can_frame>:
 <can_id>#{data}          for 'classic' CAN 2.0 data frames
 <can_id>#R{len}          for 'classic' CAN 2.0 data frames
 <can_id>##<flags>{data}  for CAN FD frames

<can_id>:
 3 (SFF) or 8 (EFF) hex chars
{data}:
 0..8 (0..64 CAN FD) ASCII hex-values (optionally separated by '.')
{len}:
 an optional 0..8 value as RTR frames can contain a valid dlc field
<flags>:
 a single ASCII Hex value (0 .. F) which defines canfd_frame.flags

Examples:
  5A1#11.2233.44556677.88 / 123#DEADBEEF / 5AA# / 123##1 / 213##311223344 /
  1F334455#1122334455667788 / 123#R / 00000123#R3

 

아래는 데이터 출력 포맷 확인용

인터페이스 / CAN id / 길이 / 데이터(페이로드 길이)

receive send
$ candump vcan0
  vcan0  111   [5]  01 02 03 04 05
$ cansend vcan0 111#010203.04.05
  vcan0  112   [5]  01 02 03 04 05 $ cansend vcan0 112#010203.04.05
  vcan0  112   [0]  $ cansend vcan0 112#
  vcan0  112  [00] $ cansend vcan0 112##1
  vcan0  112  [01]  23 $ cansend vcan0 112##123
  vcan0  112   [0]  remote request $ cansend vcan0 112#R
  vcan0  112   [3]  remote request $ cansend vcan0 112#R3

 

받는 쪽에서 CAN id 제한할 경우, 112를 받도록 설정했기에 113은 무시된다.

   
$ candump vcan0,112:FF $ cansend vcan0 111#R3
  vcan0  112   [3]  remote request $ cansend vcan0 112#R3
  $ cansend vcan0 113#R3
  vcan0  112   [5]  01 02 03 04 05 $ cansend vcan0 112#010203.04.05
  vcan0  112   [6]  01 02 03 04 05 06 $ cansend vcan0 112#010203.04.0506
  vcan0  112   [7]  01 02 03 04 05 06 07 $ cansend vcan0 112#010203.04.0506.07
  vcan0  112   [0]  remote request $ cansend vcan0 112#R
$ cansend vcan0 112#R10
$ cansend vcan0 112#R100
  vcan0  112   [1]  remote request $ cansend vcan0 112#R1
  vcan0  112   [2]  remote request $ cansend vcan0 112#R2
  vcan0  112   [8]  remote request $ cansend vcan0 112#R8

 

그나저나 mask 라는데 이해가 안되네..

123 = 0x7B & 0x7F0 하면 0x7B가 되어야 하니 16개에 대해서 받아들여야 할 거 같은데 왜 119에서 130 까지 12개 받아들여 질까?

$ candump vcan0,123:7F0
  vcan0  120   [0]  remote request
  vcan0  121   [0]  remote request
  vcan0  122   [0]  remote request
  vcan0  123   [0]  remote request
  vcan0  124   [0]  remote request
  vcan0  125   [0]  remote request
  vcan0  126   [0]  remote request
  vcan0  127   [0]  remote request
  vcan0  128   [0]  remote request
  vcan0  129   [0]  remote request
$ cansend vcan0 119#R
$ cansend vcan0 120#R
$ cansend vcan0 121#R
$ cansend vcan0 122#R
$ cansend vcan0 123#R
$ cansend vcan0 124#R
$ cansend vcan0 125#R
$ cansend vcan0 126#R
$ cansend vcan0 127#R
$ cansend vcan0 128#R
$ cansend vcan0 129#R
$ cansend vcan0 130#R

'모종의 음모 > CAN' 카테고리의 다른 글

DeviceNet CAN  (0) 2025.04.01
linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
Posted by 구차니
모종의 음모/CAN2025. 2. 18. 16:44

실 장비가 있으면 좋겠지만 없어도

가상 can(virtual can) 장치를 추가해서 테스트 할 수 있다.

 

$ sudo ip link add dev vcan0 type vcan
$ sudo ifconfig vcan0 up

[링크 : https://ola-page.tistory.com/66] socket can

[링크 : https://hn-log.tistory.com/168] CANable

'모종의 음모 > CAN' 카테고리의 다른 글

DeviceNet CAN  (0) 2025.04.01
candump, cansend와 vcan  (0) 2025.02.19
can-utils(cansend, candump)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
Posted by 구차니
모종의 음모/CAN2025. 2. 18. 16:43

cansend는 보내고

candump는 받는 녀석이다.

 

$ cansend can0 canid#userdata

로 하면 특정 canid로 보낼 수 있고

$ cansend --help
cansend - send CAN-frames via CAN_RAW sockets.

Usage: cansend <device> <can_frame>.

<can_frame>:
 <can_id>#{data}          for 'classic' CAN 2.0 data frames
 <can_id>#R{len}          for 'classic' CAN 2.0 data frames
 <can_id>##<flags>{data}  for CAN FD frames

<can_id>:
 3 (SFF) or 8 (EFF) hex chars
{data}:
 0..8 (0..64 CAN FD) ASCII hex-values (optionally separated by '.')
{len}:
 an optional 0..8 value as RTR frames can contain a valid dlc field
<flags>:
 a single ASCII Hex value (0 .. F) which defines canfd_frame.flags

Examples:
  5A1#11.2233.44556677.88 / 123#DEADBEEF / 5AA# / 123##1 / 213##311223344 /
  1F334455#1122334455667788 / 123#R / 00000123#R3

 

candump 에서는 아래와 같이 하면 특정 id로만 확인할 수 있다.

$ candump can0,canid 

$ candump --help
candump: invalid option -- '-'
candump - dump CAN bus traffic.

Usage: candump [options] <CAN interface>+
  (use CTRL-C to terminate candump)

Options:
         -t <type>   (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)
         -H          (read hardware timestamps instead of system timestamps)
         -c          (increment color mode level)
         -i          (binary output - may exceed 80 chars/line)
         -a          (enable additional ASCII output)
         -S          (swap byte order in printed CAN data[] - marked with '`' )
         -s <level>  (silent mode - 0: off (default) 1: animation 2: silent)
         -l          (log CAN-frames into file. Sets '-s 2' by default)
         -L          (use log file format on stdout)
         -n <count>  (terminate after reception of <count> CAN frames)
         -r <size>   (set socket receive buffer to <size>)
         -D          (Don't exit if a "detected" can device goes down.
         -d          (monitor dropped CAN frames)
         -e          (dump CAN error frames in human-readable format)
         -x          (print extra message infos, rx/tx brs esi)
         -T <msecs>  (terminate after <msecs> without any reception)

Up to 16 CAN interfaces with optional filter sets can be specified
on the commandline in the form: <ifname>[,filter]*

Filters:
  Comma separated filters can be specified for each given CAN interface:
    <can_id>:<can_mask>
         (matches when <received_can_id> & mask == can_id & mask)
    <can_id>~<can_mask>
         (matches when <received_can_id> & mask != can_id & mask)
    #<error_mask>
         (set error frame filter, see include/linux/can/error.h)
    [j|J]
         (join the given CAN filters - logical AND semantic)

CAN IDs, masks and data content are given and expected in hexadecimal values.
When the can_id is 8 digits long the CAN_EFF_FLAG is set for 29 bit EFF format.
Without any given filter all data frames are received ('0:0' default filter).

Use interface name 'any' to receive from all CAN interfaces.

Examples:
candump -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8

candump -l any,0~0,#FFFFFFFF
         (log only error frames but no(!) data frames)
candump -l any,0:0,#FFFFFFFF
         (log error frames and also all data frames)
candump vcan2,12345678:DFFFFFFF
         (match only for extended CAN ID 12345678)
candump vcan2,123:7FF
         (matches CAN ID 123 - including EFF and RTR frames)
candump vcan2,123:C00007FF
         (matches CAN ID 123 - only SFF and non-RTR frames)

 

'모종의 음모 > CAN' 카테고리의 다른 글

candump, cansend와 vcan  (0) 2025.02.19
linux can 테스트(가상 CAN IF)  (0) 2025.02.18
can invader  (0) 2024.01.09
CAN(controller area network)  (0) 2023.10.31
mcp2515 can  (0) 2023.10.30
Posted by 구차니

수직 동기화 켜면 30 / 60fps 가능하고

수직 동기화 끄고 프레임 속도 고정 해제(가변) 하면

120fps 정도 까지 올라가는데 그럴 때에는 8ms 주기로 온다.

어디서 주워듣기로는 물리엔진은 2배 빠르게 계산한다는데 그거랑 별개로

데이터 전송 주기는 프레임 속도에 맞추는 건가?

 

단순하게 roll/pitch를 이용해서 기울기를 표현하려고 했더니

서킷에서 기울기에 따라 roll이 올라가야 할 것 같은데.. 싶은 부분에서 pitch가 올라가고 그러는걸 보면

yaw/roll/pitch는 global 좌표에서의 값으로 생각된다.

'모종의 음모 > motion simulator' 카테고리의 다른 글

github 에 작성중인 코드 푸시!  (0) 2024.12.28
yaw roll pitch  (0) 2024.12.27
HS-311 스텝모터  (0) 2024.12.26
f1 2015 telemetry udp  (0) 2024.12.08
dirt rally 2.0 telemetry udp  (0) 2024.12.08
Posted by 구차니

어우. 올리기 빡세네

 

[링크 : https://github.com/minimonk82/forza_horizon_4_telemetry]

'모종의 음모 > motion simulator' 카테고리의 다른 글

forza horizon 수직동기화와 telemetry 정보  (0) 2025.01.01
yaw roll pitch  (0) 2024.12.27
HS-311 스텝모터  (0) 2024.12.26
f1 2015 telemetry udp  (0) 2024.12.08
dirt rally 2.0 telemetry udp  (0) 2024.12.08
Posted by 구차니

telemetry 정보에서 자동차임에도 불구하고

yaw roll pitch가 나와서 어떻게 매칭을 해야 하나 고민했는데

 

yaw는 이동방향, 나침반으로 어딜 보고 있냐를 표시하면 될 것 같고

이전 각도와의 차이로 차의 회전 방향을 알 수 있을테니 얜 미분을 해야하나?

 

roll은 측면으로 구르는 각도(그래서 roll cage 인가?)

좌우로 기운 도로를 달리게 되면 요 녀석의 값이 달라질 것 같고

 

pitch는 앞뒤로 오르막 내리막 길을 가게 되면 값이 달라질 것 같다.

 

정리하면.. 모션 시뮬레이터에서는 roll과 pitch로 운전석의 기울기를 표현하면 될 것 같고

yaw의 미분 값의 방향으로 시계, 반시계 방향의 운동량을 표현하면 될 것 같다.

 

가속도 값으로는 z 축은 의자 자체를 떨구거나 올리기 힘들테니 6축 아니면 힘들 것 같고

x 축은 앞뒤로 기울기고

y 축은 좌우로 기울이면 될테니

 

사용자가 느끼는 관성의 방향은

x 축 <-> yaw,

y 축 <-> pitch 와는 반대의 방향으로 나타나게 되겠네?

그러면.. 감각을 속이려면 yaw, roll 보단

x,y 가속도 값이 더 중요할 것 같다.

Vertical axis (yaw)
The yaw axis has its origin at the center of gravity and is directed towards the bottom of the aircraft, perpendicular to the wings and to the fuselage reference line. Motion about this axis is called yaw. A positive yawing motion moves the nose of the aircraft to the right.[1][2] The rudder is the primary control of yaw.[3]

The term yaw was originally applied in sailing, and referred to the motion of an unsteady ship rotating about its vertical axis. Its etymology is uncertain.[4]

Lateral axis (pitch)
The pitch axis (also called transverse or lateral axis),[5] passes through an aircraft from wingtip to wingtip. Rotation about this axis is called pitch. Pitch changes the vertical direction that the aircraft's nose is pointing (a positive pitching motion raises the nose of the aircraft and lowers the tail). The elevators are the primary control surfaces for pitch.[3]

Longitudinal axis (roll)
The roll axis (or longitudinal axis[5]) has its origin at the center of gravity and is directed forward, parallel to the fuselage reference line. Motion about this axis is called roll. An angular displacement about this axis is called bank.[3] A positive rolling motion lifts the left wing and lowers the right wing. The pilot rolls by increasing the lift on one wing and decreasing it on the other. This changes the bank angle.[6] The ailerons are the primary control of bank. The rudder also has a secondary effect on bank.[7]

[링크 : https://en.wikipedia.org/wiki/Aircraft_principal_axes]

[링크 : https://velog.io/@sobokii/UE5-Roll-Pitch-Yaw]

 

주익의 에일러론이 둘 다 움직이면 어떻게 될까 궁금했는데,

일단 구조적으로 양쪽이 반대로 움직이게 되어있어서 안된다고 하고

된다고 하더라도.. 무게중심에 가까워서 엘리베이션과는 다르게 움직일 것 같단 의견

플랩을 내리면 에일러론을 둘다 내린 형상이 되니

둘 다 내리면 수직방향으로 AoA이 커진 채로 올라가고

둘 다 올리면 수직방향으로 AoA가 커진채로 내려가려나?

[링크 : https://www.clien.net/service/board/park/15063368]

 

두서없이 쓰다 보니 먼 소리인지... 잠을 자야하나?!

'모종의 음모 > motion simulator' 카테고리의 다른 글

forza horizon 수직동기화와 telemetry 정보  (0) 2025.01.01
github 에 작성중인 코드 푸시!  (0) 2024.12.28
HS-311 스텝모터  (0) 2024.12.26
f1 2015 telemetry udp  (0) 2024.12.08
dirt rally 2.0 telemetry udp  (0) 2024.12.08
Posted by 구차니

스텝모터 데이터 시트를 보는데

4.8V ~ 6.0V 입력가능하고

6.0V 일 경우 최대 800mA 를 소모한다. 생각외로.. 많이 먹네? 4.8W 라.. (역률 인지 먼지 이런건 모르니 패스)

아무튼 모터 두개를 동시에 풀로 돌린다고 가정하면

1.6A는 흘려주어야 한다는 건데.. 일반적인 보조배터리라면 5V 2A는 되니까

라즈베리 등을 작동 시키는데에만도 빠듯하다는 의미가 될 듯..

아무튼 60도에 0.15~0.19초

0.0025초/1도 3msec 라니 물리적으로는 상당히 빠른 편이라고 해줘야 하나?

 

 

[링크 : https://www.devicemart.co.kr/goods/view?no=11225]

'모종의 음모 > motion simulator' 카테고리의 다른 글

github 에 작성중인 코드 푸시!  (0) 2024.12.28
yaw roll pitch  (0) 2024.12.27
f1 2015 telemetry udp  (0) 2024.12.08
dirt rally 2.0 telemetry udp  (0) 2024.12.08
forza horizon 4 telemetry 수정  (0) 2024.12.07
Posted by 구차니

다시 프로그램 수정해서 받아보니 패킷의 길이가 시원하게 보여서 좋긴하네

nc는 패킷의 시작을 알 수 없어서 매번 아쉽다.

 

/YF로 나오는 녀석은 패킷의 거의 마지막 부분이었군

280 received, 343 sizeof(FORZA_DASH)

83 0A B0 42 28 0F 0C 42 BA 7F 8B 44 BA 7F 8B 44 
AB 05 3D C4 8C 0F 8B 40 C8 54 DA C3 46 BE 2F 40 
1B E5 B8 BF B2 5E CD 3C 4C 74 15 40 5A 9B 58 3F 
13 BE C8 BC 41 4D 08 3F E3 4A 08 3F 4D 98 0B BC 
49 B1 58 BF BB F3 D4 3F C8 41 A4 3F EA 88 DA 3F 
88 4C B0 3F 35 F8 B4 C1 FE 29 31 C1 D3 61 96 C1 
FA 6F DF C0 8A DD 30 C0 AE D2 30 C0 7A E2 30 C0 
4D D1 30 C0 00 00 00 00 00 00 00 80 00 00 00 00 
00 00 00 00 00 00 00 00 15 49 87 BB C1 3D D5 3D 
00 00 00 00 06 01 3B 45 00 00 00 00 00 00 80 41 
00 50 C3 48 00 50 C3 48 00 00 00 00 00 00 80 3F 
00 00 80 3F 96 3D 13 41 00 00 C8 42 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 BB 50 42 44 
E9 01 42 44 49 C5 54 44 9F EA 54 44 00 00 90 41 
00 00 90 41 00 00 90 41 00 00 90 41 00 00 80 40 
00 00 C6 42 40 AA A5 45 00 00 00 00 FF 2F 59 46 
00 80 3B 45 00 00 10 41 00 00 80 3F 00 00 00 00 
00 00 00 00 00 00 00 40 

 

280 바이트의 시작과 끝 매칭

$ nc -ul 20777 | hexdump -C
00150bd0  0f 3d a4 42 11 35 3c 42  1f 26 f0 44 1f 26 f0 44  |.=.B.5
00150be0  6a 66 35 c3 d3 e9 5b 40  5c bb 65 c4 d5 14 e5 40  |jf5...[@\.e....@|
00150bf0  31 da a3 40 9d d7 b3 bd  3d 12 a0 c0 2c 1f 31 3f  |1..@....=...,.1?|
00150c00  30 a1 52 ba bf d5 38 3f  59 cb 38 3f ef b2 a5 bc  |0.R...8?Y.8?....|
00150c10  ae 16 31 bf ca b0 41 40  1e 4d 4d 40 14 bb 72 40  |..1...A@.MM@..r@|
00150c20  13 8e 6b 40 d6 ed 1b 42  86 5f 09 43 04 a5 45 42  |..k@...B._.C..EB|
00150c30  02 81 3c 43 22 f3 e3 40  12 9d e5 40 f1 40 e4 40  |..
00150c40  34 af e5 40 00 00 00 00  f0 70 68 3d 00 00 00 00  |4..@.....ph=....|
00150c50  00 00 00 00 00 00 00 40  02 a4 0f be 13 8f 8d be  |.......@........|
00150c60  00 00 00 00 87 86 6d 45  00 00 00 00 00 00 80 41  |......mE.......A|
00150c70  00 50 c3 48 00 50 c3 48  00 00 00 00 00 00 80 3f  |.P.H.P.H.......?|
00150c80  00 00 80 3f 77 16 0f 41  00 00 c8 42 00 00 00 00  |...?w..A...B....|
00150c90  00 00 80 3f 98 68 2d 42  00 00 00 00 a2 1e 76 44  |...?.h-B......vD|
00150ca0  fc 37 76 44 37 e5 84 44  24 b4 84 44 00 00 90 41  |.7vD7..D$..D...A|
00150cb0  00 00 90 41 00 00 90 41  00 00 90 41 00 00 80 40  |...A...A...A...@|
00150cc0  00 00 c6 42 40 aa a5 45  00 00 00 00 ff 2f 59 46  |...B@..E..... /YF |
00150cd0  00 80 3b 45 00 00 10 41  00 00 80 3f 00 00 00 00  |..;E...A...?....|
00150ce0  00 00 00 00 00 00 00 40  97 45 a4 42 1c 46 3c 42  |.......@.E.B.F

'모종의 음모 > motion simulator' 카테고리의 다른 글

yaw roll pitch  (0) 2024.12.27
HS-311 스텝모터  (0) 2024.12.26
dirt rally 2.0 telemetry udp  (0) 2024.12.08
forza horizon 4 telemetry 수정  (0) 2024.12.07
forza telemetry  (0) 2024.12.02
Posted by 구차니

68byte 라서,17 개의 float 데이터 일 것 같은데 매칭되는게 없어 보이네?

 

가장 처음꺼는 timestamp 같은데

가장 마지막의 ToCA는 먼지 모르겠고..

float 형으로 해도 int 형으로 해도 먼가 의미를 지니는 패킷을 찾긴 쉽지 않네..

68 received, 343 sizeof(FORZA_DASH)

0D A9 01 00 90 B3 A2 3F EB B4 CA 3D 94 9B 23 BF 
1A BA 3B 40 2B 3A E4 3D E8 46 E5 3F A1 BE E9 BF 
7F 16 E1 3E ED 9A 23 C1 27 43 06 BF 64 1A 84 C0 
AA 38 EF BF 00 C3 E7 FA 0E 13 2C FE 00 2D A6 08 
54 6F 43 41 
--------------
108813 0.000000
1067627408 1.271105
1036694763 0.098978
-1088185452 -0.639093
1077656090 2.933234
1038367275 0.111439
1071990504 1.791226
-1075200351 -1.826130
1054938751 0.439625
-1054631187 -10.225324
-1090108633 -0.524462
-1065084316 -4.128222
-1074841430 -1.868917
-85474560 -601687822097128628961607183025307648.000000
-30665970 -57181538217263035746945707264998113280.000000
145108224 0.000000
1094938452 12.214680

[링크 : https://github.com/gabrielgouv/dirt-rally-telemetry-dashboard/blob/main/src/main/java/com/github/gabrielgouv/dr2td/model/TelemetryData.java]

[링크 : https://github.com/ozkar99/cm-telemetry/blob/master/src/dirt/rally2.rs]

[링크 : https://docs.google.com/spreadsheets/d/1eA518KHFowYw7tSMa-NxIFYpiWe5JXgVVQ_IMs7BVW0/edit?gid=0#gid=0]

'모종의 음모 > motion simulator' 카테고리의 다른 글

HS-311 스텝모터  (0) 2024.12.26
f1 2015 telemetry udp  (0) 2024.12.08
forza horizon 4 telemetry 수정  (0) 2024.12.07
forza telemetry  (0) 2024.12.02
forza horizon 4, 리눅스용 c언어 대시보드  (0) 2024.11.30
Posted by 구차니