ÀÌ ¸Å´º¾óÀº JKÀüÀÚ(JK Electronics) ¿¡ ÀÇÇؼ­ ÀÛ¼º µÇ¾ú°í ¼ÒÀ¯±Ç ¶ÇÇÑ
JKÀüÀÚ(JK Electronics)
ÀÇ °ÍÀÔ´Ï´Ù. ¼ÒÀ¯±ÇÀÚÀÇ Çã°¡¸¦ ¹ÞÁö ¾Ê°í ¹«´ÜÀ¸·Î ¼öÁ¤, »èÁ¦Çϰųª ¹èÆ÷ ÇÒ ¼ö ¾ø½À´Ï´Ù.

 

 

IMU AHRS 10DOF Dragon ¸Þ´º¾ó


 
* Update history

- 2012.10.31 : Ãʱâ Release




 
1. IMU AHRS 10DOF Dragon »ç¿ëÀÚ °¡À̵å
1.1 Á¦Ç°»ç¾ç
1.2 ±âº» »ç¿ë¹ý
1.2.1 PC¿Í RS232 or USB Åë½Å
1.2.2 AVR, STM32 µîÀÇ °³¹ßº¸µå¿Í TTL Åë½Å
1.2.3 PC¿ë ÇÁ·Î±×·¥°ú ¿¬°á Å×½ºÆ®
1.2.4 PC¿ë ÇÁ·Î±×·¥ ¼³¸í
1.2.5 Á¦Ç° Calibration
1.3 µ¥ÀÌÅÍ Åë½Å ÆÐŶ »ç¾ç
1.3.1 Rx Packets
1.3.2 Tx Packets



 
1. IMU AHRS 10DOF Dragon »ç¿ëÀÚ °¡À̵å
1.1 Á¦Ç°»ç¾ç


(1) AHRS(Attitude Heading Reference System) ·Î¼­ ÀÚÀÌ·Î, °¡¼Óµµ, ÁöÀڱ⠼¾¼­¸¦ ÀÌ¿ëÇؼ­ ÀÚ¼¼¸¦ ÃøÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
(2) IMU(Inertial Measurement Unit) ·Î¼­ °¡¼Óµµ°è¿Í ÀÚÀ̷ΰè, ¹æÀ§°¢À» ÃøÁ¤ÇÒ ¼ö ÀÖ´Â ÁöÀڱ⠼¾¼­°¡ ÇϳªÀÇ ¸ðµâ·Î ÅëÇÕ µÇ¾ú½À´Ï´Ù.
(3) ¾Ð·Â¼¾¼­, °íµµ¼¾¼­, ¿Âµµ¼¾¼­ÀÇ Raw µ¥ÀÌÅ͸¦ Ãß°¡·Î Á¦°ø ÇÕ´Ï´Ù.
(4) STM32 Cortex-M3 °í¼Ó CPU¸¦ »ç¿ëÇÏ¿© ¼¾¼­µéÀÇ µ¥ÀÌÅ͸¦ ºü¸£°Ô ó¸® ÇÏ¿´½À´Ï´Ù.
(5) °³¹ßÀ» ºü¸£°Ô ÇÒ ¼ö ÀÖµµ·Ï PC¿ë Microsoft Visual C# ÇÁ·Î±×·¥ Ŭ¶óÀ̾ðÆ® ¼Ò½º ÄÚµå Àüü¸¦ Á¦°øÇØ µå¸³´Ï´Ù.

Á¦Ç° »ç¾ç
CPU Cortex-M3 32bit  STM32F103T8
»ç¿ë Àü¿ø 5.0 ~ 7.0V
¼Ò¸ð Àü·ù 40mA@5.0V
Weight 12g
PCB Size(W x H) 37 x 20 mm
¸ðµâ Àüü »çÀÌÁî (W x H x D)  
Temperature range -10 ~ 60C
PC Interface UART(TTL) : PC¿ë ÇÁ·Î±×·¥ ¼Ò½ºÄÚµå Á¦°ø( ±×·¡ÇÁ, DirectX 3D ÇÁ·Î±×·¥ Æ÷ÇÔ)

¼¾¼­ »ç¾ç Gyroscope(MPU6050) Accelerometer(MPU6050) Magnetic(HMC5883L) Pressure(BMP085)
Interface I2C interface I2C interface I2C interface I2C interface
Startup 100 ms 100 ms 50 ms 10 ms
Max range ¡¾2000 d/s ¡¾16G ¡¾8 Gaussian 300 ~ 1100 hPa
Min range ¡¾250 d/s ¡¾2G ¡¾1 Gaussian 300 ~ 1100 hPa
Resolution(Max) 16.4 LSB/(degree/s) 2048 LSB/(degree/s) 4.35 milli-gauss 0.01 hPa
Resolution(Min) 131 LSB/(degree/s) 16384 LSB/(degree/s) 0.73 milli-gauss 0.01 hPa
Update rate 4 ~ 8000 hz 4 ~ 1000 hz 0.75 ~ 75 hz 4.5 ~ 25.5 ms


stm32f4



stm32f4

1.2 ±âº» »ç¿ë¹ý
1.2.1 PC¿Í RS232 or USB Åë½Å
(1) PC¿Í RS232 Åë½Å

µ¥½ºÅ©Å¾ PCµîÀÇ COM Æ÷Æ®¿Í ¹Ù·Î RS232 Åë½ÅÀ» ÇÒ ¼ö´Â ¾ø½À´Ï´Ù.
PCÀÇ PRS232 ½ÅÈ£ ·¹º§À» TTL ·¹º§·Î º¯È¯ÇØ ÁÖ´Â RS232 to TTL( Á¦Ç° ¸µÅ© ) Á¦Ç° µîÀÇ º¯È¯ Á¦Ç°µîÀ» »ç¿ëÇؼ­ ¿¬°á ÇØ¾ß ÇÕ´Ï´Ù.

stm32f4

(2) PC¿Í USB Åë½Å

PC¿¡ COMÆ÷Æ®(RS232) °¡ ¾ø´Â °æ¿ì¿¡´Â USB to TTL( Á¦Ç°¸µÅ©) Á¦Ç°µîÀ» ÀÌ¿ëÇؼ­ ¿¬°á ÇÒ ¼ö ÀÖ½À´Ï´Ù.

stm32f4


1.2.2 AVR, STM32 µîÀÇ °³¹ßº¸µå¿Í TTL Åë½Å

(1) STM32 Rabbit CPU¸ðµâ°ú ¿¬°á ¿¹Á¦

stm32f4

(2) ATMEGA128 Rabbit CPU ¸ðµâ°ú ¿¬°á ¿¹Á¦

stm32f4

1.2.3 PC¿ë ÇÁ·Î±×·¥°ú ¿¬°á Å×½ºÆ®
COM Æ÷Æ®°¡ ¾ø´Â ³ëÆ®ºÏ¿¡¼­ USB to TTL Àåºñ¸¦ ÀÌ¿ëÇؼ­ IMU AHRS 10DOF Dragon Á¦Ç°°ú PC¸¦ ¿¬°áÇؼ­ »ç¿ëÇØ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.
USB to TTL Àåºñ´Â JKÀüÀÚÀÇ USB to TTL for Rabbit °³¹ßº¸µå Á¦Ç°À» ÀÌ¿ë ÇÏ¿´½À´Ï´Ù.
Âü°í·Î PC¿ë Å×½ºÆ® ÇÁ·Î±×·¥Àº Microsoft Visual C# 2010 ¿¡¼­ °³¹ß µÇ¾ú½À´Ï´Ù.

(1) USB to TTL PC¿ë USB µå¶óÀ̹ö ¼³Ä¡
¸®ÀÇ ÀåÄ¡ °ü¸®ÀÚ¿¡¼­ "Prolific USB-to-Serial Bridge(COMx)" °¡ Ãß°¡µÈ °ÍÀ» È®ÀÎ ÇÕ´Ï´Ù. COMÆ÷Æ®´Â PC¿¡ µû¶ó¼­ ´Þ¶ó Áú ¼ö ÀÖ½À´Ï´Ù.
(2) DirectX 9.0 ¼³Ä¡ : Á¦Ç°°ú ÇÔ²² Á¦°øµÇ´Â CDÀÇ /tools/directx/DirectX9-KB819696-x86-KOR.exe ¸¦ ¼³Ä¡ ÇÕ´Ï´Ù.
(3) Microsoft .Netframework 3.5 ¼³Ä¡ : Á¦Ç°°ú ÇÔ²² Á¦°øµÇ´Â CDÀÇ /tools/framework/dotNetFx35setup.exe ¸¦ ¼³Ä¡ ÇÕ´Ï´Ù.
(4) CDÀÇ /ahrs/AHRSInterface.exe¸¦ ½ÇÇà ÇÕ´Ï´Ù.

stm32f4

(5) À§ÀÇ ±×¸²¿¡¼­ ºÓÀº»ö ¿øÀ¸·Î Ç¥½ÃµÈ üũ ¾ÆÀÌÄÜÀ» Ŭ¸¯Çؼ­ AHRS Á¦Ç°°ú Åë½ÅÀ» ¿¬°á ÇÕ´Ï´Ù. ¹Ýµå½Ã ÇÁ·Î±×·¥ÀÇ COMÆ÷Æ®¿Í ÀåÄ¡°ü¸®ÀÚÀÇ COMÆ÷Æ®¸¦ È®ÀÎ ÇÏ½Ã°í ¿¬°á ÇϽñ⠹ٶø´Ï´Ù.
(6) ¿¬°áÀÌ ¼º°øÀûÀ̶ó¸é ¾Æ·¡ÀÇ µ¿¿µ»ó ±×¸²°ú °°ÀÌ AHRS Á¦Ç°À» Å×½ºÆ® ÇØ º¼ ¼ö ÀÖ½À´Ï´Ù.
(7) ±×·¡ÇÁ¸¦ ÀÌ¿ëÇÑ µ¥ÀÌÅÍ È®ÀÎ

stm32f4

Menu/Dialog/Config ¸Þ´ºÀ» ½ÇÇà ÇÕ´Ï´Ù.

stm32f4

1.2.4 PC¿ë ÇÁ·Î±×·¥ ¼³¸í

(1) µ¿ÀÛ ¸ðµå
- Broadcast Mode : Frequency ¼³Á¤¿¡ µû¶ó¼­ Active Channels ¿¡ üũµÈ µ¥ÀÌÅÍ ÆÐŶÀ» Àü¼Û ÇÕ´Ï´Ù.
- Listen Mode : µ¥ÀÌÅÍ ¿äûÀÌ ÀÖÀ» °æ¿ì¿¡¸¸ µ¥ÀÌÅÍ ÆÐŶÀ» Àü¼Û ÇÕ´Ï´Ù.
(2) RAM Commit : PC¿ë Å×½ºÆ® ÇÁ·Î±×·¥¿¡¼­ º¯°æµÈ ³»¿ëÀ» AHRS Á¦Ç°ÀÇ RAM¿¡¸¸ ÀϽÃÀûÀ¸·Î ÀúÀå ÇÕ´Ï´Ù. Á¦Ç°À» ´Ù½Ã ºÎÆÃÇÏ¸é ¼³Á¤ °ªÀº »ç¶ó Áý´Ï´Ù.
(3) FLASH Commit : RAM CommitÀ» ÇÑÈÄ¿¡ FLASH CommitÀ» Çϸé RAM»ó¿¡ ÀÖ´ø ¼³Á¤ °ªµéÀÌ Á¦Ç°ÀÇ Flash(ROM) ¿¡ ¿µ±¸È÷ ÀúÀå µË´Ï´Ù.
(4) Reset to factory : Á¦Ç°À» ÃâÇÏ »óÅ·Π¼³Á¤ ÇÕ´Ï´Ù.
(5) Sync : µ¥ÀÌÅ͵éÀ» Àç ¿äû ÇÕ´Ï´Ù.
(6) Refresh : ¸ðµå°¡ Listen Mode ÀÏ °æ¿ì¿¡ µ¥ÀÌÅ͸¦ ¿äûÇÕ´Ï´Ù.
(7) Active Channels : ¿øÇÏ´Â µ¥ÀÌÅÍ ÆÐŶÀ» ¹Þ¾Æ º¼ ¼ö ÀÖ½À´Ï´Ù. üũ°¡ ÇØÁ¦µÈ µ¥ÀÌÅ͵éÀº ´õÀÌ»ó Àü¼ÛÀ» ÇÏÁö ¾Ê½À´Ï´Ù.

1.2.5 Á¦Ç° Calibration

stm32f4

Bias °ªÀ» "0" ÀÌ ¾Æ´Ñ °ªÀ¸·Î ¼³Á¤Çϸé Data = Raw Data - Bias Çؼ­ °è»êÀ» ÇÏ°Ô µË´Ï´Ù. Á¤È®ÇÑ Bias °ªÀÌ ¾Æ´Ï¶ó¸é Ç×»ó "0" À¸·Î ¼³Á¤Çؼ­ »ç¿ëÇϽñ⠹ٶø´Ï´Ù.

(1) Gyro Bias : Data = Gyro Data - Gyro Bias
(2) Accel Bias : Data = Accel Data - Accel Bias
(3) Mag Bias : Data = Mag Data - Mag Bias
(4) Gyro Scale Factors : Data = Gyro Data * Gyro Scale Factors

1.3 µ¥ÀÌÅÍ Åë½Å ÆÐŶ »ç¾ç
1.3.1 Rx Packets
RX Packets Àº IMU AHRS 10DOF Dragon Á¦Ç°ÀÌ ¼ö½ÅÇÏ´Â µ¥ÀÌÅÍ ÀÔ´Ï´Ù. °¢°¢ÀÇ ÆÐŶÀº ¹Ýµå½Ã "snp" byte ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. ÆÐŶÀÇ 4¹øÀç ¹ÙÀÌÆ®´Â Type indicator (PT) ¹ÙÀÌÆ®ÀÌ°í, 5¹ø° ¹ÙÀÌÆ® "N"
Àº Àüü ÆÐŶÀÇ ±æÀÌ ÀÔ´Ï´Ù. ±×¸®°í ÆÐŶÀÇ ¸¶Áö¸· 2°³ÀÌ ¹ÙÀÌÆ®´Â Àüü ÆÐŶÀÌ Checksum °ªÀÔ´Ï´Ù. Checksum °ªÀº Àüü ÆÐŶÀÇ ÇÕÀÔ´Ï´Ù.

- RX Packet Structure

Function 's' 'n' 'p' PT N d1 ... d+N Checksum
Byte 1 2 3 4 5 6 ... N+5 N+6 N+7

- RX Packet Description

Byte ¼ø¼­ RX Packet Description
1-3 ÆÐŶÀÇ ½ÃÀÛÀ» ¾Ë¸®´Â µ¥ÀÌÅÍ·Î Ç×»ó "snp" 3°³ÀÇ character°¡ ¸ÕÀú ¿Í¾ß ÇÕ´Ï´Ù.
4 PT : ÆÐŶÀÇ Á¾·ù( Packet Type )
5 N : Àüü ÆÐŶÀ¸ ±æÀÌ
6 ~ N+5 d2 ~ dN : ÆÐŶ¾ÈÀÇ Data byte
N+6 ~ N+7 Checksum : Àüü ÆÐŶÀÇ checksum value ·Î Ç×»ó ¸¶Áö¸· 2Byte¸¦ Â÷Áö

¸¸¾à ¸¶Áö¸· 2Byte(checksum) °ªÀÌ ¸ÂÁö ¾Ê´Â ´Ù¸é BAD_CHECKSUM packet ÀÌ ¹ß»ý ÇÕ´Ï´Ù.

- RX Packet Overview

PT Packet Name Description
0x80 SET_ACTIVE_CHANNELS UART¸¦ ÅëÇؼ­ Àü¼ÛÇÒ µ¥ÀÌÅ͸¦ ¼³Á¤ ÇÕ´Ï´Ù.
0x81 SET_SILENT_MODE GET_DATA ÆÐŶÀ» ÅëÇؼ­ DATA ¿äûÀÌ ÀÖÀ» °æ¿ì¿¡¸¸ ¼¾¼­ DATA¸¦ Àü¼Û ÇÕ´Ï´Ù.
0x82 SET_BROADCAST_MODE GET_DATA Àü¼Û ¿äûÀÌ ¾ø¾îµµ ¼¾¼­ µ¥ÀÌÅ͵éÀ» ÁÖ±âÀûÀ¸·Î(¼³Á¤µÈ Àü¼Û¼Óµµ¿¡ ¸ÂÃ߾) Àü¼Û ÇÕ´Ï´Ù.
0x83 SET_ACCEL_GYRO_OFFSET_ZERO °¡¼Óµµ¿Í ÀÚÀÌ·Î ¼¾¼­ÀÇ OffsetÀ» 0À¸·Î ¼³Á¤ ÇÕ´Ï´Ù.
0x84 SET_MAG_OFFSET_ZERO ÁöÀڱ⠼¾¼­ÀÇ OffsetÀ» 0À¸·Î ¼³Á¤ ÇÕ´Ï´Ù.
0x85 SET_GYRO_SCALE ÀÚÀÌ·Î ¼¾¼­ÀÇ scale factor ¸¦ ¼³Á¤ ÇÕ´Ï´Ù.
0x86 RESET_TO_FACTORY Á¦Ç°ÀÇ ¼³Á¤°ªµéÀ» °øÀå ÃʱâÈ­ »óÅ·ΠÇÕ´Ï´Ù.
0x87 SET_GYRO_BIAS ÀÚÀÌ·Î ¼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.
0x88 SET_ACCEL_BIAS °¡¼Óµµ ¼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.
0x89 SET_MAG_BIAS ÁöÀڱ⠼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.
0xA0 WRITE_TO_FLASH ¼³Á¤°ªµéÀ» Flash ¸Þ¸ð¸®¿¡ ¿µ±¸È÷ ÀúÀå ÇÕ´Ï´Ù.
0x01 GET_DATA ¼¾¼­µéÀÇ µ¥ÀÌÅ͸¦ ¿äû ÇÕ´Ï´Ù.
0x02 GET_ACTIVE_CHANNELS Active ä³ÎµéÀÇ ¼³Á¤ °ªµéÀ» Report ÇÕ´Ï´Ù.
0x03 GET_BROADCAST_MODE Broadcast ¸ðµå ¿©ºÎ¸¦ Report ÇÕ´Ï´Ù.
0x04 GET_GYRO_SCALE ÀÚÀÌ·Î ¼¾¼­ÀÇ scale factor¸¦ Report ÇÕ´Ï´Ù.
0x05 GET_ACCEL_BIAS °¡¼Óµµ ¼¾¼­ÀÇ Bias °ªÀ» Report ÇÕ´Ï´Ù.
0x06 GET_GYRO_BIAS ÀÚÀÌ·Î ¼¾¼­ÀÇ Bias °ªÀ» Report ÇÕ´Ï´Ù.
0x07 GET_MAG_BIAS ÁöÀڱ⠼¾¼­ÀÇ Bias °ªÀ» Report ÇÕ´Ï´Ù.

- Active Channel : 15°¡Áö ¼¾¼­µ¥ÀÌÅ͵éÀÇ Á¾·ù¸¦ ¸»Çϸç SET_ACTIVE_CHANNELS ¿¡ ÀÇÇؼ­ Report(UART¸¦ ÅëÇؼ­ µ¥ÀÌÅÍ Àü¼Û) ÇÒÁö ¿©ºÎ¸¦ °áÁ¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

(1) SET_ACTIVE_CHANNELS
Active Channel À» ¼³Á¤ ÇÕ´Ï´Ù. Active Channel ¿¡ ÀÇÇؼ­ ¼³Á¤µÈ µ¥ÀÌÅ͸¸À» Report ÇÕ´Ï´Ù. ¸¸¾à Active Channel ¿¡¼­ yaw¸¦ üũ ÇÏÁö ¾Ê¾Ò´Ù¸é Report µÇÁö ¾Ê½À´Ï´Ù.

- Packet Type = 0x80
- Data Length = 2

D1 D2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
yaw pitch roll temp press altitude mx my mz gx gy gz ax ay az 0

yaw = yaw angle estimate
pitch = pitch angle estimate
roll = roll angle estimate
temperature = temperature data
pressure = pressure data
altitude = altitude data
mx = magnetometer x-axis data
my = magnetometer y-axis data
mz = magnetometer z-axis data
gx = gyro x-axis data
gy = gyro y-axis data
gz = gyro z-axis data
ax = accel x-axis data
ay = accel y-axis data
az = accel z-axis data

(2) SET_SILENT_MODE
GET_DATA ÆÐŶÀ» ÅëÇؼ­ DATA ¿äûÀÌ ÀÖÀ» °æ¿ì¿¡¸¸ ¼¾¼­ DATA¸¦ Àü¼Û ÇÕ´Ï´Ù.

- Packet Type = 0x81
- Data Length = 0

µ¥ÀÌÅÍ°¡ Æ÷ÇԵǾî ÀÖÁö ¾Ê½À´Ï´Ù. Data LengthÀÇ ±æÀÌ¿Í checksum ÀÇ ±æÀÌ´Â °°½À´Ï´Ù. ±×·¯¹Ç·Î Àüü ÆÐŶÀÇ ±æÀÌ´Â 7ÀÔ´Ï´Ù.

Function 's' 'n' 'p' PT N Checksum
Byte 1 2 3 4 5 N+6 N+7

(3) SET_BROADCAST_MODE
GET_DATA Àü¼Û ¿äûÀÌ ¾ø¾îµµ ¼¾¼­ µ¥ÀÌÅ͵éÀ» ÁÖ±âÀûÀ¸·Î(¼³Á¤µÈ Àü¼Û¼Óµµ¿¡ ¸ÂÃ߾) Àü¼Û ÇÕ´Ï´Ù.

- Packet Type = 0x82
- Data Length = 1

D1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
transmite rate

The broadcast frequency is given by f = ((280/255)*transmite rate + 20) Hz
0(20Hz) <= transmite rate <= 255(300Hz)

(4) SET_ACCEL_GYRO_OFFSET_ZERO
°¡¼Óµµ¿Í ÀÚÀÌ·Î ¼¾¼­ÀÇ OffsetÀ» 0À¸·Î ¼³Á¤ ÇÕ´Ï´Ù.

- Packet Type = 0x83
- Data Length = 0

(5) SET_MAG_OFFSET_ZERO
ÁöÀڱ⠼¾¼­ÀÇ OffsetÀ» 0À¸·Î ¼³Á¤ ÇÕ´Ï´Ù.

- Packet Type = 0x84
- Data Length = 0

(6) SET_GYRO_SCALE
ÀÚÀÌ·Î ¼¾¼­ÀÇ scale factor ¸¦ ¼³Á¤ ÇÕ´Ï´Ù. Scale data ´Â 32-bit floating-point value ÀÔ´Ï´Ù.

- Packet Type = 0x85
- Data Length = 12

D1-D4 D5-D8 D9-D12
Z gyro scale Y gyro scale X gyro scale


(7) RESET_TO_FACTORY
Á¦Ç°ÀÇ ¼³Á¤°ªµéÀ» °øÀå ÃʱâÈ­ »óÅ·ΠÇÕ´Ï´Ù. ÀÌ ¸í·ÉÀº ÃʱâÈ­ »óÅ·Πµ¹¸®±â´Â ÇÏÁö¸¸ RAM»ó¿¡¸¸ ¹Ý¿µÀÌ µË´Ï´Ù. ¿µ±¸ ÀûÀ¸·Î ¼³Á¤À» Àû¿ëÀ» ÇÏ·Á¸é WRITE_TO_FLASH ÆÐŶÀ» Ãß°¡·Î Àü¼ÛÇØ¾ß ÇÕ´Ï´Ù.

- Packet Type = 0x86
- Data Length = 0

(8) SET_GYRO_BIAS
ÀÚÀÌ·Î ¼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.

- Packet Type = 0x87
- Data Length = 6

D1 D2 D3 D4 D5 D6
Z gyro bias Y gyro bias X gyro bias

(4) SET_ACCEL_BIAS
°¡¼Óµµ ¼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.

- Packet Type = 0x88
- Data Length = 6

D1 D2 D3 D4 D5 D6
Z accel bias Y accel bias X accel bias


(4) SET_MAG_BIAS
ÁöÀڱ⠼¾¼­ÀÇ Bias °ªÀ» ¼³Á¤ ÇÕ´Ï´Ù.

- Packet Type = 0x89
- Data Length = 6

D1 D2 D3 D4 D5 D6
Z mag bias Y mag bias X mag bias

(4) WRITE_TO_FLASH
¼³Á¤°ªµéÀ» Flash ¸Þ¸ð¸®¿¡ ¿µ±¸È÷ ÀúÀå ÇÕ´Ï´Ù.

- Packet Type = 0xA0
- Data Length = 0

(4) GET_DATA
¼¾¼­µéÀÇ µ¥ÀÌÅÍ ¿äûÀ» ¹ÞÀ¸¸é SENSOR_DATA ¿¡ ÀÇÇؼ­ ¼¾¼­µéÀÇ µ¥ÀÌÅ͸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0x01
- Data Length = 0

(4) GET_ACTIVE_CHANNELS
Active ä³ÎµéÀÇ ¼³Á¤ °ªµéÀ» ACTIVE_CHANNEL_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x02
- Data Length = 0

(4) GET_BROADCAST_MODE
Broadcast ¸ðµå ¿©ºÎ¸¦ BROADCAST_MODE_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x03
- Data Length = 0

(4) GET_GYRO_SCALE
ÀÚÀÌ·Î ¼¾¼­ÀÇ scale factor¸¦ GYRO_SCALE_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x04
- Data Length = 0

(4) GET_ACCEL_BIAS
°¡¼Óµµ ¼¾¼­ÀÇ Bias °ªÀ» ACCEL_BIAS_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x05
- Data Length = 0

(4) GET_GYRO_BIAS
ÀÚÀÌ·Î ¼¾¼­ÀÇ Bias °ªÀ» GYRO_BIAS_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x06
- Data Length = 0

(4) GET_MAG_BIAS
ÁöÀڱ⠼¾¼­ÀÇ Bias °ªÀ» MAG_BIAS_REPORT ¿¡ ÀÇÇؼ­ Report ÇÕ´Ï´Ù.

- Packet Type = 0x07
- Data Length = 0

1.3.2 Tx Packets

TX Packets Àº IMU AHRS 10DOF Dragon Á¦Ç°¿¡¼­ UART¸¦ ÅëÇؼ­ Àü¼ÛÇÏ´Â µ¥ÀÌÅÍ ÀÔ´Ï´Ù. °¢°¢ÀÇ ÆÐŶÀº ¹Ýµå½Ã RX ÆÐŶ°ú ¸¶Âù°¡Áö·Î "snp" byte ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. ÆÐŶÀÇ 4¹øÀç ¹ÙÀÌÆ®´Â Type indicator (PT) ¹ÙÀÌÆ®ÀÌ°í, 5¹ø° ¹ÙÀÌÆ® "N" Àº Àüü ÆÐŶÀÇ ±æÀÌ ÀÔ´Ï´Ù. ±×¸®°í ÆÐŶÀÇ ¸¶Áö¸· 2°³ÀÌ ¹ÙÀÌÆ®´Â Àüü ÆÐŶÀÌ Checksum °ªÀÔ´Ï´Ù. Checksum °ªÀº Àüü ÆÐŶÀÇ ÇÕÀÔ´Ï´Ù.

- TX Packet Structure

Function 's' 'n' 'p' PT N d1 ... d+N Checksum
Byte 1 2 3 4 5 6 ... N+5 N+6 N+7

- TX Packet Description

Byte ¼ø¼­ RX Packet Description
1-3 ÆÐŶÀÇ ½ÃÀÛÀ» ¾Ë¸®´Â µ¥ÀÌÅÍ·Î Ç×»ó "snp" 3°³ÀÇ character°¡ ¸ÕÀú ¿Í¾ß ÇÕ´Ï´Ù.
4 PT : ÆÐŶÀÇ Á¾·ù( Packet Type )
5 N : Àüü ÆÐŶÀ¸ ±æÀÌ
6 ~ N+5 d2 ~ dN : ÆÐŶ¾ÈÀÇ Data byte
N+6 ~ N+7 Checksum : Àüü ÆÐŶÀÇ checksum value ·Î Ç×»ó ¸¶Áö¸· 2Byte¸¦ Â÷Áö

¸¸¾à ¸¶Áö¸· 2Byte(checksum) °ªÀÌ ¸ÂÁö ¾Ê´Â ´Ù¸é BAD_CHECKSUM packet ÀÌ ¹ß»ý ÇÕ´Ï´Ù.

- TX Packet Overview

PT Packet Name Description
0xB0 COMMAND_COMPLETE RX ÆÐŶ¿¡ ÀÇÇؼ­ ¿äûÇÑ ³»¿ëµéÀ» ¼º°øÀûÀ¸·Î ¿Ï·á ÇÏ¿´À» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.
0xB1 COMMAND_FAILED RX ÆÐŶ¿¡ ÀÇÇؼ­ ¿äûÇÑ ³»¿ëµéÀ» ¼º°øÀûÀ¸·Î ¿Ï·á ÇÏÁö ¸øÇßÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.
0xB2 BAD_CHECKSUM Checksum °ªÀÌ ¸ÂÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.
0xB3 BAD_DATA_LENGTH ¿äûÇÑ µ¥ÀÌÅÍÀÇ ±æÀÌ°¡ ¸ÂÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.
0xB4 UNRECOGNIZED_PACKET ÀÏÄ¡ÇÏ´Â Packet Type ÀÌ ¾øÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.
0xB5 BUFFER_OVERFLOW Á¦Ç° ÀÚüÀÇ packet buffer ¿¡·¯ ÀÔ´Ï´Ù.
0xB6 STATUS_REPORT Á¦Ç°ÀÇ »óŸ¦ Report ÇÕ´Ï´Ù.
0xB7 SENSOR_DATA GET_DATA ÆÐŶ ¿äû¿¡ ÀÇÇÑ ¼¾¼­µéÀÇ µ¥ÀÌÅ͸¦ Report ÇÕ´Ï´Ù.
0xB8 ACTIVE_CHANNEL_REPORT GET_ACTIVE_CHANNELS ¸í·É¿¡ ´ëÇÑ ÀÀ´äÀ¸·Î ÇöÀç ¼³Á¤µÈ °¢ ChannelµéÀ» Report ÇÕ´Ï´Ù.
0xB9 GYRO_SCALE_REPORT GET_GYRO_SCALE ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.
0xBA BROADCAST_MODE_REPORT GET_BROADCAST_MODE ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.
0xBB GYRO_BIAS_REPORT GET_GYRO_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.
0xBC ACCEL_BIAS_REPORT GET_ACCEL_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.
0xBD MAG_BIAS_REPORT GET_MAG_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

(1) COMMAND_COMPLETE
RX ÆÐŶ¿¡ ÀÇÇؼ­ ¿äûÇÑ ³»¿ëµéÀ» ¼º°øÀûÀ¸·Î ¿Ï·á ÇÏ¿´À» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB0
- Data Length = 1

D1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Packet Type (TP) identifier for executed command

(2) COMMAND_FAILED
RX ÆÐŶ¿¡ ÀÇÇؼ­ ¿äûÇÑ ³»¿ëµéÀ» ¼º°øÀûÀ¸·Î ¿Ï·á ÇÏ¿´À» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB1
- Data Length = 1

D1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Packet Type (TP) identifier for command that could not be executed

(3) BAD_CHECKSUM
Checksum °ªÀÌ ¸ÂÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB2
- Data Length = 0


(4) BAD_DATA_LENGTH
¿äûÇÑ µ¥ÀÌÅÍÀÇ ±æÀÌ°¡ ¸ÂÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB3
- Data Length = 1

D1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Packet Type (TP) identifier of the received packet

(5) UNRECOGNIZED_PACKET
ÀÏÄ¡ÇÏ´Â Packet Type ÀÌ ¾øÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB4
- Data Length = 1

D1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Packet Type (TP) identifier of unrecognized command

(6) BUFFER_OVERFLOW
Á¦Ç° ÀÚüÀÇ packet buffer ¿¡·¯ ÀÔ´Ï´Ù.

- Packet Type = 0xB5
- Data Length = 0

(7) STATUS_REPORT
Á¦Ç°ÀÇ »óŸ¦ Report ÇÕ´Ï´Ù. - ¹Ì ±¸ÇöµÈ ¸í·É¾î ÀÔ´Ï´Ù.

- Packet Type = 0xB6
- Data Length = 1

(8) SENSOR_DATA
ÀÏÄ¡ÇÏ´Â Packet Type ÀÌ ¾øÀ» °æ¿ì¿¡ ¹ß»ý ÇÕ´Ï´Ù.

- Packet Type = 0xB7
- Data Length = 2 + 2*(# of active channels)

D1 D2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
yaw pitch roll temp press altitude mx my mz gx gy gz ax ay az 0

yaw = if yaw channel is active then yaw angle estimate, otherwire 0
pitch = if pitch channel is pitch angle then estimate , otherwire 0
roll = if roll channel is active then roll angle estimate , otherwire 0
temperature = if temperature channel is active then temperature data , otherwire 0
pressure = if pressure channel is active then pressure data , otherwire 0
altitude = if altitude channel is active then altitude data , otherwire 0
mx = if max-x channel is active then magnetometer x-axis data , otherwire 0
my = if may-y channel is active then magnetometer y-axis data , otherwire 0
mz = if may-z channel is active then magnetometer z-axis data , otherwire 0
gx = if gyro-x channel is active then gyro x-axis data , otherwire 0
gy = if gyro-y channel is active then gyro y-axis data , otherwire 0
gz = if gyro-z channel is active then gyro z-axis data , otherwire 0
ax = if accel-x channel is active then accel x-axis data , otherwire 0
ay = if accel-y channel is active then accel y-axis data , otherwire 0
az = if accel-z channel is active then accel z-axis data, otherwire 0

(9) ACTIVE_CHANNEL_REPORT
GET_ACTIVE_CHANNELS ¸í·É¿¡ ´ëÇÑ ÀÀ´äÀ¸·Î ÇöÀç ¼³Á¤µÈ °¢ ChannelµéÀ» Report ÇÕ´Ï´Ù.

- Packet Type = 0xB8
- Data Length = 2

D1 D2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
yaw pitch roll temp press altitude mx my mz gx gy gz ax ay az 0

7¹øÀç ºñÆ®ÀÎ bit7 ÀÇ °ª(yaw) ÀÌ "0" À̸é not active channel ÀÌ°í "1" À̸é active channel ÀÌ µÇ¾î¼­ SENSOR_DATA ÆÐŶ¿¡ Report(Ãâ·Â) µË´Ï´Ù.
active channel ÀÌ "0" ÀÌ ºñÆ®µéÀÇ ¼¾¼­ µ¥ÀÌÅ͵éÀº SENSOR_DATA ÆÐŶ¿¡ Ãâ·ÂÀÌ "0" À¸·Î µË´Ï´Ù.

yaw = yaw angle estimate
pitch = pitch angle estimate
roll = roll angle estimate
temperature = temperature data
pressure = pressure data
altitude = altitude data
mx = magnetometer x-axis data
my = magnetometer y-axis data
mz = magnetometer z-axis data
gx = gyro x-axis data
gy = gyro y-axis data
gz = gyro z-axis data
ax = accel x-axis data
ay = accel y-axis data
az = accel z-axis data

(10) GYRO_SCALE_REPORT
GET_GYRO_SCALE ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0xB9
- Data Length = 12

D1-D4 D5-D8 D9-D12
Z gyro scale Y gyro scale X gyro scale

(10) BROADCAST_MODE_REPORT
GET_BROADCAST_MODE ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0xBA
- Data Length = 2

D1 D2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
transmite rate NA NA NA NA NA NA NA mode

The broadcast frequency is given by f = ((280/255)*transmite rate + 20) Hz
0(20Hz) <= transmite rate <= 255(300Hz)

If mode = 1, then the AHRS is in Broadcast Mode.
If mode = 0, then the AHRS is in Silent Mode.

(11) GYRO_BIAS_REPORT
GET_GYRO_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0xBB
- Data Length = 6

D1-D2 D3-D4 D5-D6
gyro_z bias gyro_y bias gyro_x bias

(12) ACCEL_BIAS_REPORT
GET_ACCEL_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0xBC
- Data Length = 6

D1-D2 D3-D4 D5-D6
accel_z bias accel_y bias accel_x bias

(13) MAG_BIAS_REPORT
GET_MAG_BIAS ¸í·É¿¡ ´ëÇÑ Response¸¦ Report ÇÕ´Ï´Ù.

- Packet Type = 0xBD
- Data Length = 6

D1-D2 D3-D4 D5-D6
mag_z bias mag_y bias mag_x bias