Skip to content

gianlisi/sailingCamera

Repository files navigation

Gimbaled Camera

Gianluca Meneghello ([email protected])

This code makes a plan for a gimbaled camera mounted on a vessel to take photos of all nearby vessels with the minimum number of pictures possible. The geographic location of all nearby vessels is known. The output is a vector of camera angles that guarantees a photo of every vessel.

The code documentation can be found in html/index.html after running

make doc

======================

To compile and run the code:

googletest needs to be available in /usr/local/include and /usr/local/lib in order to compile the unittesting program. Doxygen is used to produce the documentation. Installation instructions are provided below.

All code can be compiled and run using make:

 make [all]       - compiles everything and run both unit tests and the main program.   
 make runmain     - compiles the main program and its dependencies, and runs the built sample test.  
 make rununittest - compiles the unittest program and its dependencies, and runs the built sample test.  
 make doc         - produces the documentation using Doxygen.  
 make clean       - removes all files generated by make.  
 make cleandoc    - removes all files generated by Doxygen.

The main program can also be run by calling

./main < data.dat

where data.dat is a text file containing, on each line, the name, latitude and longitude coordinates of each vessel. The first vessel is the one taking pictures. The following lines are taken from test1.dat

 Rhinheart 37.760132 -122.3264815
 Neo       37.77308 -122.33451 
 Morpheus  37.77728 -122.34192 
 Trinity   37.75784 -122.31716 
 Smith     37.76822 -122.34187 
 Cypher    37.76002 -122.30260 
 SmithS    37.75913 -122.34187 

The resulting vector of camera angles is saved in output.txt for later use. More information is printed to terminal, see exampleOutput.md for an example and detailed description.

======================

Dependencies:

The the following must be installed on the system:

-- Doxygen, to produce the documentation (https://www.doxygen.nl/index.html)
-- googletest, to perform the unit tests (https://github.com/google/googletest)

Dependencies can be installed using brew on Mac OS X
brew install doxygen
brew install googletest

or with a package manager using a Linux installation, e.g.
sudo apt-get install googletest
sudo apt-get install doxygen

=======================

About

Code showcasing C++ and unit testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published