FlightGear next
FGAISchedule Class Reference

#include <Schedule.hxx>

Public Member Functions

 FGAISchedule ()
 
 FGAISchedule (const std::string &model, const std::string &livery, const std::string &homePort, const std::string &registration, const std::string &flightId, bool heavy, const std::string &acType, const std::string &airline, const std::string &m_class, const std::string &flight_type, double radius, double offset)
 
 FGAISchedule (const FGAISchedule &other)
 
 ~FGAISchedule ()
 
bool update (time_t now, const SGVec3d &userCart)
 Returns true when processing is complete.
 
bool init ()
 
double getSpeed ()
 
bool next ()
 
time_t getDepartureTime ()
 
FGAirportgetDepartureAirport ()
 
FGAirportgetArrivalAirport ()
 
int getCruiseAlt ()
 
double getRadius ()
 
double getGroundOffset ()
 
const std::string & getFlightType ()
 
const std::string & getAirline ()
 
const std::string & getAircraft ()
 
std::string getCallSign ()
 
const std::string & getRegistration ()
 
std::string getFlightRules ()
 
bool getHeavy ()
 
double getCourse ()
 
unsigned int getRunCount ()
 
unsigned int getHits ()
 
void setrunCount (unsigned int count)
 
void setHits (unsigned int count)
 
void setScore ()
 
double getScore ()
 
void setHeading ()
 Create an initial heading for user controlled aircraft.
 
void assign (FGScheduledFlight *ref)
 
void clearAllFlights ()
 Warning - will empty the flights vector no matter what.
 
void setFlightType (const std::string &val)
 
FGScheduledFlightfindAvailableFlight (const std::string &currentDestination, const std::string &req, time_t min=0, time_t max=0)
 
bool operator< (const FGAISchedule &other) const
 
int getLastUsed ()
 
void setLastUsed (unsigned int val)
 

Static Public Member Functions

static bool validModelPath (const std::string &model)
 
static SGPath resolveModelPath (const std::string &model)
 
static bool compareSchedules (const FGAISchedule *a, const FGAISchedule *b)
 

Detailed Description

Definition at line 41 of file Schedule.hxx.

Constructor & Destructor Documentation

◆ FGAISchedule() [1/3]

FGAISchedule::FGAISchedule ( )

Definition at line 61 of file Schedule.cxx.

◆ FGAISchedule() [2/3]

FGAISchedule::FGAISchedule ( const std::string & model,
const std::string & livery,
const std::string & homePort,
const std::string & registration,
const std::string & flightId,
bool heavy,
const std::string & acType,
const std::string & airline,
const std::string & m_class,
const std::string & flight_type,
double radius,
double offset )

◆ FGAISchedule() [3/3]

FGAISchedule::FGAISchedule ( const FGAISchedule & other)

Definition at line 116 of file Schedule.cxx.

◆ ~FGAISchedule()

FGAISchedule::~FGAISchedule ( )

Definition at line 145 of file Schedule.cxx.

Member Function Documentation

◆ assign()

void FGAISchedule::assign ( FGScheduledFlight * ref)

Definition at line 416 of file Schedule.cxx.

◆ clearAllFlights()

void FGAISchedule::clearAllFlights ( )

Warning - will empty the flights vector no matter what.

Use with caution!

Definition at line 421 of file Schedule.cxx.

◆ compareSchedules()

bool FGAISchedule::compareSchedules ( const FGAISchedule * a,
const FGAISchedule * b )
static

Definition at line 695 of file Schedule.cxx.

◆ findAvailableFlight()

FGScheduledFlight * FGAISchedule::findAvailableFlight ( const std::string & currentDestination,
const std::string & req,
time_t min = 0,
time_t max = 0 )

Definition at line 568 of file Schedule.cxx.

◆ getAircraft()

const std::string & FGAISchedule::getAircraft ( )
inline

Definition at line 119 of file Schedule.hxx.

◆ getAirline()

const std::string & FGAISchedule::getAirline ( )
inline

Definition at line 118 of file Schedule.hxx.

◆ getArrivalAirport()

FGAirport * FGAISchedule::getArrivalAirport ( )

Definition at line 536 of file Schedule.cxx.

◆ getCallSign()

std::string FGAISchedule::getCallSign ( )

Definition at line 552 of file Schedule.cxx.

◆ getCourse()

double FGAISchedule::getCourse ( )
inline

Definition at line 124 of file Schedule.hxx.

◆ getCruiseAlt()

int FGAISchedule::getCruiseAlt ( )

Definition at line 544 of file Schedule.cxx.

◆ getDepartureAirport()

FGAirport * FGAISchedule::getDepartureAirport ( )

Definition at line 528 of file Schedule.cxx.

◆ getDepartureTime()

time_t FGAISchedule::getDepartureTime ( )

Definition at line 520 of file Schedule.cxx.

◆ getFlightRules()

std::string FGAISchedule::getFlightRules ( )

Definition at line 560 of file Schedule.cxx.

◆ getFlightType()

const std::string & FGAISchedule::getFlightType ( )
inline

Definition at line 117 of file Schedule.hxx.

◆ getGroundOffset()

double FGAISchedule::getGroundOffset ( )
inline

Definition at line 116 of file Schedule.hxx.

◆ getHeavy()

bool FGAISchedule::getHeavy ( )
inline

Definition at line 123 of file Schedule.hxx.

◆ getHits()

unsigned int FGAISchedule::getHits ( )
inline

Definition at line 126 of file Schedule.hxx.

◆ getLastUsed()

int FGAISchedule::getLastUsed ( )
inline

Definition at line 141 of file Schedule.hxx.

◆ getRadius()

double FGAISchedule::getRadius ( )
inline

Definition at line 115 of file Schedule.hxx.

◆ getRegistration()

const std::string & FGAISchedule::getRegistration ( )
inline

Definition at line 121 of file Schedule.hxx.

◆ getRunCount()

unsigned int FGAISchedule::getRunCount ( )
inline

Definition at line 125 of file Schedule.hxx.

◆ getScore()

double FGAISchedule::getScore ( )
inline

Definition at line 131 of file Schedule.hxx.

◆ getSpeed()

double FGAISchedule::getSpeed ( )

Definition at line 664 of file Schedule.cxx.

◆ init()

bool FGAISchedule::init ( )

Definition at line 159 of file Schedule.cxx.

◆ next()

bool FGAISchedule::next ( )

Definition at line 488 of file Schedule.cxx.

◆ operator<()

bool FGAISchedule::operator< ( const FGAISchedule & other) const

Definition at line 700 of file Schedule.cxx.

◆ resolveModelPath()

SGPath FGAISchedule::resolveModelPath ( const std::string & model)
static

Definition at line 327 of file Schedule.cxx.

◆ setFlightType()

void FGAISchedule::setFlightType ( const std::string & val)
inline

Definition at line 136 of file Schedule.hxx.

◆ setHeading()

void FGAISchedule::setHeading ( )

Create an initial heading for user controlled aircraft.

Definition at line 411 of file Schedule.cxx.

◆ setHits()

void FGAISchedule::setHits ( unsigned int count)
inline

Definition at line 129 of file Schedule.hxx.

◆ setLastUsed()

void FGAISchedule::setLastUsed ( unsigned int val)
inline

Definition at line 142 of file Schedule.hxx.

◆ setrunCount()

void FGAISchedule::setrunCount ( unsigned int count)
inline

Definition at line 128 of file Schedule.hxx.

◆ setScore()

void FGAISchedule::setScore ( )

Definition at line 681 of file Schedule.cxx.

◆ update()

bool FGAISchedule::update ( time_t now,
const SGVec3d & userCart )

Returns true when processing is complete.

Returns false when processing was aborted due to timeout, so more time required - and another call is requested (next sim iteration).

Definition at line 190 of file Schedule.cxx.

◆ validModelPath()

bool FGAISchedule::validModelPath ( const std::string & model)
static

Definition at line 322 of file Schedule.cxx.


The documentation for this class was generated from the following files: