Вы находитесь на странице: 1из 13

[Type the company name]

Contents
High-Level System Architecture................................................................................. 3
Overview................................................................................................................. 3
Communication Protocol............................................................................................. 5
Communication Functions....................................................................................... 5
Communication Methods......................................................................................... 5
Communication Design Decisions........................................................................... 6
Communication Method....................................................................................... 6
Communication Syntax........................................................................................... 7
References................................................................................................................ 10

Page 1 of 13
Document Control

Date Actor Action Remarks


Dec 2011 M.S.Hefny Created
June 2012 M.S.Hefny Updated Communication
Protocols

Page 2 of 13
High-Level System Architecture

Overview

The system mainly consists of two parts; On-Land hardware and On-Plane hardware.

On-Land hardware consists of:

Ordinary Remote-Control: used for taking off and landing.


Laptop/tablet : this system is used for:
- Design navigation path and upload it to the plane.
- Download recorded video from plane.
- Monitoring plane status in real time as long as plane is
reachable.

On-Vehicle hardware consists of:

Mobile device: this can be seen as an integrated circuit that contains GPS,
Accelerometer, Gyro, Temperature-sensor, speaker, camera & touch
screen. In addition to ability to connect using GPRS & Wi-Fi.

Page 3 of 13
IOIO: is the input output board that can be considered as mobile extension
I/O ports. IOIO is mainly used to control servo motors and read external
sensors - if needed.
Switch: this is a simple hardware that enables RC-receiver to take control
of servo motors from mobile. It is activated via RC-AUX channel.
RC-Receiver: This is an ordinary receiver that communicates with On-Land
remote control.

Communication:

Communication uses both Remote-Control channels for relatively long range


control 1Km. Laptop communicates with mobile using Wi-Fi connection provides a
very short range typically 100m, there is another way for communicating with plane
which is using GPRS.

Page 4 of 13
Communication Protocol

This chapter discusses system communication, alternatives and approach.

Communication Functions

Both Laptop and a remote control need to access plane. Laptop


communication should be able make use of available laptop communication
methods i.e. Wi-Fi , Bluetooth etc.- and needs a bi-directional channels in order to
program plane and retrieve information about plane status and stored materials.
Remote control is used by human to manually control plane using accurate
joysticks; it needs a reliable connection with minimum latency to ensure fast
response.

Communication Methods

In table below we can find pros and cons of different communication methods
available for hardware used in this system.

Communication
Pros Cons
Method
R/C Spread Reliable communication One-Direction
Spectrum method. communication from
Fastest response time remote to planes
among all other methods. receiver.
Not suitable for very long
ranges.
Wifi Two-way communication. Short range connection.
Can be used by laptop Slower response time
easily. because of packets
delay.
GPRS Two-way communication. The least reliable among
Suitable for very long other methods.
ranges. Slowest response time
because of packets
delay.

Page 5 of 13
This is another table that compares different features against available
communication methods.

Feature R/C Spread Wif GPRS


Spectrum
Reliable Best Medium Poor
Connection
Communication One Direction Bi-directional Bi-directional
Directions R/C to Plane
Range 1.5KM Below 200m Unlimited depends
on mobile
coverage
Computer Interface Feasible not direct Feasible feasible

Communication Design Decisions

Communication Method

Socket communication over Wi-Fi will be used to communicate with PC or another


Android device running a ground station application. Sockets will mainly be using
Wi-Fi, this is important especially when you want to make tethering and initialized
by your plane hence you can detect any vehicle in range.

Figure 1: Communication Protocols with Vehicle

There is currently communication channels currently implemented using IP Protocol.

1- Identification Protocol:

Page 6 of 13
Protocol is mainly a UDP broadcast of vehicle nature which is:

GUID, Name, Type

A packet is being sent continuously.

2- Sensor Protocol:
This is a UDP based protocol, it sends status of vehicle such as location info,
Gyro, Control Surface Positions Elevator, Rudder etc. Ground station
depends on this info to update displayed information for user. UDP is used
here to allow fast rate of sending data.

3- Control Protocol:

This is a TCP based protocol.

The reasons for using TCP protocol is:

a. Provide reliable connection with Plan when sending commands or


receiving certain info.
b. Ensure packets sends in order this is vital in some status such as sending
route path.

Communication Syntax

Below is current 0.1 beta syntax of Androiv protocols.

All protocols are text base protocols that use delimiters to separate different fields.

ID Protocol

Delimiter

#: used to separate parameters.

Commands

No commands here, there is only a # separated string for identification.

Name Type Description


GUID GUID
VehicleName String String name e.g.
myplane

Page 7 of 13
Type string Plane, Quad, Heli

Sensor Protocol

Delimiter

%: used to separate different sensors

#: used to separate parameters

Commands

Name Type Description


THR String const Throttle Position
Value double 0-100

Name Type Description


Elv String const Elevator Position
Value double 0-100

Name Type Description


RUD String const Rudder Position
Value double 0-100

Name Type Description


THR String const
Value double

Name Type Description


AIL String const Aileron Position
Value double 0-100

Name Type Description


ACC String const Gyro Meter
ACC_X double rad/s
ACC_Y double rad/s
ACC_Z double rad/s

Page 8 of 13
Name Type Description
MAG String const Gyro Meter
MAG_X double rad/s
MAG_Y double rad/s
MAG_Z double rad/s

Name Type Description


GYR String const Gyro Meter
Gyro_X double rad/s
Gyro_Y double rad/s
Gyro_Z double rad/s

Name Type Description


GPS String const Orientation Sensor
LNG double Heading compass
LAT double Pitch Acc + Gyro
ALT double Roll Acc + Gyro
SPD

Name Type Description


ORI String const Orientation Sensor
ORI_X double Heading compass
ORI_Y double Pitch Acc + Gyro
ORI_Z double Roll Acc + Gyro

Control Protocol

Delimiter

#: used to separate parameters

Commands

The following are SET commands, they turn different sensors on and off, they can
also turn other activities. They act as remote toggle buttons.

Name Type Description


SET_SWT String const
ACC String const Accelerometer
On/OFF string ON or OFF

Page 9 of 13
Name Type Description
SET_SWT String const
MAG String const Magnetic
On/OFF string ON or OFF

Name Type Description


SET_SWT String const
GYR String const Gyro
On/OFF string ON or OFF

Name Type Description


SET_SWT String const
GPS String const GPS
On/OFF string ON or OFF

Name Type Description


SET_SWT String const
ORI String const Orientation
On/OFF string ON or OFF

Delimiter

#: used to separate parameters

$: separates by values for the same parameter

Commands

The following are route commands used to send and update routs for vehicle.

Name Type Description


SET_ROT String const Route command
SAV String const Save route, and clear
current.
[longitude $ latitude $ $ separated string Speed is the target speed,
altitude $ speed $ max min speed is the minimum
speed $ min speed] allowed speed, maximum
speed is the maximum
allowed speed. In case
speed is not zero min
speed and max speed are

Page 10 of 13
ignored.

Example
"SET_ROT#SAV#0$31.365966796875$30.1341416247186$0$0$9999$0%1$31.3978958129883$
30.1118698492352$0$0$9999$0%2$31.3845062255859$30.0872165636535$0$0$9999$0\r\n"

Page 11 of 13
References

DX-7 Spektrum Manual


PDF manual for DX-7 R/C.
http://www.spektrumrc.com/ProdInfo/Files/DX7_Manual.pdf

IOIO
Introduction to IOIO board.
http://www.sparkfun.com/tutorials/280

Page 12 of 13

Вам также может понравиться