## woensdag 20 oktober 2021

### FLYING AROUND 3: FLYING A MISSION

When you buy a Tello EDU you have 4 mission pads, which enable the drone to fly special assignments. To fly a mission there are special command available. Look at the Mission Pad User Guide. Available at :https://dl-cdn.ryzerobotics.com/downloads/Tello/Tello%20Mission%20Pad%20User%20Guide.pdf

However flying a mission was more complicated. I had 3 problems:

2. set up a mission from the command line

3. X and Y coordinates

It seems the pads have numbers, but I could not find where that number was. How can you find out?

Go to github: https://github.com/dbaldwin/DroneBlocks-DJITelloPy-Tutorial . Here you find a bonus script :

If you run that script and tello is on a pad it will give you the mid.

Here is the output when Tello flying over MID 1:

'agx': -6.0,

'agy': 10.0,

'agz': -999.0,

'baro': 112.27,

'bat': 61,

'h': 70,

'mid': 1,

'mpry': '2,-4,178',

'pitch': 0,

'roll': 0,

'temph': 47,

'templ': 44,

'time': 12,

'tof': 83,

'vgx': 0,

'vgy': 0,

'vgz': 0,

'x': -10,

'y': 3,

'yaw': -1,

'z': 84}

Do that for all 4 pads front and backside and write the number on the pad.

Just discovered that the number is on the pad: printed as white line between the stars! If you look closely it is a number. Here is for example pad 3:

Second: how to set up a mission with 4 pads.

The mission pad works as a switch; like if…. Then. Read the guide closely.

Set up the following:

M1 M2 M3 M4 are the MIDs

The arrow is the direction, represented by the direction of the rocket on the pad. ( I come back to this later)

Next we need a command line to send instruction to the Tello.

Go to https://tello.oneoffcoder.com/python-manual-control.html . Under section 8 you find the scripts to send commands to the Tello.

For example:

python3 app.py -f command4.txt

In this case the commands in the txt file command4 are send to the drone.

And here are the commands for command4 forcing the Tello to fly a square over the pads.

(Important to understand is that you have to state the x,y,z coordinates of each MID)

command

takeoff

battery?

mon

mdirection 0

jump 0 80 60 60 90 m1 m2

#(tello is on m1 flies to 0 80 60, speed 60, if m2 is recognized camera is turned 90 degrees)

delay1

jump 0 80 60 60 90 m2 m3

delay 1

jump 0 80 60 60 90 m3 m4

delay 1

jump 0 80 60 60 90 m4 m1

delay 1

land

And the result is this video:

https://youtu.be/2Kk65aS5MtI

Problem 3:  X and Y

The coordinates are looking peculiar; I just discovered them by trial and error. But when I changed the direction of the pads(direction of the rocket) it did not work anymore. I needed new coordinates.

So the coordinates (x,y; that is the first two) are relatives to direction. The rocket gives the direction of the X axis.

Here are two figures showing the relations ship between direction and coordinates.

Figure 2 shows the position of the Tello: using the the same x and y while turning the direction of the pad.

Figure  1 shows the position of the Tello: using different x and y , while keep the pad in the same direction.

Do you want to fly over the diagonals. Keep the pads in the same position when flying in a square over the pads. For the diagonal flight use the following:

command
takeoff
battery?
mon
mdirection 0
jump 80 80 60 60 90 m1 m3
delay1
jump 0 80 60 60 90 m3 m4
delay 1
jump 80 80 60 60 90 m4 m2
land

## Why “Python” is the best coding language for data journalism

By  Dolly Setton Data Journalists
From the Economist Data Journalism  newsletter

Most data journalists would agree that coding has become a core component for good data journalism. But few can agree which programming language is best for it—is it “R” or “Python”? Last week, one of my colleagues explained why they think R is the superior language for data journalism. This week, I will explain why I prefer Python.

Python is, like R, an open-source language so it is free for anyone to use. Unlike R, it is a full-fledged, general-purpose language and an integral part of digital life. It powers popular tools and platforms such as Google Search, Spotify, Instagram and YouTube. Guido Van Rossum, a Dutch developer, released the first version of Python in 1991.

## Why “R” is the best coding language for data journalism

By  James Fransham Data Journalists
From the Economist Data Journalism  newsletter

Data journalism is a pursuit whose success relies on being able to crunch numbers. Lots of them. For many years data journalism—a term that was popularised beginning about 2010—mostly relied on the power of spreadsheets alone. But pivot tables, vlookups and other spreadsheet functions only get you so far. With more and more data available, being able to perform more powerful and flexible operations is now a vital part of the data journalist’s toolkit. Two programming languages, Python and R, vie for data journalism supremacy. But which is best? Here is my case for the latter.

R is an open-source language, it is free and open for use by everyone. It was spun out of another programming language called “S” in the early 1990s by two academics working at the University of Auckland in New Zealand. It was developed to focus on statistical-based problems and so it naturally handles data.

## zondag 3 oktober 2021

### FLYTING AROUND( 2): programming the Tello

The Tello has a dedicated app for children. Go to the app store and download Tello Edu. It works better, because of the screen size, when the app is installed on a tablet.  First you have access to the remote control on screen (1), which works the same as on a cell phone. But there is also an option called blocks. Here you can practice the programming. First in a virtual environment(2), and then in real time.

It is very easy to learn. Children will get the idea behind programming fast and it is fun!

SDK