DJI Phantom 4

2016-05-31

I finally joined the legions of people flying drones. My first drone is a DJI Phantom 4.

I have not yet received the unit but I did get a spare battery and a 64GB micro sd card. I got the Samsung UHS-1 48MB/s Class 10 card. I also have a Samsung 32GB card coming which I will assume is also exFAT.

Since I work with unix all the time, I had to be able to use the exFAT micro sd card with that operating system so you will need to install the exfat-utils package. I use the card reader exclusively with a Cubie board (ARM A10) so I installed the package there. It works well.

Disk /dev/sdc: 64.0 GB, 64021856256 bytes
255 heads, 63 sectors/track, 7783 cylinders, total 125042688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1           32768   125042687    62504960    7  HPFS/NTFS/exFAT

My friend pointed out that the battery wasn't as much fun as the drone though.

phantom-2016-05-31-001.jpg phantom-2016-05-31-002.jpg phantom-2016-05-31-003.jpg

i can turn on the battery, it looks like it has about 40% charge. I practiced turning it on and off a few times but it didn't seem to fly. I read the instructions and the warnings for the battery module and it said it needed a drone to fly the battery (joke.)

It comes in a well-designed foam cradle to protect the battery.

2016-06-04

I received another 32GB micro sd card and the sunvisor hood for the Ipad Mini 2. This will fit onto the RC controller so you can see the screen in sunlight…

phantom-2016-06-04-001.jpg phantom-2016-06-04-002.jpg

2016-06-06

The micro sd card that was shipped with the DJI Phantom 4 has the following layout:

root@master:/mnt# fdisk -l /dev/sdc

Disk /dev/sdc: 16.0 GB, 16012804096 bytes
199 heads, 44 sectors/track, 3571 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        8192    31275007    15633408    b  W95 FAT32
root@master:/mnt#
root@master:/mnt# ls -laR
.:
total 100
drwxr-xr-x  4 root root 32768 Dec 31  1969 .
drwxr-xr-x 25 root root  4096 Jun  5 21:44 ..
drwxr-xr-x  2 root root 32768 May 13 08:55 DCIM
drwxr-xr-x  6 root root 32768 May 13 08:55 MISC

./DCIM:
total 64
drwxr-xr-x 2 root root 32768 May 13 08:55 .
drwxr-xr-x 4 root root 32768 Dec 31  1969 ..

./MISC:
total 224
drwxr-xr-x 6 root root 32768 May 13 08:55 .
drwxr-xr-x 4 root root 32768 Dec 31  1969 ..
drwxr-xr-x 2 root root 32768 May 13 08:55 IDX
drwxr-xr-x 2 root root 32768 May 13 08:55 LOG
drwxr-xr-x 2 root root 32768 May 13 08:55 THM
-rwxr-xr-x 1 root root  2095 Dec 31  2013 wifi.conf
drwxr-xr-x 2 root root 32768 May 13 08:55 XCODE

./MISC/IDX:
total 64
drwxr-xr-x 2 root root 32768 May 13 08:55 .
drwxr-xr-x 6 root root 32768 May 13 08:55 ..

./MISC/LOG:
total 64
drwxr-xr-x 2 root root 32768 May 13 08:55 .
drwxr-xr-x 6 root root 32768 May 13 08:55 ..

./MISC/THM:
total 64
drwxr-xr-x 2 root root 32768 May 13 08:55 .
drwxr-xr-x 6 root root 32768 May 13 08:55 ..

./MISC/XCODE:
total 64
drwxr-xr-x 2 root root 32768 May 13 08:55 .
drwxr-xr-x 6 root root 32768 May 13 08:55 ..
root@master:/mnt#

The initial charging of the batteries.

phantom-2016-06-06-001.jpg

The batteries are coming out of the aircraft much too hot. When you remove them to charge they have to cool down quite awhile before the charge begins. I believe this is a design flaw.

I also noticed after-market Apple cables are too loose and cause connection errors during flight. Best to use Apple cables at all times when using an IPAD or IPAD Mini 2/3.

I updated the firmware today which led me to a series of "interesting" discoveries.

When you upgrade the quad copter's firmware the battery firmware is usually also updated. I had to install DJI Assistant on a Windows 7 laptop. I tried to run it under a vmware guest under Linux but the software did not work. There didn't seem to be any way to upgrade the battery firmware alone in the DJI Assistant so I had to choose 'refresh' and reflash the quad copter's firmware again just to upgrade the second battery firmware. If I had more batteries I'd have to repeat that process. I tell you that is really stupid.

Observatory_Hill_2016-06-06-002-low.jpg

Yes, those are 19" telco racks outside the observatory. I need to clean up that mess soon.

2016-06-12

I had a filesystem error when trying to copy some video off the micro sd card to an ssd in one of the Cubie board servers here. When trying to get a directory listing of the micro sd card it also appeared to be empty after the initial error.

root@master:/master/tmp/point_of_interest# dosfsck -w -r -l -a -v -t /dev/sdd1
dosfsck 3.0.13 (30 Jun 2012)
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     32768 bytes per cluster
      1124 reserved sectors
First FAT starts at byte 575488 (sector 1124)
         2 FATs, 32 bit entries
   3906560 bytes per FAT (= 7630 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 8388608 (sector 16384)
    976512 data clusters (31998345216 bytes)
63 sectors/track, 255 heads
      8192 hidden sectors
  62513152 sectors total
Checking file /
Checking file /DCIM
Checking file /MISC
Checking file /DCIM/.
Checking file /DCIM/..
Checking file /DCIM/100MEDIA
Checking file /DCIM/100MEDIA/.
Checking file /DCIM/100MEDIA/..
Checking file /DCIM/100MEDIA/DJI_0001.MOV
Checking file /DCIM/100MEDIA/DJI_0002.MOV
Checking file /DCIM/100MEDIA/DJI_0003.JPG
Checking file /MISC/.
Checking file /MISC/..
Checking file /MISC/IDX
Checking file /MISC/THM
Checking file /MISC/LOG
Checking file /MISC/XCODE
Checking file /MISC/wifi.conf (WIFI~1.CON)
Checking file /MISC/IDX/.
Checking file /MISC/IDX/..
Checking file /MISC/IDX/idx00 (IDX00)
Checking file /MISC/IDX/idx01 (IDX01)
/MISC/IDX/idx00
  File size is 267275 bytes, cluster chain length is > 294912 bytes.
  Truncating file to 267275 bytes.
/MISC/IDX/idx01
  File size is 267195 bytes, cluster chain length is > 294912 bytes.
  Truncating file to 267195 bytes.
Checking file /MISC/THM/.
Checking file /MISC/THM/..
Checking file /MISC/THM/100
Checking file /MISC/THM/100/.
Checking file /MISC/THM/100/..
Checking file /MISC/THM/100/DJI_0001.THM
Checking file /MISC/THM/100/DJI_0002.THM
Checking file /MISC/LOG/.
Checking file /MISC/LOG/..
Checking file /MISC/XCODE/.
Checking file /MISC/XCODE/..
Checking for bad clusters.

Reclaiming unconnected clusters.
Checking free cluster summary.
Free cluster summary uninitialized (should be 826106)
  Auto-setting.
Performing changes.
/dev/sdd1: 16 files, 150406/976512 clusters
root@master:/master/tmp/point_of_interest#

I was able to save the video after all. There was just one file I wished to keep, a region of interest circuit of the observatory.

phantom-2016-06-12-001.jpg phantom-2016-06-12-003.jpg

2016-06-13

HIgher Resolution - Where I live it took me 7-hours to upload the video to youtube. The size of the source video was over 2G. All processing done with ffmpeg.

Here is the direct link https://youtu.be/FRVvVD7z65g

2016-07-01

So I was copying some video from the class 10 64GB micro sd card onto an ssd today and realized I had not checked to see what my read performance was using this card, card reader and host sata controller with an ssd attached. Here is a rough look at the performance using "iostat -dx4" (4-second measurement intervals during copy of data to ssd.

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     1.31    0.00   32.11     0.00 15964.49   994.21    17.18  398.78    0.00  398.78  10.24  32.90
sdc            3331.59     0.00  221.93    0.00 14214.10     0.00   128.09     2.85   12.86   12.86    0.00   3.67  81.46

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     1.60    0.00   43.88     0.00 21526.60   981.09    20.24  425.21    0.00  425.21  10.73  47.07
sdc            4340.43     0.00  289.36    0.00 18519.15     0.00   128.00     3.70   12.80   12.80    0.00   3.67 106.12

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     1.33    0.00   37.14     0.00 18460.48   994.23    16.47  605.50    0.00  605.50  11.36  42.18
sdc            4369.23     0.00  291.51    0.00 18642.97     0.00   127.91     3.71   12.75   12.75    0.00   3.64 106.10

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     1.35    0.00   34.05     0.00 16752.43   983.87    14.36  421.59    0.00  421.59  10.79  36.76
sdc            4394.59     0.00  292.97    0.00 18750.27     0.00   128.00     3.85   13.12   13.12    0.00   3.69 108.11

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     0.26    0.00   33.16     0.00 16477.28   993.83    14.51  437.87    0.00  437.87  11.02  36.55
sdc            4278.33     0.00  285.38    0.00 18285.12     0.00   128.15     3.70   12.98   12.98    0.00   3.66 104.44

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
nand              0.00     0.00    0.00    0.27     0.00     1.08     8.00     0.00    0.00    0.00    0.00   0.00   0.00
sdb               0.00     1.08    0.00   47.70     0.00 23993.50  1006.09    27.05  460.17    0.00  460.17  11.14  53.12
sdc            4373.98     0.00  291.33    0.00 18629.81     0.00   127.90     3.82   13.11   13.11    0.00   3.72 108.40

[snip]

If you are interested in operating systems (as I am) you will also note the write performance of the host sata controller with the ssd. I have to admit that I am using an ARM A10-based (Cubie Board 1) computer to do this AND the micro sd card reader is using USB so we already know that performance will be slow. oh so slow.

I flew the P4 today to get some video of a nearby item of interest.

I was able to get about 20-mins flying time before the rain sqall hit and cut my outing short. I had driven to a point nearby where I wanted to explore today. The flight went well and as I was driving back to the observatory I reflected on how simple the P4 is to fly and how despite it being a consumer-grade aircraft still allowed even the most basic user the ability to make use of the aircraft. That sounds like some kind of marketing hype I know.

I won't really publish the video but you can see a low resolution screenshot from me watching the video. I don't need some crazed radio astronomer coming after me for ruining his 24-hour long observation.

Screenshot-from-DJI_0002.jpg

2016-07-12

I got some XYT New Technology DJI Phantom 4 Propeller Guards today that were supposed to NOT interfere with the obstacle system but they do interfere, badly.

2016-07-12-01-prop.jpg

I tried to refit them a few times but it still kept intermittently triggering the obstacle system.

2016-07-12-02-prop.jpg

See this thread on Phantom Pilots for more discussion.

2016-07-12-03-prop.jpg

I have removed the propeller guards and put them back into the box. Hopefully DJI will come up with something that will still allow the obstacle sensing software to be used with propeller guards.