
A BeoSub mapping database. More...
#include <BeoSub/BeoSubDB.H>

Public Member Functions | |
Constructors and Destructors | |
| BeoSubDB () | |
| Default Constructor. | |
| ~BeoSubDB () | |
| Destructor. | |
| bool | initializeDatabase (std::list< std::string > filenames, std::string destFilename) |
| Returns true if files found, false otherwise. | |
| bool | loadDatabase (std::string filename) |
| Returns true if file found, false otherwise. | |
| void | saveDatabase (std::map< std::string, MappingData > inDB, std::string filename) |
| Saves map to file. | |
| MappingData | getMappingData (std::string name) |
| Returns map element at key "name". | |
| uint | getNumEntries () |
| Returns size of the database. | |
| void | getDirections (MappingData from, MappingData to, Attitude &directions, float &dist) |
| This function returns by reference the attitude and distance necessary to reach a target state given the current state (represented in MappingData objects). | |
A BeoSub mapping database.
Structure is as follows: IMAGE, COMPASS(heading pitch roll), ACTUATORS (ballast[front rear], thrusters[left right]), POSITION (x, y, z)
NOTE: zPos is based off of the depth sensor
Definition at line 67 of file BeoSubDB.H.
| BeoSubDB::BeoSubDB | ( | ) | [inline] |
Default Constructor.
This constructor reads in from a hardcoded directory all database data and reads it into a map
Definition at line 107 of file BeoSubDB.H.
| BeoSubDB::~BeoSubDB | ( | ) | [inline] |
Destructor.
Definition at line 112 of file BeoSubDB.H.
| void BeoSubDB::getDirections | ( | MappingData | from, | |
| MappingData | to, | |||
| Attitude & | directions, | |||
| float & | dist | |||
| ) | [inline] |
This function returns by reference the attitude and distance necessary to reach a target state given the current state (represented in MappingData objects).
Definition at line 259 of file BeoSubDB.H.
References angle(), Attitude::depth, Attitude::roll, and sqrt().
Referenced by main().
| MappingData BeoSubDB::getMappingData | ( | std::string | name | ) | [inline] |
| uint BeoSubDB::getNumEntries | ( | ) | [inline] |
| bool BeoSubDB::initializeDatabase | ( | std::list< std::string > | filenames, | |
| std::string | destFilename | |||
| ) | [inline] |
Returns true if files found, false otherwise.
Definition at line 117 of file BeoSubDB.H.
References in, saveDatabase(), and Angle::setVal().
Referenced by main().
| bool BeoSubDB::loadDatabase | ( | std::string | filename | ) | [inline] |
Returns true if file found, false otherwise.
Definition at line 167 of file BeoSubDB.H.
References in.
Referenced by main().
| void BeoSubDB::saveDatabase | ( | std::map< std::string, MappingData > | inDB, | |
| std::string | filename | |||
| ) | [inline] |
1.6.3