|
ICAROUS
|
#include <Route.h>
Public Member Functions | |
| Route (const Route &gsp) | |
| Route (const Plan &lpc, int start, int end) | |
| Route (const Plan &lpc) | |
| int | size () const |
| Position | position (int i) const |
| Position | positionFromDistance (double dist, bool linear) const |
| Position | positionFromDistance (int i, double dist, bool linear) const |
| std::string | name (int i) const |
| std::string | info (int i) const |
| double | radius (int i) const |
| void | add (const Position &pos, const std::string &label, const std::string &data) |
| void | add (const Position &pos, const std::string &label, const std::string &data, double rad) |
| void | add (int ix, const Position &pos, const std::string &label, const std::string &data, double rad) |
| void | add (const Route &p, int ix) |
| void | addAll (const Route &p) |
| void | set (int ix, const Position &pos, const std::string &label, const std::string &data, double) |
| void | remove (int i) |
| void | removeFirst () |
| void | removeLast () |
| Route | append (const Route &p2) |
| void | updateWithDefaultRadius (double default_radius) |
| int | findName (const std::string &nm, int startIx) const |
| int | findName (const std::string &nm) const |
| void | setName (int i, const std::string &name) |
| int | findInfo (const std::string &nm, int startIx) const |
| int | findInfo (const std::string &nm) const |
| void | setInfo (int i, const std::string &data) |
| void | setPosition (int i, const Position &pos) |
| void | setRadius (int i, double rad) |
| Route | copy () const |
| double | pathDistance (int i, int j, bool linear) const |
| double | pathDistance (bool linear) const |
| double | pathDistance () const |
| Position | positionFromDistance (double dist, double gs, double defaultBank, bool linear) const |
| Velocity | velocityFromDistance (double dist, double gs, double defaultBank, bool linear) const |
| Plan | linearPlan (double startTime, double gs) const |
| bool | equals (const Route &fp) const |
| std::string | toString () const |
| std::string | toString (double startTime, double gs) const |
Static Public Member Functions | |
| static Route | mkRoute (const Plan &fp, int start, int end, double radius) |
| static Route | mkRouteNamedOnly (const Plan &fp) |
| static Route | mkRoute (const Plan &fp, double radius) |
| static Route | mkRouteBankAngle (const Plan &fp, double bankAngle) |
| static Route | mkRouteCut (const Route &fp, int start, int end) |
Static Public Attributes | |
| static const std::string | virtualName = "$virtual" |
Private Attributes | |
| std::vector< std::string > | names |
| std::vector< std::string > | infos |
| std::vector< Position > | positions |
| std::vector< double > | radius_v |
A class (and tools) for creating a Route, that is, a sequence of 3D positions. Routes can be converted into Plans and vice versa.
| larcfm::Route::Route | ( | const Plan & | lpc, |
| int | start, | ||
| int | end | ||
| ) |
Creates a route from a linear plan, all points have radius 0.0
| lpc | linear plan |
| start | starting index |
| end | ending index |
| larcfm::Route::Route | ( | const Plan & | lpc | ) |
Create a route from a linear plan, all points have radius 0.0
| lpc | linear plan |
| void larcfm::Route::add | ( | const Position & | pos, |
| const std::string & | label, | ||
| const std::string & | data | ||
| ) |
Add a position
| pos | position |
| label | label for point – if this equals Route.virtualName, then this will become a virtual point when make into a linear plan |
| data | data field for a point |
| void larcfm::Route::add | ( | const Position & | pos, |
| const std::string & | label, | ||
| const std::string & | data, | ||
| double | rad | ||
| ) |
| pos | position |
| label | label for point – if this equals Route.virtualName, then this will become a virtual point when make into a linear plan |
| void larcfm::Route::add | ( | int | ix, |
| const Position & | pos, | ||
| const std::string & | label, | ||
| const std::string & | data, | ||
| double | rad | ||
| ) |
Add a position
| ix | index |
| pos | position |
| label | label for point – if this equals Route.virtualName, then this will become a virtual point when make into a linear plan |
| data | data field for a point |
| rad | radius |
| bool larcfm::Route::equals | ( | const Route & | fp | ) | const |
test equality of GsPlans
| fp | another route |
| int larcfm::Route::findName | ( | const std::string & | nm | ) | const |
Return the index of first point that has a label equal to the given string -1 if there are no matches.
| nm | String to match |
| int larcfm::Route::findName | ( | const std::string & | nm, |
| int | startIx | ||
| ) | const |
Return the index of first point that has a label equal to the given string -1 if there are no matches.
| nm | String to match |
| startIx | index to begin searching |
| Plan larcfm::Route::linearPlan | ( | double | startTime, |
| double | gs | ||
| ) | const |
Create a linear plan from this route using a constant ground speed "gs". It will copy the radius information into the plan.
| startTime | The time that will be assigned to point 0 |
| gs | ground speed to use |
Create a route from a linear plan and make all radii have the value "radius"
| fp | source plan |
| radius | radius to be used at every vertex (for path distance calculations) |
Create a route from a linear plan and calculate radii using "radius"
| fp | linear plan |
| start | starting index |
| end | ending index |
| radius | this radius value is inserted at all vertex points (used in path distance calculations) |
Create a route from a linear plan and calculate radii using "bankAngle" NOTE: If a radius is already stored in the source plan, this will not overwrite it
| fp | source plan |
| bankAngle | bank angle used to calculate radii values (used in path distance calculations) |
Create a route which is a subset of the given route (from the starting index, to the ending index)
| fp | source route |
| start | starting index |
| end | ending index |
Create a route from a plan fp using only the named points. All other points are discarded
| fp | source plan |
| double larcfm::Route::pathDistance | ( | int | i, |
| int | j, | ||
| bool | linear | ||
| ) | const |
Find the path distance between the given starting and ending indexes
| i | starting index |
| j | ending index |
| linear | if true, use linear distance |
Note: the distance is from MOT to MOT if linear = false and indices are vertices
| Position larcfm::Route::positionFromDistance | ( | double | dist, |
| double | gs, | ||
| double | defaultBank, | ||
| bool | linear | ||
| ) | const |
Position along the route
| dist | distance to query |
| gs | ground speed (must be greater than zero, but otherwise only used for turn generation) |
| defaultBank | default bank angle for turns (overridden by radius info) |
| linear | true to remain linear, false to generate turns. |
| Velocity larcfm::Route::velocityFromDistance | ( | double | dist, |
| double | gs, | ||
| double | defaultBank, | ||
| bool | linear | ||
| ) | const |
Velocity along the route (primarily track)
| dist | distance to query |
| gs | ground speed (must be greater than zero, but otherwise only used for turn generation) |
| defaultBank | default bank angle for turns (overridden by radius info) |
| linear | true to remain linear, false to generate turns. |