├── .gitignore ├── .travis.yml ├── COPYING.txt ├── README.md ├── appveyor.yml ├── capturescripts ├── GenericOpenCV │ └── captureWebcam.py ├── RasPi │ ├── CMakeLists.txt │ ├── README.txt │ ├── RaspiCLI.c │ ├── RaspiCLI.h │ ├── RaspiCamControl.c │ ├── RaspiCamControl.h │ ├── RaspiPreview.c │ ├── RaspiPreview.h │ ├── RaspiTex.c │ ├── RaspiTex.h │ ├── RaspiTexUtil.c │ ├── RaspiTexUtil.h │ ├── cuav_util.c │ ├── cuav_util.h │ ├── cuavraw │ ├── cuavraw.c │ └── start_rpi_capture.sh └── chameleon │ ├── 40-chameleon.rules │ ├── Readme.txt │ ├── chameleon.c │ ├── chameleon_py.c │ ├── chameleon_util.c │ ├── include │ ├── chameleon.h │ └── chameleon_util.h │ ├── installrules.sh │ ├── mavlog.sh │ ├── pgm_convert.py │ ├── py_capture.py │ ├── setup.py │ └── start_chameleon_capture.sh ├── cuav ├── __init__.py ├── camera │ ├── __init__.py │ └── cam_params.py ├── data │ ├── CMAC-boundary.txt │ ├── CMAC-fence.txt │ ├── ChameleonArecort │ │ ├── calib00000.png │ │ ├── calib00001.png │ │ ├── calib00003.png │ │ ├── calib00004.png │ │ ├── calib00005.png │ │ ├── calib00006.png │ │ ├── calib00007.png │ │ └── params.json │ ├── OBC Waypoints.kml │ ├── OBC_search.txt │ ├── OBC_search2.txt │ ├── PiCamV2 │ │ ├── full │ │ │ ├── 15.jpg │ │ │ ├── 16.jpg │ │ │ ├── 17.jpg │ │ │ ├── 18.jpg │ │ │ ├── 19.jpg │ │ │ ├── 2.jpg │ │ │ ├── 20.jpg │ │ │ ├── 21.jpg │ │ │ ├── 3.jpg │ │ │ └── 6.jpg │ │ ├── half │ │ │ ├── 15.jpg │ │ │ ├── 16.jpg │ │ │ ├── 17.jpg │ │ │ ├── 18.jpg │ │ │ ├── 19.jpg │ │ │ ├── 2.jpg │ │ │ ├── 20.jpg │ │ │ ├── 21.jpg │ │ │ ├── 3.jpg │ │ │ └── 6.jpg │ │ ├── params.json │ │ └── params_half.json │ ├── cmac.txt │ ├── fence.txt │ ├── fence2014ANorth.txt │ ├── fence2014BSouth.txt │ ├── fence2014Full.txt │ ├── scrutineering-2014.txt │ ├── scrutineering.txt │ ├── scrutineering2.txt │ └── way.txt ├── image │ ├── .gitignore │ ├── Makefile │ ├── __init__.py │ ├── imageutil.c │ ├── include │ │ └── imageutil.h │ └── scanner.c ├── lib │ ├── OBC Waypoints.kml │ ├── __init__.py │ ├── block_xmit.py │ ├── camera_view.py │ ├── crop_test.sh │ ├── cuav_command.py │ ├── cuav_joe.py │ ├── cuav_landingregion.py │ ├── cuav_libchecklist.py │ ├── cuav_mosaic.py │ ├── cuav_region.py │ ├── cuav_util.py │ ├── mav_position.py │ ├── video_decode_dec265.py │ ├── video_encode.py │ ├── video_encode_decode.py │ ├── video_encode_x265.py │ └── video_play.py ├── modules │ ├── __init__.py │ ├── camera_air.py │ ├── camera_air_2020.py │ ├── camera_ground.py │ ├── camera_ground_2020.py │ ├── checklist.py │ ├── cuav_check.py │ ├── cuav_companion.py │ └── nmea.py ├── tools │ ├── __init__.py │ ├── agl_mission.py │ ├── algtest.py │ ├── benchmarks │ │ ├── BeagleBoneBlack.txt │ │ ├── Edison-500MHz.txt │ │ ├── Lenono-X230-2.9GHz-laptop-Linux.txt │ │ ├── Odroid-U3.txt │ │ ├── Odroid-X2.txt │ │ └── RaspberryPi.txt │ ├── calibrate.py │ ├── cuav_benchmark.py │ ├── cuav_lens.py │ ├── cuav_missiongenerator.py │ ├── gegpsd │ │ ├── HOWTO │ │ ├── blueplane.png │ │ ├── gegpsd.py │ │ └── redplane.png │ ├── geosearch.py │ ├── geotag.py │ ├── logbook.py │ ├── playback.py │ ├── run_block_xmit.py │ ├── scantest.py │ └── thermal_view.py └── uav │ ├── __init__.py │ ├── geo.py │ └── uav.py ├── obc_2018 ├── generate_DNFZ.py └── geosearch_test.sh ├── obc_2020 └── video_encode │ ├── README.md │ ├── ff_encode.sh │ └── ff_mat_264.sh ├── requirements.txt ├── script ├── 2018 │ ├── Dalby-fence-Kraken.txt │ ├── Dalby-fence.txt │ ├── Dalby-mission-Kraken-north-takeoff.txt │ ├── Dalby-mission-Kraken-south-takeoff.txt │ ├── Dalby-mission-Porter-north-takeoff.txt │ ├── Dalby-mission-Porter-south-takeoff.txt │ ├── Kraken.Ground │ │ ├── BigScreenKraken.sh │ │ ├── BigScreenPorter.sh │ │ ├── StartGround.scr │ │ ├── StartGround.sh │ │ └── kraken.parm │ ├── Kraken.GroundBackup │ │ ├── StartGround.scr │ │ ├── StartGround.sh │ │ ├── kraken.parm │ │ └── sitl.parm │ ├── Porter.Aircraft │ │ ├── cap_loop.sh │ │ ├── mavinit.scr │ │ ├── mavlog.sh │ │ ├── network.sh │ │ ├── screenrc │ │ ├── start_rpi_capture.sh │ │ └── stop.sh │ ├── Porter.Ground │ │ ├── OBC2018.parm │ │ ├── StartGround.scr │ │ ├── StartGround.sh │ │ ├── porter.parm │ │ └── sitl.parm │ ├── Porter.GroundBackup │ │ ├── PorterCamera.scr │ │ ├── StartGround.scr │ │ └── StartGround.sh │ ├── Ranger.Aircraft │ │ ├── cap_loop.sh │ │ ├── mavinit.scr │ │ ├── mavlog.sh │ │ ├── network.sh │ │ ├── screenrc │ │ ├── start_rpi_capture.sh │ │ └── stop.sh │ ├── Ranger.Ground │ │ ├── PlayGroundStephen.scr │ │ ├── PlayGroundStephen.sh │ │ ├── StartGround.scr │ │ ├── StartGround.sh │ │ ├── StartTridge.scr │ │ └── StartTridge.sh │ ├── SITL │ │ ├── CMAC-mission-kraken.txt │ │ ├── CMAC-mission.txt │ │ ├── CMAC-param-kraken.parm │ │ ├── CMAC-param.parm │ │ ├── Porter.parm │ │ ├── SIM_Kraken │ │ │ ├── OBC2016 │ │ │ │ └── mavinit.scr │ │ │ ├── start_kraken.sh │ │ │ ├── start_kraken_dalby.sh │ │ │ └── start_kraken_raw.sh │ │ ├── SIM_Porter │ │ │ ├── OBC2016 │ │ │ │ └── mavinit.scr │ │ │ ├── start_quadplane.sh │ │ │ ├── start_quadplane_raw.sh │ │ │ └── start_quadplane_raw_dalby.sh │ │ ├── cmac_images │ │ │ ├── 2018082401182498Z.jpg │ │ │ ├── 2018082401182559Z.jpg │ │ │ ├── 2018082401182626Z.jpg │ │ │ ├── 2018082401182694Z.jpg │ │ │ ├── 2018082401182765Z.jpg │ │ │ ├── 2018082401182832Z.jpg │ │ │ ├── 2018082401182900Z.jpg │ │ │ ├── 2018082401182969Z.jpg │ │ │ ├── 2018082401183037Z.jpg │ │ │ ├── 2018082401183106Z.jpg │ │ │ ├── 2018082401183166Z.jpg │ │ │ ├── 2018082401184963Z.jpg │ │ │ ├── 2018082401185019Z.jpg │ │ │ ├── 2018082401185075Z.jpg │ │ │ ├── 2018082401185129Z.jpg │ │ │ ├── 2018082401185182Z.jpg │ │ │ ├── 2018082401185242Z.jpg │ │ │ ├── 2018082401185296Z.jpg │ │ │ ├── 2018082401185382Z.jpg │ │ │ ├── 2018082401185450Z.jpg │ │ │ ├── 2018082401185524Z.jpg │ │ │ ├── 2018082401185587Z.jpg │ │ │ ├── 2018082401185652Z.jpg │ │ │ ├── 2018082401185715Z.jpg │ │ │ ├── 2018082401185774Z.jpg │ │ │ ├── 2018082401185835Z.jpg │ │ │ ├── 2018082401185894Z.jpg │ │ │ ├── 2018082401191712Z.jpg │ │ │ ├── 2018082401191773Z.jpg │ │ │ ├── 2018082401191836Z.jpg │ │ │ ├── 2018082401191894Z.jpg │ │ │ ├── 2018082401191958Z.jpg │ │ │ ├── 2018082401192018Z.jpg │ │ │ ├── 2018082401192078Z.jpg │ │ │ ├── 2018082401192139Z.jpg │ │ │ ├── 2018082401192197Z.jpg │ │ │ ├── 2018082401192256Z.jpg │ │ │ ├── 2018082401192320Z.jpg │ │ │ ├── 2018082401193786Z.jpg │ │ │ ├── 2018082401193848Z.jpg │ │ │ ├── 2018082401193918Z.jpg │ │ │ ├── 2018082401193981Z.jpg │ │ │ ├── 2018082401194044Z.jpg │ │ │ ├── 2018082401194106Z.jpg │ │ │ ├── 2018082401194168Z.jpg │ │ │ ├── 2018082401194230Z.jpg │ │ │ ├── 2018082401194290Z.jpg │ │ │ ├── 2018082401194352Z.jpg │ │ │ ├── 2018082401194416Z.jpg │ │ │ ├── 2018082401195977Z.jpg │ │ │ ├── 2018082401200066Z.jpg │ │ │ ├── 2018082401200135Z.jpg │ │ │ ├── 2018082401200202Z.jpg │ │ │ ├── 2018082401200265Z.jpg │ │ │ ├── 2018082401200328Z.jpg │ │ │ ├── 2018082401200407Z.jpg │ │ │ ├── 2018082401200473Z.jpg │ │ │ ├── 2018082401200533Z.jpg │ │ │ ├── 2018082401200595Z.jpg │ │ │ ├── 2018082401201489Z.jpg │ │ │ ├── 2018082401201554Z.jpg │ │ │ ├── 2018082401201617Z.jpg │ │ │ ├── 2018082401201679Z.jpg │ │ │ ├── 2018082401201740Z.jpg │ │ │ ├── 2018082401201802Z.jpg │ │ │ ├── 2018082401201862Z.jpg │ │ │ ├── 2018082401201924Z.jpg │ │ │ ├── 2018082401201987Z.jpg │ │ │ ├── 2018082401202049Z.jpg │ │ │ ├── 2018082401202111Z.jpg │ │ │ ├── 2018082401202177Z.jpg │ │ │ ├── 2018082401202241Z.jpg │ │ │ ├── 2018082401202301Z.jpg │ │ │ ├── 2018082401204199Z.jpg │ │ │ ├── 2018082401204279Z.jpg │ │ │ ├── 2018082401204355Z.jpg │ │ │ ├── 2018082401204419Z.jpg │ │ │ ├── 2018082401204476Z.jpg │ │ │ ├── 2018082401204541Z.jpg │ │ │ ├── 2018082401204603Z.jpg │ │ │ ├── 2018082401204669Z.jpg │ │ │ ├── 2018082401204732Z.jpg │ │ │ ├── 2018082401204793Z.jpg │ │ │ ├── 2018082401215485Z.jpg │ │ │ ├── 2018082401215543Z.jpg │ │ │ ├── 2018082401215670Z.jpg │ │ │ ├── 2018082401215743Z.jpg │ │ │ ├── 2018082401215807Z.jpg │ │ │ ├── 2018082401215871Z.jpg │ │ │ ├── 2018082401220190Z.jpg │ │ │ ├── 2018082401220252Z.jpg │ │ │ ├── 2018082401220319Z.jpg │ │ │ ├── 2018082401220381Z.jpg │ │ │ ├── 2018082401220446Z.jpg │ │ │ └── 2018082401220509Z.jpg │ │ ├── create_mavpos.py │ │ ├── mavlogAir.scr │ │ ├── mavlogAir.sh │ │ ├── mavlogGround.scr │ │ ├── mavlogGround.sh │ │ ├── no_radio_vars.sh │ │ ├── playback.sh │ │ ├── playback_dalby.sh │ │ ├── playback_dalby_small.sh │ │ ├── playback_mavpos.py │ │ ├── playback_synthetic.py │ │ ├── targets │ │ │ ├── target0.png │ │ │ ├── target1.png │ │ │ ├── target10.png │ │ │ ├── target11.png │ │ │ ├── target12.png │ │ │ ├── target13.png │ │ │ ├── target14.png │ │ │ ├── target15.png │ │ │ ├── target16.png │ │ │ ├── target17.png │ │ │ ├── target18.png │ │ │ ├── target19.png │ │ │ ├── target2.png │ │ │ ├── target20.png │ │ │ ├── target21.png │ │ │ ├── target22.png │ │ │ ├── target23.png │ │ │ ├── target24.png │ │ │ ├── target25.png │ │ │ ├── target26.png │ │ │ ├── target27.png │ │ │ ├── target28.png │ │ │ ├── target29.png │ │ │ ├── target3.png │ │ │ ├── target30.png │ │ │ ├── target31.png │ │ │ ├── target32.png │ │ │ ├── target33.png │ │ │ ├── target34.png │ │ │ ├── target35.png │ │ │ ├── target36.png │ │ │ ├── target37.png │ │ │ ├── target38.png │ │ │ ├── target39.png │ │ │ ├── target4.png │ │ │ ├── target40.png │ │ │ ├── target41.png │ │ │ ├── target42.png │ │ │ ├── target43.png │ │ │ ├── target44.png │ │ │ ├── target45.png │ │ │ ├── target46.png │ │ │ ├── target47.png │ │ │ ├── target48.png │ │ │ ├── target49.png │ │ │ ├── target5.png │ │ │ ├── target50.png │ │ │ ├── target51.png │ │ │ ├── target52.png │ │ │ ├── target53.png │ │ │ ├── target54.png │ │ │ ├── target55.png │ │ │ ├── target56.png │ │ │ ├── target57.png │ │ │ ├── target58.png │ │ │ ├── target59.png │ │ │ ├── target6.png │ │ │ ├── target60.png │ │ │ ├── target61.png │ │ │ ├── target62.png │ │ │ ├── target63.png │ │ │ ├── target64.png │ │ │ ├── target65.png │ │ │ ├── target66.png │ │ │ ├── target67.png │ │ │ ├── target68.png │ │ │ ├── target69.png │ │ │ ├── target7.png │ │ │ ├── target70.png │ │ │ ├── target71.png │ │ │ ├── target72.png │ │ │ ├── target73.png │ │ │ ├── target74.png │ │ │ ├── target75.png │ │ │ ├── target76.png │ │ │ ├── target77.png │ │ │ ├── target78.png │ │ │ ├── target79.png │ │ │ ├── target8.png │ │ │ ├── target80.png │ │ │ ├── target81.png │ │ │ ├── target82.png │ │ │ ├── target83.png │ │ │ ├── target84.png │ │ │ ├── target85.png │ │ │ ├── target86.png │ │ │ ├── target87.png │ │ │ ├── target88.png │ │ │ ├── target89.png │ │ │ ├── target9.png │ │ │ └── target90.png │ │ ├── testimgs │ │ │ ├── 2018080501004480Z.jpg │ │ │ ├── 2018080501004550Z.jpg │ │ │ ├── 2018080501004640Z.jpg │ │ │ ├── 2018080501004736Z.jpg │ │ │ ├── 2018080501004828Z.jpg │ │ │ ├── 2018080501004918Z.jpg │ │ │ ├── 2018080501005009Z.jpg │ │ │ ├── 2018080501005094Z.jpg │ │ │ ├── 2018080501005163Z.jpg │ │ │ ├── 2018080501005238Z.jpg │ │ │ ├── 2018080501005336Z.jpg │ │ │ ├── 2018080501005427Z.jpg │ │ │ ├── 2018080501005506Z.jpg │ │ │ ├── 2018080501005597Z.jpg │ │ │ ├── 2018080501005683Z.jpg │ │ │ ├── 2018080501005776Z.jpg │ │ │ ├── 2018080501005867Z.jpg │ │ │ ├── 2018080501005958Z.jpg │ │ │ └── flight.tlog │ │ └── with_radio_vars.sh │ ├── cmac-image-wp.txt │ ├── gcs_network.py │ ├── gcs_network.sh │ ├── raspi-install.sh │ ├── target_loc_CMAC.sh │ └── target_loc_dalby.sh ├── OBC2014 │ ├── Porter.GroundSecondary │ │ ├── mav_porter.sh │ │ └── mavinit.scr │ ├── Porter.ground │ │ ├── mav.parm │ │ ├── mav_porter.sh │ │ └── mavinit.scr │ └── Porter.plane │ │ ├── autostart.sh │ │ ├── mav_porter.sh │ │ └── mavinit.scr ├── OBC2016 │ ├── GX9.ground │ │ ├── mav_aircraft.sh │ │ └── mavinit.scr │ ├── GX9.plane │ │ └── cron │ │ │ └── network.sh │ ├── PorterQuad.ground │ │ ├── mav_aircraft.sh │ │ └── mavinit.scr │ ├── PorterQuad.plane │ │ ├── cron │ │ │ └── network.sh │ │ ├── mav-screenrc │ │ ├── mavinit.scr │ │ ├── network.sh │ │ ├── start_cam.sh │ │ ├── start_capture.sh │ │ ├── start_mav.sh │ │ ├── start_screen.sh │ │ └── telstra_connect.sh │ ├── fence.txt │ ├── mission-heli.txt │ ├── mission-plane.txt │ ├── pi1 │ │ ├── .screenrc │ │ ├── gcs-screenrc │ │ ├── reboot_telstra.py │ │ ├── screen.service │ │ └── start_screen.sh │ └── pi2 │ │ ├── .mavinit.scr │ │ ├── .screenrc │ │ ├── gcs-screenrc │ │ ├── mav_route_start.sh │ │ └── start_screen.sh ├── Playback │ ├── ImageLog.sh │ ├── PlayGround.sh │ ├── PlayUAV.sh │ └── Readme ├── SITL │ ├── GCS │ │ ├── GX9.SITL │ │ │ └── mavinit.scr │ │ ├── PorterQuad.SITL │ │ │ └── mavinit.scr │ │ ├── start_gcs_heli.sh │ │ └── start_gcs_quadplane.sh │ └── aircraft │ │ ├── Heli │ │ ├── OBC2016 │ │ │ └── mavinit.scr │ │ ├── heli.parm │ │ ├── mission.txt │ │ └── start_heli.sh │ │ └── PorterQuad │ │ ├── OBC2016.fen │ │ ├── OBC2016 │ │ └── mavinit.scr │ │ ├── mission.txt │ │ ├── quadplane.parm │ │ └── start_quadplane.sh ├── ctest │ └── mavinit.scr ├── gtest │ └── mavinit.scr ├── obc_playback.sh ├── rename_by_date.py └── update_host.sh ├── setup.py ├── tests ├── camera │ └── test_cam_params.py ├── lib │ ├── test_block_xmit.py │ ├── test_cuav_joe.py │ ├── test_cuav_landingregion.py │ ├── test_cuav_mosaic.py │ ├── test_cuav_region.py │ ├── test_cuav_util.py │ └── test_mav_position.py ├── modules │ ├── test_camera_air.py │ ├── test_camera_ground.py │ ├── test_checklist.py │ ├── test_cuav_check.py │ ├── test_cuav_companion.py │ └── test_nmea.py ├── requirements-test.txt ├── testdata │ ├── OBC Waypoints 2014.kml │ ├── OBC Waypoints.kml │ ├── OBC_boundary.txt │ ├── cmac-image-wp.txt │ ├── exifimg2018021100040450Z.jpg │ ├── exifimg2018021100041320Z.jpg │ ├── filelist_python │ ├── flight.tlog │ ├── raw2016111223465120Z.png │ ├── raw2016111223465160Z.png │ ├── raw2016111223465213Z.png │ ├── robota.trigger │ └── test-8bit.png ├── tools │ ├── test_aglmission.py │ ├── test_calibrate.py │ ├── test_cuav_benchmark.py │ ├── test_cuav_lens.py │ ├── test_cuav_missiongenerator.py │ ├── test_logbook.py │ ├── test_playback.py │ └── test_thermal_view.py └── uav │ ├── test_geo.py │ └── test_uav.py ├── tools ├── 3g │ └── log-telstra-dongle.py └── udpproxy.c └── windows ├── createChangelog.py ├── cuav.iss ├── cuav.spec ├── cuavWinBuild.bat ├── geosearchbuildrun.bat ├── geotagbuildrun.bat └── returnVersion.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *~ 3 | *.png 4 | *.pnm 5 | *.pgm 6 | *.jpg 7 | *.yuv 8 | *.pyc 9 | *.lst 10 | *.log 11 | *.tlog 12 | *.parm 13 | build/ 14 | dist/ 15 | MANIFEST 16 | deb_dist/ 17 | logs/ 18 | .eggs/ 19 | .pytest_cache/ 20 | cuav.egg-info/ 21 | !cuav/tools/gegpsd/*.png 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # http://travis-ci.org/#!/CanberraUAV/cuav 2 | language: python 3 | python: 4 | - 3.5 5 | - 2.7 6 | cache: 7 | pip: true 8 | apt: true 9 | addons: 10 | apt: 11 | packages: 12 | - python-numpy 13 | - libgstreamer-plugins-base0.10-dev 14 | - libnotify-dev 15 | - libgtk-3-dev 16 | - libwebkitgtk-3.0-dev 17 | - libgstreamer-plugins-base1.0-dev 18 | before_install: 19 | #Download SRTM data, because MAVProxy fails without it cached 20 | #It returns a None if needs to download in the background (need to fix this) 21 | - mkdir -p $HOME/.tilecache/SRTM 22 | - cp $TRAVIS_BUILD_DIR/tests/testdata/filelist_python $HOME/.tilecache/SRTM/filelist_python 23 | - cd $HOME/.tilecache/SRTM 24 | - wget http://firmware.ardupilot.org/SRTM/Africa/S16E011.hgt.zip 25 | - wget http://firmware.ardupilot.org/SRTM/Australia/S21E145.hgt.zip 26 | - wget http://firmware.ardupilot.org/SRTM/Africa/S28E020.hgt.zip 27 | - wget http://firmware.ardupilot.org/SRTM/Australia/S35E148.hgt.zip 28 | - wget http://firmware.ardupilot.org/SRTM/Australia/S35E149.hgt.zip 29 | - wget http://firmware.ardupilot.org/SRTM/Australia/S36E148.hgt.zip 30 | - wget http://firmware.ardupilot.org/SRTM/Australia/S36E149.hgt.zip 31 | - wget http://firmware.ardupilot.org/SRTM/Australia/S37E148.hgt.zip 32 | - wget http://firmware.ardupilot.org/SRTM/Islands/S47E037.hgt.zip 33 | - cd $TRAVIS_BUILD_DIR 34 | install: 35 | #Prerequisites 36 | - pip install opencv-python future 37 | - pip install pymavlink MAVProxy piexif 38 | - pip install -r ./tests/requirements-test.txt 39 | #Using pip install wxpython takes waaay too long, so downloading precompiled version instead 40 | - pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 wxPython 41 | 42 | - python setup.py build install 43 | before_script: 44 | - ls 45 | script: 46 | - py.test --junitxml=./unittests.xml ./tests/ 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cuav 2 | 3 | [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CanberraUAV/cuav?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | [![Build Status](https://travis-ci.org/CanberraUAV/cuav.svg?branch=master)](https://travis-ci.org/CanberraUAV/cuav) 6 | 7 | The CanberraUAV Image Processing (cuav) tools are designed to quickly and 8 | accurately locate objects of interest from a large set of photos. With the addition 9 | of flight logs or geo-tagging, it can also give the location of the objects. 10 | 11 | It can be run in realtime directly from a camera, or offine from a folder of images. 12 | 13 | The tools can be run on both Linux and Windows platforms. 14 | 15 | cuav was created by [CanberraUAV](http://www.canberrauav.org.au) as part of the 16 | [UAV Challenge](https://uavchallenge.org), in order to find a missing 17 | bushwalker from photos taken by a Unmanned Aerial System (UAS, commonly known as a "drone") 18 | as it flew over the search area at low altitude. 19 | 20 | Documentation is available at http://canberrauav.github.io/cuav 21 | -------------------------------------------------------------------------------- /capturescripts/GenericOpenCV/captureWebcam.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | An example program to capture cuav-compliant images using OpenCV. 4 | NOTE: The capture time of the images (represented in the filename) must be <100ms 5 | precise, otherwise the geolocation will be inaccurate 6 | 7 | This uses Python 2.7/3.x and OpenCV2 8 | 9 | Use "sudo apt-get install opencv-python" to install OpenCV2 10 | ''' 11 | import time, cv2, os 12 | 13 | def frame_time(t): 14 | '''return a time string for a filename with 0.01 sec resolution''' 15 | # round to the nearest 100th of a second 16 | t += 0.005 17 | hundredths = int(t * 100.0) % 100 18 | return "%s%02uZ" % (time.strftime("%Y%m%d%H%M%S", time.gmtime(t)), hundredths) 19 | 20 | if __name__ == '__main__': 21 | #Open the default camera on the system 22 | camera = cv2.VideoCapture(0) 23 | 24 | #Set the camera resolution 25 | camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 1280) 26 | camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 720) 27 | 28 | #grab an image just to activate the camera 29 | camera.grab() 30 | 31 | #And keep capturing, (until CTRL+C) with timestamp 32 | try: 33 | while True: 34 | #grab the image and get timestamp 35 | camera.grab() 36 | frametime = frame_time(time.time()) 37 | 38 | #Get the grabbed image from the device and write to file as png 39 | return_value, image = camera.retrieve() 40 | cv2.imwrite(frametime + '.jpg', image) 41 | 42 | #Symlink to the latest-written image for cuav processing 43 | try: 44 | os.unlink('camera.jpg') 45 | except OSError: 46 | pass 47 | os.symlink(frametime + '.jpg', 'camera.jpg') 48 | print("Got: " + frametime + '.jpg') 49 | 50 | time.sleep(1) 51 | except KeyboardInterrupt: 52 | pass 53 | 54 | #Finally, shutdown the camera 55 | print("Closing camera") 56 | del(camera) 57 | 58 | -------------------------------------------------------------------------------- /capturescripts/RasPi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(cuavraw) 4 | 5 | include_directories("/opt/vc/include") 6 | include_directories("./") 7 | 8 | link_directories("/opt/vc/lib") 9 | 10 | SET(CMAKE_CURRENT_SOURCE_DIR ./) 11 | 12 | SET(COMPILE_DEFINITIONS -Werror) 13 | 14 | set (COMMON_SOURCES 15 | RaspiCamControl.c 16 | RaspiCLI.c 17 | RaspiPreview.c) 18 | 19 | set (MMAL_LIBS mmal_core mmal_util mmal_vc_client) 20 | 21 | add_executable(cuavraw ${COMMON_SOURCES} cuavraw.c RaspiTex.c RaspiTexUtil.c cuav_util.c ) 22 | target_link_libraries(cuavraw ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL jpeg pthread vcsm m) 23 | -------------------------------------------------------------------------------- /capturescripts/RasPi/README.txt: -------------------------------------------------------------------------------- 1 | This module provides a live image stream from a Rasberry Pi camera (V2.1) 2 | 3 | It uses a custom capture software "cuavraw", which is derived from the 4 | "rpi_userland" code at https://github.com/raspberrypi/userland. 5 | 6 | This provides high-resolution timestamps (to within 100ms) to 7 | raw images, which are then compressed to jpeg files. 8 | 9 | The output images have the filename YYYYMMDDHHmmSSllZ.jpg, which 10 | is the time of capture 11 | Where: 12 | YYYY = year 13 | MM = month 14 | DD = day 15 | HH = 24 hour time 16 | mm = minute 17 | SS = second 18 | ll = milliseconds x10 19 | 20 | All times are in the UTC0 timezone 21 | 22 | -----------Build----------- 23 | This assumes that you are building on a Raspberry Pi, using a 24 | release of Raspian from August 2017 or later. 25 | 26 | Install the required packages via the following command: 27 | sudo apt-get install cmake libjpeg62-turbo-dev 28 | 29 | Then build: 30 | ./cmake 31 | make 32 | 33 | -----------Running----------- 34 | See start_rpi_capture.sh for an example of running cuavraw 35 | 36 | The commonly used options are: 37 | -o Save output images in this folder 38 | -l Create this file as a symlink to the latest captured image 39 | -halfres Reduce saved images to half resolution to reduce CPU/IO usage 40 | 41 | -------------------------------------------------------------------------------- /capturescripts/RasPi/cuav_util.h: -------------------------------------------------------------------------------- 1 | void cuav_process(const uint8_t *buffer, uint32_t size, const char *filename, const char *linkname, const struct timeval *tv, bool halfres); 2 | 3 | void *mm_alloc(uint32_t size); 4 | void mm_free(void *ptr, uint32_t size); 5 | 6 | -------------------------------------------------------------------------------- /capturescripts/RasPi/cuavraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/capturescripts/RasPi/cuavraw -------------------------------------------------------------------------------- /capturescripts/RasPi/start_rpi_capture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # set timezone to GMT 7 | export TZ=GMT 8 | 9 | CAPTURE_DIR=~/images_captured 10 | DATETIME_DIR=$(date +"%Y%m%d_%H-%M-%S") 11 | 12 | mkdir -p ${CAPTURE_DIR}/${DATETIME_DIR} 13 | 14 | # start rpi capture. Images stored in ${CAPTURE_DIR}/${DATETIME_DIR} 15 | ./cuavraw -o ${CAPTURE_DIR}/${DATETIME_DIR}/ -l ${CAPTURE_DIR}/current.jpg 16 | 17 | 18 | -------------------------------------------------------------------------------- /capturescripts/chameleon/40-chameleon.rules: -------------------------------------------------------------------------------- 1 | ATTRS{idVendor}=="1e10", ATTRS{idProduct}=="2004", MODE:="0666" 2 | 3 | -------------------------------------------------------------------------------- /capturescripts/chameleon/Readme.txt: -------------------------------------------------------------------------------- 1 | -----------Install----------- 2 | The cuav git repo must be in the ~/ directory 3 | 4 | Install these via the following commands: 5 | sudo apt-get install python-pip python-dev python-opencv libusb-1.0.0-dev libdc1394-22-dev 6 | pip install future numpy 7 | 8 | Ensure your system has the correct permissions to access the 9 | camera. Run "installrules.sh" to add the permissions, then reboot. 10 | 11 | To build this module, run: 12 | python setup.py build_ext --inplace 13 | 14 | For capturing options, take a look at the source of py_catpure.py 15 | 16 | -----------APM Config-------- 17 | Typically, the companion computer would be connected to the TELEM2 port 18 | on the APM. In this case, the following params must be set to 19 | configure the TELEM2 port to output Mavlink (V2) telemetry at 20 | 115200bps: 21 | SERIAL2_PROTOCOL = 2 22 | SERIAL2_BAUD = 115 23 | 24 | -----------Running----------- 25 | Run start_chameleon_capture.sh to start the capture 26 | Run ../stop.sh to stop all capture processes 27 | Run ../clear_images.sh to delete all captured images 28 | 29 | Note: If you have any existing pgm files that you need to convert to png/jpg format, 30 | use the "pgm_convert.py" script 31 | 32 | -------------------------------------------------------------------------------- /capturescripts/chameleon/include/chameleon_util.h: -------------------------------------------------------------------------------- 1 | #ifndef CHAMELEON_UTIL_H_ 2 | #define CHAMELEON_UTIL_H_ 3 | 4 | #if USE_LIBDC1394 5 | #include "chameleon_dc1394.h" 6 | #else 7 | #include "chameleon.h" 8 | #endif 9 | 10 | int capture_wait(struct chameleon_camera* c, float* shutter, 11 | void* buf, size_t stride, size_t size, 12 | int timeout_ms, 13 | float *frame_time, uint32_t *frame_counter); 14 | 15 | int trigger_capture(struct chameleon_camera* c, float shutter, bool continuous); 16 | 17 | struct chameleon_camera *open_camera(bool colour_chameleon, uint8_t depth, uint16_t brightness); 18 | 19 | void close_camera(struct chameleon_camera *); 20 | 21 | void camera_set_brightness(chameleon_camera_t *camera, uint16_t brightness); 22 | void camera_set_gamma(chameleon_camera_t *camera, uint16_t gamma); 23 | void camera_set_framerate(chameleon_camera_t *camera, uint8_t framerate); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /capturescripts/chameleon/installrules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo cp ./40-chameleon.rules /etc/udev/rules.d/40-chameleon.rules 4 | sudo chmod 755 /etc/udev/rules.d/40-chameleon.rules 5 | sudo /etc/init.d/udev restart 6 | sudo udevadm control --reload-rules 7 | sudo udevadm trigger 8 | 9 | -------------------------------------------------------------------------------- /capturescripts/chameleon/mavlog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check arguments 4 | if [ $# -ne 1 ]; then 5 | echo "usage: mavlog.sh logdir" 6 | exit 1 7 | fi 8 | 9 | LOG_DIR=$1 10 | 11 | cd ${LOG_DIR} 12 | mavproxy.py --master=/dev/ttyAMA0 --baud=115200 --out=udpin:0.0.0.0:14550 13 | 14 | -------------------------------------------------------------------------------- /capturescripts/chameleon/pgm_convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | ''' 3 | convert images from PGM to other formats 4 | ''' 5 | 6 | import os, sys, glob, cv2, argparse 7 | 8 | def parse_args(): 9 | '''parse command line arguments''' 10 | parser = argparse.ArgumentParser("Convert pgm image to png or jpg") 11 | 12 | parser.add_argument("directory", default=None, 13 | help="directory containing PGM image files") 14 | parser.add_argument("--output-directory", default=None, 15 | help="directory to use for converted files") 16 | parser.add_argument("--format", default='png', choices=['png', 'jpg'], help="type of file to convert to (png or jpg)") 17 | return parser.parse_args() 18 | 19 | def process(args): 20 | '''process a set of files''' 21 | 22 | files = [] 23 | if os.path.isdir(args.directory): 24 | files.extend(glob.glob(os.path.join(args.directory, '*.pgm'))) 25 | else: 26 | if args.directory.find('*') != -1: 27 | files.extend(glob.glob(args.directory)) 28 | else: 29 | files.append(args.directory) 30 | files.sort() 31 | 32 | for f in files: 33 | im_orig = cv2.imread(f,-1) 34 | im_colour = cv2.cvtColor(im_orig, cv2.COLOR_BAYER_GR2BGR) 35 | if not args.output_directory: 36 | outdir = os.path.dirname(f) 37 | else: 38 | outdir = args.output_directory 39 | basename = os.path.basename(f)[:-4] 40 | new_name = os.path.join(outdir, basename + '.' + args.format) 41 | print("Creating %s" % new_name) 42 | cv2.imwrite(new_name, im_colour) 43 | 44 | if __name__ == '__main__': 45 | args = parse_args() 46 | 47 | # main program 48 | process(args) 49 | -------------------------------------------------------------------------------- /capturescripts/chameleon/setup.py: -------------------------------------------------------------------------------- 1 | #from distutils.core import setup, Extension 2 | import platform, os 3 | from setuptools import setup, Extension 4 | import numpy as np 5 | 6 | ext_modules = [] 7 | 8 | if platform.system() == 'Windows': 9 | extra_compile_args=["-std=gnu99", "-O3"] 10 | else: 11 | if platform.machine().find('arm') != -1: 12 | extra_compile_args=["-std=gnu99", "-O3", "-mfpu=neon"] 13 | else: 14 | extra_compile_args=["-std=gnu99", "-O3"] 15 | 16 | chameleon = Extension('chameleon', 17 | sources = ['chameleon_py.c', 18 | 'chameleon.c', 19 | 'chameleon_util.c'], 20 | libraries = ['dc1394', 'm', 'usb-1.0'], 21 | extra_compile_args=extra_compile_args + ['-O0']) 22 | ext_modules.append(chameleon) 23 | 24 | setup( 25 | ext_modules=ext_modules, 26 | include_dirs=[np.get_include(), './include'], 27 | ) 28 | -------------------------------------------------------------------------------- /capturescripts/chameleon/start_chameleon_capture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # set timezone to GMT 7 | export TZ=GMT 8 | 9 | CAPTURE_DIR=~/images_captured 10 | DATETIME_DIR=$(date +"%Y%m%d_%H-%M-%S") 11 | 12 | mkdir -p ${CAPTURE_DIR}/${DATETIME_DIR} 13 | 14 | # start chameleon capture. Images stored in ${CAPTURE_DIR}/${DATETIME_DIR} 15 | python ./py_capture.py --save=${CAPTURE_DIR}/${DATETIME_DIR}/ 16 | 17 | 18 | -------------------------------------------------------------------------------- /cuav/__init__.py: -------------------------------------------------------------------------------- 1 | '''CanberraUAV python library - see http://www.canberrauav.com''' 2 | 3 | -------------------------------------------------------------------------------- /cuav/camera/__init__.py: -------------------------------------------------------------------------------- 1 | '''CUAV camera library''' 2 | -------------------------------------------------------------------------------- /cuav/data/CMAC-boundary.txt: -------------------------------------------------------------------------------- 1 | # CMAC search boundary 2 | -35.36298956853007 149.1652111425666 3 | -35.367076 149.165802 4 | -35.367590 149.160338 5 | -35.360217 149.158789 6 | -35.359446 149.164563 7 | -35.36298956853007 149.1652111425666 8 | -------------------------------------------------------------------------------- /cuav/data/CMAC-fence.txt: -------------------------------------------------------------------------------- 1 | -35.363149 149.162398 2 | -35.355800 149.167742 3 | -35.357309 149.154038 4 | -35.371001 149.155889 5 | -35.369239 149.171959 6 | -35.355800 149.167742 7 | 8 | -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00000.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00001.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00003.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00004.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00005.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00006.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/calib00007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/ChameleonArecort/calib00007.png -------------------------------------------------------------------------------- /cuav/data/ChameleonArecort/params.json: -------------------------------------------------------------------------------- 1 | { 2 | "yresolution": 960, 3 | "D": [ 4 | [ 5 | -0.32890513407068056 6 | ], 7 | [ 8 | 0.2159396990180609 9 | ], 10 | [ 11 | 0.0029645761934150965 12 | ], 13 | [ 14 | 0.002599542670562016 15 | ], 16 | [ 17 | -0.1134707226971591 18 | ] 19 | ], 20 | "K": [ 21 | [ 22 | 1045.3479654266523, 23 | 0.0, 24 | 645.0408552616645 25 | ], 26 | [ 27 | 0.0, 28 | 1057.794600140546, 29 | 471.2852485332886 30 | ], 31 | [ 32 | 0.0, 33 | 0.0, 34 | 1.0 35 | ] 36 | ], 37 | "lens": 4.0, 38 | "version": 0, 39 | "sensorwidth": 5.0, 40 | "xresolution": 1280 41 | } 42 | -------------------------------------------------------------------------------- /cuav/data/OBC_search.txt: -------------------------------------------------------------------------------- 1 | # OBC2010 search area 2 | -26.6174450000 151.8431840000 3 | -26.6191710000 151.8555730000 4 | -26.6378430000 151.8515970000 5 | -26.6388280000 151.8491210000 6 | -26.6373930000 151.8393860000 7 | -26.6174450000 151.8431840000 8 | -------------------------------------------------------------------------------- /cuav/data/OBC_search2.txt: -------------------------------------------------------------------------------- 1 | # OBC2010 search area with 50m buffer 2 | -26.616937 151.842710 3 | -26.637630 151.839027 4 | -26.639171 151.849302 5 | -26.638147 151.851995 6 | -26.618883 151.856013 7 | -26.616937 151.842710 8 | -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/15.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/16.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/17.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/18.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/19.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/2.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/20.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/21.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/3.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/full/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/full/6.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/15.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/16.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/17.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/18.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/19.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/2.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/20.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/21.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/3.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/half/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/data/PiCamV2/half/6.jpg -------------------------------------------------------------------------------- /cuav/data/PiCamV2/params.json: -------------------------------------------------------------------------------- 1 | { 2 | "yresolution": 2464, 3 | "D": [ 4 | [ 5 | 0.169265116367196, 6 | -0.2542927293382999, 7 | -0.00376779279634671, 8 | 0.0028627661264100223, 9 | -0.47036977591158924 10 | ] 11 | ], 12 | "K": [ 13 | [ 14 | 2619.531502594297, 15 | 0.0, 16 | 1626.6592353089773 17 | ], 18 | [ 19 | 0.0, 20 | 2619.0101070738315, 21 | 1234.1532801497171 22 | ], 23 | [ 24 | 0.0, 25 | 0.0, 26 | 1.0 27 | ] 28 | ], 29 | "lens": 3.0, 30 | "version": 0, 31 | "sensorwidth": 3.68, 32 | "xresolution": 3280 33 | } 34 | -------------------------------------------------------------------------------- /cuav/data/PiCamV2/params_half.json: -------------------------------------------------------------------------------- 1 | { 2 | "yresolution": 1232, 3 | "D": [ 4 | [ 5 | 0.16641467032409257, 6 | -0.2234393189584932, 7 | -0.0037763249278537124, 8 | 0.0024124935430655313, 9 | -0.6079587461332615 10 | ] 11 | ], 12 | "K": [ 13 | [ 14 | 1329.4945879587194, 15 | 0.0, 16 | 809.9528740604338 17 | ], 18 | [ 19 | 0.0, 20 | 1329.336471299515, 21 | 618.5527699408506 22 | ], 23 | [ 24 | 0.0, 25 | 0.0, 26 | 1.0 27 | ] 28 | ], 29 | "lens": 3.0, 30 | "version": 0, 31 | "sensorwidth": 3.68, 32 | "xresolution": 1640 33 | } 34 | -------------------------------------------------------------------------------- /cuav/data/fence.txt: -------------------------------------------------------------------------------- 1 | -26.587662 151.845894 2 | -26.609574 151.863100 3 | -26.638958 151.858839 4 | -26.644972 151.847224 5 | -26.643572 151.830350 6 | -26.569564 151.837373 7 | -26.569956 151.839405 8 | -26.576823 151.841142 9 | -26.581720 151.840740 10 | -26.577078 151.839735 11 | -26.582060 151.842503 12 | -26.579179 151.849329 13 | -26.589689 151.850146 14 | -26.585139 151.834829 15 | -26.609574 151.863100 16 | -------------------------------------------------------------------------------- /cuav/data/fence2014ANorth.txt: -------------------------------------------------------------------------------- 1 | -26.5876621644 151.8458942647 2 | -26.569564 151.837373 3 | -26.569956 151.839405 4 | -26.576823 151.841142 5 | -26.5770776944 151.8397352222 6 | -26.5817200833 151.8407402778 7 | -26.5820599087 151.8425026348 8 | -26.5851387587 151.8348293899 9 | -26.569564 151.837373 10 | -------------------------------------------------------------------------------- /cuav/data/fence2014BSouth.txt: -------------------------------------------------------------------------------- 1 | -26.5876621644 151.8458942647 2 | -26.5820599087 151.8425026348 3 | -26.579179 151.849329 4 | -26.5896893428 151.8501455817 5 | -26.609574 151.863100 6 | -26.638958 151.858839 7 | -26.6449723895 151.8472241047 8 | -26.643572 151.830350 9 | -26.5851387587 151.8348293899 10 | -26.5820599087 151.8425026348 11 | -------------------------------------------------------------------------------- /cuav/data/fence2014Full.txt: -------------------------------------------------------------------------------- 1 | -26.5876621644 151.8458942647 2 | -26.569564 151.837373 3 | -26.569956 151.839405 4 | -26.576823 151.841142 5 | -26.5770776944 151.8397352222 6 | -26.5817200833 151.8407402778 7 | -26.5820599087 151.8425026348 8 | -26.579179 151.849329 9 | -26.5896893428 151.8501455817 10 | -26.609574 151.863100 11 | -26.638958 151.858839 12 | -26.6449723895 151.8472241047 13 | -26.643572 151.830350 14 | -26.5851387587 151.8348293899 15 | -26.569564 151.837373 16 | -------------------------------------------------------------------------------- /cuav/data/scrutineering-2014.txt: -------------------------------------------------------------------------------- 1 | QGC WPL 110 2 | # Airfield home 3 | 0 1 0 16 0.000000 0.000000 0.000000 0.000000 -26.5876621644 151.8458942647 441.000000 1 4 | # Jump to TST-1 5 | 1 0 10 177 18.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 6 | # Takeoff 7 | 2 0 10 22 12.000000 0.000000 0.000000 0.000000 -26.585745 151.840867 60.000000 1 8 | # Jump to TST-1 9 | 3 0 10 177 18.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 10 | # Landing approach 11 | 4 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.592155 151.842225 80.000000 1 12 | # Change to 25 m/s 13 | 5 0 10 178 0.000000 25.000000 20.000000 0.000000 0.000000 0.000000 0.000000 1 14 | # Change throttle to 20%% 15 | 6 0 10 178 1.000000 25.000000 20.000000 0.000000 0.000000 0.000000 0.000000 1 16 | # Landing approach 2 17 | 7 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.588218 151.841345 30.000000 1 18 | # Change to 20 m/s 19 | 8 0 10 178 0.000000 20.000000 12.000000 0.000000 0.000000 0.000000 0.000000 1 20 | # Change throttle to 12%% 21 | 9 0 10 178 1.000000 20.000000 12.000000 0.000000 0.000000 0.000000 0.000000 1 22 | # Landing 23 | 10 0 10 21 0.000000 0.000000 0.000000 0.000000 -26.582821 151.840247 0.000000 1 24 | # Comms Failure 25 | 11 0 10 177 13.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 26 | # loiter 2 minutes 27 | 12 0 10 19 120.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 28 | # Airfield home 29 | 13 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.5876621644 151.8458942647 100.000000 1 30 | # loiter 31 | 14 0 10 17 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 32 | # GPS fail - loiter 30 secs 33 | 15 0 10 19 30.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 34 | # Airfield home 35 | 16 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.5876621644 151.8458942647 100.000000 1 36 | # loiter 37 | 17 0 10 17 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 38 | # Scrutineering Mission (TST-1, -2, -3) 39 | 18 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.5855296256 151.8382032904 100.0000 1 40 | 19 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.5859618185 151.8451373142 100.0000 1 41 | 20 0 10 16 0.000000 0.000000 0.000000 0.000000 -26.5902280387 151.8400929439 100.0000 1 42 | # Jump to TST-1 43 | 21 0 10 177 18.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 44 | 45 | -------------------------------------------------------------------------------- /cuav/data/scrutineering.txt: -------------------------------------------------------------------------------- 1 | QGC WPL 110 2 | # Airfield home 3 | 0 1 0 16 0.000000 0.000000 0.000000 0.000000 -26.584778 151.842333 441.000000 1 4 | # Jump to entry lane 5 | 1 0 3 177 20.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 6 | # jump dummy 7 | 2 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 8 | # Takeoff 9 | 3 0 3 22 12.000000 0.000000 0.000000 0.000000 -26.585745 151.840867 50.000000 1 10 | # Jump to entry lane 11 | 4 0 3 177 20.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 12 | # jump dummy 13 | 5 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 14 | # takeoff2 15 | 6 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 16 | # takeoff3 17 | 7 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 18 | # takeoff4 19 | 8 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 20 | # Landing approach 21 | 9 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.592155 151.842225 80.000000 1 22 | # Change to 25 m/s 23 | 10 0 3 178 0.000000 25.000000 20.000000 0.000000 0.000000 0.000000 0.000000 1 24 | # Change throttle to 20%% 25 | 11 0 3 178 1.000000 25.000000 20.000000 0.000000 0.000000 0.000000 0.000000 1 26 | # Landing approach 2 27 | 12 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.588218 151.841345 30.000000 1 28 | # Change to 20 m/s 29 | 13 0 3 178 0.000000 20.000000 12.000000 0.000000 0.000000 0.000000 0.000000 1 30 | # Change throttle to 12%% 31 | 14 0 3 178 1.000000 20.000000 12.000000 0.000000 0.000000 0.000000 0.000000 1 32 | # Landing 33 | 15 0 3 21 0.000000 0.000000 0.000000 0.000000 -26.582821 151.840247 0.000000 1 34 | # landing dummy 35 | 16 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 36 | # Search 1 37 | 17 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.583028 151.837833 100 1 38 | # Search 2 39 | 18 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.584472 151.845694 100 1 40 | # Search 3 41 | 19 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.589778 151.846083 100 1 42 | # Search 4 43 | 20 0 3 16 0.000000 0.000000 0.000000 0.000000 -26.589556 151.838056 100 1 44 | # Jump to search 1 45 | 21 0 3 177 17.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 46 | # jump dummy 47 | 22 0 3 16 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 48 | -------------------------------------------------------------------------------- /cuav/image/.gitignore: -------------------------------------------------------------------------------- 1 | /blobtest 2 | /hgram_scanner 3 | /hgram_scanner2 4 | /hgram_scanner8 5 | /histtest 6 | /image.lib 7 | /joe.jpg 8 | /neighbours.pnm 9 | *.so 10 | -------------------------------------------------------------------------------- /cuav/image/Makefile: -------------------------------------------------------------------------------- 1 | CC=gcc 2 | CXX=g++ 3 | AR=ar 4 | INCLUDES=$(shell python-config --includes) 5 | #CC=arm-linux-gnueabi-gcc 6 | #CXX=arm-linux-gnueabi-g++ 7 | #AR=arm-linux-gnueabi-ar 8 | 9 | CXXFLAGS=-Wall -O3 10 | LISTOPTS=-adhlns=$(@:.o=.lst) 11 | #CFLAGS=-Wall -std=gnu99 -fPIC -O3 -mfpu=neon -ftree-vectorize -Wa,$(LISTOPTS) $(INCLUDES) 12 | ARCH:=$(shell arch) 13 | ifeq ($(ARCH),armv71) 14 | CFLAGS=-Wall -std=gnu99 -fPIC -O3 -mfpu=neon -ftree-vectorize -Wa,$(LISTOPTS) $(INCLUDES) 15 | else 16 | CFLAGS=-Wall -std=gnu99 -fPIC -O3 -Wa,$(LISTOPTS) $(INCLUDES) 17 | endif 18 | 19 | all: scanner.so 20 | 21 | scanner.so: scanner.o 22 | $(CC) -shared -o scanner.so scanner.o $(LIBS) $(shell python-config --libs) 23 | 24 | clean: 25 | rm -f *.o *.so *~ *.bak 26 | -------------------------------------------------------------------------------- /cuav/image/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/image/__init__.py -------------------------------------------------------------------------------- /cuav/image/include/imageutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | Image format routines 3 | 4 | Copyright Andrew Tridgell 2013 5 | Released under GNU GPL v3 or later 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #ifdef _MSC_VER 13 | #define PACKED( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) ) 14 | #else 15 | #define PACKED __attribute__((__packed__)) 16 | #endif 17 | 18 | #ifdef _MSC_VER 19 | PACKED( 20 | struct bgr 21 | { 22 | uint8_t b; 23 | uint8_t g; 24 | uint8_t r; 25 | }); 26 | #else 27 | struct PACKED bgr { 28 | uint8_t b, g, r; 29 | }; 30 | #endif 31 | 32 | /* 33 | greyscale 8 bit image 34 | */ 35 | struct grey_image8 { 36 | uint32_t width; 37 | uint32_t height; 38 | uint8_t **data; 39 | }; 40 | 41 | /* 42 | general purpose BGR 8 bit image 43 | */ 44 | struct bgr_image { 45 | uint32_t width; 46 | uint32_t height; 47 | struct bgr **data; 48 | }; 49 | 50 | /* 51 | allocate a N dimensional array with a given element size and header 52 | size. Can be freed with free() 53 | */ 54 | void *any_matrix(uint8_t dimension, 55 | uint16_t el_size, 56 | uint32_t header_size, ...); 57 | 58 | /* 59 | allocate an RGM 8 bit image 60 | */ 61 | struct bgr_image *allocate_bgr_image8(uint16_t height, 62 | uint16_t width, 63 | const struct bgr *data); 64 | 65 | /* 66 | allocate a greyscale 8 bit image 67 | */ 68 | struct grey_image8 *allocate_grey_image8(uint16_t height, 69 | uint16_t width, 70 | const uint8_t *data); 71 | 72 | /* 73 | copy image data from one image to another of same size 74 | */ 75 | void copy_bgr_image8(const struct bgr_image *in, 76 | struct bgr_image *out); 77 | 78 | -------------------------------------------------------------------------------- /cuav/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/lib/__init__.py -------------------------------------------------------------------------------- /cuav/lib/camera_view.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import picamera 4 | import video_encode 5 | import io 6 | import numpy 7 | import cv2 8 | from MAVProxy.modules.lib import mp_image 9 | 10 | viewer = mp_image.MPImage(title='Image', width=200, height=200, auto_size=True) 11 | 12 | def cap_image_CV(): 13 | '''capture one image''' 14 | s = io.BytesIO() 15 | camera.capture(s, "jpeg") 16 | s.seek(0) 17 | data = numpy.fromstring(s.getvalue(), dtype=numpy.uint8) 18 | return cv2.imdecode(data, 1) 19 | 20 | import argparse 21 | import sys 22 | 23 | ap = argparse.ArgumentParser() 24 | ap.add_argument("--crop", type=str, default=None) 25 | ap.add_argument("--flipH", action='store_true', default=False) 26 | ap.add_argument("--flipV", action='store_true', default=False) 27 | ap.add_argument("--resX", type=int, default=1024) 28 | ap.add_argument("--resY", type=int, default=768) 29 | args = ap.parse_args() 30 | 31 | crop = None 32 | if args.crop: 33 | c = args.crop.split(",") 34 | if len(c) == 4: 35 | crop = (int(c[0]), int(c[1]), int(c[2]), int(c[3])) 36 | 37 | camera = picamera.PiCamera(resolution=(args.resX,args.resY)) 38 | 39 | def crop_image(img): 40 | '''crop image as requested''' 41 | if crop is None: 42 | return img 43 | (x,y,w,h) = crop 44 | return img[y:y+h,x:x+w] 45 | 46 | while True: 47 | img = cap_image_CV() 48 | if args.flipV: 49 | img = cv2.flip(img, 0)[:,:] 50 | if args.flipH: 51 | img = cv2.flip(img, 1)[:,:] 52 | img = crop_image(img) 53 | viewer.set_image(img,bgr=True) 54 | -------------------------------------------------------------------------------- /cuav/lib/crop_test.sh: -------------------------------------------------------------------------------- 1 | ./video_encode.py ../data/clock5/image0???.jpg --crop 340,20,300,300 2 | -------------------------------------------------------------------------------- /cuav/lib/video_encode_decode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | encode and then decode video, displaying original and decoded frames 4 | ''' 5 | 6 | import io 7 | import argparse 8 | import sys 9 | import cv2 10 | import time 11 | from MAVProxy.modules.lib import mp_image 12 | 13 | # construct the argument parse and parse the arguments 14 | ap = argparse.ArgumentParser() 15 | ap.add_argument("--delay", type=float, default=1.0) 16 | ap.add_argument("--crop", type=str, default=None) 17 | ap.add_argument("--x265", action='store_true', default=False) 18 | ap.add_argument("imgs", type=str, nargs='+') 19 | args = ap.parse_args() 20 | 21 | if len(args.imgs) < 2: 22 | print("Need at least 2 images") 23 | sys.exit(1) 24 | 25 | if args.x265: 26 | import video_encode_x265 27 | import video_decode_dec265 28 | 29 | encoder = video_encode_x265.VideoWriter() 30 | decoder = video_decode_dec265.VideoReader() 31 | else: 32 | import video_encode 33 | import video_play 34 | 35 | encoder = video_encode.VideoWriter() 36 | decoder = video_play.VideoReader() 37 | 38 | if args.crop: 39 | encoder.set_cropstr(args.crop) 40 | 41 | viewer_in = mp_image.MPImage(title='Original', width=200, height=200, auto_size=True) 42 | viewer_out = mp_image.MPImage(title='Decoded', width=200, height=200, auto_size=True) 43 | 44 | idx = 0 45 | timestamp_ms = 0 46 | 47 | enc_saved = open("enc.dat", "wb") 48 | 49 | total_bytes = 0 50 | total_frames = 0 51 | 52 | while True: 53 | time.sleep(args.delay) 54 | img = cv2.imread(args.imgs[idx]) 55 | cropped = encoder.crop_image(img) 56 | 57 | viewer_in.set_image(cropped) 58 | enc = encoder.add_image(img, timestamp_ms) 59 | 60 | timestamp_ms += 1000 61 | idx = (idx + 1) % len(args.imgs) 62 | 63 | if enc is None: 64 | continue 65 | enc_saved.write(enc) 66 | enc_saved.flush() 67 | 68 | encoder.report() 69 | 70 | total_bytes += len(enc) 71 | 72 | img = decoder.get_image(bytearray(enc)) 73 | if img is None: 74 | continue 75 | while img is not None: 76 | total_frames += 1 77 | viewer_out.set_image(img) 78 | #time.sleep(args.delay/4) 79 | img = decoder.get_image(bytearray('')) 80 | print("%u bytes/frame" % (total_bytes//total_frames)) 81 | -------------------------------------------------------------------------------- /cuav/modules/__init__.py: -------------------------------------------------------------------------------- 1 | # Allow imports. 2 | -------------------------------------------------------------------------------- /cuav/tools/__init__.py: -------------------------------------------------------------------------------- 1 | '''CUAV tools library''' 2 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/BeagleBoneBlack.txt: -------------------------------------------------------------------------------- 1 | debayer: 32.0 fps 2 | debayer_full: 9.6 fps 3 | debayer_cv_full: 44.5 fps 4 | RGB2HSV_full: 12.7 fps 5 | RGB2HSV_640: 50.6 fps 6 | rect_extract: 2842.3 fps 7 | SubImage: 6252.3 fps 8 | downsample: 16.7 fps 9 | scan: 12.9 fps 10 | scan_full: 3.2 fps 11 | jpeg full quality 30: 4.2 fps 74174 bytes 12 | jpeg full quality 40: 4.1 fps 99529 bytes 13 | jpeg full quality 50: 4.0 fps 125901 bytes 14 | jpeg full quality 60: 3.9 fps 155804 bytes 15 | jpeg full quality 70: 3.8 fps 201706 bytes 16 | jpeg full quality 80: 3.5 fps 279576 bytes 17 | jpeg full quality 90: 3.1 fps 477535 bytes 18 | jpeg full quality 95: 2.7 fps 726031 bytes 19 | EncodeImage full quality 30: 4.0 fps 89505 bytes 20 | EncodeImage full quality 40: 3.9 fps 117468 bytes 21 | EncodeImage full quality 50: 3.7 fps 145895 bytes 22 | EncodeImage full quality 60: 3.6 fps 177579 bytes 23 | EncodeImage full quality 70: 3.5 fps 226079 bytes 24 | EncodeImage full quality 80: 3.2 fps 308966 bytes 25 | EncodeImage full quality 90: 2.9 fps 516219 bytes 26 | EncodeImage full quality 95: 2.5 fps 772236 bytes 27 | jpeg 640 quality 30: 17.2 fps 11782 bytes 28 | jpeg 640 quality 40: 17.0 fps 15655 bytes 29 | jpeg 640 quality 50: 16.7 fps 19940 bytes 30 | jpeg 640 quality 60: 16.4 fps 24990 bytes 31 | jpeg 640 quality 70: 15.9 fps 33404 bytes 32 | jpeg 640 quality 80: 15.2 fps 47911 bytes 33 | jpeg 640 quality 90: 13.6 fps 85898 bytes 34 | jpeg 640 quality 95: 12.1 fps 142324 bytes 35 | thumb 10 quality 85: 3842.5 fps 740 bytes 36 | thumb 20 quality 85: 2644.3 fps 802 bytes 37 | thumb 40 quality 85: 1490.1 fps 1015 bytes 38 | thumb 60 quality 85: 832.5 fps 1547 bytes 39 | thumb 80 quality 85: 536.6 fps 2140 bytes 40 | thumb 100 quality 85: 324.1 fps 3105 bytes 41 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/Edison-500MHz.txt: -------------------------------------------------------------------------------- 1 | debayer: 18.9 fps 2 | debayer_full: 4.8 fps 3 | debayer_cv_full: 82.4 fps 4 | RGB2HSV_full: 5.5 fps 5 | RGB2HSV_640: 22.1 fps 6 | rect_extract: 3822.9 fps 7 | SubImage: 3378.1 fps 8 | downsample: 16.8 fps 9 | scan: 11.1 fps 10 | scan_full: 2.8 fps 11 | jpeg full quality 30: 2.5 fps 74174 bytes 12 | jpeg full quality 40: 2.4 fps 99529 bytes 13 | jpeg full quality 50: 2.3 fps 125901 bytes 14 | jpeg full quality 60: 2.2 fps 155804 bytes 15 | jpeg full quality 70: 2.1 fps 201706 bytes 16 | jpeg full quality 80: 2.0 fps 279576 bytes 17 | jpeg full quality 90: 1.7 fps 477535 bytes 18 | jpeg full quality 95: 1.4 fps 726031 bytes 19 | EncodeImage full quality 30: 2.3 fps 89505 bytes 20 | EncodeImage full quality 40: 2.2 fps 117468 bytes 21 | EncodeImage full quality 50: 2.1 fps 145895 bytes 22 | EncodeImage full quality 60: 2.1 fps 177579 bytes 23 | EncodeImage full quality 70: 2.0 fps 226079 bytes 24 | EncodeImage full quality 80: 1.8 fps 308966 bytes 25 | EncodeImage full quality 90: 1.5 fps 516219 bytes 26 | EncodeImage full quality 95: 1.3 fps 772236 bytes 27 | jpeg 640 quality 30: 10.3 fps 11782 bytes 28 | jpeg 640 quality 40: 10.0 fps 15655 bytes 29 | jpeg 640 quality 50: 9.8 fps 19940 bytes 30 | jpeg 640 quality 60: 9.5 fps 24990 bytes 31 | jpeg 640 quality 70: 9.2 fps 33404 bytes 32 | jpeg 640 quality 80: 8.6 fps 47911 bytes 33 | jpeg 640 quality 90: 7.4 fps 85898 bytes 34 | jpeg 640 quality 95: 6.2 fps 142324 bytes 35 | thumb 10 quality 85: 2085.0 fps 740 bytes 36 | thumb 20 quality 85: 1433.8 fps 802 bytes 37 | thumb 40 quality 85: 815.9 fps 1015 bytes 38 | thumb 60 quality 85: 457.9 fps 1547 bytes 39 | thumb 80 quality 85: 303.8 fps 2140 bytes 40 | thumb 100 quality 85: 186.3 fps 3105 bytes 41 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/Lenono-X230-2.9GHz-laptop-Linux.txt: -------------------------------------------------------------------------------- 1 | debayer: 792.6 fps 2 | debayer_full: 144.0 fps 3 | debayer_cv_full: 1307.5 fps 4 | RGB2HSV_full: 167.8 fps 5 | RGB2HSV_640: 378.3 fps 6 | rect_extract: 23456.8 fps 7 | SubImage: 30608.7 fps 8 | downsample: 176.6 fps 9 | scan: 102.8 fps 10 | scan_full: 20.5 fps 11 | jpeg full quality 30: 64.1 fps 74132 bytes 12 | jpeg full quality 40: 59.0 fps 99422 bytes 13 | jpeg full quality 50: 54.6 fps 125759 bytes 14 | jpeg full quality 60: 50.4 fps 155615 bytes 15 | jpeg full quality 70: 45.0 fps 201577 bytes 16 | jpeg full quality 80: 38.6 fps 278983 bytes 17 | jpeg full quality 90: 29.3 fps 474062 bytes 18 | jpeg full quality 95: 23.4 fps 720708 bytes 19 | EncodeImage full quality 30: 50.0 fps 89452 bytes 20 | EncodeImage full quality 40: 46.3 fps 117397 bytes 21 | EncodeImage full quality 50: 43.4 fps 145765 bytes 22 | EncodeImage full quality 60: 40.5 fps 177494 bytes 23 | EncodeImage full quality 70: 37.2 fps 225802 bytes 24 | EncodeImage full quality 80: 32.4 fps 308355 bytes 25 | EncodeImage full quality 90: 25.4 fps 512034 bytes 26 | EncodeImage full quality 95: 20.9 fps 766684 bytes 27 | jpeg 640 quality 30: 272.9 fps 11784 bytes 28 | jpeg 640 quality 40: 260.3 fps 15652 bytes 29 | jpeg 640 quality 50: 241.6 fps 19930 bytes 30 | jpeg 640 quality 60: 227.4 fps 24982 bytes 31 | jpeg 640 quality 70: 205.1 fps 33397 bytes 32 | jpeg 640 quality 80: 179.0 fps 47880 bytes 33 | jpeg 640 quality 90: 140.0 fps 85380 bytes 34 | jpeg 640 quality 95: 103.6 fps 141336 bytes 35 | thumb 10 quality 85: 17646.1 fps 741 bytes 36 | thumb 20 quality 85: 15005.9 fps 799 bytes 37 | thumb 40 quality 85: 10644.9 fps 1017 bytes 38 | thumb 60 quality 85: 7040.3 fps 1551 bytes 39 | thumb 80 quality 85: 5226.5 fps 2142 bytes 40 | thumb 100 quality 85: 3264.1 fps 3095 bytes 41 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/Odroid-U3.txt: -------------------------------------------------------------------------------- 1 | debayer: 89.9 fps 2 | debayer_full: 23.0 fps 3 | debayer_cv_full: 98.0 fps 4 | RGB2HSV_full: 28.6 fps 5 | RGB2HSV_640: 114.9 fps 6 | rect_extract: 11357.1 fps 7 | SubImage: 17930.5 fps 8 | downsample: 60.7 fps 9 | scan: 37.4 fps 10 | scan_full: 9.3 fps 11 | jpeg full quality 30: 23.5 fps 74132 bytes 12 | jpeg full quality 40: 22.7 fps 99422 bytes 13 | jpeg full quality 50: 21.9 fps 125759 bytes 14 | jpeg full quality 60: 21.0 fps 155615 bytes 15 | jpeg full quality 70: 19.9 fps 201577 bytes 16 | jpeg full quality 80: 18.3 fps 278983 bytes 17 | jpeg full quality 90: 15.8 fps 474062 bytes 18 | jpeg full quality 95: 13.7 fps 720708 bytes 19 | EncodeImage full quality 30: 19.9 fps 89452 bytes 20 | EncodeImage full quality 40: 19.2 fps 117397 bytes 21 | EncodeImage full quality 50: 18.5 fps 145765 bytes 22 | EncodeImage full quality 60: 17.8 fps 177494 bytes 23 | EncodeImage full quality 70: 16.9 fps 225802 bytes 24 | EncodeImage full quality 80: 15.6 fps 308355 bytes 25 | EncodeImage full quality 90: 13.6 fps 512034 bytes 26 | EncodeImage full quality 95: 11.9 fps 766684 bytes 27 | jpeg 640 quality 30: 97.6 fps 11784 bytes 28 | jpeg 640 quality 40: 95.3 fps 15652 bytes 29 | jpeg 640 quality 50: 92.7 fps 19930 bytes 30 | jpeg 640 quality 60: 90.2 fps 24982 bytes 31 | jpeg 640 quality 70: 86.0 fps 33397 bytes 32 | jpeg 640 quality 80: 80.2 fps 47880 bytes 33 | jpeg 640 quality 90: 70.1 fps 85380 bytes 34 | jpeg 640 quality 95: 61.8 fps 141336 bytes 35 | thumb 10 quality 85: 8669.1 fps 741 bytes 36 | thumb 20 quality 85: 7094.7 fps 799 bytes 37 | thumb 40 quality 85: 4922.9 fps 1017 bytes 38 | thumb 60 quality 85: 3109.4 fps 1551 bytes 39 | thumb 80 quality 85: 2212.9 fps 2142 bytes 40 | thumb 100 quality 85: 1410.2 fps 3095 bytes 41 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/Odroid-X2.txt: -------------------------------------------------------------------------------- 1 | debayer: 682.1 fps 2 | debayer_full: 122.7 fps 3 | debayer_cv_full: 102.9 fps 4 | RGB2HSV_full: 29.8 fps 5 | RGB2HSV_640: 119.8 fps 6 | rect_extract: 12895.2 fps 7 | SubImage: 20964.2 fps 8 | downsample: 192.0 fps 9 | scan: 50.7 fps 10 | jpeg full quality 30: 34.8 fps 99488 bytes 11 | jpeg full quality 40: 32.5 fps 131725 bytes 12 | jpeg full quality 50: 30.5 fps 164189 bytes 13 | jpeg full quality 60: 28.7 fps 200547 bytes 14 | jpeg full quality 70: 26.3 fps 257939 bytes 15 | jpeg full quality 80: 23.2 fps 365157 bytes 16 | jpeg full quality 90: 18.5 fps 641580 bytes 17 | jpeg full quality 95: 15.8 fps 982652 bytes 18 | EncodeImage full quality 30: 22.1 fps 89452 bytes 19 | EncodeImage full quality 40: 21.4 fps 117397 bytes 20 | EncodeImage full quality 50: 20.6 fps 145765 bytes 21 | EncodeImage full quality 60: 19.9 fps 177494 bytes 22 | EncodeImage full quality 70: 18.7 fps 225802 bytes 23 | EncodeImage full quality 80: 17.3 fps 308355 bytes 24 | EncodeImage full quality 90: 15.3 fps 512034 bytes 25 | EncodeImage full quality 95: 13.4 fps 766684 bytes 26 | jpeg 640 quality 30: 146.4 fps 16354 bytes 27 | jpeg 640 quality 40: 140.5 fps 21613 bytes 28 | jpeg 640 quality 50: 134.6 fps 27261 bytes 29 | jpeg 640 quality 60: 127.9 fps 33943 bytes 30 | jpeg 640 quality 70: 118.4 fps 44550 bytes 31 | jpeg 640 quality 80: 105.6 fps 62991 bytes 32 | jpeg 640 quality 90: 85.2 fps 116587 bytes 33 | jpeg 640 quality 95: 71.1 fps 195916 bytes 34 | thumb 10 quality 85: 9071.1 fps 761 bytes 35 | thumb 20 quality 85: 7856.7 fps 847 bytes 36 | thumb 40 quality 85: 5611.0 fps 1149 bytes 37 | thumb 60 quality 85: 3620.6 fps 1911 bytes 38 | thumb 80 quality 85: 2593.8 fps 2762 bytes 39 | thumb 100 quality 85: 1726.0 fps 4114 bytes 40 | -------------------------------------------------------------------------------- /cuav/tools/benchmarks/RaspberryPi.txt: -------------------------------------------------------------------------------- 1 | debayer: 62.6 fps 2 | debayer_full: 18.0 fps 3 | debayer_cv_full: 18.4 fps 4 | RGB2HSV_full: 5.1 fps 5 | RGB2HSV_640: 22.6 fps 6 | rect_extract: 630.1 fps 7 | SubImage: 1476.7 fps 8 | downsample: 26.4 fps 9 | scan: 7.8 fps 10 | jpeg full quality 30: 0.8 fps 99488 bytes 11 | jpeg full quality 40: 0.6 fps 131725 bytes 12 | jpeg full quality 50: 0.8 fps 164189 bytes 13 | jpeg full quality 60: 0.6 fps 200547 bytes 14 | jpeg full quality 70: 0.7 fps 257939 bytes 15 | jpeg full quality 80: 0.5 fps 365157 bytes 16 | jpeg full quality 90: 0.5 fps 641580 bytes 17 | jpeg full quality 95: 0.4 fps 982652 bytes 18 | EncodeImage full quality 30: 1.4 fps 89505 bytes 19 | EncodeImage full quality 40: 1.2 fps 117468 bytes 20 | EncodeImage full quality 50: 1.6 fps 145895 bytes 21 | EncodeImage full quality 60: 1.6 fps 177579 bytes 22 | EncodeImage full quality 70: 1.4 fps 226079 bytes 23 | EncodeImage full quality 80: 0.9 fps 308966 bytes 24 | EncodeImage full quality 90: 1.3 fps 516219 bytes 25 | EncodeImage full quality 95: 1.2 fps 772236 bytes 26 | jpeg 640 quality 30: 2.9 fps 16354 bytes 27 | jpeg 640 quality 40: 1.7 fps 21613 bytes 28 | jpeg 640 quality 50: 3.0 fps 27261 bytes 29 | jpeg 640 quality 60: 3.4 fps 33943 bytes 30 | jpeg 640 quality 70: 3.3 fps 44550 bytes 31 | jpeg 640 quality 80: 2.8 fps 62991 bytes 32 | jpeg 640 quality 90: 2.6 fps 116587 bytes 33 | jpeg 640 quality 95: 2.3 fps 195916 bytes 34 | thumb 10 quality 85: 444.7 fps 761 bytes 35 | thumb 20 quality 85: 515.6 fps 847 bytes 36 | thumb 40 quality 85: 292.6 fps 1149 bytes 37 | thumb 60 quality 85: 144.1 fps 1911 bytes 38 | thumb 80 quality 85: 102.5 fps 2762 bytes 39 | thumb 100 quality 85: 50.1 fps 4114 bytes 40 | -------------------------------------------------------------------------------- /cuav/tools/gegpsd/HOWTO: -------------------------------------------------------------------------------- 1 | # start gpsd listening for NMEA data on port 7000 and listening on port 7001 for gpsd clients: 2 | gpsd -D 10 udp://192.168.3.11:7000 -N -n -S 7001 3 | 4 | # start MAVProxy sending data to gegpsd: 5 | # in MAVProxy console: 6 | module load nmea 7 | nmea udp:192.168.3.11:7000 8 | 9 | # start gegpsd sourcing information from started gpsd: 10 | GEGPSD=$HOME/rc/cuav/cuav/cuav/tools/gegpsd 11 | $GEGPSD/gegpsd.py --output=/tmp/nmea.kml --server=localhost:7001 --pin-image=$GEGPSD/blueplane.png 12 | 13 | # in Google Earth Pro, open the .kml file as a Network Link 14 | Add -> Network Link 15 | Name: CUAV Primary Vehicle 16 | Link: /tmp/nmea.kml 17 | 18 | Refresh Tab: 19 | Time-based-fresh 20 | When: Periodically, 1 second 21 | 22 | -------------------------------------------------------------------------------- /cuav/tools/gegpsd/blueplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/tools/gegpsd/blueplane.png -------------------------------------------------------------------------------- /cuav/tools/gegpsd/gegpsd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # gegpsd-0.3.py retrieved from https://warwick.ac.uk/fac/sci/csc/people/computingstaff/jaroslaw_zachwieja/gegpsd/gegpsd-0.3.py 4 | 5 | import gps 6 | import optparse 7 | 8 | parser = optparse.OptionParser("gegpsd.py [options]") 9 | parser.add_option("--output", help="Output file", default='/tmp/nmea.kml') 10 | parser.add_option("--server", help="host:port", default="localhost:2947") 11 | parser.add_option("--pin-image", help="pin image", default=None) 12 | 13 | (opts, args) = parser.parse_args() 14 | 15 | file = opts.output 16 | 17 | (host, port) = opts.server.split(":") 18 | 19 | session = gps.gps(host=host, port=port) 20 | 21 | session.stream(flags=gps.WATCH_JSON) 22 | 23 | def handle_report(report): 24 | if report['class'] == 'TPV': 25 | latitude = report['lat'] 26 | longitude = report['lon'] 27 | altitude = report['alt'] 28 | speed_in = report['speed'] 29 | heading = report['track'] 30 | 31 | speed = int(speed_in * 1.852) 32 | range = ( ( speed / 100 ) * 350 ) + 650 33 | tilt = ( ( speed / 120 ) * 43 ) + 30 34 | 35 | if speed < 10: 36 | range = 200 37 | tilt = 30 38 | heading = 0 39 | 40 | pin_image = "" 41 | if opts.pin_image is not None: 42 | pin_image = """ 51 | """ % (opts.pin_image, heading) 52 | 53 | output = """ 54 | 55 | 56 | %s km/h 57 | ^ 58 | 59 | %s 60 | %s 61 | %s 62 | %s 63 | %s 64 | 65 | 66 | %s,%s,%s 67 | 68 | %s 69 | 70 | """ % (speed,longitude,latitude,range,tilt,heading,longitude,latitude,altitude, pin_image) 71 | 72 | f=open(file, 'w') 73 | f.write(output) 74 | f.close() 75 | 76 | for report in session: 77 | try: 78 | handle_report(report) 79 | except Exception as e: 80 | print("Caught exception: %s" % str(e)) 81 | 82 | del session 83 | 84 | -------------------------------------------------------------------------------- /cuav/tools/gegpsd/redplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/cuav/tools/gegpsd/redplane.png -------------------------------------------------------------------------------- /cuav/uav/__init__.py: -------------------------------------------------------------------------------- 1 | '''UAV utility functions''' 2 | -------------------------------------------------------------------------------- /obc_2018/geosearch_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # run a test using standard target positions at CMAC for OBC 2018 4 | 5 | # target positions taken from test on 5th August 2018 6 | FLAGS="--flag=-35.362669,149.164242,barrell" 7 | FLAGS="$FLAGS --flag=-35.362846,149.164272,barrell" 8 | FLAGS="$FLAGS --flag=-35.363027,149.164295,barrell" 9 | 10 | CAM_PARMS="../cuav/data/PiCamV2/params_half.json" 11 | 12 | IMGDIR=$1 13 | shift 14 | TLOG=$IMGDIR/mav.tlog 15 | 16 | geosearch.py --camera-params=$CAM_PARMS --minscore=500 $FLAGS --mavlog $TLOG $IMGDIR $* 17 | -------------------------------------------------------------------------------- /obc_2020/video_encode/README.md: -------------------------------------------------------------------------------- 1 | You will need the following packages 2 | 3 | pip install --user --upgrade scikit-image imutils 4 | -------------------------------------------------------------------------------- /obc_2020/video_encode/ff_encode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dirname=$1 4 | [ -d "$dirname" ] || { 5 | echo "Usage: ff_encode.sh DIRECTORY" 6 | exit 1 7 | } 8 | 9 | ffmpeg -y -framerate 1 -i "$dirname"/'image%*.jpg' -c:v libx265 -crf 37 -vf fps=1 -t 360 -pix_fmt yuv420p "$dirname".mp4 10 | ls -l "$dirname".mp4 11 | -------------------------------------------------------------------------------- /obc_2020/video_encode/ff_mat_264.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ffmpeg -framerate 1 -pattern_type glob -i clock5/*.jpg -c:v libx264 -x264-params "ref=1:bframes=0:keyint=60:intra-refresh=1" -b:v 15k -minrate 0k -maxrate 30k -bufsize 60k output.264 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | lxml 2 | pymavlink 3 | numpy 4 | matplotlib 5 | pyserial 6 | opencv-python 7 | pyreadline 8 | PyYAML 9 | Pygame 10 | Pillow 11 | wxpython 12 | piexif 13 | MAVProxy 14 | gooey 15 | -------------------------------------------------------------------------------- /script/2018/Dalby-fence-Kraken.txt: -------------------------------------------------------------------------------- 1 | -27.278803 151.272949 2 | -27.283335 151.243515 3 | -27.262848 151.246414 4 | -27.270510 151.301865 5 | -27.292074 151.297668 6 | -27.283335 151.243515 7 | -------------------------------------------------------------------------------- /script/2018/Dalby-fence.txt: -------------------------------------------------------------------------------- 1 | -27.313734 151.265762 2 | -27.360502 151.229477 3 | -27.262848 151.246414 4 | -27.270510 151.301865 5 | -27.364637 151.282745 6 | -27.364143 151.243027 7 | -27.360502 151.229477 8 | -------------------------------------------------------------------------------- /script/2018/Kraken.Ground/BigScreenKraken.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #This is for visualisation of the Kraken on the big screen 4 | #on Stephen's laptop. Just a console and map 5 | 6 | #Can't use the default modules list - the layout module messes us 7 | #up here with restoring the windows to the same position as for the 8 | #other UAV 9 | 10 | #Packets come from the Kraken.Ground 11 | mavproxy.py --aircraft KrakenScreen --master=udp:127.0.0.1:16001 --mav20 --force-connected --console --cmd="set heartbeat 0; set vehicle_name KrakenScreen; module load map; map follow 1; map zoom 2000; map center -27.277209 151.291835; module load cuav.modules.cuav_check" $* 12 | -------------------------------------------------------------------------------- /script/2018/Kraken.Ground/BigScreenPorter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #This is for visualisation of the Porter on the big screen 4 | #on Stephen's laptop. Just a console and map 5 | 6 | #Can't use the default modules list - the layout module messes us 7 | #up here with restoring the windows to the same position as for the 8 | #other UAV 9 | 10 | #Packets come from the Porter.GroundBackup 11 | mavproxy.py --aircraft PorterScreen --master=udp:127.0.0.1:16000 --mav20 --force-connected --console --cmd="set heartbeat 0; set vehicle_name PorterScreen; module load map; map follow 1; map zoom 2000; map center -27.277209 151.291835; module load cuav.modules.cuav_check" $* 12 | -------------------------------------------------------------------------------- /script/2018/Kraken.Ground/StartGround.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set streamrate -1 3 | set vehicle_name Kraken 4 | set source_system 253 5 | 6 | set altreadout 30 7 | set numcells 3 8 | 9 | set speed_unit knots 10 | set height_unit feet 11 | set dist_unit nm 12 | 13 | # set a female voice 14 | module load cuav.modules.cuav_check 15 | module load speech 16 | set speech_voice english+f5 17 | 18 | # throw away sysid2 pkts 19 | output sysid 2 127.0.0.1:9991 20 | 21 | module load cuav.modules.cuav_check 22 | 23 | #output to big screen 24 | output add udp:127.0.0.1:16001 25 | 26 | # 2km map 27 | module load map 28 | map follow 0 29 | map zoom 2000 30 | map center -27.277209 151.291835 31 | 32 | 33 | layout load 34 | 35 | -------------------------------------------------------------------------------- /script/2018/Kraken.Ground/StartGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #All telemetry from the Rpi on the Porter over two networks 4 | mavproxy.py --aircraft Kraken --master=:14650 --force-connected --mav20 --console --force-connect --cmd="script StartGround.scr" $* 5 | 6 | -------------------------------------------------------------------------------- /script/2018/Kraken.GroundBackup/StartGround.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set streamrate 2 3 | set vehicle_name Kraken 4 | set streamrate -1 5 | set altreadout 30 6 | set numcells 3 7 | set source_system 253 8 | 9 | set speed_unit knots 10 | set height_unit feet 11 | set dist_unit nm 12 | 13 | module load cuav.modules.cuav_check 14 | #module load speech 15 | #set speech_voice english+f5 16 | 17 | # send packets over to primary kraken GCS 18 | output add 192.168.3.22:14650 19 | 20 | output sysid 2 127.0.0.1:9991 21 | 22 | # use saved layout 23 | layout load 24 | -------------------------------------------------------------------------------- /script/2018/Kraken.GroundBackup/StartGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #All telemetry from the Rpi on the Porter over two networks 4 | mavproxy.py --aircraft Kraken --master=:14650 --mav20 --console --map --cmd="script StartGround.scr" $* 5 | 6 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/cap_loop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while :; do 4 | date 5 | # run under sudo to enable FIFO priority for timestamps. Use nice to lower priority of encoding 6 | sudo nice /home/pi/cuav/capturescripts/RasPi/cuavraw --halfres -o ${CAPTURE_DIR} -l /home/pi/images_captured/capture.jpg 7 | sleep 5 8 | done 9 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/mavinit.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set streamrate -1 3 | set shownoise 0 4 | set source_system 254 5 | set heartbeat 0 6 | 7 | # output packets from Kraken onto 14800 on RPi, where they are discarded 8 | output sysid 1 127.0.0.1:14800 9 | 10 | module load cuav.modules.camera_air 11 | camera set gcs_address 203.11.71.1:10403:14680:60000,203.217.61.45:10403:14681:60000 12 | camera set camparms /data/PiCamV2/params_half.json 13 | camera set imagefile /home/pi/images_captured/capture.jpg 14 | camera set minscore 2000 15 | camera start 16 | 17 | set script_fatal 1 18 | 19 | camera set target_latitude ${TARGET_LATITUDE} 20 | camera set target_longitude ${TARGET_LONGITUDE} 21 | camera set target_radius 100.0 22 | 23 | module load cuav.modules.cuav_companion 24 | 25 | set distreadout 0 26 | set altreadout 0 27 | 28 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/mavlog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check arguments 4 | if [ $# -ne 1 ]; then 5 | echo "usage: mavlog.sh logdir" 6 | exit 1 7 | fi 8 | 9 | LOG_DIR=$1 10 | shift 11 | 12 | . ../target_loc_dalby.sh 13 | 14 | OZLABS_PROXY1_AIR=udpout:203.11.71.1:10401 15 | OZLABS_PROXY1_GND=udpout:203.11.71.1:10402 16 | 17 | TRIDGELL_PROXY1_AIR=udpout:203.217.61.45:10401 18 | TRIDGELL_PROXY1_GND=udpout:203.217.61.45:10402 19 | 20 | cp -f mavinit.scr ${LOG_DIR}/mavinit.scr 21 | 22 | cd ${LOG_DIR} 23 | #All outputs via 2 network links 24 | mavproxy.py --master=/dev/serial0 --baud=115200 --out=$OZLABS_PROXY1_AIR --out=$TRIDGELL_PROXY1_AIR --mav20 --cmd="script mavinit.scr" $* 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | export PATH=/sbin:/usr/sbin:/bin:/usr/bin 6 | 7 | cd /root 8 | 9 | ( 10 | date 11 | 12 | LOCKFILE="network.sh.lock" 13 | 14 | # dotlockfile can be found in liblockfile-bin 15 | if ! dotlockfile -p "$LOCKFILE"; then 16 | echo "Failed to lock" 17 | exit 1 18 | fi 19 | 20 | TRIDGELLNET="203.217.61.45" 21 | OZLABSORG="203.11.71.1" 22 | OPTUSGW="192.168.8.1" 23 | TELSTRAGW="192.168.0.1" 24 | 25 | (route -n | grep -q $TRIDGELLNET) || route add -host $TRIDGELLNET gw $OPTUSGW dev eth1 26 | (route -n | grep -q $OZLABSORG) || route add -host $OZLABSORG gw $TELSTRAGW dev usb0 27 | 28 | ifconfig usb0 192.168.0.125/24 up 29 | ifconfig eth0 192.168.3.70/24 up 30 | ifconfig eth1 192.168.8.100/24 up 31 | 32 | ping -q -c 2 $OZLABSORG || { 33 | route del default 34 | route add default gw $TELSTRAGW dev usb0 35 | wget -O /dev/null "http://$TELSTRAGW/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK" 36 | } 37 | 38 | ping -q -c 2 $TRIDGELLNET || { 39 | ifconfig eth2 192.168.8.100/24 up 40 | } 41 | 42 | [ $(date +%s) -lt 1534499946 ] && { 43 | /usr/bin/rdate $OZLABSORG 44 | } 45 | 46 | dotlockfile -u "$LOCKFILE" 47 | 48 | #(mount -n | grep -q images_captured) || mount /home/pi/images_captured 49 | echo 50 | ) >> network.log 2>&1 51 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/screenrc: -------------------------------------------------------------------------------- 1 | source /home/pi/.screenrc 2 | screen -t image_capture 3 | stuff "./cap_loop.sh " 4 | screen -t mavproxy 5 | stuff "./mavlog.sh ${CAPTURE_DIR} " 6 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/start_rpi_capture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # set timezone to GMT 7 | export TZ=GMT 8 | 9 | export CAPTURE_DIR=$HOME/images_captured/$(date +"%Y%m%d_%H-%M-%S")/ 10 | 11 | mkdir -p ${CAPTURE_DIR} 12 | 13 | screen -L -S mav_shell -d -m -c ./screenrc 14 | -------------------------------------------------------------------------------- /script/2018/Porter.Aircraft/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | screen -S mav_shell -X quit 7 | -------------------------------------------------------------------------------- /script/2018/Porter.Ground/StartGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Note the GCS is receiving two streams - one over Ozlabs and 6 | #the other over Tridge's VPN. We use a udp server over both to 7 | #relay the udp telemetry 8 | 9 | #Type in "camera status" to see the queues of captured/processed/transmitted images 10 | 11 | OZLABS_PROXY1_GND=udpout:203.11.71.1:10402 12 | TRIDGELL_PROXY1_GND=udpout:203.217.61.45:10402 13 | 14 | . ../target_loc_dalby.sh 15 | 16 | [ -z "$UART_GROUND" ] && { 17 | UART_GROUND="radio1" 18 | } 19 | 20 | MASTER="" 21 | MASTER="$MASTER --master $UART_GROUND" 22 | MASTER="$MASTER --master=$OZLABS_PROXY1_GND" 23 | MASTER="$MASTER --master=$TRIDGELL_PROXY1_GND" 24 | 25 | #All telemetry from the Rpi on the Porter over two networks 26 | mavproxy.py --aircraft Porter $MASTER --mav20 --force-connected --console --map --cmd="script StartGround.scr" $* 27 | -------------------------------------------------------------------------------- /script/2018/Porter.GroundBackup/PorterCamera.scr: -------------------------------------------------------------------------------- 1 | 2 | set altreadout 30 3 | 4 | module load cuav.modules.cuav_check 5 | 6 | # search area map 7 | module load map 8 | map2 follow 0 9 | map2 zoom 240 10 | 11 | # lz map 12 | module load map 13 | map3 follow 0 14 | map3 zoom 50 15 | 16 | set speed_unit knots 17 | set height_unit feet 18 | set dist_unit nm 19 | 20 | @alias add touchstop remote shell touch /home/pi/images_captured/capture.jpg.stop 21 | @alias add rmstop remote shell rm -f /home/pi/images_captured/capture.jpg.stop 22 | 23 | -------------------------------------------------------------------------------- /script/2018/Porter.GroundBackup/StartGround.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | # redirect Kraken to port 14650 3 | set vehicle_name Porter 4 | 5 | set source_system 254 6 | 7 | set streamrate -1 8 | set shownoise 0 9 | 10 | 11 | output sysid 1 127.0.0.1:14650 12 | 13 | 14 | #set dist_unit nm 15 | #set height_unit feet 16 | #set speed_unit knots 17 | set altreadout 30 18 | 19 | module load sensors 20 | speed 21 | 22 | # search area map 23 | module load map 24 | map2 follow 0 25 | map2 zoom 240 26 | 27 | # lz map 28 | module load map 29 | map3 follow 0 30 | map3 zoom 50 31 | 32 | 33 | module load cuav.modules.cuav_check 34 | 35 | #output to big screen 36 | output add udp:127.0.0.1:16000 37 | 38 | -------------------------------------------------------------------------------- /script/2018/Porter.GroundBackup/StartGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Type in "camera status" to see the queues of captured/processed/transmitted images 6 | 7 | PORT='radio' 8 | 9 | #All telemetry from the RFD900 or Tridge's laptop 10 | mavproxy.py --aircraft Porter --master $PORT --force-connect --master :14660 --mav20 --console --map --cmd="script StartGround.scr" $* 11 | 12 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/cap_loop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while :; do 4 | date 5 | # run under sudo to enable FIFO priority for timestamps. Use nice to lower priority of encoding 6 | sudo nice /home/pi/cuav/capturescripts/RasPi/cuavraw --halfres -o ${CAPTURE_DIR} -l /home/pi/images_captured/capture.jpg 7 | sleep 5 8 | done 9 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/mavinit.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set streamrate -1 3 | set shownoise 0 4 | 5 | # output packets from Kraken onto 14800 on RPi, where they are discarded 6 | output sysid 1 127.0.0.1:14800 7 | 8 | module load cuav.modules.camera_air 9 | camera set gcs_address 203.11.71.1:10403:14680:60000,203.217.61.45:10403:14681:60000 10 | camera set camparms /data/PiCamV2/params_half.json 11 | camera set imagefile /home/pi/images_captured/capture.jpg 12 | camera set minscore 1000 13 | camera start 14 | 15 | set script_fatal 1 16 | 17 | camera set target_latitude ${TARGET_LATITUDE} 18 | camera set target_longitude ${TARGET_LONGITUDE} 19 | camera set target_radius 100.0 20 | 21 | module load cuav.modules.cuav_companion 22 | 23 | set distreadout 0 24 | set altreadout 0 25 | 26 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/mavlog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check arguments 4 | if [ $# -ne 1 ]; then 5 | echo "usage: mavlog.sh logdir" 6 | exit 1 7 | fi 8 | 9 | LOG_DIR=$1 10 | shift 11 | 12 | OZLABS_PROXY1_AIR=udpout:203.11.71.1:10401 13 | OZLABS_PROXY1_GND=udpout:203.11.71.1:10402 14 | 15 | TRIDGELL_PROXY1_AIR=udpout:203.217.61.45:10401 16 | TRIDGELL_PROXY1_GND=udpout:203.217.61.45:10402 17 | 18 | cp -f mavinit.scr ${LOG_DIR}/mavinit.scr 19 | 20 | cd ${LOG_DIR} 21 | #All outputs via 2 network links 22 | mavproxy.py --master=/dev/serial0 --baud=115200 --out=$OZLABS_PROXY1_AIR --out=$TRIDGELL_PROXY1_AIR --mav20 --cmd="script mavinit.scr" $* 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | export PATH=/sbin:/usr/sbin:/bin:/usr/bin 6 | 7 | cd /root 8 | 9 | ( 10 | date 11 | 12 | LOCKFILE="network.sh.lock" 13 | 14 | # dotlockfile can be found in liblockfile-bin 15 | if ! dotlockfile -p "$LOCKFILE"; then 16 | echo "Failed to lock" 17 | exit 1 18 | fi 19 | 20 | TRIDGELLNET="203.217.61.45" 21 | OZLABSORG="203.11.71.1" 22 | OPTUSGW="192.168.8.1" 23 | TELSTRAGW="192.168.0.1" 24 | 25 | (route -n | grep -q $TRIDGELLNET) || route add -host $TRIDGELLNET gw $OPTUSGW dev eth1 26 | (route -n | grep -q $OZLABSORG) || route add -host $OZLABSORG gw $TELSTRAGW dev usb0 27 | 28 | ifconfig usb0 192.168.0.125/24 up 29 | ifconfig eth0 192.168.3.70/24 up 30 | ifconfig eth1 192.168.8.100/24 up 31 | 32 | ping -q -c 2 $OZLABSORG || { 33 | route del default 34 | route add default gw $TELSTRAGW dev usb0 35 | wget -O /dev/null "http://$TELSTRAGW/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK" 36 | } 37 | 38 | ping -q -c 2 $TRIDGELLNET || { 39 | ifconfig eth2 192.168.8.100/24 up 40 | } 41 | 42 | [ $(date +%s) -lt 1534499946 ] && { 43 | /usr/bin/rdate $OZLABSORG 44 | } 45 | 46 | dotlockfile -u "$LOCKFILE" 47 | 48 | #(mount -n | grep -q images_captured) || mount /home/pi/images_captured 49 | echo 50 | ) >> network.log 2>&1 51 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/screenrc: -------------------------------------------------------------------------------- 1 | source /home/pi/.screenrc 2 | screen -t image_capture 3 | stuff "./cap_loop.sh " 4 | screen -t mavproxy 5 | stuff "./mavlog.sh ${CAPTURE_DIR} " 6 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/start_rpi_capture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # set timezone to GMT 7 | export TZ=GMT 8 | 9 | export CAPTURE_DIR=$HOME/images_captured/$(date +"%Y%m%d_%H-%M-%S")/ 10 | 11 | mkdir -p ${CAPTURE_DIR} 12 | 13 | screen -L -S mav_shell -d -m -c ./screenrc 14 | -------------------------------------------------------------------------------- /script/2018/Ranger.Aircraft/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | screen -S mav_shell -X quit 7 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/PlayGroundStephen.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | module load cuav.modules.camera_ground 3 | camera set air_address 10.26.0.226:14680:14670:60000 4 | camera set camparms /data/PiCamV2/params_half.json 5 | camera view 6 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/PlayGroundStephen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Note the GCS is receiving two streams - port 14650 for MAVLink telemetry 6 | #the image stream on port 14680. It will transmit remote commands back to the 7 | #cuav_air module on port 14670. 8 | 9 | #Type in "camera status" to see the queues of captured/processed/transmitted images 10 | 11 | #All telemetry from the Rpi on the Ranger 12 | mavproxy.py --master=udpin:10.26.0.225:14650 --mav20 --console --map --cmd="script PlayGroundStephen.scr" 13 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/StartGround.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | # redirect Kraken to port 14650 3 | set vehicle_name Porter 4 | 5 | set source_system 254 6 | 7 | set streamrate -1 8 | set shownoise 0 9 | 10 | 11 | output sysid 1 127.0.0.1:14650 12 | module load cuav.modules.camera_ground 13 | camera set air_address 203.11.71.1:10404:14680:60000,203.217.61.45:10404:14681:60000 14 | #camera set air_address 203.11.71.1:10404:14680:60000 15 | camera set camparms /data/PiCamV2/params_half.json 16 | camera view 17 | 18 | set script_fatal 1 19 | 20 | camera set target_latitude ${TARGET_LATITUDE} 21 | camera set target_longitude ${TARGET_LONGITUDE} 22 | camera set target_radius 100.0 23 | 24 | 25 | #set dist_unit nm 26 | #set height_unit feet 27 | #set speed_unit knots 28 | set altreadout 30 29 | 30 | module load cuav.modules.cuav_check 31 | 32 | module load sensors 33 | speed 34 | module load speech 35 | 36 | #cuavcheck set wind_speed 4 37 | #cuavcheck set wind_direction 225 38 | 39 | # search area map 40 | module load map 41 | map2 follow 0 42 | map2 zoom 240 43 | 44 | # lz map 45 | module load map 46 | map3 follow 0 47 | map3 zoom 50 48 | 49 | cuavcheck toggleJoeZone 50 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/StartGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Note the GCS is receiving two streams - one over Ozlabs and 6 | #the other over Tridge's VPN. We use a udp server over both to 7 | #relay the udp telemetry 8 | 9 | #Type in "camera status" to see the queues of captured/processed/transmitted images 10 | 11 | OZLABS_PROXY1_GND=udpout:203.11.71.1:10402 12 | TRIDGELL_PROXY1_GND=udpout:203.217.61.45:10402 13 | 14 | PORT=$(/bin/ls /dev/serial/by-id/usb-FTDI*) 15 | 16 | MASTER="" 17 | MASTER="$MASTER --master $PORT" 18 | MASTER="$MASTER --master=$OZLABS_PROXY1_GND" 19 | MASTER="$MASTER --master=$TRIDGELL_PROXY1_GND" 20 | 21 | #All telemetry from the Rpi on the Porter over two networks 22 | mavproxy.py --aircraft Porter $MASTER --mav20 --console --map --cmd="script StartGround.scr" $* 23 | 24 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/StartTridge.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | module load cuav.modules.camera_ground 3 | camera set air_address 10.26.0.224:14680:14670:60000 4 | camera set camparms /data/PiCamV2/params_half.json 5 | camera view 6 | -------------------------------------------------------------------------------- /script/2018/Ranger.Ground/StartTridge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Note the GCS is receiving two streams - port 14650 for MAVLink telemetry 6 | #the image stream on port 14680. It will transmit remote commands back to the 7 | #cuav_air module on port 14670. 8 | 9 | #Type in "camera status" to see the queues of captured/processed/transmitted images 10 | 11 | #All telemetry from the Rpi on the Ranger 12 | mavproxy.py --master=udpin:10.26.0.200:14650 --mav20 --console --map --cmd="script StartTridge.scr" 13 | -------------------------------------------------------------------------------- /script/2018/SITL/CMAC-mission-kraken.txt: -------------------------------------------------------------------------------- 1 | QGC WPL 110 2 | 0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 3 | 1 0 0 87 400.000000 100.000000 20.000000 0.000000 0.000000 0.000000 0.000000 1 4 | 2 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 15.000000 1 5 | 3 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.361382 149.162033 120.000000 1 6 | 4 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.364716 149.162781 120.000000 1 7 | 5 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.364536 149.163803 120.000000 1 8 | 6 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.361179 149.163101 120.000000 1 9 | 7 0 0 177 3.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 10 | 8 0 10 189 0.000000 0.000000 0.000000 0.000000 -35.362701 149.161804 60.000000 1 11 | 9 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.362862 149.162079 120.000000 1 12 | 10 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.364559 149.162476 120.000000 1 13 | 11 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.364380 149.163635 120.000000 1 14 | 12 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.362736 149.163223 120.000000 1 15 | 13 0 0 224 15.000000 0.000000 250.000000 20.000000 0.000000 0.000000 100.000000 1 16 | 14 0 0 177 9.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 17 | 15 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.162186 60.000000 1 18 | 16 0 0 224 9.000000 1.000000 250.000000 20.000000 0.000000 0.000000 100.000000 1 19 | 17 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.365334 149.163788 55.000000 1 20 | 18 0 0 224 9.000000 1.000000 250.000000 20.000000 0.000000 0.000000 100.000000 1 21 | 19 0 10 16 0.000000 0.000000 0.000000 0.000000 -35.365204 149.165237 30.000000 1 22 | 20 0 10 21 0.000000 0.000000 0.000000 1.000000 -35.362816 149.164917 0.000000 1 23 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Kraken/OBC2016/mavinit.scr: -------------------------------------------------------------------------------- 1 | 2 | output sysid 2 127.0.0.1:14951 3 | set vehicle_name KrakenSim 4 | set streamrate -1 5 | set source_system 253 6 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Kraken/start_kraken.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | $HOME/project/UAV/APM.obc2018/Tools/autotest/sim_vehicle.py --no-extra-ports -I3 -D -L CMAC -v ArduPlane -A --uartC=uart:../radio_relay -C --aircraft OBC2016 --mav20 --source-system=254 $* 4 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Kraken/start_kraken_dalby.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -z "$UART_RELAY" ] && { 4 | UART_RELAY="uart:../radio_relay" 5 | } 6 | 7 | HOMELOC="-27.274541,151.289865,343,195" 8 | 9 | $HOME/project/UAV/APM.obc2018/Tools/autotest/sim_vehicle.py --no-extra-ports -I3 -D -l $HOMELOC -v ArduPlane -A --uartC=$UART_RELAY -C --aircraft OBC2016 --mav20 --source-system=254 $* 10 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Kraken/start_kraken_raw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OBC=$HOME/project/UAV/APM.obc2018 3 | 4 | pushd $OBC 5 | ./waf configure --board sitl --debug 6 | ./waf plane 7 | popd 8 | 9 | [ -z "$UART_RELAY" ] && { 10 | UART_RELAY="uart:../radio_relay" 11 | } 12 | 13 | HOMELOC="-27.274541,151.289865,343,195" 14 | 15 | $OBC/build/sitl/bin/arduplane --home $HOMELOC --model plane -I 3 --uartA tcp:0 --uartC $UART_RELAY --defaults $OBC/Tools/autotest/default_params/plane.parm 16 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Porter/OBC2016/mavinit.scr: -------------------------------------------------------------------------------- 1 | output sysid 1 127.0.0.1:14950 2 | set vehicle_name PorterSim 3 | set streamrate -1 4 | 5 | #output add udpout:203.11.71.1:10401 6 | #output add udpout:203.217.61.45:10401 7 | 8 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Porter/start_quadplane.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | $HOME/project/UAV/APM.obc2018/Tools/autotest/sim_vehicle.py --no-extra-ports -I2 -D -L CMAC -v ArduPlane -f quadplane-ice --mavproxy-args="--source-system=254" --aircraft OBC2016 -A --uartC=uart:../radio_retrieval $* 4 | 5 | 6 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Porter/start_quadplane_raw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OBC=$HOME/project/UAV/APM.obc2018 3 | 4 | pushd $OBC 5 | ./waf configure --board sitl --debug 6 | ./waf plane 7 | popd 8 | 9 | UARTC="uart:../radio_retrieval" 10 | 11 | $OBC/build/sitl/bin/arduplane --model quadplane-ice -I 2 --uartA tcp:0 --uartC $UARTC --defaults $OBC/Tools/autotest/default_params/quadplane.parm 12 | -------------------------------------------------------------------------------- /script/2018/SITL/SIM_Porter/start_quadplane_raw_dalby.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OBC=$HOME/project/UAV/APM.obc2018 3 | 4 | pushd $OBC 5 | ./waf configure --board sitl --debug 6 | ./waf plane 7 | popd 8 | 9 | [ -z "$UART_RETRIEVAL" ] && { 10 | UART_RETRIEVAL="uart:../radio_retrieval" 11 | } 12 | 13 | HOME="-27.274439,151.290064,343,8.7" 14 | 15 | $OBC/build/sitl/bin/arduplane --home $HOME --model quadplane-ice -I 2 --uartA tcp:0 --uartC $UART_RETRIEVAL --defaults $OBC/Tools/autotest/default_params/quadplane.parm $* 16 | 17 | -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182498Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182498Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182559Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182559Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182626Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182626Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182694Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182694Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182765Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182765Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182832Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182832Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182900Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182900Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401182969Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401182969Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401183037Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401183037Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401183106Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401183106Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401183166Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401183166Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401184963Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401184963Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185019Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185019Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185075Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185075Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185129Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185129Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185182Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185182Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185242Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185242Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185296Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185296Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185382Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185382Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185450Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185450Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185524Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185524Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185587Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185587Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185652Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185652Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185715Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185715Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185774Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185774Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185835Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185835Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401185894Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401185894Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401191712Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401191712Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401191773Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401191773Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401191836Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401191836Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401191894Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401191894Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401191958Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401191958Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192018Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192018Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192078Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192078Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192139Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192139Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192197Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192197Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192256Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192256Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401192320Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401192320Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401193786Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401193786Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401193848Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401193848Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401193918Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401193918Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401193981Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401193981Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194044Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194044Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194106Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194106Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194168Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194168Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194230Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194230Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194290Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194290Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194352Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194352Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401194416Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401194416Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401195977Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401195977Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200066Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200066Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200135Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200135Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200202Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200202Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200265Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200265Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200328Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200328Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200407Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200407Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200473Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200473Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200533Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200533Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401200595Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401200595Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201489Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201489Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201554Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201554Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201617Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201617Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201679Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201679Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201740Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201740Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201802Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201802Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201862Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201862Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201924Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201924Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401201987Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401201987Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401202049Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401202049Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401202111Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401202111Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401202177Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401202177Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401202241Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401202241Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401202301Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401202301Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204199Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204199Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204279Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204279Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204355Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204355Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204419Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204419Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204476Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204476Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204541Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204541Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204603Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204603Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204669Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204669Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204732Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204732Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401204793Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401204793Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215485Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215485Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215543Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215543Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215670Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215670Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215743Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215743Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215807Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215807Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401215871Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401215871Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220190Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220190Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220252Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220252Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220319Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220319Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220381Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220381Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220446Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220446Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/cmac_images/2018082401220509Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/cmac_images/2018082401220509Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/create_mavpos.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | ''' 3 | create mavpos.dat, containing MavPosition for each image in a set of images using a tlog 4 | ''' 5 | 6 | 7 | import os, time, math, glob, re 8 | import argparse, pickle 9 | 10 | from cuav.lib import cuav_util, mav_position 11 | 12 | 13 | def parse_args(): 14 | '''parse command line arguments''' 15 | parser = argparse.ArgumentParser("create mavpos.dat") 16 | 17 | parser.add_argument("files", default=None, help="Image directory or files") 18 | parser.add_argument("mavlog", default=None, help="flight log for geo-referencing") 19 | parser.add_argument("--roll-stabilised", default=False, action='store_true', help="Is camera roll stabilised?") 20 | parser.add_argument("--gps-lag", default=0.0, type=float, help="GPS lag in seconds") 21 | return parser.parse_args() 22 | 23 | 24 | def process(args): 25 | '''process a set of files''' 26 | 27 | count = 0 28 | files = [] 29 | types = ('*.png', '*.jpeg', '*.jpg') 30 | if os.path.isdir(args.files): 31 | for tp in types: 32 | files.extend(glob.glob(os.path.join(args.files, tp))) 33 | else: 34 | files.append(args.files) 35 | files.sort() 36 | num_files = len(files) 37 | print("num_files=%u" % num_files) 38 | 39 | mpos = mav_position.MavInterpolator(gps_lag=args.gps_lag) 40 | mpos.set_logfile(os.path.join(os.getcwd(), args.mavlog)) 41 | 42 | frame_time = 0 43 | 44 | poshash = {} 45 | 46 | for f in files: 47 | #timestamp is in filename 48 | timestamp = (os.path.splitext(os.path.basename(f))[0]) 49 | m = re.search("\d", timestamp) 50 | if m : 51 | timestamp = timestamp[m.start():] 52 | 53 | frame_time = cuav_util.parse_frame_time(f) 54 | 55 | try: 56 | if args.roll_stabilised: 57 | roll = 0 58 | else: 59 | roll = None 60 | pos = mpos.position(frame_time, roll=roll) 61 | except mav_position.MavInterpolatorException as e: 62 | print(e) 63 | pos = None 64 | 65 | if pos: 66 | poshash[os.path.basename(f)] = pos 67 | 68 | dirname = os.path.dirname(f) 69 | mavpos = os.path.join(dirname, "mavpos.dat") 70 | open(mavpos,"w").write(pickle.dumps(poshash)) 71 | print("Wrote %s with %u entries" % (mavpos, len(poshash))) 72 | 73 | # main program 74 | if __name__ == '__main__': 75 | args = parse_args() 76 | 77 | process(args) 78 | 79 | -------------------------------------------------------------------------------- /script/2018/SITL/mavlogAir.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set heartbeat 0 3 | 4 | set source_system 254 5 | 6 | # go via ozlabs proxy2 7 | camera set gcs_address 203.11.71.1:10403:14682:60000,203.217.61.45:10403:14683:60000 8 | #camera set gcs_address 203.11.71.1:10403:14682:60000 9 | camera set camparms /data/PiCamV2/params_half.json 10 | camera set imagefile capture.jpg 11 | camera set minscore 1000 12 | 13 | # using playback_synthetic we can use real 14 | # timestamps 15 | # camera set ignoretimestamps 1 16 | 17 | set script_fatal 1 18 | 19 | camera set target_latitude ${TARGET_LATITUDE} 20 | camera set target_longitude ${TARGET_LONGITUDE} 21 | camera set target_radius 100.0 22 | 23 | module load cuav.modules.cuav_companion 24 | 25 | camera start 26 | set distreadout 0 27 | set altreadout 0 28 | 29 | set streamrate -1 30 | 31 | output sysid 1 127.0.0.1:14952 32 | -------------------------------------------------------------------------------- /script/2018/SITL/mavlogAir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # go via ozlabs proxy 4 | OZLABS_PROXY1_AIR=udpout:203.11.71.1:10401 5 | TRIDGELL_PROXY1_AIR=udpout:203.217.61.45:10401 6 | 7 | . ../target_loc_dalby.sh 8 | 9 | OUT="--out=$OZLABS_PROXY1_AIR" 10 | OUT="$OUT --out=$TRIDGELL_PROXY1_AIR" 11 | 12 | # connect to local SITL instance, and out to proxy 13 | mavproxy.py --master tcp:127.0.0.1:5783 --aircraft=Air $OUT --load-module=cuav.modules.camera_air --mav20 --cmd="script mavlogAir.scr" 14 | -------------------------------------------------------------------------------- /script/2018/SITL/mavlogGround.scr: -------------------------------------------------------------------------------- 1 | set moddebug 3 2 | set streamrate -1 3 | set vehicle_name Porter 4 | set shownoise 0 5 | set source_system 254 6 | 7 | set speed_unit knots 8 | set height_unit feet 9 | set dist_unit nm 10 | 11 | # go via ozlabs proxy2 12 | camera set air_address 203.11.71.1:10404:14670:60000,203.217.61.45:10404:14671:60000 13 | #camera set air_address 203.11.71.1:10404:14670:60000 14 | camera set camparms /data/PiCamV2/params_half.json 15 | 16 | set script_fatal 1 17 | 18 | camera set target_latitude ${TARGET_LATITUDE} 19 | camera set target_longitude ${TARGET_LONGITUDE} 20 | camera set target_radius 100.0 21 | 22 | camera view 23 | 24 | # search area map 25 | module load map 26 | map2 follow 0 27 | map2 zoom 240 28 | 29 | # lz map 30 | module load map 31 | map3 follow 0 32 | map3 zoom 50 33 | 34 | module load cuav.modules.cuav_check 35 | cuavcheck toggleJoeZone 36 | 37 | @alias add triggerbutton param set SIM_PIN_MASK 0xFE 38 | @alias add triggerfuel param set SIM_PIN_MASK 0xFD 39 | 40 | module load asterix 41 | 42 | output sysid 1 127.0.0.1:14650 43 | 44 | # output porter traffic to stephen 45 | output add 192.168.3.22:14660 46 | 47 | # use saved layout 48 | layout load 49 | 50 | module load cuav.modules.nmea 51 | #nmea udp 127.0.0.1:9500 52 | nmea udp 172.27.162.164:9500 53 | nmea log primary.nmea.log 54 | nmea set target_vehicle 2 55 | nmea set wgs84_to_amsl -41.2 56 | 57 | module load cuav.modules.nmea 58 | #nmea2 udp 127.0.0.1:7000 59 | nmea2 udp 172.27.162.164:7000 60 | nmea2 log secondary.nmea.log 61 | nmea2 set target_vehicle 1 62 | nmea2 set wgs84_to_amsl -41.2 63 | -------------------------------------------------------------------------------- /script/2018/SITL/mavlogGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | OZLABS_PROXY1_GND=udpout:203.11.71.1:10402 4 | TRIDGELL_PROXY1_GND=udpout:203.217.61.45:10402 5 | 6 | #Connects to mavlogAir 7 | 8 | #MASTER="--master=tcp:127.0.0.1:5786" 9 | MASTER="--master=radio_gcs" 10 | MASTER="$MASTER --master=$OZLABS_PROXY1_GND" 11 | MASTER="$MASTER --master=$TRIDGELL_PROXY1_GND" 12 | 13 | mavproxy.py $MASTER --aircraft SIM --mav20 --console --map --load-module=cuav.modules.camera_ground --cmd="script mavlogGround.scr" 14 | -------------------------------------------------------------------------------- /script/2018/SITL/no_radio_vars.sh: -------------------------------------------------------------------------------- 1 | 2 | # dot this into env for running SITL tests with no radios attached 3 | 4 | export UART_RETRIEVAL="tcp:2" 5 | 6 | export UART_GROUND="tcp:127.0.0.1:5782" 7 | 8 | export UART_RELAY="tcp:2" 9 | -------------------------------------------------------------------------------- /script/2018/SITL/playback.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ../../../cuav/tools/playback.py testimgs testimgs/flight.tlog --loop $* 4 | -------------------------------------------------------------------------------- /script/2018/SITL/playback_dalby.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | nice ./playback_synthetic.py --target-lat -27.357372 --target-lon 151.240477 6 | 7 | -------------------------------------------------------------------------------- /script/2018/SITL/playback_dalby_small.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./playback_synthetic.py --target-lat -27.294595 --target-lon 151.342756 4 | -------------------------------------------------------------------------------- /script/2018/SITL/targets/target0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target0.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target1.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target10.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target11.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target12.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target13.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target14.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target15.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target16.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target17.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target18.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target19.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target2.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target20.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target21.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target22.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target23.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target24.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target25.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target26.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target27.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target28.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target29.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target3.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target30.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target31.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target32.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target33.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target34.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target35.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target36.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target37.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target38.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target39.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target4.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target40.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target41.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target42.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target43.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target44.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target45.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target46.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target47.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target48.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target49.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target5.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target50.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target51.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target52.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target53.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target54.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target55.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target56.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target57.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target58.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target59.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target6.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target60.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target61.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target61.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target62.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target63.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target64.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target65.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target66.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target66.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target67.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target67.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target68.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target68.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target69.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target69.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target7.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target70.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target71.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target71.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target72.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target73.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target73.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target74.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target74.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target75.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target76.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target77.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target78.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target78.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target79.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target79.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target8.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target80.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target81.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target81.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target82.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target82.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target83.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target83.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target84.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target85.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target85.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target86.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target87.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target88.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target89.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target89.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target9.png -------------------------------------------------------------------------------- /script/2018/SITL/targets/target90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/targets/target90.png -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004480Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004480Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004550Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004550Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004640Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004640Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004736Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004736Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004828Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004828Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501004918Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501004918Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005009Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005009Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005094Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005094Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005163Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005163Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005238Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005238Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005336Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005336Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005427Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005427Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005506Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005506Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005597Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005597Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005683Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005683Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005776Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005776Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005867Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005867Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/2018080501005958Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/2018080501005958Z.jpg -------------------------------------------------------------------------------- /script/2018/SITL/testimgs/flight.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/script/2018/SITL/testimgs/flight.tlog -------------------------------------------------------------------------------- /script/2018/SITL/with_radio_vars.sh: -------------------------------------------------------------------------------- 1 | 2 | # dot this into env for running SITL tests with no radios attached 3 | 4 | export UART_RETRIEVAL="uart:../radio_retrieval" 5 | export UART_GROUND="radio1" 6 | export UART_RELAY="uart:../radio_relay" 7 | 8 | -------------------------------------------------------------------------------- /script/2018/cmac-image-wp.txt: -------------------------------------------------------------------------------- 1 | QGC WPL 110 2 | 0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.362869 149.165497 590.130005 1 3 | 1 0 3 22 10.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 30.000000 1 4 | 2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 90.000000 1 5 | 3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 90.000000 1 6 | 4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 90.000000 1 7 | 5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 90.000000 1 8 | 6 0 0 177 2.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 9 | 7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 10 | 8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 11 | 9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 12 | 10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365620 149.165543 30.000000 1 13 | 11 0 3 21 0.000000 0.000000 0.000000 0.000000 -35.362865 149.165161 -0.400000 1 14 | -------------------------------------------------------------------------------- /script/2018/gcs_network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # script for main GCS laptop to keep network setup correctly 4 | 5 | TRIDGELLNET="203.217.61.45" 6 | OZLABSORG="203.11.71.1" 7 | PI_TELSTRA="192.168.3.10" 8 | PI_OPTUS="192.168.3.11" 9 | 10 | while :; do 11 | date 12 | 13 | (route -n | grep -q $TRIDGELLNET) || { 14 | echo "Adding tridgell.net route" 15 | sudo route add -host $TRIDGELLNET gw $PI_TELSTRA dev eth2 16 | } 17 | (route -n | grep -q $OZLABSORG) || { 18 | echo "Adding ozlabs.org route" 19 | sudo route add -host $OZLABSORG gw $PI_OPTUS dev eth2 20 | } 21 | (route -n | egrep -q "^0.0.0.0.*$PI_TELSTRA") || { 22 | echo "Adding default route" 23 | sudo sudo route del default dev eth2; 24 | sudo route add default gw $PI_TELSTRA dev eth2 25 | } 26 | sleep 5 27 | done 28 | 29 | -------------------------------------------------------------------------------- /script/2018/target_loc_CMAC.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | export TARGET_LATITUDE="-35.362859" 4 | export TARGET_LONGITUDE="149.164086" 5 | 6 | -------------------------------------------------------------------------------- /script/2018/target_loc_dalby.sh: -------------------------------------------------------------------------------- 1 | 2 | # . this in to set target location for Dalby 3 | 4 | export TARGET_LATITUDE="-27.3578300476" 5 | export TARGET_LONGITUDE="151.240219116" 6 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.GroundSecondary/mav_porter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mavproxy.py --master=192.168.16.30:14550 --aircraft="Porter" --console 4 | 5 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.GroundSecondary/mavinit.scr: -------------------------------------------------------------------------------- 1 | module load sensors 2 | speed 3 | set numcells 4 4 | set batwarncell 2.9 5 | set moddebug 1 6 | module load graph 7 | @graph timespan 30 8 | @alias add g graph 9 | @alias add gradio g RADIO.rssi RADIO.noise RADIO.remrssi RADIO.remnoise 10 | @alias add galt g GLOBAL_POSITION_INT.relative_alt*0.001 altitude(SCALED_PRESSURE) RANGEFINDER.distance 11 | @alias add gthr g VFR_HUD.throttle 12 | @alias add gspeed g VFR_HUD.groundspeed VFR_HUD.airspeed 13 | gradio 14 | galt 15 | gthr 16 | gspeed 17 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.ground/mav_porter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #PORT="/dev/serial/by-id/usb-FTDI_FT231X_USB_UART_DN00762C-if00-port0" 4 | #PORT="/dev/serial/by-id/usb-FTDI_FT231X_USB_UART_DN0074S3-if00-port0" 5 | #PORT="/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A4*" 6 | # new RFD900, used for OBC-2014 7 | #PORT="/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A703V47G-if00-port0" 8 | PORT=$(/bin/ls /dev/serial/by-id/usb-FTDI*) 9 | 10 | #mavproxy.py --speech --map --aircraft=Porter --console --baudrate 57600 --master $PORT --out=127.0.0.1:14550 --out=127.0.0.1:14551 "$@" 11 | mavproxy.py --map --aircraft=Porter --console --baudrate 57600 --master=$PORT --master 192.168.16.15:2626 --out=127.0.0.1:14550 $* 12 | pkill -f speech 13 | 14 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.ground/mavinit.scr: -------------------------------------------------------------------------------- 1 | module load sensors 2 | speed 3 | set numcells 4 4 | set batwarncell 2.9 5 | set heartbeat 2 6 | set streamrate -1 7 | set streamrate2 -1 8 | set moddebug 2 9 | module load map 10 | module load cuav.modules.camera 11 | module load cuav.modules.cuav_check 12 | camera set use_bsend2 1 13 | camera set bandwidth 130000 14 | camera set bandwidth2 750 15 | camera set altitude 0 16 | camera set gcs_slave 192.168.16.34 17 | camera set aircraft_address 192.168.16.4 18 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 19 | set moddebug 2 20 | camera view 21 | module load output 22 | output add 192.168.16.30:14550 23 | output add 192.168.16.34:14550 24 | module load tracker 25 | tracker set port 127.0.0.1:1234 26 | module load speech 27 | @alias add minscore remote camera set minscore 28 | @alias add minscore2 remote camera set minscore2 29 | @alias add movejoe wp movemulti 22 15 27 30 | @alias add joedropdist wp param 22 2 31 | @alias add wpedit module load misseditor 32 | @alias add terminate param set AFS_TERMINATE 33 | @alias add termaction param set AFS_TERM_ACTION 34 | @alias add drop servo set 8 1500 35 | @alias add hold servo set 8 900 36 | @alias add drop2 servo set 6 1050 37 | @alias add hold2 servo set 6 1480 38 | @alias add odroidpower relay set 0 39 | @alias add ekf param set AHRS_EKF_USE 40 | @alias add gbottle graph SERVO_OUTPUT_RAW.servo6_raw SERVO_OUTPUT_RAW.servo8_raw 41 | @alias add grange g rangefinder_roll(RANGEFINDER,ATTITUDE,maxdist=39.5) GLOBAL_POSITION_INT.relative_alt*0.001 42 | @alias add ignitioncut rc 7 1000 43 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.plane/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # autostart for mavproxy on Porter 3 | 4 | ( 5 | date 6 | export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/local/bin 7 | export HOME=/root 8 | cd /root 9 | screen -d -m -S MAVProxy -s /bin/bash Porter/mav_porter.sh 10 | ) > /root/autostart.log 2>&1 11 | exit 0 12 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.plane/mav_porter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rdate 192.168.16.15 3 | 4 | mavproxy.py --master /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A1011RO6-if00-port0 --rtscts --baudrate 115200 --aircraft Porter --out 192.168.16.15:2626 5 | -------------------------------------------------------------------------------- /script/OBC2014/Porter.plane/mavinit.scr: -------------------------------------------------------------------------------- 1 | set heartbeat 0 2 | set streamrate -1 3 | set streamrate2 -1 4 | set moddebug 1 5 | module load cuav.modules.camera 6 | camera set use_bsend2 1 7 | camera set bandwidth2 750 8 | camera set send2_divider 5 9 | camera set gcs_address 192.168.16.15 10 | camera set minscore 5000 11 | camera set minscore2 5000 12 | camera set send2 1 13 | camera set bandwidth 130000 14 | camera set blue_emphasis 1 15 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 16 | # use TERRAIN_REPORT for altitude 17 | camera set altitude 0 18 | camera airstart 19 | camera start 20 | set distreadout 0 21 | set altreadout 0 22 | set moddebug 2 23 | -------------------------------------------------------------------------------- /script/OBC2016/GX9.ground/mav_aircraft.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | AIRCRAFT="$1" 4 | 5 | mavproxy.py --mav20 --baudrate 57600 --aircraft "$AIRCRAFT" --console --map --speech $* 6 | 7 | -------------------------------------------------------------------------------- /script/OBC2016/GX9.ground/mavinit.scr: -------------------------------------------------------------------------------- 1 | link add udpout:52.63.21.140:10402 2 | link add udpout:103.22.144.67:10402 3 | set streamrate -1 4 | set streamrate2 -1 5 | output sysid 2 127.0.0.1:14552 6 | module load cuav.modules.cuav_check 7 | 8 | set numcells 3 9 | 10 | -------------------------------------------------------------------------------- /script/OBC2016/GX9.plane/cron/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=/sbin:/usr/sbin:/bin:/usr/bin 4 | 5 | OZLABS=103.22.144.67 6 | TRIDGELLNET=59.167.251.244 7 | CUAVVPN=52.63.21.140 8 | 9 | OPTUSDONGLE=192.168.8.1 10 | TELSTRADONGLE=192.168.0.1 11 | 12 | # ensure we have a route to tridgell.net via optus dongle 13 | (route -n | egrep -q ^$TRIDGELLNET) || route add -host $TRIDGELLNET gw $TELSTRADONGLE 14 | (route -n | egrep -q ^$OZLABS) || route add -host $OZLABS gw $TELSTRADONGLE 15 | (route -n | egrep -q ^$CUAVVPN) || route add -host $CUAVVPN gw $OPTUSDONGLE 16 | # default route via telstra 17 | (route -n | egrep -q ^0.0.0.0) || route add default gw $TELSTRADONGLE 18 | 19 | (ifconfig | grep 192.168.8) || { 20 | usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14dc -M "55534243123456780000000000000a11062000000000000100000000000000" 21 | sleep 3 22 | ifconfig eth3 192.168.8.100/24 up 23 | } 24 | 25 | ifconfig usb0 192.168.0.182/24 up 26 | 27 | (ifconfig | grep 10.26.0.221) || /root/start_vpn2.sh 28 | 29 | #ifconfig eth0 192.168.2.64/24 up 30 | #ifconfig eth1 192.168.2.64/24 up 31 | 32 | # check link to ozlabs via telstra is OK 33 | ping -q -c 2 $OZLABS || { 34 | wget -O /dev/null 'http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK' 35 | #sed -i s/127.0.0.1/8.8.8.8/g /etc/resolv.conf 36 | } 37 | 38 | 39 | # check if we can ping cuav-vpn via optus 40 | ping -q -c 2 $CUAVVPN || { 41 | ifconfig eth2 192.168.8.100/24 up 42 | ifconfig eth3 192.168.8.100/24 up 43 | } 44 | 45 | [ $(date +%s) -lt 1469439272 ] && { 46 | /usr/bin/rdate cuav-vpn 47 | } 48 | [ $(date +%s) -lt 1469439272 ] && { 49 | /usr/bin/rdate ozlabs.org 50 | } 51 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.ground/mav_aircraft.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | AIRCRAFT="$1" 4 | 5 | mavproxy.py --mav20 --baudrate 57600 --aircraft "$AIRCRAFT" --console --map --speech $* 6 | 7 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.ground/mavinit.scr: -------------------------------------------------------------------------------- 1 | @alias add joemovedalby wp movemulti 11 10 24 2 | 3 | set streamrate -1 4 | set streamrate2 -1 5 | 6 | set source_system 254 7 | 8 | set dist_unit nm 9 | set height_unit feet 10 | set speed_unit knots 11 | 12 | output sysid 1 127.0.0.1:14650 13 | 14 | # use these without steves box 15 | link add udpout:52.63.21.140:10402 16 | link add udpout:103.22.144.67:10402 17 | 18 | # use these with steves box 19 | #link add udp:0.0.0.0:14450 20 | #link add udp:0.0.0.0:14451 21 | 22 | # added 'james scenario' link 23 | link add udpout:103.22.144.67:10406 24 | 25 | module load cuav.modules.camera 26 | module load cuav.modules.cuav_check 27 | 28 | camera set gcs_address 52.63.21.140 29 | camera set aircraft_address 52.63.21.140 30 | camera set gcs_view_port 7543 31 | camera set aircraft_port 7544 32 | 33 | camera set gcs_address2 103.22.144.67 34 | camera set aircraft_address2 103.22.144.67 35 | camera set gcs_view_port2 10407 36 | camera set aircraft_port2 10408 37 | 38 | camera set roll_stabilised 0 39 | camera set altitude 0 40 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 41 | 42 | set numcells 6 43 | #set speech 0 44 | module load sensors 45 | speed 46 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/cron/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=/sbin:/usr/sbin:/bin:/usr/bin 4 | 5 | OZLABS=103.22.144.67 6 | TRIDGELLNET=59.167.251.244 7 | CUAVVPN=52.63.21.140 8 | 9 | OPTUSDONGLE=192.168.8.1 10 | TELSTRADONGLE=192.168.0.1 11 | 12 | # ensure we have a route to tridgell.net via optus dongle 13 | (route -n | egrep -q ^$TRIDGELLNET) || route add -host $TRIDGELLNET gw $TELSTRADONGLE 14 | (route -n | egrep -q ^$OZLABS) || route add -host $OZLABS gw $TELSTRADONGLE 15 | (route -n | egrep -q ^$CUAVVPN) || route add -host $CUAVVPN gw $OPTUSDONGLE 16 | # default route via telstra 17 | (route -n | egrep -q ^0.0.0.0) || route add default gw $TELSTRADONGLE 18 | 19 | (ifconfig | grep 192.168.8) || { 20 | usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14dc -M "55534243123456780000000000000a11062000000000000100000000000000" 21 | sleep 3 22 | ifconfig eth3 192.168.8.100/24 up 23 | } 24 | 25 | ifconfig usb0 192.168.0.182/24 up 26 | 27 | ifconfig eth0 192.168.2.64/24 up 28 | ifconfig eth1 192.168.2.64/24 up 29 | 30 | # check link to ozlabs via telstra is OK 31 | ping -q -c 2 $OZLABS || { 32 | route del default 33 | route add default gw $TELSTRADONGLE 34 | wget -O /dev/null 'http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK' 35 | #sed -i s/127.0.0.1/8.8.8.8/g /etc/resolv.conf 36 | } 37 | 38 | 39 | # check if we can ping cuav-vpn via optus 40 | ping -q -c 2 $CUAVVPN || { 41 | ifconfig eth2 192.168.8.100/24 up 42 | ifconfig eth3 192.168.8.100/24 up 43 | } 44 | 45 | [ $(date +%s) -lt 1469439272 ] && { 46 | /usr/bin/rdate cuav-vpn 47 | } 48 | 49 | [ $(date +%s) -lt 1469439272 ] && { 50 | /usr/bin/rdate tridgell.net 51 | } -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/mav-screenrc: -------------------------------------------------------------------------------- 1 | source /root/.screenrc 2 | screen -t "camera" 3 | stuff "./start_cam.sh " 4 | screen -t "MAVProxy" 5 | stuff "./start_mav.sh " 6 | screen -t "bash" 7 | 8 | 9 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/mavinit.scr: -------------------------------------------------------------------------------- 1 | module load cuav.modules.camera 2 | module load cuav.modules.cuav_companion 3 | 4 | camera set gcs_address 52.63.21.140 5 | camera set aircraft_address 52.63.21.140 6 | camera set gcs_view_port 7543 7 | camera set aircraft_port 7544 8 | 9 | camera set gcs_address2 103.22.144.67 10 | camera set aircraft_address2 103.22.144.67 11 | camera set gcs_view_port2 10407 12 | camera set aircraft_port2 10408 13 | 14 | camera set save_pgm 1 15 | camera set roll_stabilised 0 16 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 17 | set streamrate 2 18 | set numcells 6 19 | camera start -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=/sbin:/usr/sbin:/bin:/usr/bin 4 | 5 | # ensure we have a route to tridgell.net via optus dongle 6 | (route -n | grep -q 59.167.251.244) || route add -host 59.167.251.244 gw 192.168.1.1 7 | (route -n | grep -q 103.22.144.67) || route add -host 103.22.144.67 gw 192.168.1.1 8 | (route -n | grep -q 52.63.21.140) || route add -host 52.63.21.140 gw 192.168.0.1 9 | 10 | ifconfig usb0 192.168.0.182/24 up 11 | 12 | ifconfig eth0 192.168.2.64/24 up 13 | ifconfig eth1 192.168.2.64/24 up 14 | 15 | ping -q -c 2 cuav-vpn || { 16 | route del default 17 | route add default gw 192.168.0.1 18 | wget -O /dev/null 'http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK' 19 | sed -i s/127.0.0.1/8.8.8.8/g /etc/resolv.conf 20 | } 21 | 22 | ping -q -c 2 tridgell.net || { 23 | ifconfig eth2 192.168.1.100/24 up 24 | } 25 | 26 | [ $(date +%s) -lt 1469439272 ] && { 27 | /usr/bin/rdate cuav-vpn 28 | } -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/start_cam.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | while [ $(date +%s) -lt 1469439272 ]; do 3 | sleep 2 4 | done 5 | ./cuav/cuav/camera/py_capture.py --reduction 2 --save --make-fake=fake_chameleon.pgm 6 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/start_capture.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | cd /data 5 | tdir=$(date +%Y%m%d%H%M) 6 | mkdir -p $tdir 7 | cd $tdir 8 | ( 9 | date 10 | /root/cuav/cuav/camera/py_capture.py --save --reduction 10 11 | ) >> capture.log 2>&1 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/start_mav.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export FAKE_CHAMELEON=1 3 | while [ $(date +%s) -lt 1469439272 ]; do 4 | sleep 2 5 | done 6 | mavproxy.py --mav20 --source-system=254 --baudrate 115200 --master /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 --out udpout:52.63.21.140:10401 --out udpout:103.22.144.67:10401 --aircraft PorterQuad.plane 7 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/start_screen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /bin/date >> /root/start_screen.log 4 | 5 | export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin 6 | export HOME=/root 7 | export SHELL=/bin/bash 8 | export TERM=xterm 9 | 10 | cd /root 11 | ( 12 | sleep 5 13 | screen -S MAVProxy -t 0 -d -m -c mav-screenrc 14 | ) > screen.log 2>&1 15 | -------------------------------------------------------------------------------- /script/OBC2016/PorterQuad.plane/telstra_connect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo ifconfig usb0 192.168.0.182/24 up 4 | sudo route del default 5 | sudo route add default gw 192.168.0.1 6 | wget -O - 'http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK' | strings - 7 | sudo sed -i s/127.0.0.1/8.8.8.8/g /etc/resolv.conf 8 | 9 | 10 | -------------------------------------------------------------------------------- /script/OBC2016/fence.txt: -------------------------------------------------------------------------------- 1 | -27.274403 151.290085 2 | -27.270222 151.295868 3 | -27.319092 151.286438 4 | -27.317934 151.278915 5 | -27.277956 151.286636 6 | -27.276211 151.275314 7 | -27.325117 151.257217 8 | -27.358505 151.255386 9 | -27.361076 151.246948 10 | -27.363745 151.237289 11 | -27.355124 151.234299 12 | -27.350365 151.250671 13 | -27.324266 151.252106 14 | -27.266756 151.273392 15 | -27.270222 151.295868 16 | -------------------------------------------------------------------------------- /script/OBC2016/pi1/gcs-screenrc: -------------------------------------------------------------------------------- 1 | source /home/pi/.screenrc 2 | screen -t RelayTelstra 3 | stuff "mavproxy.py --master=udpout:103.22.144.67:10404 --continue --nowait --out=udp:192.168.1.22:14450 --out=udp:192.168.1.20:14460 --aircraft=RelayPiTelstra " 4 | screen -t RetrievalTelstra 5 | stuff "mavproxy.py --master=udpout:103.22.144.67:10402 --continue --nowait --out=udp:192.168.1.20:14450 --out=udp:192.168.1.22:14460 --aircraft=RetrievalPiTelstra " 6 | screen -t bash 7 | 8 | -------------------------------------------------------------------------------- /script/OBC2016/pi1/reboot_telstra.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import pexpect, sys 4 | 5 | IP="192.168.0.1" 6 | 7 | t = pexpect.spawn('telnet 192.168.0.1', logfile=sys.stdout) 8 | t.expect('login') 9 | t.send('root\n') 10 | t.expect('Password') 11 | t.send('zte9x15\n') 12 | t.expect('root@') 13 | t.send('reboot\n') 14 | t.expect('going down for reboot') 15 | -------------------------------------------------------------------------------- /script/OBC2016/pi1/screen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=MAVGateway 3 | 4 | [Service] 5 | Type=forking 6 | ExecStart=/home/pi/start_screen.sh 7 | User=pi 8 | Restart=always 9 | RestartSec=3 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | Alias=screen.service 14 | -------------------------------------------------------------------------------- /script/OBC2016/pi1/start_screen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export HOME=/home/pi 4 | export USER=pi 5 | export PATH=/bin:/usr/bin:/usr/local/bin:/home/pi/bin:/home/pi/.local/bin:$PATH 6 | cd /home/pi/MAVLogs 7 | screen -S MAVProxy -d -m -c ../gcs-screenrc 8 | 9 | -------------------------------------------------------------------------------- /script/OBC2016/pi2/.mavinit.scr: -------------------------------------------------------------------------------- 1 | set streamrate -1 2 | set streamrate2 -1 3 | 4 | 5 | -------------------------------------------------------------------------------- /script/OBC2016/pi2/gcs-screenrc: -------------------------------------------------------------------------------- 1 | source /home/pi/.screenrc 2 | screen -t RelayOptus 3 | stuff "mavproxy.py --mav20 --master=udpout:52.63.21.140:10404 --continue --nowait --out=udp:192.168.1.22:14451 --out=udp:192.168.1.20:14461 --aircraft=RelayPiOptus " 4 | screen -t RetrievalOptus 5 | stuff "mavproxy.py --mav20 --master=udpout:52.63.21.140:10402 --continue --nowait --out=udp:192.168.1.20:14451 --out=udp:192.168.1.22:14461 --aircraft=RetrievalPiOptus " 6 | screen -t bash 7 | 8 | -------------------------------------------------------------------------------- /script/OBC2016/pi2/mav_route_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | screen -dm -S mavproxy mavproxy.py --master=udpout:52.63.21.140:10402 --master=udpout:103.22.144.67:10402 --continue --nowait --out=udp:192.168.0.20:14551 --out=udp:192.168.0.21:14551 --state-basedir=/home/pi/MAVLogs 4 | 5 | -------------------------------------------------------------------------------- /script/OBC2016/pi2/start_screen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export HOME=/home/pi 4 | export USER=pi 5 | export PATH=/bin:/usr/bin:/usr/local/bin:/home/pi/bin:/home/pi/.local/bin:$PATH 6 | cd /home/pi 7 | cd MAVLogs 8 | screen -S MAVProxy -d -m -c ../gcs-screenrc 9 | 10 | -------------------------------------------------------------------------------- /script/Playback/ImageLog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IMAGE_DIR=~/Documents/Optera 4 | LOGFILE=~/Documents/Optera/flight.tlog 5 | 6 | #This creates a mavlink stream and an image link at ./cur_camera.jpg 7 | playback.py ${IMAGE_DIR} ${LOGFILE} --out=udpout:127.0.0.1:14550 8 | -------------------------------------------------------------------------------- /script/Playback/PlayGround.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The GCS just runs the cuav_ground module - image viewing 4 | 5 | #Note the GCS is receiving two streams - port 14650 for MAVLink telemetry 6 | #the image stream on port 14680. It will transmit remote commands back to the 7 | #cuav_air module on port 147670. 8 | 9 | #The "600000" number at the end of the air_address is the bandwidth in bytes/sec 10 | 11 | #Type in "camera status" to see the queues of captured/processed/transmitted images 12 | 13 | mavproxy.py --master=udpin:127.0.0.1:14650 --console --map --load-module=cuav.modules.camera_ground --cmd="set moddebug 3; camera set air_address 127.0.0.1:14680:14670:60000; camera set camparms /data/PiCamV2/params.json; camera view;" 14 | -------------------------------------------------------------------------------- /script/Playback/PlayUAV.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #The UAV just runs the cuav_air module - image scanning and sending 4 | 5 | #Note the UAV is outputting 2 steams to the GCS. port 14650 for MAVLink telemetry 6 | #and port 14670 for the image stream. The GCS is receiving the image stream on port 14680. 7 | 8 | #The "600000" number at the end of the gcs_address is the bandwidth in bytes/sec 9 | 10 | #Also note the "camera set ignoretimestamps True", in order to ensure the camera timestamps are "live" and match 11 | #the telemetry timestamps 12 | 13 | mavproxy.py --master=udpin:127.0.0.1:14550 --out=udpout:127.0.0.1:14650 --load-module=cuav.modules.camera_air --cmd="set moddebug 3; camera set gcs_address 127.0.0.1:14670:14680:60000; camera set camparms /data/PiCamV2/params.json; camera set imagefile cur_camera.jpg; camera set minscore 100; camera set ignoretimestamps True; camera airstart;" 14 | -------------------------------------------------------------------------------- /script/Playback/Readme: -------------------------------------------------------------------------------- 1 | These scripts are for playing back an existing set of images and MAVLink tlog. 2 | 3 | There are 3 scripts: 4 | ImageLog.sh - for putting out the image and telemetry stream 5 | PlayUAV.sh - the cuav_air module running in MAVProxy on a UAV 6 | PlayGround.sh - the cuav_ground module running in MAVProxy in a GCS 7 | 8 | The MAVProxy instance in PlayGround should be where the user manages 9 | the images and processing. 10 | -------------------------------------------------------------------------------- /script/SITL/GCS/GX9.SITL/mavinit.scr: -------------------------------------------------------------------------------- 1 | set streamrate -1 2 | set streamrate2 -1 3 | 4 | # use these without steves box 5 | #link add udpout:52.63.21.140:10404 6 | #link add udpout:103.22.144.67:10404 7 | 8 | # use these for plane input from steves box 9 | #link add udp:0.0.0.0:14450 10 | #link add udp:0.0.0.0:14451 11 | 12 | output add 192.168.1.22:14452 13 | output add 192.168.1.23:14452 14 | 15 | module load cuav.modules.cuav_check 16 | set dist_unit nm 17 | set height_unit feet 18 | set speed_unit knots 19 | set numcells 3 20 | set battwarn 10000 21 | set speech_voice en-us+f4 22 | -------------------------------------------------------------------------------- /script/SITL/GCS/PorterQuad.SITL/mavinit.scr: -------------------------------------------------------------------------------- 1 | set streamrate -1 2 | set streamrate2 -1 3 | set dist_unit nm 4 | set height_unit feet 5 | set speed_unit knots 6 | set battwarn 10000 7 | 8 | output sysid 1 127.0.0.1:14650 9 | 10 | # use these without steves box 11 | #link add udpout:52.63.21.140:10402 12 | #link add udpout:103.22.144.67:10402 13 | 14 | # use these with steves box 15 | link add udp:0.0.0.0:14450 16 | link add udp:0.0.0.0:14451 17 | 18 | # added 'james scenario' link 19 | link add udpout:103.22.144.67:10406 20 | #link add udpout:52.63.21.140:10406 21 | 22 | module load cuav.modules.camera 23 | module load cuav.modules.cuav_check 24 | 25 | camera set gcs_address 52.63.21.140 26 | camera set aircraft_address 52.63.21.140 27 | camera set gcs_view_port 7543 28 | camera set aircraft_port 7544 29 | 30 | camera set gcs_address2 103.22.144.67 31 | camera set aircraft_address2 103.22.144.67 32 | camera set gcs_view_port2 10407 33 | camera set aircraft_port2 10408 34 | 35 | 36 | camera set roll_stabilised 0 37 | camera set altitude 0 38 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 39 | set numcells 6 40 | #set speech 0 41 | module load sensors 42 | speed 43 | 44 | @alias add joemovedalby wp movemulti 11 10 24 45 | -------------------------------------------------------------------------------- /script/SITL/GCS/start_gcs_heli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | AIRCRAFT="GX9.SITL" 4 | 5 | mavproxy.py --aircraft "$AIRCRAFT" --console --map --speech --master 127.0.0.1:14650 --mav20 $* 6 | -------------------------------------------------------------------------------- /script/SITL/GCS/start_gcs_quadplane.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | AIRCRAFT="PorterQuad.SITL" 4 | SYSID=254 5 | 6 | mavproxy.py --aircraft "$AIRCRAFT" --console --map --speech --master radio1 --mav20 --source-system=$SYSID $* 7 | -------------------------------------------------------------------------------- /script/SITL/aircraft/Heli/OBC2016/mavinit.scr: -------------------------------------------------------------------------------- 1 | # remove 127.0.0.1 outputs 2 | output remove 0 3 | output remove 0 4 | set heartbeat 0 5 | 6 | # redirect serial packets arriving from the retrieval aircraft 7 | output sysid 2 103.22.144.67:10405 8 | 9 | module load cuav.modules.cuav_companion 10 | 11 | output add udpout:52.63.21.140:10403 12 | output add udpout:103.22.144.67:10403 13 | set streamrate -1 14 | -------------------------------------------------------------------------------- /script/SITL/aircraft/Heli/start_heli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sim_vehicle.py -v ArduCopter -j4 -D -L Dalby2 -f heli -A --uartC=uart:radio2 -C --aircraft OBC2016 --mav20 "$*" 3 | -------------------------------------------------------------------------------- /script/SITL/aircraft/PorterQuad/OBC2016.fen: -------------------------------------------------------------------------------- 1 | -27.302433 151.332031 2 | -27.276356 151.339645 3 | -27.268810 151.285797 4 | -27.277533 151.284409 5 | -27.278055 151.286621 6 | -27.298431 151.282822 7 | -27.308550 151.352051 8 | -27.330193 151.370728 9 | -27.331450 151.369049 10 | -27.338329 151.375549 11 | -27.332550 151.383301 12 | -27.325674 151.376816 13 | -27.326727 151.375381 14 | -27.303444 151.355347 15 | -27.293982 151.289902 16 | -27.278849 151.292618 17 | -27.285116 151.338287 18 | -27.276356 151.339645 19 | -------------------------------------------------------------------------------- /script/SITL/aircraft/PorterQuad/OBC2016/mavinit.scr: -------------------------------------------------------------------------------- 1 | set streamrate -1 2 | 3 | # remove 127.0.0.1 outputs 4 | output remove 0 5 | output remove 0 6 | set heartbeat 0 7 | 8 | output add udpout:52.63.21.140:10401 9 | output add udpout:103.22.144.67:10401 10 | 11 | output sysid 1 127.0.0.1:14800 12 | 13 | module load cuav.modules.camera 14 | module load cuav.modules.cuav_companion 15 | 16 | camera set gcs_address 52.63.21.140 17 | camera set aircraft_address 52.63.21.140 18 | camera set gcs_view_port 7543 19 | camera set aircraft_port 7544 20 | 21 | camera set gcs_address2 103.22.144.67 22 | camera set aircraft_address2 103.22.144.67 23 | camera set gcs_view_port2 10407 24 | camera set aircraft_port2 10408 25 | 26 | camera set save_pgm 1 27 | camera set roll_stabilised 0 28 | camera set camparms /home/tridge/project/UAV/cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 29 | camera start 30 | 31 | -------------------------------------------------------------------------------- /script/SITL/aircraft/PorterQuad/start_quadplane.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export FAKE_CHAMELEON=1 3 | pkill -9 -f playimages_simple 4 | $HOME/project/UAV/cuav/cuav/tests/playimages_simple.py --loop /home/tridge/project/UAV/PorterQuad/plane/2016-07-08/flight2/camera/raw > /dev/null & 5 | rm -rf OBC2016/logs/2*/flight*/camera 6 | sim_vehicle.py -I2 -j4 -D -L Dalby -v ArduPlane -f quadplane-ice -A --uartC=uart:radio3 -C --aircraft OBC2016 --mav20 --source-system=254 "$*" 7 | -------------------------------------------------------------------------------- /script/ctest/mavinit.scr: -------------------------------------------------------------------------------- 1 | output add 192.168.16.15:2626 2 | set heartbeat 0 3 | set streamrate -1 4 | set streamrate2 -1 5 | #camera boundary /home/tridge/project/UAV/joe/CMAC-boundary.txt 6 | set moddebug 1 7 | module load cuav.modules.camera 8 | camera set use_bsend2 1 9 | camera set bandwidth2 1500 10 | camera set send2_divider 5 11 | camera set gcs_address 192.168.16.15 12 | camera set minscore 5000 13 | camera set minscore2 1200 14 | camera set bandwidth 130000 15 | camera set blue_emphasis 1 16 | camera set camparms cuav/cuav/data/calibration_images_2014/ChameleonArecort/params.json 17 | # use TERRAIN_REPORT for altitude 18 | camera set altitude 0 19 | camera airstart 20 | set moddebug 2 21 | set distreadout 0 22 | set altreadout 0 23 | 24 | -------------------------------------------------------------------------------- /script/gtest/mavinit.scr: -------------------------------------------------------------------------------- 1 | #module load sensors 2 | set heartbeat 2 3 | set streamrate -1 4 | set streamrate2 -1 5 | set distreadout 500 6 | set basealt 441 7 | module load antenna 8 | module load graph 9 | graph timespan 60 10 | set moddebug 2 11 | #module load console 12 | module load map 13 | module load console 14 | module load cuav.modules.camera 15 | camera set save_pgm 0 16 | camera set brightness 2 17 | #module load cuav.modules.cuav_check 18 | #camera set gcs_slave 192.168.16.34 19 | #graph VFR_HUD.airspeed VFR_HUD.groundspeed WIND.speed 20 | #graph NAV_CONTROLLER_OUTPUT.nav_roll degrees(ATTITUDE.roll) 21 | wp show cuav/cuav/data/way.txt 22 | fence show cuav/cuav/data/fence.txt 23 | camera boundary cuav/cuav/data/OBC_search2.txt 24 | camera view 25 | camera set filter_type compactness 26 | camera set minscore 35 27 | camera set use_bsend2 0 28 | -------------------------------------------------------------------------------- /script/obc_playback.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./cuav/cuav/tests/test_playback.sh /mnt/OBC/OBC-2012 --HIL --out /dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00 4 | -------------------------------------------------------------------------------- /script/rename_by_date.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys, os, time 4 | 5 | print 'hello' 6 | 7 | for f in sys.argv[1:]: 8 | print f 9 | stat = os.stat(f) 10 | extension = f[-4:] 11 | if extension != ".pgm": 12 | print extension 13 | continue 14 | base = f[:-4] 15 | hundredths = int(stat.st_mtime * 100.0) % 100 16 | newname = "raw%s%02u" % (time.strftime("%Y%m%d%H%M%S", time.localtime(stat.st_mtime)), hundredths) 17 | newname = os.path.join(os.path.dirname(f), newname) 18 | if os.path.exists(base + '.log'): 19 | print(base + '.log', newname + '.log') 20 | os.rename(base + '.log', newname + '.log') 21 | os.rename(base + '.pgm', newname + '.pgm') 22 | print newname 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /script/update_host.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | set -e 5 | host=$1 6 | 7 | pushd mavlink 8 | git push $host HEAD:master 9 | ssh $host "cd mavlink/pymavlink && git reset --hard && rm -rf build && MAVLINK_DIALECT=ardupilotmega python setup.py clean build install" 10 | popd 11 | 12 | pushd MAVProxy 13 | git push $host 14 | ssh $host "cd MAVProxy && git reset --hard && rm -rf build && python setup.py clean build install" 15 | popd 16 | 17 | pushd cuav 18 | git push $host 19 | ssh $host "cd cuav && git reset --hard && rm -rf build && python setup.py clean build install" 20 | popd 21 | 22 | -------------------------------------------------------------------------------- /tests/camera/test_cam_params.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test Camera params 4 | ''' 5 | 6 | from numpy import array 7 | import json 8 | import sys 9 | import pytest 10 | import os, numpy 11 | from cuav.camera.cam_params import CameraParams 12 | 13 | def test_cam_params_txt(): 14 | C = CameraParams(lens=4.0, sensorwidth=5.0, xresolution=1280, yresolution=960) 15 | C.setParams([[1, 2, 3], [4, 5, 6]], [0, 6, 7, 8]) 16 | C.save('foo.txt') 17 | C2 = CameraParams.fromfile('foo.txt') 18 | assert str(C) == str(C2) 19 | assert numpy.array_equal(C.K, C2.K) 20 | assert numpy.array_equal(C.D, C2.D) 21 | os.remove('foo.txt') 22 | 23 | def test_cam_params_dict(): 24 | C = CameraParams(lens=4.0, sensorwidth=5.0, xresolution=3000, yresolution=4000) 25 | C.setParams([[1, 2, 3], [4, 5, 6]], [0, 6, 7, 8]) 26 | Cdict = C.todict() 27 | C2dict = CameraParams.fromdict(Cdict) 28 | assert C.todict() == C2dict.todict() 29 | assert numpy.array_equal(C.K, C2dict.K) 30 | assert numpy.array_equal(C.D, C2dict.D) 31 | 32 | -------------------------------------------------------------------------------- /tests/lib/test_block_xmit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | test program for block_xmit 4 | ''' 5 | 6 | import sys, os, time, random, functools 7 | import pytest 8 | from cuav.lib import block_xmit 9 | 10 | 11 | def test_block_xmit(): 12 | 13 | debug = False 14 | bandwidth = 100000 15 | ordered = False 16 | num_blocks = 10 17 | packet_loss = 0 18 | average_block_size = 5000 19 | 20 | # setup a send/recv pair 21 | b1 = block_xmit.BlockSender(dest_ip='127.0.0.1', debug=debug, bandwidth=bandwidth, ordered=ordered) 22 | b2 = block_xmit.BlockSender(dest_ip='127.0.0.1', debug=debug, bandwidth=bandwidth, ordered=ordered) 23 | 24 | # setup for some packet loss 25 | if packet_loss: 26 | b1.set_packet_loss(packet_loss) 27 | b2.set_packet_loss(packet_loss) 28 | 29 | # tell b1 the port b2 got allocated 30 | b1.set_dest_port(b2.get_port()) 31 | b2.set_dest_port(b1.get_port()) 32 | 33 | # generate some data blocks to work with 34 | blocks = [bytes(os.urandom(random.randint(1,average_block_size))) for i in range(num_blocks)] 35 | 36 | total_size = sum([len(blk) for blk in blocks]) 37 | 38 | t0 = time.time() 39 | 40 | # send them from b1 to b2 and from b2 to b1 41 | for blk in blocks: 42 | b1.send(blk) 43 | b2.send(blk) 44 | 45 | received1 = [] 46 | received2 = [] 47 | 48 | # wait till they have all been received and acked 49 | while (b1.sendq_size() > 0 or 50 | b2.sendq_size() > 0 or 51 | len(received1) != num_blocks or 52 | len(received2) != num_blocks): 53 | b1.tick() 54 | b2.tick() 55 | blk = b2.recv(0.01) 56 | if blk is not None: 57 | received2.append(blk) 58 | blk = b1.recv(0.01) 59 | if blk is not None: 60 | received1.append(blk) 61 | if int(time.time()) - int(t0) > 2: 62 | #timeout 63 | assert False 64 | 65 | t1 = time.time() 66 | 67 | if not ordered: 68 | blocks.sort() 69 | received1.sort() 70 | received2.sort() 71 | 72 | assert blocks == received1 73 | assert blocks == received2 74 | 75 | 76 | #print("%u blocks received OK %.1f bytes/second" % (num_blocks, total_size/(t1-t0))) 77 | #print("efficiency %.1f bandwidth used %.1f bytes/s" % (b1.get_efficiency(), 78 | # b1.get_bandwidth_used())) 79 | -------------------------------------------------------------------------------- /tests/lib/test_cuav_joe.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | test program for cuav_joe 4 | ''' 5 | 6 | import sys, os, time, random, functools 7 | import pytest 8 | from cuav.lib import cuav_joe, cuav_region, mav_position 9 | from cuav.camera.cam_params import CameraParams 10 | 11 | 12 | def test_JoeLog_JoeIterator(): 13 | joelog = cuav_joe.JoeLog(os.path.join('.', 'joe.log'), False) 14 | regions = [] 15 | frame_time = 1478954763.0 16 | C = CameraParams(lens=4.0, sensorwidth=5.0, xresolution=1024, yresolution=768) 17 | regions.append(cuav_region.Region(10, 10, 25, 23, None, scan_score=450)) 18 | regions.append(cuav_region.Region(200, 205, 252, 236, None, scan_score=420)) 19 | pos = mav_position.MavPosition(-30, 145, 34.56, 20, -56.67, 345, frame_time) 20 | joelog.add_regions(frame_time, regions, pos, 'img2017111312451230Z.png') 21 | 22 | joeread = cuav_joe.JoeIterator(os.path.join('.', 'joe.log')) 23 | 24 | joeret = joeread.getjoes() 25 | 26 | assert len(joeret) == 2 27 | assert joeret[0] == "JoePosition(lat=-30.000235 lon=144.999639 MavPosition(pos -30.000000 145.000000 alt=34.6 roll=20.0 pitch=-56.7 yaw=345.0) img2017111312451230Z.png None (10, 10, 25, 23) latlon=(-30.000235126851315, 144.9996388367703) score=None Sat Nov 12 23:46:03 2016 2016111212460300Z)" or "JoePosition(lat=-30.000235 lon=144.999639 MavPosition(pos -30.000000 145.000000 alt=34.6 roll=20.0 pitch=-56.7 yaw=345.0) img2017111312451230Z.png None (10, 10, 25, 23) latlon=(-30.000235126851315, 144.9996388367703) score=None Sat Nov 12 12:46:03 2016 2016111212460300Z)" 28 | assert joeret[1] == "JoePosition(lat=-30.000367 lon=144.999711 MavPosition(pos -30.000000 145.000000 alt=34.6 roll=20.0 pitch=-56.7 yaw=345.0) img2017111312451230Z.png None (200, 205, 252, 236) latlon=(-30.000366794010567, 144.9997107272955) score=None Sat Nov 12 23:46:03 2016 2016111212460300Z)" or "JoePosition(lat=-30.000367 lon=144.999711 MavPosition(pos -30.000000 145.000000 alt=34.6 roll=20.0 pitch=-56.7 yaw=345.0) img2017111312451230Z.png None (200, 205, 252, 236) latlon=(-30.000366794010567, 144.9997107272955) score=None Sat Nov 12 12:46:03 2016 2016111212460300Z)" 29 | 30 | os.remove(os.path.join('.', 'joe.log')) 31 | 32 | -------------------------------------------------------------------------------- /tests/lib/test_cuav_landingregion.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | test program for cuav_landingregion 4 | ''' 5 | 6 | import sys, os, time, random, functools 7 | import pytest 8 | import numpy as np 9 | from cuav.lib import cuav_region, cuav_landingregion, mav_position 10 | 11 | 12 | 13 | def test_addLandingZone(): 14 | lz = cuav_landingregion.LandingZone() 15 | for i in range(0, 10): 16 | r = cuav_region.Region(1020, 658, 1050, 678, (30, 30)) 17 | r.latlon = (23, 34) 18 | pos = mav_position.MavPosition(23, 24, 80, 0, 0, 0, 1) 19 | r.score = 20 20 | lz.checkaddregion(r, pos) 21 | 22 | assert len(lz.regions) == 10 23 | 24 | def test_addLandingZoneMany(): 25 | lz = cuav_landingregion.LandingZone() 26 | for i in range(0, 100): 27 | r = cuav_region.Region(1020, 658, 1050, 678, (30, 30)) 28 | r.latlon = (random.uniform(-90, 90), random.uniform(-180, 180)) 29 | r.score = random.randint(0, 1000) 30 | pos = mav_position.MavPosition(r.latlon[0], r.latlon[1], 80, 0, 0, 0, 1) 31 | lz.checkaddregion(r, pos) 32 | 33 | assert len(lz.regions) == 100 34 | 35 | def test_averagepos(): 36 | lz = cuav_landingregion.LandingZone() 37 | rg = [] 38 | for i in range(0, 100): 39 | r = cuav_region.Region(1020, 658, 1050, 678, (30, 30)) 40 | r.latlon = (random.uniform(-90, 90), random.uniform(-180, 180)) 41 | r.score = random.randint(0, 1000) 42 | pos = mav_position.MavPosition(r.latlon[0], r.latlon[1], 80, 0, 0, 0, 1) 43 | rg.append(r) 44 | 45 | ret = lz.average_pos(rg) 46 | assert ret[0] > -90 and ret[0] < 90 47 | assert ret[1] > -180 and ret[1] < 180 48 | 49 | def test_calcLandingZone(): 50 | lz = cuav_landingregion.LandingZone() 51 | for i in range(0, 100): 52 | r = cuav_region.Region(1020, 658, 1050, 678, (30, 30)) 53 | r.latlon = (random.uniform(-0.001, 0.001)+34, random.uniform(-0.001, 0.001)-140) 54 | r.score = random.randint(0, 1000) 55 | pos = mav_position.MavPosition(r.latlon[0], r.latlon[1], 80, 0, 0, 0, 1) 56 | lz.checkaddregion(r, pos) 57 | 58 | ret = lz.calclandingzone() 59 | assert ret.latlon[0] > -90 and ret.latlon[0] < 90 60 | assert ret.latlon[1] > -180 and ret.latlon[1] < 180 61 | assert ret.maxrange > 0 62 | assert ret.avgscore > 0 63 | assert ret.numregions > 0 64 | 65 | 66 | -------------------------------------------------------------------------------- /tests/requirements-test.txt: -------------------------------------------------------------------------------- 1 | pyinstaller 2 | setuptools 3 | packaging 4 | wheel 5 | pytest 6 | pytest-mock 7 | -------------------------------------------------------------------------------- /tests/testdata/OBC_boundary.txt: -------------------------------------------------------------------------------- 1 | # OBC2010 boundary 2 | -26.5695640 151.8373730 3 | -26.5699560 151.8394050 4 | -26.5768230 151.8411420 5 | -26.5773080 151.8403440 6 | -26.5815110 151.8419500 7 | -26.5784860 151.8474690 8 | -26.5994890 151.8528860 9 | -26.6092110 151.8747420 10 | -26.6454780 151.8820530 11 | -26.6435720 151.8303500 12 | -26.5875990 151.8344050 13 | -26.5695640 151.8373730 14 | -------------------------------------------------------------------------------- /tests/testdata/cmac-image-wp.txt: -------------------------------------------------------------------------------- 1 | QGC WPL 110 2 | 0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.362869 149.165497 590.130005 1 3 | 1 0 3 22 10.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 30.000000 1 4 | 2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 90.000000 1 5 | 3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 90.000000 1 6 | 4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 90.000000 1 7 | 5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 90.000000 1 8 | 6 0 0 177 2.000000 -1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 9 | 7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 10 | 8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 11 | 9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 12 | 10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365620 149.165543 30.000000 1 13 | 11 0 3 21 0.000000 0.000000 0.000000 0.000000 -35.362865 149.165161 -0.400000 1 14 | -------------------------------------------------------------------------------- /tests/testdata/exifimg2018021100040450Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/exifimg2018021100040450Z.jpg -------------------------------------------------------------------------------- /tests/testdata/exifimg2018021100041320Z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/exifimg2018021100041320Z.jpg -------------------------------------------------------------------------------- /tests/testdata/flight.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/flight.tlog -------------------------------------------------------------------------------- /tests/testdata/raw2016111223465120Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/raw2016111223465120Z.png -------------------------------------------------------------------------------- /tests/testdata/raw2016111223465160Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/raw2016111223465160Z.png -------------------------------------------------------------------------------- /tests/testdata/raw2016111223465213Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/raw2016111223465213Z.png -------------------------------------------------------------------------------- /tests/testdata/robota.trigger: -------------------------------------------------------------------------------- 1 | Lat(deg) Lon(deg) GpsAlt(m) Roll(deg) Pitch(deg) Heading(deg) DateTimeYYYY-MM-DDTHH:MM:SSZ 2 | -20.1234 145.456 20.34 0 0 0 2016-11-12T23:46:03Z 3 | -20.1235 145.466 20.44 0 0 0 2016-11-12T23:47:03Z 4 | -20.1236 145.476 20.40 0 0 0 2016-11-12T23:48:03Z 5 | -------------------------------------------------------------------------------- /tests/testdata/test-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tridge/cuav/3a288eb4d47b6b6b329cc07c659b45cac806559d/tests/testdata/test-8bit.png -------------------------------------------------------------------------------- /tests/tools/test_aglmission.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test OpenCV speedtest 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.agl_mission as agl_mission 10 | 11 | @pytest.mark.skipif(sys.platform.startswith("win"), reason="SRTM caching broken in Windows") 12 | def test_do_aglmission(): 13 | missionfile = os.path.join(os.getcwd(), 'tests', 'testdata', 'cmac-image-wp.txt') 14 | outfile = os.path.join(os.getcwd(), 'tests', 'testdata', 'cmac-image-wp-new.txt') 15 | agl = 90 16 | speed = 25 17 | wp = agl_mission.fix_alt(missionfile, agl, None, outfile) 18 | wp = agl_mission.add_points(wp, agl, 50, 50, 100) 19 | wp = agl_mission.fix_climb(wp, speed, 3) 20 | agl_mission.report_points(wp, speed) 21 | assert os.path.isfile(outfile) 22 | os.remove(outfile) 23 | 24 | -------------------------------------------------------------------------------- /tests/tools/test_calibrate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test camera calibration 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.calibrate as calibrate 10 | 11 | from cuav.camera.cam_params import CameraParams 12 | 13 | def test_do_calibrate(): 14 | dirry = os.path.join('.', 'cuav', 'data', 'ChameleonArecort') 15 | outfile = os.path.join('.', 'cuav', 'data', 'ChameleonArecort', 'paramsout.json') 16 | calibrate.calibrate(dirry, 10, 7) 17 | assert os.path.isfile(outfile) 18 | C = CameraParams.fromfile(outfile) 19 | assert C is not None 20 | os.remove(outfile) 21 | 22 | -------------------------------------------------------------------------------- /tests/tools/test_cuav_benchmark.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test cuav benchmark 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.cuav_benchmark as cuav_benchmark 10 | 11 | 12 | def test_cuav_benchmark(): 13 | infile = os.path.join(os.getcwd(), 'tests', 'testdata', 'test-8bit.png') 14 | cuav_benchmark.process(infile, 10) 15 | 16 | -------------------------------------------------------------------------------- /tests/tools/test_cuav_lens.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test lens equations 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.cuav_lens as cuav_lens 10 | 11 | 12 | def test_aov(): 13 | assert cuav_lens.aov(5, 2.8) == 83.52059940779574 14 | 15 | def test_groundwidth(): 16 | assert cuav_lens.groundwidth(122, 5, 2.8) == 217.85714285714286 17 | 18 | def test_pixelwidth(): 19 | assert cuav_lens.pixelwidth(1280, 122, 5, 2.8) == 0.17020089285714285 20 | 21 | def test_pixelarea(): 22 | assert cuav_lens.pixelarea(1280, 122, 5, 2.8) == 0.02896834392936862 23 | 24 | def test_lamparea(): 25 | assert cuav_lens.lamparea(6.5) == 0.0033183072403542195 26 | 27 | def test_lamppower(): 28 | assert cuav_lens.lamppower(10, 50) == 5 29 | 30 | def test_lamppixelpower(): 31 | assert cuav_lens.lamppixelpower(10, 50, 1280, 6.5, 122, 5, 2.8) == 5 32 | 33 | def test_sunonlamp(): 34 | assert cuav_lens.sunonlamp(1500, 6.5) == 4.9774608605313295 35 | 36 | def test_sunreflected(): 37 | assert cuav_lens.sunreflected(0.2, 1500, 1280, 122, 5, 2.8) == 8.690503178810586 38 | 39 | def test_apparentbrightness(): 40 | assert cuav_lens.apparentbrightness(10, 50, 1280, 6.5, 1.0, 0.2, 1500, 122, 5, 2.8) == 1.575340679028935 41 | 42 | -------------------------------------------------------------------------------- /tests/tools/test_cuav_missiongenerator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test cuav mission generator (OBC 2014) 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.cuav_missiongenerator as missiongenerator 10 | 11 | def test_do_missiongen(): 12 | missionfile = os.path.join('.', 'tests', 'testdata', 'OBC Waypoints 2014.kml') 13 | 14 | gen = missiongenerator.MissionGenerator(missionfile) 15 | gen.Process('SA-', 'MB-') 16 | gen.CreateEntryExitPoints('EL-01,EL-02', 'EL-03,EL-04') 17 | groundWidth = gen.getCameraWidth(100, 0.098, 1280) 18 | assert groundWidth == 125.44 19 | 20 | gen.CreateSearchPattern(width = groundWidth, overlap=60, offset=150, wobble=10, alt=100) 21 | 22 | assert gen.getPolygonLength() == 70600 23 | 24 | -------------------------------------------------------------------------------- /tests/tools/test_logbook.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test OpenCV speedtest 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.logbook as logbook 10 | 11 | def test_do_logbook(): 12 | logfile = os.path.join(os.getcwd(), 'tests', 'testdata', 'flight.tlog') 13 | logbookentries = [] 14 | total_time = 0.0 15 | total_dist = 0.0 16 | 17 | for f in [logfile, logfile]: 18 | (ftime, fdist) = logbook.flight_time(logbookentries, f, None, 1, 1) 19 | total_time += ftime 20 | total_dist += fdist 21 | assert total_time == 162 22 | assert total_dist == 2614.8674443951145 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/tools/test_playback.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test playback 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.playback as playback 10 | from cuav.lib import cuav_util 11 | 12 | def test_do_playback(): 13 | #Check if we're running under Windows: 14 | if sys.platform.startswith('win'): 15 | print("This script is not compatible with Windows") 16 | return 17 | 18 | logfile = os.path.join('.', 'tests', 'testdata', 'flight.tlog') 19 | outfile = os.path.join('.', 'cur_camera.png') 20 | images = [] 21 | image_a = os.path.join('.', 'tests', 'testdata', 'raw2016111223465120Z.png') 22 | images.append(playback.ImageFile(cuav_util.parse_frame_time(image_a), image_a)) 23 | image_b = os.path.join('.', 'tests', 'testdata', 'raw2016111223465160Z.png') 24 | images.append(playback.ImageFile(cuav_util.parse_frame_time(image_b), image_b)) 25 | image_c = os.path.join('.', 'tests', 'testdata', 'raw2016111223465213Z.png') 26 | images.append(playback.ImageFile(cuav_util.parse_frame_time(image_c), image_c)) 27 | playback.playback(os.path.join('.', 'tests', 'testdata', 'flight.tlog'), images, "127.0.0.1:14550", 57600, None, 40, 'cur_camera.png') 28 | assert os.path.isfile(outfile) 29 | os.remove(outfile) 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/tools/test_thermal_view.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test cuav thermal view 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | import cuav.tools.thermal_view as thermal_view 10 | 11 | def test_convert_image(): 12 | infile = os.path.join('.', 'tests', 'testdata', 'raw2016111223465120Z.png') 13 | outfile = thermal_view.convert_image(infile, 5600, 0.75, 0.4) 14 | assert outfile is not None 15 | 16 | def test_show_value(): 17 | infile = os.path.join('.', 'tests', 'testdata', 'raw2016111223465120Z.png') 18 | thermal_view.show_value(50, 67, infile) 19 | 20 | def test_file_list(): 21 | infolder = os.path.join('.', 'tests', 'testdata') 22 | files = thermal_view.file_list(infolder, ['jpg', 'jpeg', 'png']) 23 | assert len(files) == 6 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/uav/test_geo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test Geo conversions 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | from cuav.uav.geo import geodetic 10 | 11 | def test_computeZoneAndBand(): 12 | lat = -( 37.0 + 39.0/60.0 + 10.15610/3600.0) 13 | lon = +(143.0 + 55.0/60.0 + 35.38390/3600.0) 14 | g = geodetic() 15 | (zone, band) = g.computeZoneAndBand(lat, lon) 16 | assert zone == 54 17 | assert band == 'H' 18 | 19 | def test_geoToGrid(): 20 | lat = -( 37.0 + 39.0/60.0 + 10.15610/3600.0) 21 | lon = +(143.0 + 55.0/60.0 + 35.38390/3600.0) 22 | g = geodetic() 23 | (zone, band) = g.computeZoneAndBand(lat, lon) 24 | (northing, easting) = g.geoToGrid(lat, lon, zone, band) 25 | assert northing == 5828674.3400593391 26 | assert easting == 758173.79728005431 27 | 28 | def test_gridToGeo(): 29 | northing = 5796489.777 30 | easting = 273741.297 31 | band = 'A' 32 | zone = 55 33 | g = geodetic() 34 | (lat_, lon_) = g.gridToGeo(northing, easting, zone, band) 35 | assert lat_ == -37.951033415544593 36 | assert lon_ == 144.42486789295646 37 | 38 | -------------------------------------------------------------------------------- /tests/uav/test_uav.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | '''Test uav module 4 | ''' 5 | 6 | import sys 7 | import pytest 8 | import os 9 | from numpy import sin, cos, pi 10 | from numpy import array 11 | from cuav.uav.uav import uavxfer 12 | from cuav.uav.uav import rotationMatrix 13 | 14 | def test_uavxfer(): 15 | xfer = uavxfer() 16 | xfer.setCameraParams(200.0, 200.0, 512, 480) 17 | xfer.setCameraOrientation(0.0, 0.0, -pi/2) 18 | xfer.setPlatformPose(500.0, 1000.0, -700.0, 0.1, -0.1, 0.1) 19 | 20 | p_w = array([500. +00., 1000. -00., -600.0]) 21 | p_p = xfer.worldToPlatform(p_w[0], p_w[1], p_w[2]) 22 | p_i = xfer.worldToImage(p_w[0], p_w[1], p_w[2]) 23 | 24 | (l_w, scale) = xfer.imageToWorld(p_i[0], p_i[1]) 25 | 26 | assert abs(500 - l_w[0]) < 0.01 27 | assert abs(1000 - l_w[1]) < 0.01 28 | assert abs(-600 - l_w[2]) < 0.01 29 | assert abs(1 - l_w[3]) < 0.01 30 | assert abs(99 - scale) < 0.01 31 | 32 | def test_rotationMatrix(): 33 | Rc = rotationMatrix(45, 60, 30) 34 | 35 | assert Rc.shape == (3, 3) 36 | assert abs(-0.1469110 - Rc[0,0]) < 0.001 37 | assert abs(0.3372919 - Rc[1,1]) < 0.001 38 | assert abs(-0.5003234 - Rc[2,2]) < 0.001 39 | 40 | -------------------------------------------------------------------------------- /tools/3g/log-telstra-dongle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import time 4 | import requests 5 | import json 6 | import csv 7 | import sys 8 | import datetime 9 | 10 | class TelstraDongleLogger(): 11 | def __init__(self, fields): 12 | self.ip = "192.168.0.1" 13 | self.script = "goform/goform_get_cmd_process" 14 | self.fields = fields 15 | 16 | def url(self): 17 | fieldstring = ",".join(self.fields); 18 | return "http://{ip}/{script}?multi_data=1&isTest=false&cmd={fieldstring}&_=1475535303952".format(ip=self.ip, script=self.script, fieldstring=fieldstring) 19 | 20 | def poll(self): 21 | r = requests.get(self.url()) 22 | if r.status_code != 200: 23 | raise ValueError("Bad response from request (%d)" % r.status_code) 24 | stuff = json.loads(r.content) 25 | return stuff 26 | 27 | if __name__ == '__main__': 28 | fields = ['signalbar','network_type'] 29 | csv_writer = csv.writer(sys.stdout) 30 | headings = ["timestamp"] 31 | headings.extend(fields) 32 | csv_writer.writerow(headings) 33 | dongle = TelstraDongleLogger(fields) 34 | while True: 35 | results = dongle.poll() 36 | row = [int(time.time())*1000000+datetime.datetime.now().microsecond] 37 | for field in fields: 38 | row.append(results[field]) 39 | csv_writer.writerow(row) 40 | 41 | time.sleep(1) 42 | -------------------------------------------------------------------------------- /windows/createChangelog.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' 3 | Create a user readable changelog 4 | Requires the gitpython package via pip install gitpython 5 | 6 | Stephen Dade 7 | November 2016 8 | ''' 9 | 10 | from git import Repo 11 | import os 12 | import time 13 | 14 | #Get the parent (..\) directory. ie the root cuav dir 15 | path = os.path.abspath(os.path.join(os.getcwd(), os.pardir)) 16 | repo = Repo(path) 17 | assert not repo.bare 18 | 19 | #get list of all commits 20 | all_commits = list(repo.iter_commits('master')) 21 | 22 | #open the changelog for writing 23 | f = open("changelog.txt","w") 24 | 25 | #go through all the commits 26 | for comm in all_commits: 27 | #if it's a version raise, add a special message 28 | if "raise version" in comm.message or "release" in comm.message[0:7]: 29 | commit_date = time.strftime("%d-%m-%Y", time.gmtime(comm.committed_date)) 30 | tree = comm.tree 31 | #get setup.py and grab the version number from the file 32 | blob = tree['setup.py'] 33 | data = blob.data_stream.read() 34 | curversion = "" 35 | for line in data.split(b'\n'): 36 | if b"version = " in line: 37 | curversion = line[11:len(line)-1] 38 | break 39 | f.write("\n") 40 | f.write("CUAV " + curversion.decode("utf-8") + " (" + commit_date + ")\n") 41 | else: 42 | #just print the summary (1st line) of the commit message 43 | comm.message.split('\n', 1)[0] 44 | f.write("-" + comm.summary + "\n") 45 | 46 | f.close() 47 | print("Done") 48 | -------------------------------------------------------------------------------- /windows/cuav.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | #define MyAppName "CanberraUAV Imaging" 5 | ; Note MyAppVersion is defined in cuavWinBuild.bat 6 | ; #define MyAppVersion {code:GetVersion} 7 | #define MyAppPublisher "CanberraUAV" 8 | #define MyAppURL "http://CanberraUAV.github.io/cuav" 9 | 10 | [Setup] 11 | ; NOTE: The value of AppId uniquely identifies this application. 12 | ; Do not use the same AppId value in installers for other applications. 13 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 14 | AppId={{328AE3B2-C026-423A-866F-35A0EC5195D9} 15 | AppName={#MyAppName} 16 | AppVersion={#MyAppVersion} 17 | ;AppVerName={#MyAppName} {#MyAppVersion} 18 | AppPublisher={#MyAppPublisher} 19 | AppPublisherURL={#MyAppURL} 20 | AppSupportURL={#MyAppURL} 21 | AppUpdatesURL={#MyAppURL} 22 | DefaultDirName={pf}\{#MyAppName} 23 | DefaultGroupName={#MyAppName} 24 | LicenseFile=..\COPYING.txt 25 | OutputBaseFilename=cuavSetup-{#MyAppVersion} 26 | Compression=lzma 27 | SolidCompression=yes 28 | 29 | [InstallDelete] 30 | Type: filesandordirs; Name: {pf}\{#MyAppName} 31 | 32 | [Languages] 33 | Name: "english"; MessagesFile: "compiler:Default.isl" 34 | 35 | [Files] 36 | Source: "..\dist\cuav\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 37 | 38 | [Icons] 39 | Name: "{group}\Geosearch"; Filename: "{app}\geosearch.exe" 40 | Name: "{group}\Geotagger"; Filename: "{app}\geotag.exe" 41 | Name: "{group}\Documentation"; Filename: "http://CanberraUAV.github.io/cuav/" 42 | Name: "{group}\CanberraUAV Website"; Filename: "http://canberrauav.org.au" 43 | 44 | -------------------------------------------------------------------------------- /windows/cuavWinBuild.bat: -------------------------------------------------------------------------------- 1 | rem build the standalone Cuav tools for Windows. 2 | rem This assumes Python is installed in C:\Python36 3 | rem If it is not, change the PYTHON_LOCATION environment variable accordingly 4 | rem This assumes InnoSetup is installed in C:\Program Files (x86)\Inno Setup 5 5 | 6 | SETLOCAL enableextensions 7 | 8 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.17134.0 9 | if "%PYTHON_LOCATION%" == "" (set "PYTHON_LOCATION=C:\Python36") 10 | if "%INNOSETUP%" == "" (set "INNOSETUP=C:\Program Files (x86)\Inno Setup 5") 11 | 12 | rem get the version 13 | for /f "tokens=*" %%a in ( 14 | '"%PYTHON_LOCATION%\python" returnVersion.py' 15 | ) do ( 16 | set VERSION=%%a 17 | ) 18 | 19 | rem -----build the changelog----- 20 | "%PYTHON_LOCATION%\python" createChangelog.py 21 | 22 | rem -----Build CUAV----- 23 | cd ..\ 24 | "%PYTHON_LOCATION%\python" setup.py build install --user 25 | "%PYTHON_LOCATION%\Scripts\pyinstaller" -y --clean .\windows\cuav.spec 26 | 27 | rem ----Copy the files---- 28 | mkdir .\dist\cuav 29 | xcopy .\dist\geotag\* .\dist\cuav /Y /E 30 | xcopy .\dist\geosearch\* .\dist\cuav /Y /E 31 | 32 | 33 | rem -----Create version Info----- 34 | @echo off 35 | @echo %VERSION%> .\windows\version.txt 36 | @echo on 37 | 38 | rem -----Build the Installer----- 39 | cd .\windows\ 40 | rem Newer Inno Setup versions do not require a -compile flag, please add it if you have an old version 41 | "%INNOSETUP%\ISCC.exe" /dMyAppVersion=%VERSION% cuav.iss 42 | 43 | pause 44 | -------------------------------------------------------------------------------- /windows/geosearchbuildrun.bat: -------------------------------------------------------------------------------- 1 | rem This builds and runs geosearch.py 2 | rem It is useful as a quick build-n-run for debugging changes to cuav 3 | rem This assumes Python is installed in C:\Python36 4 | rem If it is not, change the PYTHON_LOCATION environment variable accordingly 5 | 6 | SETLOCAL enableextensions 7 | 8 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.17134.0 9 | if "%PYTHON_LOCATION%" == "" (set "PYTHON_LOCATION=C:\Python36") 10 | 11 | rem -----Build CUAV----- 12 | cd ..\ 13 | "%PYTHON_LOCATION%\python" setup.py build install --user 14 | 15 | rem -----Run geosearch.py----- 16 | cd .\cuav\tools 17 | "%PYTHON_LOCATION%\python" geosearch.py 18 | pause 19 | -------------------------------------------------------------------------------- /windows/geotagbuildrun.bat: -------------------------------------------------------------------------------- 1 | rem This builds and runs geotag.py 2 | rem It is useful as a quick build-n-run for debugging changes to cuav 3 | rem This assumes Python is installed in C:\Python36 4 | rem If it is not, change the PYTHON_LOCATION environment variable accordingly 5 | 6 | SETLOCAL enableextensions 7 | 8 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.17134.0 9 | if "%PYTHON_LOCATION%" == "" (set "PYTHON_LOCATION=C:\Python36") 10 | 11 | rem -----Build CUAV----- 12 | cd ..\ 13 | "%PYTHON_LOCATION%\python" setup.py build install --user 14 | 15 | rem -----Run geotag.py----- 16 | cd .\cuav\tools 17 | "%PYTHON_LOCATION%\python" geotag.py 18 | pause 19 | -------------------------------------------------------------------------------- /windows/returnVersion.py: -------------------------------------------------------------------------------- 1 | # This script reads the setup.py and returns the current version number 2 | # Used as part of building the WIndows setup file (cuavWinBuild.bat) 3 | # It assumes there is a line like this: 4 | # version = "12344" 5 | 6 | # glob supports Unix style pathname extensions 7 | with open("../setup.py") as f: 8 | searchlines = f.readlines() 9 | for i, line in enumerate(searchlines): 10 | if "version = " in line: 11 | print(line[11:len(line)-2]) 12 | break --------------------------------------------------------------------------------