|
| InterpolatedMovingPlatform (SimulationStepLoop &stepLoop, TemporalDesignMatrix< double, double > const &tdm, DiffDesignMatrix< double, double > const &ddm, InterpolationScope scope, bool const syncGPSTime, double const startTime, RotationSpec rotspec=RotationSpec::ARINC_705) |
| Build an InterpolatedMovingPlatform from given values and differentials. Note that the DiffDesignMatrix must define the derivatives for the same functions which values over time are described by the TemporalDesignMatrix. More...
|
|
void | doSimStep (int simFrequency_hz) override |
|
bool | waypointReached () override |
| Check whether the interpolated moving platform has reached its waypoint or not. More...
|
|
virtual void | toTrajectoryTime (double const t) |
| Configures the iterative method of the trajectory function so the current iteration is considered to be at given time \(t\). More...
|
|
void | initLegManual () override |
| Consider the current time as the start time of the manually initialized leg.
|
|
void | initLeg () override |
| Consider the current time as the start time of the initialized leg.
|
|
SimulationStepLoop & | getStepLoop () const |
| Obtain the reference to the SimulationStepLoop. More...
|
|
InterpolationScope | getScope () const |
| Obtain the InterpolationScope. More...
|
|
void | setScope (InterpolationScope const scope) |
| Set the InterpolationScope. More...
|
|
std::shared_ptr< DesignTrajectoryFunction > | getTrajectoryFunction () const |
| Obtain the TrajectoryFunction. More...
|
|
void | setTrajectoryFunction (std::shared_ptr< DesignTrajectoryFunction > tf) |
| Set the TrajectoryFunction. More...
|
|
arma::Col< double > const & | getTimeFrontiers () const |
| Obtain the time frontiers. More...
|
|
void | setTimeFrontiers (arma::Col< double > const &timeFrontiers) |
| Set the time frontiers. More...
|
|
arma::Mat< double > const & | getFrontierValues () const |
| Obtain the values at the frontier points. More...
|
|
void | setFrontierValues (arma::Mat< double > const &frontierValues) |
| Set the values at the frontier points. More...
|
|
arma::Mat< double > const & | getFrontierDerivatives () const |
| Obtain the derivatives at the frontier points. More...
|
|
void | setFrontierDerivatives (arma::Mat< double > const &frontierDerivatives) |
| Set the derivatives at the frontier points. More...
|
|
bool | isSyncGPSTime () const |
| Check whether the GPS time is requested to be synchronized with platform's start time (true) or not (false) More...
|
|
void | setSyncGPSTime (bool const syncGPSTime) |
| Either enable (true) or disable (false) the synchronization of GPS time with platform's start time. More...
|
|
double | getStartTime () const |
| Obtain the start time. More...
|
|
void | setStartTime (double const startTime) |
| Set the start time. More...
|
|
bool | isInterpolated () const override |
|
double | getCurrentLegStartTime () const |
| Obtain the start time of the current leg. More...
|
|
void | setCurrentLegTimeDiff (double const timeDiff) |
| Set the time difference between the start and end points of the current leg. More...
|
|
double | getCurrentLegTimeDiff () const |
| Obtain the time difference between the start and end points of the current leg. More...
|
|
void | getRollPitchYaw (double &roll, double &pitch, double &yaw) override |
| Override the platform's default Platform::getRollPitchYaw method to account for the given rotation specification when using a InterpolatedMovingPlatform. More...
|
|
| MovingPlatform ()=default |
| Moving platform default constructor.
|
|
std::shared_ptr< Platform > | clone () override |
|
void | _clone (std::shared_ptr< Platform > p) override |
|
void | applySettings (std::shared_ptr< PlatformSettings > settings, bool manual) override |
|
void | doSimStep (int simFrequency_hz) override |
|
void | initLegManual () override |
|
void | initLegManualIterative () |
| Method to assist manual leg initialization for moving platform when it fails. More...
|
|
bool | waypointReached () override |
|
glm::dvec3 | getVelocity () override |
|
void | setVelocity (glm::dvec3 v) |
| Set velocity vector for moving platform. More...
|
|
bool | canMove () const override |
|
| Platform ()=default |
| Default platform constructor.
|
|
virtual void | prepareSimulation (int simFrequency_hz) |
| Prepare the platform to deal with simulation. More...
|
|
virtual void | prepareLeg (int const simFrequency_hz) |
| Prepare the platform to deal with the next leg. More...
|
|
std::shared_ptr< PlatformSettings > | retrieveCurrentSettings () |
| Retrieve current platform settings and build a new PlatformSettings object with them. More...
|
|
virtual void | updateStaticCache () |
| Cache update which only needs to be performed after static modifications. Updating static cache also updates dynamic cache. More...
|
|
void | updateDynamicCache () |
| Cache update which must be performed between simulation steps and after static modifications. Updating static cache also updates dynamic cache but updating dynamic cache does not update static cache. More...
|
|
virtual void | setAttitude (Rotation attitude) |
| Set platform attitude. More...
|
|
virtual void | setOrigin (glm::dvec3 origin) |
| Set platform origin way point. More...
|
|
virtual void | setDestination (glm::dvec3 dest) |
| Set platform destination way point. More...
|
|
virtual void | setAfterDestination (glm::dvec3 next) |
| Set platform after destination way point. More...
|
|
void | setPosition (glm::dvec3 pos) |
| Set platform position. More...
|
|
void | setOffset (glm::dvec3 pos) |
| Set platform position. More...
|
|
Rotation | getAbsoluteMountAttitude () const |
| Obtain platform absolute mount attitude. More...
|
|
glm::dvec3 | getAbsoluteMountPosition () const |
| Obtain platform absolute mount position. More...
|
|
Rotation | getAttitude () const |
| Obtain platform attitude. More...
|
|
virtual Rotation | getDirectionalAttitude () |
| Obtain the directional attitude. While the attitude represents the platform orientation, the directional attitude represents the movement direction. More...
|
|
virtual glm::dvec3 | getCurrentDirection () |
| Obtain platform current direction.
|
|
glm::dvec3 | getPosition () const |
| Obtain platform position. More...
|
|
glm::dvec3 | getVectorToTarget () const |
| Obtain platform vector to target (cache) More...
|
|
virtual void | setHeadingRad (double rad) |
| Set the heading angle in radians. This angle can be understood as yaw in most cases. More...
|
|
virtual double | getHeadingRad () |
| Obtain platform heading angle in radians, which can be understood as yaw in most cases. More...
|
|
virtual bool | canStopAndTurn () const |
| Check if platform support stop and turn mode (true) or not (false) More...
|
|
std::string | getLocationString () |
| Obtain asset location string. More...
|
|
virtual bool | isEgg () const |
| Check whether the asset is an EggAsset or not. More...
|
|
|
SimulationStepLoop & | stepLoop |
| Reference to the SimulationStepLoop defining the Simulation. More...
|
|
InterpolationScope | scope |
| Specify the scope of the interpolation. More...
|
|
RotationSpec | rotspec |
| The rotation specification defining the interpolated attitude. More...
|
|
std::shared_ptr< DesignTrajectoryFunction > | tf = nullptr |
| The trajectory function defining the platform's motion. More...
|
|
arma::Col< double > | timeFrontiers |
| The \(m\) time frontiers \(a_1, \ldots, a_m\) such that \(\forall t,\, \exists i \ni t \in [a_i, a_{i+1})\). More...
|
|
arma::Mat< double > | frontierValues |
| The \(m\) vectors in \(\mathbb{R}^{n}\) such that at the \(i\)-th frontier it is known that \( \vec{y}(a_i) = \left(y_{i1}, \ldots, y_{in}\right) \). More...
|
|
arma::Mat< double > | frontierDerivatives |
| The \(m\) vectors in \(\mathbb{R}^{n}\) such that at the \(i\)-th frontier it is known that \( \frac{d\vec{y}}{dt} = \left( \frac{dy_1}{dt}, \ldots, \frac{dy_n}{dt} \right) \). More...
|
|
std::function< Rotation(arma::Col< double > const)> | calcAttitude |
| Function which handles how attitude is calculated. It depends on the rotation specification. More...
|
|
std::function< void(double &, double &, double &, Rotation &) > | _getRollPitchYaw |
| Function to get the roll, pitch, and yaw angles depending on the rotation specification. More...
|
|
std::function< void(double const t)> | doStepUpdates |
| Function which handles the update of components belonging to interpolation scope at each simulation step. More...
|
|
bool | syncGPSTime |
| If true, the GPS time will be synchronized with the start time of the InterpolatedMovingPlatform. If false, nothing will be done. More...
|
|
double | startTime |
| The start time for the GPS time (in seconds). More...
|
|
double | currentLegStartTime |
| The time at the start of the current leg (in seconds). It is \(0\) for the first leg and it is the time at which \(i\)-th leg finished for the \((i+1)\)-th leg. More...
|
|
double | currentLegTimeDiff |
| The difference between the start time and the end time of the current leg. More...
|
|
|
glm::dvec3 | cfg_device_relativeMountPosition = glm::dvec3(0, 0, 0) |
| Device mount position relative to the platform.
|
|
Rotation | cfg_device_relativeMountAttitude |
| Device mount attitude relative to the platform. More...
|
|
double | lastCheckZ = 0 |
| Not used at the moment. Might be removed in the future.
|
|
glm::dvec3 | lastGroundCheck = glm::dvec3(0, 0, 0) |
| Not used at the moment. Might be removed in the future.
|
|
std::shared_ptr< Scene > | scene = nullptr |
| Scene where the platform belongs to.
|
|
std::shared_ptr< NoiseSource< double > > | positionXNoiseSource = nullptr |
| Noise source for x component of platform position.
|
|
std::shared_ptr< NoiseSource< double > > | positionYNoiseSource = nullptr |
| Noise source for y component of platform position.
|
|
std::shared_ptr< NoiseSource< double > > | positionZNoiseSource = nullptr |
| Noise source for z component of platform position.
|
|
std::shared_ptr< NoiseSource< double > > | attitudeXNoiseSource = nullptr |
| Noise source for x component of platform attitude.
|
|
std::shared_ptr< NoiseSource< double > > | attitudeYNoiseSource = nullptr |
| Noise source for y component of platform attitude.
|
|
std::shared_ptr< NoiseSource< double > > | attitudeZNoiseSource = nullptr |
| Noise source for z component of platform attitude.
|
|
double | dmax = std::numeric_limits<double>::max() |
| Not used at the moment. Might be removed in the future.
|
|
glm::dvec3 | prevWrittenPos = glm::dvec3(dmax, dmax, dmax) |
| Not used at the moment. Might be removed in the future.
|
|
double | cfg_settings_movePerSec_m = 0 |
| How meters per seconds the platform moves. NOTICE this behavior must be overridden by platforms implementing its own physics model.
|
|
glm::dvec3 | originWaypoint = glm::dvec3(0, 0, 0) |
| Origin waypoint.
|
|
glm::dvec3 | targetWaypoint = glm::dvec3(0, 0, 0) |
| Target waypoint (destination)
|
|
glm::dvec3 | nextWaypoint = glm::dvec3(0, 0, 0) |
| Waypoint after target. For the last target, waypoint after target is equal to the target itself.
|
|
bool | onGround = false |
| Flag to specify if the platform must be placed on ground (true) or not (false)
|
|
bool | stopAndTurn = false |
| Flag to specify if platform must work in stop and turn mode (true) or not (false). Not all platforms support this mode, so it will only be used when possible.
|
|
bool | smoothTurn = false |
| Flag to specify if platform must work in smooth turn mode (true) or not (false). Not all platforms support this mode, so it will only be used when possible.
|
|
bool | slowdownEnabled = true |
| Flag to specify if slowdown stage must be enabled (true) or not (false). Not all platforms have a slowdown stage, so this flag will only be applied when it is necessary.
|
|
glm::dvec3 | position = glm::dvec3(0, 0, 0) |
| Platform 3D position.
|
|
Rotation | attitude = Rotation(Directions::up, 0) |
| Platform 3D attitude.
|
|
bool | mSetOrientationOnLegInit = false |
| Not used at the moment. Might be removed in the future.
|
|
bool | writeNextTrajectory = true |
| Flag to specify if next trajectory needs to be written (true) or not (false)
|
|
glm::dvec3 | cached_absoluteMountPosition = glm::dvec3(0, 0, 0) |
| Cached absolute mount position.
|
|
Rotation | cached_absoluteMountAttitude = Rotation(glm::dvec3(0, 1, 0), 0) |
| Cached absolute mount attitude.
|
|
glm::dvec3 | cached_dir_current = glm::dvec3(0, 0, 0) |
| Current director vector over XY plane.
|
|
glm::dvec3 | cached_dir_current_xy = glm::dvec3(0, 0, 0) |
| Current director vector over XY plane (z is always 0)
|
|
glm::dvec3 | cached_vectorToTarget = glm::dvec3(0, 0, 0) |
| Distance vector from current position to target.
|
|
glm::dvec3 | cached_vectorToTarget_xy = glm::dvec3(0, 0, 0) |
| Distance vector from current position to target over XY plane (z is always 0)
|
|
double | cached_distanceToTarget_xy = 0 |
| Distance on XY plane between current position and target.
|
|
glm::dvec3 | cached_originToTargetDir_xy = glm::dvec3(0, 0, 0) |
| Director vector from origin to target over the XY plane (z is always 0).
|
|
glm::dvec3 | cached_targetToNextDir_xy = glm::dvec3(0, 0, 0) |
| Director vector from target to after target waypoint over the XY plane (z is always 0).
|
|
double | cached_endTargetAngle_xy |
| Angle between director vector from origin to target and director vector from target to waypoint after target.
|
|
double | cached_currentAngle_xy |
| Angle between current director vector and director vector from target to waypoint after target.
|
|
double | cached_originToTargetAngle_xy |
| Angle in \([0, 2\pi)\) which identifies director vector from origin waypoint to target waypoint.
|
|
double | cached_targetToNextAngle_xy |
| Angle in \([0, 2\pi)\) which identifies director vector from target waypoint to waypoint after target.
|
|
std::string | id = "" |
| Asset identifier.
|
|
std::string | name = "Unnamed Asset" |
| Asset name.
|
|
std::string | sourceFilePath = "" |
| Path to asset file.
|
|
Class representing a MovingPlatform which position is defined by a function interpolated from a DesignMatrix.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
- See also
- MovingPlatform