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

DEPLOYING ARDUPILOT

1.1

INSTALLING ARDUPILOT
The TS40 TRAINER ca n be equipped a nd controlled also using ArduPilot. ArduPil ot is the
mos t common Open Source roboti cs controller. It is widel y used for surfa ce roboti cs
(ca r, ta nk etc), plane and also copter (quadcopter, hexa copter etc) model surveillance.
Si nce i t is open s ource, users a re allowed to develop (and recompile) by themselves the
controller softwa re suited to thei r needs .

Figure 1 1 Deploying ArduPilot APM 2.5 Board to TS40 TRAINER

The hea rt of ArduPilot is the APM Boa rd. Wi th Processor, Memory and IO Ports , APM
Boa rd can be configured specifi call y to control land roboti cs , plane or copters using
fi rmwa re uploaded to APM Boa rd. APM Boa rd will senses all command from Radi o,
check current position / s ta tus and gi ve command to servo output to control devi ces .
APM Boa rd can be confi gured also to send s tatus to ground control via ra dio or OSD
Video.
1.1.1

ArduPilot Configuration
Euqi pped wi th GPS Module (external ) and onboa rd compass module, a ctuall y
APM Boa rd has all required pa rameters / sensors to know the sta tus of the plane
i .e. loca tion (coordina tes), X, Y, Z a xis s tatus a nd plane speed, hence ArduPilot
ma y send command to servo motor. In case user requi res precision pa rameter
sensing, APM Boa rd ma y be configured wi th IMU Shield to allow APM Boa rd has
input from Ai r Speed sensors (such as pi tot) and external compass
(Magnetometer).

Bandung-aeromodeling.com

Page 1

Figure 1 2 ArduPilot General Configuration

In pra cti cal, user mostl y requires telemetry ra dio to send the s ta tus of the plane
during the flight or connected to the ground control s ta tion or to assign mission
or a task or remotel y control to the plane.

Figure 1 3 ArduPilot Sub Module required

1.1.2

Initializing APM Board


Before ins talling APM Boa rd on the plane, i t is i mporta nt to setting the APM
Boa rd to ma tch the plane or devi ce we ha ve. This can be done by uploading
fi rmwa re to our APM Boa rd. Uploading fi rmwa re should be done on the ground
by computer, to prevent any unwanted error in da ta link.

Bandung-aeromodeling.com

Page 2

To Seeting APM Boa rd do the followi ng s tep by s tep:


1. Download ArduPilot Mission Planner and APM Boa rd USB Port dri ver.
2. Download USB Port dri ver a ccording to APM Boa rd you ha ve (eg. Ardui no
Mega 2560).
3. Connect APM Boa rd to Computer and ins tall its dri ver

Figure 1 4 Connect APM Board and install driver

4. Run ArduPilot Mission Planner and select Port connected to APM Bord a nd
cli ck Connect

Figure 1 5 Connect Mission Planner to APM Board

5. Select menu Fi rmwa re. Select devi ce i.e. ArduPlane and APM Setup button
to upload selected Firmwa re to APM Boa rd.

Bandung-aeromodeling.com

Page 3

Figure 1 6 Upload Firmware

6. Your APM Boa rd has been ini tialized as ArduPlane

1.1.3

Installing APM Board (IMU) on plane


As the hea rt of the ArduPilot, ins talling the APM Boa rd and ma ke i t work is the
fi rs t mos t i mporta nt things to ha ve before opera te and assign a flight mission to
the ArduPilot.
As the APM Boa rd (IMU) provi ded with internal compass, i t is needed to ins tall i t
correctl y, i .e:
1. The GPS connector should fa ce forwa rd, and the servo cables fa ce back.
2. The boa rd mus t also be ri ght side up, wi th the IMU shield a t the top.

Figure 1 7 APM Board should be installed correctly

Ei ther using APM Boa rd (IMU) wi th box or jus t the IMU ca rd, i t is provi ded wi th
a rrow. Ensure this a rrow point the front side of the plane.
Bandung-aeromodeling.com

Page 4

Kindl y take notes tha t APM Board should be ins talled securel y. No movement
a re allowed to prevent wrong plane s ta tus reading from internal compass.

Figure 1 8 APM Board should securely installed and has no movement

1.1.4

Connecting APM Board


After APM Boa rd ins talled securel y on plane, now it is time to connect it to radio
recei ver, servo and others ins talled on boa rd.
To
1.
2.
3.

connect APM Boa rd to RC Recei ver, you need:


At leas t a 5-channel RC uni t. 7 channels or more is highl y recommended.
Female-to female cables for ea ch channel you'll be using.
A power s ource. For electri c aircra ft, this is usuall y the ESC. For gas/nitro
powered planes, your servos will need its own ba ttery/BEC.
4. If you're using APM 2.5, we recommend that i t (and i ts a ccessories, such as
GPS a nd 3DR radios), be powered by the included Power Module. You'll still
need a n ESC plugged into the usual Output 3 pins or BEC pl ugged into any
spa re Output pins to power your servos , however; the Power Module is onl y
designed to power APM i tself.
To Connect APM Boa rd to RC Recei ver, do the following:
1. Connect Inputs sections of APM Boa rd to the corresponding RC Recei ver

Bandung-aeromodeling.com

Page 5

Figure 1 9 APM Board Input ports

Figure 1 9 Connect APM Board Input ports to RC Receiver

2.
3.
4.
5.

1.1.5

Connect Output APM Boa rd to corresponding servos


Connect GPS Module and put GPS module to fa ce the sky.
Connect Battery to a vailable slots (To power the servos)
Connect Telemetry ra dio (i f any) to APM Boa rd

Setting and calibrate APM Board


As the APM Boa rd connected to the RC and plane servos , i t is important to ha ve
them set a nd calibra ted. Setting and calibra te APM Boa rd ca n be done using PC
run Mission Planner applica tion whi ch is connected to the APM Boa rd.
To do setting and calibra ting APM Boa rd, proceed the following:
1. If you're using a s tanda rd ai rfra me, l oad a pre-ma de configura tion file.
For common ai rframes such as the Bi xler, Skyfun and Skywalker, we ha ve
supplied configura tion files whi ch a re tuned for those ai rcraft. You can

Bandung-aeromodeling.com

Page 6

download theme here and use the Mission Planner to wri te them to APM.
You'll s till need to configure them for your own ha rdwa re,
2. Calibra te your RC input
Your tra nsmi tter must be on. Ideall y, you ha ve already flown your ai rplane in
ma nual RC mode and adjus ted a ny tri m values necessary, s o the RC outputs
reflect these tri m settings ; i f you ha ven't al ready flown your ai rcraft i n RC
mode and tri mmed i t out, you ma y need to do the RC calibra tion again la ter,
after you ha ve flown the aircra ft (this is eas y to do a t the field).
Cha nnel assignments a re as shown above. When you move the RC s ti cks , the
relevant ba rs will move. Cli ck on "Calibra te Radio" to set the radio limi ts. Red
ba rs will appea r, and you shoul d move them to their li mi ts for ea ch channel
you ha ve connected.
On this screen you ca n also reverse servos i f necessa ry a nd set up elevon
mode if desi red.

Figure 1 10 APM Board calibrated to Radio

Press sa ve when you're done.

Bandung-aeromodeling.com

Page 7

Figure 1 11 Calibrating RC Input into Mission Planner

3. Set your flight modes


You ca n choose di fferent fli ght modes in the ai r wi th your RC trans mitter's
toggle swi tch, whi ch you should ha ve connected to APM i nput 1. When you
move the toggle s witch, you will see the green highlight change to a
di fferent line. You can use the drop-down menu on ea ch line to assign tha t
mode to a function. Note tha t Flight Mode 6 cannot be changed from
Manual. It's "ha rdwa re ma nual", whi ch means tha t i t's controlled by the
failsafe ci rcui t on the APM boa rd to alwa ys be able to return you to RC
control as a safety measure.

Figure 1 12 Setting Flight Mode on Mission Planner

4. Configure your hardwa re

Bandung-aeromodeling.com

Page 8

In this tab, you can tell APM wha t opti onal sensors you ha ve connected. Jus t
cli ck the check box for any sensor you're using. (Sona r is not currentl y
supported with APM; i t's prima ril y used for ArduCopter)

Figure 1 13 Setting Hardware Options on Mission Planner

For the magnetometer (compass), you ha ve a choice of calibra tion options once
you enable the sensor:
1. You can do nothing, a nd the code will try to fi gure out all the offsets and
declina tion by compa ring the compass readi ngs wi th the GPS and IMU
readings over time in flight. Pro: No user effort. Con: It takes a few minutes
of fl yi ng to get ri ght, so the compass is ina ccura te a t fi rs t launch.
2. Manual calibra tion in the Mission Planner (above). You ca n enter your
Declina tion as instructed below and then press the "Li ve Calibra tion" button
and move and rotate your ai rcra ft a round for 30 seconds while i t records the
da ta and does some ma th to calibra te the sensor. Pro: It works . Con: i t's a
li ttle awkwa rd, especiall y for bi g ai rcraft. Also i t doesn't reflect the ma gneti c
interference tha t can occur when the motors a re going in flight.
3. Repla y a flight log. This is a very cool option, shown above as Log Calibra tion,
where you can just repla y a previ ousl y recorded flight log (.tlog) and the code
will compa re the GPS a nd IMU readings wi th the compass reading a nd make
the necessary corrections. Pro: Works grea t. Con: You must ha ve al ready
fl own, if you load a .tlog file where you didn't a ctuall y fl y you'll mess up your
calibra tion and will ha ve to do i t a gain or ris k poor flight performance.
To manuall y enter a declinati on for your geographi c loca tion, you can find the
correct val ue by cli cking on the link to open a web browser. Enter your l oca tion
and i t will gi ve you a declina tion.

Bandung-aeromodeling.com

Page 9

5. Now if you swi tch to the Flight Data tab with MAVLi nk connected, you will
see the a rtifi cial horizon moving with the boa rd. Remember to lea ve the
boa rd s ta tiona ry for 15-20 seconds when you s wi tch into this tab, since the
IMU must calibra te fi rs t. Once i t's done, the HUD will sta rt moving.

Figure 1 14 Mission Planner should receive and command Correctly

1.2

USING MISSION PLANNER TO CONTR OL Y OUR PL ANE


The Mission Planner, crea ted by Mi chael Oborne, does a lot more than i ts name. Here
a re some of the fea tures :

Poi nt-and-cli ck wa ypoint entry, using Google Maps .


Select mission commands from drop-down menus
Download mission log files and anal yze them
Configure APM settings for your ai rfra me
Interfa ce wi th a PC flight si mula tor to crea te a full ha rdwa re -in-the-loop UAV
simula tor.
See the output from APM's serial terminal

Bandung-aeromodeling.com

Page 10

Figure 1 15 Mission Planner to control the Plane

.
1.2.1

Flight Mode
Ardupilot has a range of buil t in flight modes, and will ha ve more as
development progresses. Ardupilot can a ct as a simple flight stabiliza tion s ystem
or a sophisti ca ted autopilot. Flight modes a re controlled through the radio or
through logic, using the events .pde file.
To setup your ra dio to control Ardupilot's Fli ght Modes , use the Mission Planner
setup process or the intera cti ve CLI: Setup/Modes. Note tha t the modes names
ma y not show up as exa ctl y the below in your Ground Sta tion, due to the
limi ta tions of the MAVLi nk communica tions protocol . The modes display a rea as
follows :
1.

MANUAL
Regula r RC control, no stabiliza tion.

2.

STABILIZE
RC control wi th stabiliza tion; let go of the s ti cks and i t will level .

3.

FLY BY WIRE_A
The autopilot will hold the roll and pi tch specified by the control s ti cks .
Throttle is manually controlled, but is cons trained by the THR_MIN and
THR_MAX settings . Note tha t THR_MIN is 0 by defaul t, but i f you raise i t in
the pa rameter settings, the throttle will rise to a t leas t that value when
FBA-A is invoked, even on the ground (so be ca reful!). The plane will not
roll past the limi ts set in the confi gura tion of the autopilot. Great for new
pilots learning to fl y.

Bandung-aeromodeling.com

Page 11

4.

FLY BY WIRE_B
Requi res airspeed sensor. The autopilot will hold the roll speci fied by the
control s ti cks . Pi tch input from the radio is converted to al titude error,
whi ch the a utopilot will try and adjust to. Throttle is controlled by
autopilot. This is the perfect mode to tes t your autopilot as your ra dio
inout is subs ti tuted for the na vi ga tion controls . If no ai rpseed sensor is
present, this will defaul t to FBW-A.

5.

TRAINING
This mode is like training wheels on a bi cycle a nd is ideal for tea ching
s tudents manual R/C control . If the roll is less the the LIM_ROLL_CD
pa ra meter than the pilot has ma nual roll control . If the plane tries to roll
pas t that limi t then the roll will be held a t tha t limi t. The plane will not
automa ti cally roll ba ck to level flight, but i t will prevent the pilot from
rolling pas t the limi t. The same applies to pi tch - the pilot has manual pitch
control until the LIM_PITCH_MIN or LIM_PITCH_MAX limi ts are reached, a t
whi ch point the plane won't allow the pi tch to go past those limi ts.

6.

AUTO
Ai rcra ft will follow GPS wa ypoints set by configura tion utility. (You can also
"nudge" the ai rcraft manuall y in this mode - see below*.)

7.

RTL
Ai rcra ft will return to launch point and ci rcle there until manual control is
regained. You can also "nudge" the aircra ft manually in this mode.

1.

LOITER
Ai rcra ft will ci rcle in current posi tion. (You can also "nudge" the ai rcra ft
ma nuall y in this mode - see below*.)

(*"Nudging": Assume a model plane is fl ying in Stabilize mode and i t's heading
north, if you "nudge" i t by moving the control s ti ck (roll) a small and brief
amount you "nudge" the plane off it's northerl y course and now perhaps it will
be fl ying north-wes t, all the time s till ha ving the autopilot in control . i .e All
"nudging" means is tha t you can overri de the control tha t the autopilot has over
the plane a t any time a nd then ha ve the a utopilot resume i t's control when you
let the s ti cks go.)
Adva nced modes
9.

TAKEOFF
Auto Takeoff is set by the mission control s cripting onl y. Throttle is manual
(i t respects the limi ts of the autopilot settings so if you ha ve 65% throttle

Bandung-aeromodeling.com

Page 12

as the ma x, i t will not go above 65%.) Once the plane is moving faster than
a few m/s i t will lock onto a heading and hold tha t heading until the desired
al titude is rea ched.
10. LAND
Auto Land is set by the mission control s cripting onl y. Throttle is controlled
by the autopilot. After getting closer than 30 meters , the course will lock to
the current heading. Fla re, throttle, flaps , gea r, and other events can be
s cripted based on dis tance to landing point.

1.2.2

Stabilize Mode
When in Stabilize Mode, Ardupilot will stabilize your plane during RC control. It
smooths out your ai rcra ft's movement and when you release the s ti cks , i t will
return to level flight.

Figure 1 16 AutoPilot Mode

This is a grea t mode for all users (i t makes landing eas y--you'll look like a pro),
but is especially useful for beginners . If you get in trouble, jus t release the s ti cks
and i t will recover by i tself, rega rdless of wha t cra zy posi tion i t was in.
On the ground (or in the ai r also), We ma y check i f the plane is in Stabilize Mode
i .e. i f we move the the plane to an a xis , Mission Planner will counter i t by
commanding corresponding surfa ce control to move to other di rection in order
to normalized the plane. For example we move (by hand on the ground) the
plane to a cli mb di rection, elevator will move to down, we turn the plane to left,
Mission Control will turn rudder to right.

Bandung-aeromodeling.com

Page 13

Figure 1 17 Elevator Auto Stabilization Mode

Figure 1 18 Rudder Auto Stabilization Mode

1.2.3

Autopilot Mode
In this mode, the ai rcraft tra vels to pre-programmed GPS wa ypoints . The
wa ypoints a re set before flight wi th the configura tion utility.

Bandung-aeromodeling.com

Page 14

Figure 1 16 AutoPilot Mode

You can also "nudge" the ai rcraft manually i n this mode. Throttle "nudgi ng"
occurs if the throttle s ti ck is in the top 1/2 of the ra nge a nd moves the ai rspeed
or throttle setpoint up towa rds the upper limi t proportional to the s ti ck's
position in the top 1/2 of the ra nge. Normally you shoul d ha ve the throttle s ti ck
in the lower 1/2 of its range when using any "auto" mode.
G LAUNCH (Arduplane 2.71 a nd grea ter)
WARNING: BE AWARE OF 100% THROTTLE INPUT USING THIS MODE!!!!!)
G Launch is good for bungee or hand launched ai rcra ft and ma y onl y be enabled
in auto mode assumi ng a pre-progra mmed wa ypoint profile has been wri tten to
the a utopilot to include a ta keoff wa ypoint and a t least one additional wa ypoint
after the ta keoff wa ypoint. The takeoff wa ypoint requi res a lat/lon, takeoff pi tch,
and takeoff transition al ti tude..

1.2.4

Guided Mode
One of the mos t commonl y-used fea tures in pro UAVs is point-and-cli ck mission
control in real time. Ra ther than jus t pre-planned missions or manually fl ying the
UAV, opera tors can just cli ck on a map and sa y "go here now".

Bandung-aeromodeling.com

Page 15

Figure 1 17 Guided Mode

Tha t's now implemented in the Mission Planner. On the GCS map, you can ri ghtcli ck on the map and jus t select "Fl y To Here". The UAV will fl y there and loi ter
until you gi ve i t another command. We call this "Guided Mode". There a re more
commands coming in this mode soon, but the functionali ty is now buil t-in.
Note: Guided is a sepa rate fli ght mode. If you enter i t you will remain in i t until
you do something to change modes . So if you tell i t to "go here now", once i t
a rri ves there i t will loi ter at the Guided wa ypoint till you tell i t to do something
else. Something else could ei ther be going to another Guided wa ypoint (s ta ying
in Guided mode) or changi ng to some other fli ght mode. If you change to Auto
your mission will resume where i t left off.

1.2.5

Automatic Takeoff
ArduPilot Mega can automa ti cally launch and land an aircra ft, as pa rt of a
mission plan. Auto takeoff instructions :
The basic idea of a utoma ti c ta keoff is for the APM to set the throttle to
ma xi mum and climb until a designa ted al ti tude is rea ched. To ca use the plane to
execute a takeoff, add a NAV_TAKEOFF command to your mission, probabl y as
the fi rs t command. This goal is handled slightl y di fferentl y depending on wha t
sensors a re a ttached, but the alti tude pa ra meter alwa ys specifies the al titude
tha t must be a ttained before the APM will consider i ts ta keoff complete and load
the next Must command.
The APM will initiall y hold the wings level on takeoff, but as soon as a takeoff
heading is es tablished, the APM will adjus t roll to maintain that heading.
If you do not have a magnetometer:

Bandung-aeromodeling.com

Page 16

As soon as the ground speed, as measured by the GPS, exceeds 3 m/s, the
takeoff heading will be set to the GPS ground course. This means tha t, in a
cross wind, the APM ma y turn downwind somewha t duri ng takeoff. Sometimes ,
the takeoff heading is a ccidentall y set too ea rl y and this will cause the APM to
turn the plane to an undesi red heading during takeoff. To mini mize this problem,
try not to move the plane a fter Auto has been engaged except to throw i t i n the
di rection of takeoff. Try not to "wind up" by moving the plane ba ckwards before
throwing i t. As much as possible, try to dupli ca te the beha vior of a ca tapul t
launcher.
If you have a magnetometer:
As soon as the ground speed, as measured by the GPS, exceeds 3 m/s, the
takeoff heading will be set to the magnetometer's yaw sensor.
If you do not have an airspeed sensor:
The fi rs t pa rameter of the NAV_TAKEOFF command will speci fy the ma ximum
pi tch the APM will ta rget on takeoff. The minimum pitch is automa ticall y set to 5
degrees posi ti ve pi tch. As the plane increases in speed (as measured by the GPS),
i ts pi tch will increase. The exa ct formula is :
ta rget pitch = (GPS speed / cruise speed) x ma ximum pi tch / 2
If you have an airspeed sensor:
The fi rs t pa rameter of the NAV_TAKEOFF command will specify the minimum
pi tch the APM will ta rget on takeoff. The APM will adjus t pi tch to a chieve
ai rspeed_cruise (pi tch up if ai rspeed is above cruise, pi tch down i f ai rspeed is
below cruise), but i t will not pi tch below the minimum pi tch set by
NAV_TAKEOFF.
1.2.6

Automatic Landing
To land the plane, simpl y add a NAV_LAND command to the end of your mission
indi ca ting the la titude, longitude and al ti tude of your desired touchdown point.
In most cases , the alti tude should be set to 0. During landing, the APM will shut
down the throttle a nd hold the current heading as soon as the plane is wi thi n 2
seconds of the touchdown point horizontall y, or as soon as the plane is lower
than 3 meters above the touchdown point, whi chever occurs fi rst. On approa ch,
the APM will fl y normall y if you ha ve an ai rspeed sensor. If you do not ha ve an
ai rspeed sensor, the APM will hold 0 pitch.
Here is an example mission around the Spa rkfun building tha t a utotakeoffs, goes
a round the building and then sets up a landing pa ttern for a n autoland. Note
tha t the wa ypoints ki ck in once the plane has reached 30m al ti tude a fter

Bandung-aeromodeling.com

Page 17

autota keoff, and tha t i t lands a t 0m alti tude (al titude is gi ven rela ti ve to
home/launch al titude).

Figure 1 18 Auto Land

Note that in reali ty the above flight plan probabl y won't resul t in a s uccessful
landing in the desi red a rea. Wa ypoint 5 is set wi th an alti tude of 100 meters , and
wa ypoint 6, whi ch is the landing wa ypoint, is onl y a short dis tance awa y. Unless
the pa rticular ai rplane used has a very fast descent ra te when gliding with the
motor off, i t will not be able to come down from 100 meters in the short
dis tance planned here. It is more appropria te to s tep the al ti tude down over a
few wa ypoints and make s ure tha t the dis tance between the wa ypoint before
the landi ng point and the landing point is suffi cientl y la rge for the al titude whi ch
mus t be los t. Use of automa ti c flap deployment can be helpful here if your
ai rplane has a relati vel y flat glide angle - look under "Optional Addi tions ".

1.3

CREATING A FLIGHT MISSION


Now we ha ve a full unders tanding tha t ArduPilot using Mission Planner allow us to
automa te fl ying of our TS40 TRAINERby uploading wa ypoint and flight mode to APM
Boa rd ins talled. The ques tion ri ght now is How to create a flight mission whi ch is consis t
of several wa ypoints and upload i t to the APM Boa rd. We can crea te a flight Mission
using Mission Planner appli ca tion on Flight Planner Menu.

Bandung-aeromodeling.com

Page 18

Figure 1 19 Flight Planner

You can enter wa ypoints and other commands (see below for the full list). In the
dropdown menus on each row, select the command you want. The column heading will
change to show you what da ta that command requi res . La t and Lon can be entered by
cli cking on the map. Al ti tude is rela ti ve to your launch al ti tude, so if you set 100m, for
exa mple, i t will fl y 100m above you.
1.3.1

Setting Home
You can set a home position by cli cking on the Home lat or lon and then cli cking
on the map. Or, i f the map is not already centered on the field you're going to be
fl ying a t, you can sea rch for i t by cli cking on the "Zoom To" button and entering
your loca tion in the search box, as shown:

Figure 1 20 Setting Home

Bandung-aeromodeling.com

Page 19

1.3.2

Creating Waypoint
You can crea te a wa ypoint using:
1. Manually set the wa ypoint one by one. This will create a precise
La t/Long/height wa ypoint loca tion but time consummed.
2. Using Autogri d fa cility i n the Mission Planner will be fas ter solution. Of
course you can edi t each wa ypoint later before upload it to your plane.
Manually Add WayPoints

Figure 1 21 Add a WayPoint

Crea ting a WP is a n eas y task. You need just enter the La t/Log/Hei ght or jus t cli ck
on the Ma p to create a new wa ypoint.
Note tha t i f the "Absolute Al t" box is checked, the al ti tude used will be al ti tude
above sea level, NOT al ti tude a bove your launch posi tion. If that box is
unchecked, ALT will be relati ve al ti tude, so 100m will be 100m above your
"home" alti tude, or where you're probabl y standing.
Defaul t Alt is the defaul t al ti tude when entering new wa ypoi nts. It's also the
al titude RTL (return to launch) mode will fl y a t i f you ha ve "Hold Defaul t ALT"
checked; if you don't ha ve tha t checked, your aircra ft will try to maintain the
al titude it was a t when you swi tched on RTL.
Verify height means tha t the Mission Planner will use Google Ea rth topology data
to a djust your desi red al ti tude a t ea ch wa ypoint to reflect the height of the
ground benea th. So i f your wa ypoint is on a hill, if this option is selected the
Mission Planner will increase your ALT setting by the height of the hill. This is a
good wa y to ma ke sure you don't crash into mountains!

Bandung-aeromodeling.com

Page 20

Auto WayPoints
If you're making aerial surveys and need to take l ots of pictures tha t you will
la ter sti tch together to make a photo mosaic, a handy Mission Planner fea ture
can help. It's called AutoWP, and it automa ti cally crea tes wa ypoints tha t will take
your UAV on a "lawnmower" pa ttern over an a rea , with tri gger points a t regula r
points to ins truct your ca mera to ta ke picture.

Figure 1 22 Automatic Waypoint

If you're making aerial surveys and need to take l ots of pictures tha t you will
la ter sti tch together to make a photo mosaic, a handy Mission Planner fea ture
can help. It's called AutoWP, and it automa ti cally crea tes wa ypoints tha t will take
your UAV on a "lawnmower" pa ttern over an a rea , with tri gger points a t regula r
points to ins truct your ca mera to ta ke picture.
1.

Draw a Polygon
To use this, go into the Flight Planner s creen and ri ght-click, selecting
"Dra w Pol ygon".

Bandung-aeromodeling.com

Page 21

Figure 1 23 Draw Polygon

2.

Draw a Grid Waypoints


Once you've dra wn a pol ygon a round the a rea you want to cover, select
"Auto WP" then ei ther Gri d or Grid V2 (the fi rst s ta rts at the bottom of
your a rea , and the second sta rts a t the top).

Figure 1 24 Draw a grid of waypoints

It will ask you to choose some other pa rameters for the mission, such as a t
wha t al ti tude to fl y and how fa r apa rt the lines and wa ypoints should be.
Choose these based on the cha ra cteris tics of the camera you're using; i n
general you should ha ve a t least 20% overlap between pi ctures so the
feature-ma tching algori thms of your photo s ti tching softwa re ha ve enough
common features between photos to work with.
When you're done, i t will automa ti call y create a mission like the one shown
a t top.
Bandung-aeromodeling.com

Page 22

1.3.3

Upload / Save Waypoint

Figure 1 25 Saving Waypoint

Once you a re done wi th your mission, select "Wri te" and i t will be sent to APM
and sa ved in EEPROM. You can confi rm that i t's as you wanted by selecting
"Read"
You ca n sa ve mul tiple mission files to your local ha rd dri ve by selecting "Sa ve WP
File" or read in files with "Load WP File" in the ri ght-click menu:
1.3.3

Basic Waypoint Commands


A mission file is a little intimida ting to the human eye, but is a powerful s cripting
language for the autopilot. (Again, remember that the GCS will soon take ca re of
all of this for you. You shouldn't ha ve to see i t yourself for long!).
You ca n ha ve as many commands as you want, ra nging from pre -programmed
ones to ones tha t you can create. Here are some common ones :
{NAV_WAYPOINT n/a , al t, lat, lon}
{NAV_TAKEOFF pi tch, ta rget al titude}
{NAV_LAND n/a , al t, lat, lon}
{DO_JUMP wa ypoi nt, n/a, repea t count, n/a} Goes to tha t wa ypoint a nd
resumes mission there. Set repea t count to any number grea ter than 1 to do i t
tha t many ti mes . or to -1 to do it forever. Good for looping missions .
(Note: DO_xxx comma nds currentl y need a dummy wa ypoint pla ced after the
command
eg:

Bandung-aeromodeling.com

Page 23

WAYPOINT_1
DO_SET_HOME
WAYPOINT_2
Home will be set a t WAYPOINT_1 but will not work if WAYPOINT_2 is not there.)
In the s creenshot above, I've planned a mission tha t s ta rts wi th an autotakeoff to
20m a ttitude, the three wa ypoints at 100m, ending with one tha t sets up a
landing pa ttern. Finall y an autoland fi nishes the mission a t 0m al ti tude.
Tips

1.4

Prefetch: You can ca che map da ta so you don't need Internet a ccess a t the
field. Cli ck the Prefetch button, a nd hold down Al t to dra w a box to download
the selected i magery of a loca tion.
Grid: This allows you to dra w a pol ygon (right cli ck) and a utomati call y crea te
wa ypoints over the selected a rea . Note that i t does not do "island detection",
whi ch means if you ha ve a big pol ygon and a li ttle one inside of tha t, the little
one will not be excluded from the big one (see this for more). Also, i n the
case of any pol ygon tha t pa rtialy doubles ba cks on i tself (like the letter U),
the open a rea in the center will be included as pa rt of the fl yover.
Setti ng your home loca tion to the current loca tion is eas y, jus t click "Home
Loca tion" above where you enter your home loca tion, and i t will set your
home loca tion to the current coordina tes.
You can measure the dis tance between wa ypoints by right-cli cking a t one
end and selecting Measure Dista nce. Then ri ght-click on the other end and
select Measure Distance again. A dialog box will open wi th the dis tance
between the two points .

OSD & RADIO LINK OPTIO NS


1.4.1

Using OSD
Mini mOSD is a super-tiny boa rd designed by 3DRoboti cs . It's all you need to get
OSD telemetry da ta from ArduPilot Mega . Jus t connect your FPV camera and a
video link a nd you're ready to fl y with i nstruments on s creen.

Bandung-aeromodeling.com

Page 24

Figure 1 26 MinimOSD

The concept is to read da ta from APM boa rd inputs. At the same time, read from
Video Output. Mi nimOSD then merge them by putting data forma tted to be
displa yed wi th Vi deo Output. The resul t the tra nsmi tted so i t can be recei ved
and displa yed real time using PAL or NTSC TV.
It's intended to be a dedi cated APM telemetry vi deo output. So, i t reads
MAVLink messages from i ts RX and reques t ra tes from APM i f you connect i ts TX
to ArduPilot "telem" port.
Important note: You ca nnot connect the OSD when your APM 2 is also
connected via USB (they sha re the same port). Make sure you dis connect your
USB ca ble from the APM 2 boa rd before a ttempting to use the OSD.
Details
It has the Ma x7456 chip powered by two sta ges to a void noises from servos
a tta ched to ArduPilot Mega boa rd.
It provides an extra clean power line to feed the FPV camera and vi deo link.

Figure 1 27 MinimOSD Configuration

The approa ch is to use two external power sources : 12V from a Lipo Ba ttery a nd
5V from APM:
Bandung-aeromodeling.com

Page 25

Raw 12V from Lipo Battery

Feeds di rectl y FPV camera and video trans mitter.


It also feeds Ma x7456's analog line (AVDD and AGND) by a 5V vol tage
regula tor (a voiding noises from servos a tta ched to APM).

5V from APM telem port

Feeds the ATmega 328P and Ma x7456's digi tal line (DVDD and DGND)

Mini mOSD has no extra pins exposed, because the concept is "capturi ng all the
needed da ta from MAVLink". E.g.: to show RSSI from RC recei ver, tha t info needs
to be on msgs #35 and #36 (RC_CHANNELS "RAW" and "SCALED").
So, the analog reading of RSSI output from recei ver needs to be done on APM
analog ports a nd treated i nside the APM code.

Figure 1 28 Using MinimOSD

PAL vs NTSC
The forma t of the vi deo does ha ve an impa ct on how many cha ra cters the OSD
can fi t on the video feed. The Mimi mOSD can be confi gured by the ArduCAM
OSD Config Tool to work a t PAL or NTSC. The "PAL" solder jumper undernea th
the boa rd is not used anymore (Firmwa re 2.0 or above).
1.4.2

Using Radio Link


The 3DRoboti cs 3DR Radio is the ideal wa y to setup a telemetry connection
between your APM a nd a ground s tation. Small, inexpensive and wi th grea t
range, the 3DR radio uses an open source firmwa re which allows us to do things
tha t cannot be done wi th other radios .

Bandung-aeromodeling.com

Page 26

Figure 1 29 3DR Radio Link

Connecting your 3DR Radios


You will need two 3DR radios , one for your ai rcra ft, and the other for your
ground s ta tion. Important note: You ca nnot connect via the radios when your
APM 2.x is also connected via USB (they sha re the same port). Ma ke sure you
dis connect your USB cable from the APM 2 boa rd be fore a ttempti ng a wireless
connection.
Looking at the above pi cture you will see tha t typi cally the "ground" radio
module has a USB connector, ma king i t eas y to connect them to your ground
s tati on. It uses a D2XX FTDI dri ver tha t you ca n get here. This dri ver is built i nto
Wi ndows 7 and above, so i t is onl y necessary i f you a re using Windows XP or
below.

Figure 1 30 Connecting 3DR Radio Link

Bandung-aeromodeling.com

Page 27

Figure 1 31 Connecting 3DR Radio Link

The 'aircra ft' model has a FTDI si x pin header, allowing i t to be di rectl y connected
to your APM telemetry port.
The radios come pre-confi gured for a serial ra te of 57600, which is the defaul t
ra te tha t APM uses for telemetry, but you ca n change this to any ra te you like,
ei ther using the AT command set, the APM Mission Planner ra dio setup
interfa ce, or the 3DR Radio Confi gura tion Utility.
Sta tus LEDs

Figure 1 32 Connecting 3DR Radio Link

The 3DR Radi os ha ve 2 s tatus LEDs , one red and one green. The meaning of the
di fferent LED sta tes is as follows :

Bandung-aeromodeling.com

Page 28

green LED blinking - sea rching for a nother radio


green LED solid - link is es tablished with a nother radio
red LED flashing - trans mitti ng da ta
red LED solid - in firmwa re upda te mode

Configuring using the Mission Planner


The lates t versions of the APM Mission Planner support configuring your 3DR
radios using a simple GUI interfa ce. In the Mission Planner (top right) select the
Com port tha t your "ground" 3DR ra dio is connected to and 57k as the baud ra te.
Then swi tch to the Configura tion s creen. Choose the 3DR radio ta b in the lis t a t
left, and cli ck on "Load Settings" and i t will populate i t wi th da ta similar to tha t
shown (the remote radio's settings will onl y show if i t is also powered on a nd
connected to APM running current ArduPlane or ArduCopter code).

Figure 1 33 Configuring Mission Planner

This is the recommended confi gura tion method for mos t users.

Bandung-aeromodeling.com

Page 29

Оценить