ICAROUS
|
#include <GsPlan.h>
Public Member Functions | |
GsPlan (double startTime) | |
GsPlan (const std::string &s) | |
GsPlan (const Plan &lpc, int start, int end) | |
GsPlan (const Plan &lpc) | |
GsPlan (const GsPlan &gsp) | |
GsPlan (const Route &r, const std::string &name, double start, double gsAll) | |
int | size () const |
std::string | getID () const |
void | setID (const std::string &s) |
void | setInfo (int i, const std::string &s) |
double | gs (int i) const |
Route | route () const |
void | add (const Position &pos, const std::string &label, const std::string &info, double gsOut, double rad) |
void | add (const Position &pos, const std::string &label, const std::string &info, double gsOut) |
void | add (const Position &pos, const std::string &label, const std::string &info) |
void | add (const GsPlan &p, int ix) |
void | addAll (const GsPlan &p) |
void | set (int ix, const Position &pos, const std::string &label, const std::string &info, double gsOut, double radius) |
Position | position (int i) const |
Position | last () const |
std::string | name (int i) const |
std::string | info (int i) const |
double | radius (int i) const |
void | setRadius (int i, double rad) |
std::vector< double > | getGsInits () const |
GsPlan | append (const GsPlan &p2) |
void | remove (int i) |
void | setGs (int i, double gsin) |
double | startTime () const |
void | setStartTime (double startTime) |
int | findName (const std::string &nm) const |
double | pathDistance (int i, int j, bool linear) const |
double | ETA (bool linear) const |
Plan | linearPlan () const |
int | closestSegment (const Position &pos) const |
Position | positionFromDistance (double dist, double defaultBank, bool linear) const |
Velocity | velocityFromDistance (double dist, double defaultBank, bool linear) const |
bool | equals (const GsPlan &fp) const |
bool | almostEquals (const GsPlan &p) const |
std::string | toString () const |
Static Public Member Functions | |
static GsPlan | makeGsPlanConstant (const GsPlan &gsp, double gsNew) |
static GsPlan | mkGsPlanBankAngle (const Plan &lpc, double bankAngle) |
Private Attributes | |
Route | rt |
std::vector< double > | gsOuts |
std::string | id |
double | starttime |
GsPlan – an alternate yet convenient way to store a linear plan. There are no times stored. Instead the ground speed at each point is specified.
Since there are no times in a GsPlan, only the order of the points is maintained. This often eliminates the need to continually recalculate times. After an appropriate GsPlan is constructed it can be converted to a linear plan using the "linearPlan" method
larcfm::GsPlan::GsPlan | ( | const Plan & | lpc, |
int | start, | ||
int | end | ||
) |
Converts a section of a linear plan into a GsPlan. The ground speeds correspond to the speeds in the "lcp" linear plan. However, no route radii values are set using this constructor
lpc | linear plan |
start | starting index of the section to be used |
end | ending index of the section to be used |
larcfm::GsPlan::GsPlan | ( | const Plan & | lpc | ) |
Converts a full linear plan into a GsPlan. The ground speeds correspond to the speeds in the "lcp" linear plan. However, no route radii values are set using this constructor.
lpc | linear plan |
larcfm::GsPlan::GsPlan | ( | const GsPlan & | gsp | ) |
Creates a copy of a GsPlan
gsp | ground speed plan |
void larcfm::GsPlan::add | ( | const GsPlan & | p, |
int | ix | ||
) |
add point "ix" from GsPlan "p"
p | ground speed plan |
ix | index |
void larcfm::GsPlan::add | ( | const Position & | pos, |
const std::string & | label, | ||
const std::string & | info | ||
) |
This method is primarily added to prevent accidental use of lower level Route method
It makes the ground speed the same as the last one, if there is a previous point, otherwise -1.0
pos | position |
label | label for this point |
info | info string for this point |
void larcfm::GsPlan::add | ( | const Position & | pos, |
const std::string & | label, | ||
const std::string & | info, | ||
double | gsOut | ||
) |
Add a position
pos | position |
label | label for point – if this equals GsPlan.virtualName, then this will become a virtual point when make into a linear plan |
info | information for a point |
gsOut | ground speed out |
void larcfm::GsPlan::addAll | ( | const GsPlan & | p | ) |
Add all of the points of GsPlan "p" to this plan
p | ground speed plan |
int larcfm::GsPlan::closestSegment | ( | const Position & | pos | ) | const |
Return the segment containing the point closest to the given position.
pos | position |
bool larcfm::GsPlan::equals | ( | const GsPlan & | fp | ) | const |
test equality of GsPlans
double larcfm::GsPlan::ETA | ( | bool | linear | ) | const |
Calculate ETA for this GsPlan
linear | false to include kinematic plans |
int larcfm::GsPlan::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 | name |
double larcfm::GsPlan::gs | ( | int | i | ) | const |
Get groundspeed
i | index |
Plan larcfm::GsPlan::linearPlan | ( | ) | const |
Make linear plan from GsPlan. Note: in order to not generate invalid Plans, this ensures each segment has a positive groundspeed (currently ≥ 0.001 m/s)
Create a route from a linear plan and calculate radii using "bankAngle"
lpc | linear plan |
bankAngle | bank angle used for turn generation |
Position larcfm::GsPlan::positionFromDistance | ( | double | dist, |
double | defaultBank, | ||
bool | linear | ||
) | const |
Position at distance
dist | distance to query |
defaultBank | default bank angle for turns (overridden by radius) |
linear | flag to generate turns |
void larcfm::GsPlan::set | ( | int | ix, |
const Position & | pos, | ||
const std::string & | label, | ||
const std::string & | info, | ||
double | gsOut, | ||
double | radius | ||
) |
Sets a point
ix | index of the point |
pos | position |
label | label for point – if this equals GsPlan.virtualName, then this will become a virtual point when make into a linear plan |
info | information for a point |
gsOut | ground speed out of "ix" |
void larcfm::GsPlan::setID | ( | const std::string & | s | ) |
set aircraft id
s | string name |
void larcfm::GsPlan::setRadius | ( | int | i, |
double | rad | ||
) |
Set the radius at point "i" to be "rad"
i | index |
rad | radius to be stored |
Velocity larcfm::GsPlan::velocityFromDistance | ( | double | dist, |
double | defaultBank, | ||
bool | linear | ||
) | const |
Velocity at distance
dist | distance to query |
defaultBank | default bank angle for turns (overridden by radius) |
linear | flse to generate turns |