วันเสาร์ที่ 15 พฤศจิกายน พ.ศ. 2557

การออกเเเบบ Protocol สำหรับการใช้งาน Portable Ground Station Part I

          เนื่องจากโปรเจ็คที่ผู้เขียนกำลังทำอยู่นั้นจำเป็นต้องไปเชื่อมต่อกับ MAVlink Gateway (http://mavlink-gateway.blogspot.com/ ) เพื่อนำค่ามาเเสดงผลดังนั้นจึงต้องมีการออกเเบบ Protocol เพื่อการสื่อสารกับระหว่าง MAVlink MCU เเละ Protable Ground Station MCU โดยที่หลักการออกเเบบ Protocol ของผู้เขียนนั้นจะคำนึงถึงสิ่งต่างๆต่อไปนี้

  • หลีกเลี่ยงความยุ่งยาก
  • ออกเเบบให้ผู้รับเเละผู้ส่งเข้าใจกันง่าย 
  • ประสิทธิภาพของ Protocol 
  • การใช้งานจริง
ดังนั้นเพื่อให้การใช้ออกเเบบ Protocol เป็นไปดังข้อมูลที่ต้องการข้างบนผู้เขียนจึงได้ออกเเบบ Protocol ให้เป็น Binary Protocol เพื่อลด Overhead ของการส่งข้อมูลเเละออกเเบบ Protocol มาดังนี้


โดยที่ 
MSG TYPE is message type of protocol have 4 type  are 
  • Receive Status from MAVLINK Gateway 
  • Receive Parameter form MAVLINK Gateway
  • Send Parameter to MAVLINK Gateway 
  • Send Command to MAVLINK Gateway 

We separate ID into two part 
  • First is Status there has approximately    200 value 
  • Second is Parameter has approximately  300 value 

There are 5 type of parameter that send from MAVLINK Gateway
  • Float_32 
  • INT_32
  • INT_16 
  • Int_8
  • CHAR 16 BYTE  (Use in parameter only)

MSG has 4 type of length depend on type of protocol 
  • Integer  8 – bit
  • Integer  16 –bit
  • Integer , float 32 –bit
  • Char 16 byte  

จึงได้ออกมาเป็น Protocol ที่กว่ามาข้างต้นเเต่ทว่า Protocol ที่ออกเเบบมาข้างต้นนั้นยังมีปัญหาอยู่ศซึ่งจะเเสดงถึงปัญหาเเละวิธีเเก้ใน Blog ต่อไปครับ :D 

ไม่มีความคิดเห็น:

แสดงความคิดเห็น