Test Flight

This section outlines the distributed systems test flight procedure.

192.168.0.21 - NUC is static IP

192.168.0.50 - attena tracker

Pre-arrival Checklist

  • Make sure you build most recent version of ground-test before getting to the field (no internet), NEVER EXIT ACTIVATOR SHELL
  • Bring Targets (Shapes and Alphanumerics)

Ground Setup Checklist

  1. Setup all the targets in the field and record gps lat/long and orientation coordinates
  2. Open compass app and take screen shot
  3. Make sure that you restart compass app when you go to new target location
  4. Make sure database is empty (run a test in the activator shell)
  5. Do “run” in activator shell
  6. Turn on nuc, gimbal, and comms (on left side, down is on)
  7. Turn on button on top left of dashboard (should turn green)
  8. Take off lens cap from camera
  9. Set focus of camera on plane to infinity
  10. Make sure antenna tracker is on
  11. Set a static IP address for yourself
  12. Open 4 other terminals
  1. Start Gimbal server:
ssh@192.168.0.21
cd odysseus/gimbal-server
./run.py -a 8001
  1. Start Camera server:
ssh@192.168.0.21
cd odysseus/camera-server
./app.py -dh <your-static-ip> -dp 9000
  1. Start Plane Autopilot server:
ssh@192.168.0.21
cd MAVProxy2/MAVProxy
source venv/bin/activate
python mavproxy.py —-master=/dev/ttyUSB0 57600
  • Try USB1 and USB2
  • To see which one is communicating data, do a cat on any of those USB files
  • DON’T TYPE ANYTHING
  1. Access Database
sql -U postgres plaedalus
  1. Extra Terminal for pinging NUC (192.168.0.21)
  1. If connection to NUC ever goes down, restart all above servers

Ground Pre-Flight Test

  1. Open localhost:9000 (MDLC)
  2. Test gimbal - point at ground and retract
  1. Make sure you enter numbers in for point-at-gps coordinates or the request will fail
  2. Ensure that the gimbal rotates and the motor works
  3. Check in the database (select * from gimbal_settings) to see when your request goes from queued to sent
  1. Test camera
  1. Start taking pictures
  2. Stop taking pictures
  3. Check in database
  1. Select * from camera_settings;
  1. Check that requests are getting sent
  1. Select * from images;
  1. Check that we are receiving images
  2. Check that they have a gimbal_id and telemetry_id (autopilot)
  1. Ask for notification when about to land (to retract gimbal)

Ground Test Flight

  1. A couple seconds before take off, start taking pictures
  2. Once plane takes off, set gimbal to point at ground
  3. When they’re about to land, retract gimbal
  4. Stop taking pictures

Post Flight

  1. Stop ground server ONCE all images are received using CTRL D
  2. Dump database

pg_dump -U postgres plaedalus > 05_11_2016_1.sql

  1. Move all images to pictures file
  2. Create <date_testflight#> folder with
  1. Folder of all pictures
  2. Sql file
  3. Logs file

Debugging

  1. Trying to ssh into NUC
  1. Possible error: Connection refused
  1. NUC is still powering on
  1. Possible error: No route to host
  1. Switch connecting you to the LAN is down
  1. Can do “-h” for running anything and it’ll specify parameters

For Connecting Through Ethernet

  1. Connect to NUC through Ethernet
  2. Change your local network settings to the following:
  1. IP Address: 192.168.1.26
  2. Subnet Mask: 255.255.255.0
  3. Router: 192.168.0.1
  1. In Terminal, type ssh cuair@192.168.0.21. The password is aeolus. You should be able to access and run any programs on the NUC.
  2. To get all the pictures captured by the NUC, go into another Terminal window and type: scp "cuair@192.168.0.21:~/odysseus/camera-server/*.jpg” ~/<path to the folder you want to put the pictures in>
  1. Make sure to keep the quotation marks where they are so that the regex works