DUNE: Uniform Navigational Environment  2.6.0-rc1
DUNE::Simulation::UAVSimulation Class Reference

Classes

class  Error
 

Public Member Functions

 UAVSimulation (void)
 
 UAVSimulation (const UAVSimulation &simul)
 
 UAVSimulation (const double &alt_time_cst)
 
 UAVSimulation (const double &bank_time_cst, const double &speed_time_cst)
 
 UAVSimulation (const double &bank_time_cst, const double &speed_time_cst, const double &alt_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &vel)
 
 UAVSimulation (const DUNE::Math::Matrix &vel, const double &alt_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst, const double &alt_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst, const double &airspeed_cmd, const double &bank_cmd)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel, const double &alt_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst, const double &alt_time_cst)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst, const double &airspeed_cmd, const double &bank_cmd)
 
 UAVSimulation (const DUNE::Math::Matrix &pos, const DUNE::Math::Matrix &vel, const double &bank_time_cst, const double &speed_time_cst, const double &alt_time_cst, const double &airspeed_cmd, const double &bank_cmd, const double &altitude_cmd)
 
UAVSimulationoperator= (const UAVSimulation &model)
 
void resetModel (void)
 
UAVSimulation update (const double &timestep)
 
UAVSimulation update (const double &timestep, const double &bank_cmd)
 
UAVSimulation update (const double &timestep, const double &bank_cmd, const double &airspeed_cmd)
 
UAVSimulation update (const double &timestep, const double &bank_cmd, const double &airspeed_cmd, const double &altitude_cmd)
 
void setCtrl (const double &bank_time_cst, const double &speed_time_cst)
 
void setCtrl (const double &bank_time_cst, const double &speed_time_cst, const double &alt_time_cst)
 
void setBankRateLim (const double &bank_rate_lim)
 
void setAccelLim (const double &lon_accel_lim)
 
void setVertSlopeLim (const double &vert_slope_lim)
 
DUNE::Math::Matrix getPosition (void)
 
DUNE::Math::Matrix getVelocity (void)
 
double getAirspeed (void)
 
double getBankCmd (void)
 
double getAirspeedCmd (void)
 
double getAltCmd (void)
 
void setPosition (const DUNE::Math::Matrix &pos)
 
void setVelocity (const DUNE::Math::Matrix &vel)
 
void command (const double &bank_cmd)
 
void command (const double &bank_cmd, const double &airspeed_cmd)
 
void command (const double &bank_cmd, const double &airspeed_cmd, const double &altitude_cmd)
 
void commandBank (const double &bank_cmd)
 
void commandAirspeed (const double &airspeed_cmd)
 
void commandAlt (const double &altitude_cmd)
 
void commandFPA (const double &fpa_cmd)
 
void commandPitch (const double &pitch_cmd)
 

Public Attributes

std::string m_sim_type
 
DUNE::Math::Matrix m_wind
 
double m_g
 
double m_timestep_lim
 

Constructor & Destructor Documentation

DUNE::Simulation::UAVSimulation::UAVSimulation ( void  )

Constructor.

Create a simulation model with null initial state. 3 DOF simulation.

References resetModel().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const UAVSimulation simul)

Constructor.

Create a simulation model as a copy of another

Parameters
[in]simul- simulation model to be replicated

References m_g, m_sim_type, m_timestep_lim, and m_wind.

DUNE::Simulation::UAVSimulation::UAVSimulation ( const double &  alt_time_cst)

Constructor.

Create a simulation model with null initial state and the vehicle model parameters. 4 DOF simulation with altitude dynamics.

Parameters
[in]alt_time_cst- altitude time constant

References resetModel().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const double &  bank_time_cst,
const double &  speed_time_cst 
)

Constructor.

Create a simulation model with null initial state and the vehicle model parameters. 4 DOF simulation with bank and speed dynamics.

Parameters
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant

References resetModel().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  alt_time_cst 
)

Constructor.

Create a simulation model with null initial state and the vehicle model parameters. 5 DOF simulation with bank, speed, and altitude dynamics.

Parameters
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]alt_time_cst- altitude time constant

References resetModel().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix vel)

Constructor.

Create a simulation model based on the initial velocity state. 3 DOF simulation.

Parameters
[in]vel- initial velocity vector

References resetModel(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix vel,
const double &  alt_time_cst 
)

Constructor.

Create a simulation model based on the initial velocity state and the vehicle model parameters. 4 DOF simulation with altitude dynamics.

Parameters
[in]vel- initial velocity vector
[in]alt_time_cst- altitude time constant

References resetModel(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst 
)

Constructor.

Create a simulation model based on the initial velocity state and the vehicle model parameters. 4 DOF simulation with bank and speed dynamics.

Parameters
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant

References resetModel(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  alt_time_cst 
)

Constructor.

Create a simulation model based on the initial velocity state and the vehicle model parameters. 5 DOF simulation with bank, speed, and altitude dynamics.

Parameters
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]alt_time_cst- altitude time constant

References resetModel(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  airspeed_cmd,
const double &  bank_cmd 
)

Constructor.

Create a simulation model based on the initial velocity state, the vehicle model parameters, and initial commands. 4 DOF simulation with bank and speed dynamics.

Parameters
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]airspeed_cmd- applied airspeed command
[in]bank_cmd- applied bank command

References resetModel(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel 
)

Constructor.

Create a simulation model based on the initial state. 3 DOF simulation.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector

References resetModel(), setPosition(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel,
const double &  alt_time_cst 
)

Constructor.

Create a simulation model based on the initial state and the vehicle model parameters. 4 DOF simulation with altitude dynamics.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector
[in]alt_time_cst- altitude time constant

References resetModel(), setPosition(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst 
)

Constructor.

Create a simulation model based on the initial state and the vehicle model parameters. 4 DOF simulation with bank and speed dynamics.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant

References resetModel(), setPosition(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  alt_time_cst 
)

Constructor.

Create a simulation model based on the initial state and the vehicle model parameters. 5 DOF simulation with bank, speed, and altitude dynamics.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]alt_time_cst- altitude time constant

References resetModel(), setPosition(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  airspeed_cmd,
const double &  bank_cmd 
)

Constructor.

Create a simulation model based on the initial state, the vehicle model parameters, and initial commands. 4 DOF simulation with bank and speed dynamics.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]airspeed_cmd- applied airspeed command
[in]bank_cmd- applied bank command

References resetModel(), setPosition(), and setVelocity().

DUNE::Simulation::UAVSimulation::UAVSimulation ( const DUNE::Math::Matrix pos,
const DUNE::Math::Matrix vel,
const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  alt_time_cst,
const double &  airspeed_cmd,
const double &  bank_cmd,
const double &  altitude_cmd 
)

Constructor.

Create a simulation model based on the initial state, the vehicle model parameters, and initial commands. 5 DOF simulation with bank, speed, and altitude dynamics.

Parameters
[in]pos- initial position vector
[in]vel- initial velocity vector
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]alt_time_cst- altitude time constant
[in]airspeed_cmd- applied airspeed command
[in]bank_cmd- applied bank command
[in]altitude_cmd- applied altitude command

References resetModel(), setPosition(), and setVelocity().

Member Function Documentation

void DUNE::Simulation::UAVSimulation::command ( const double &  bank_cmd)
void DUNE::Simulation::UAVSimulation::command ( const double &  bank_cmd,
const double &  airspeed_cmd 
)

This method sets the vehicle control commands.

Parameters
[in]bank_cmd- applied bank command
[in]airspeed_cmd- applied airspeed command
void DUNE::Simulation::UAVSimulation::command ( const double &  bank_cmd,
const double &  airspeed_cmd,
const double &  altitude_cmd 
)

This method sets the vehicle control commands.

Parameters
[in]bank_cmd- applied bank command
[in]airspeed_cmd- applied airspeed command
[in]altitude_cmd- applied altitude command

References m_sim_type.

void DUNE::Simulation::UAVSimulation::commandAirspeed ( const double &  airspeed_cmd)

This method sets the vehicle airspeed command.

Parameters
[in]airspeed_cmd- applied airspeed command

Referenced by Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::Coordinator::Task::consume(), and Maneuver::VehicleFormation::FormCollAvoid::Task::consume().

void DUNE::Simulation::UAVSimulation::commandAlt ( const double &  altitude_cmd)

This method sets the vehicle altitude command.

Parameters
[in]altitude_cmd- applied altitude command

References m_sim_type.

Referenced by Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::Coordinator::Task::consume(), and Maneuver::VehicleFormation::FormCollAvoid::Task::consume().

void DUNE::Simulation::UAVSimulation::commandBank ( const double &  bank_cmd)

This method sets the vehicle bank command.

Parameters
[in]bank_cmd- applied bank command

Referenced by Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::Coordinator::Task::consume(), and Maneuver::VehicleFormation::FormCollAvoid::Task::consume().

void DUNE::Simulation::UAVSimulation::commandFPA ( const double &  fpa_cmd)

This method sets the vehicle flight path angle command.

Parameters
[in]fpa_cmd- applied flight path angle command

Referenced by Simulators::UAV::Task::consume().

void DUNE::Simulation::UAVSimulation::commandPitch ( const double &  pitch_cmd)

This method sets the vehicle pitch command.

Parameters
[in]pitch_cmd- applied pitch command
double DUNE::Simulation::UAVSimulation::getAirspeed ( void  )

This method gets the vehicle state.

Returns
airspeed - current aircraft total airspeed

Referenced by Maneuver::VehicleFormation::Coordinator::Task::periodicUpdate(), and Maneuver::VehicleFormation::FormCollAvoid::Task::teamPeriodicUpdate().

double DUNE::Simulation::UAVSimulation::getAirspeedCmd ( void  )

This method gets the vehicle airspeed command.

Returns
airspeed command
double DUNE::Simulation::UAVSimulation::getAltCmd ( void  )

This method gets the vehicle altitude command.

Returns
altitude command
double DUNE::Simulation::UAVSimulation::getBankCmd ( void  )

This method gets the vehicle bank command.

Returns
bank command
UAVSimulation & DUNE::Simulation::UAVSimulation::operator= ( const UAVSimulation model)

This method assigns a UAVSimulation with another UAVSimulation.

Parameters
[in]modelreference to UAV simulation model to be assigned
Returns
reference to resultant UAV simulation model

References m_g, m_sim_type, m_timestep_lim, and m_wind.

void DUNE::Simulation::UAVSimulation::resetModel ( void  )

This method resets all the vehicle model variables.

References m_g, m_timestep_lim, m_wind, and DUNE::Math::Matrix.

Referenced by UAVSimulation().

void DUNE::Simulation::UAVSimulation::setAccelLim ( const double &  lon_accel_lim)

This method sets the vehicle model longitudinal acceleration operation constraint.

Parameters
[in]lon_accel_lim- longitudinal acceleration limit

Referenced by Maneuver::VehicleFormation::Coordinator::Task::onEntityResolution(), Simulators::UAV::Task::onResourceAcquisition(), and Maneuver::VehicleFormation::FormCollAvoid::Task::onUpdateParameters().

void DUNE::Simulation::UAVSimulation::setBankRateLim ( const double &  bank_rate_lim)

This method sets the vehicle model bank rate operation constraint.

Parameters
[in]bank_rate_lim- bank rate limit

Referenced by Maneuver::VehicleFormation::Coordinator::Task::onEntityResolution(), Simulators::UAV::Task::onResourceAcquisition(), and Maneuver::VehicleFormation::FormCollAvoid::Task::onUpdateParameters().

void DUNE::Simulation::UAVSimulation::setCtrl ( const double &  bank_time_cst,
const double &  speed_time_cst 
)

This method sets the vehicle model control parameters.

Parameters
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant

Referenced by Maneuver::VehicleFormation::FormCollAvoid::Task::onUpdateParameters().

void DUNE::Simulation::UAVSimulation::setCtrl ( const double &  bank_time_cst,
const double &  speed_time_cst,
const double &  alt_time_cst 
)

This method sets the vehicle model control parameters.

Parameters
[in]bank_time_cst- bank angle time constant
[in]speed_time_cst- airspeed time constant
[in]alt_time_cst- altitude time constant
void DUNE::Simulation::UAVSimulation::setPosition ( const DUNE::Math::Matrix pos)
void DUNE::Simulation::UAVSimulation::setVelocity ( const DUNE::Math::Matrix vel)
void DUNE::Simulation::UAVSimulation::setVertSlopeLim ( const double &  vert_slope_lim)

This method sets the vehicle model vertical slope operation constraint.

Parameters
[in]vert_slope_lim- vertical slope limit

Referenced by Simulators::UAV::Task::onResourceAcquisition().

UAVSimulation DUNE::Simulation::UAVSimulation::update ( const double &  timestep)

This method updates the simulated state with the defined time step.

Parameters
[in]timestep- time step for the update
Returns
the updated state

References m_sim_type, and m_timestep_lim.

Referenced by Maneuver::VehicleFormation::Coordinator::Task::periodicUpdate(), Simulators::UAV::Task::task(), Maneuver::VehicleFormation::FormCollAvoid::Task::teamPeriodicUpdate(), Maneuver::VehicleFormation::FormCollAvoid::Task::teamUnevenUpdate(), and update().

UAVSimulation DUNE::Simulation::UAVSimulation::update ( const double &  timestep,
const double &  bank_cmd 
)

This method updates the simulated state with the defined time step and controls.

Parameters
[in]timestep- time step for the update
[in]bank_cmd- applied bank command
Returns
the updated state

References update().

UAVSimulation DUNE::Simulation::UAVSimulation::update ( const double &  timestep,
const double &  bank_cmd,
const double &  airspeed_cmd 
)

This method updates the simulated state with the defined time step and controls.

Parameters
[in]timestep- time step for the update
[in]bank_cmd- applied bank command
[in]airspeed_cmd- applied airspeed command
Returns
the updated state

References update().

UAVSimulation DUNE::Simulation::UAVSimulation::update ( const double &  timestep,
const double &  bank_cmd,
const double &  airspeed_cmd,
const double &  altitude_cmd 
)

This method updates the simulated state with the defined time step and controls.

Parameters
[in]timestep- time step for the update
[in]bank_cmd- applied bank command
[in]airspeed_cmd- applied airspeed command
[in]altitude_cmd- applied altitude command
Returns
the updated state

References update().

Member Data Documentation

double DUNE::Simulation::UAVSimulation::m_g

Gravity acceleration.

Referenced by operator=(), resetModel(), and UAVSimulation().

double DUNE::Simulation::UAVSimulation::m_timestep_lim

Time step control.

  • If negative, the time step limitation is disabled

Referenced by operator=(), resetModel(), UAVSimulation(), and update().

Collaboration diagram for DUNE::Simulation::UAVSimulation:
Collaboration graph