Skip to main content

AVxcelerate Simulation Framework 2026 R1 SP01

File vehicle_state.h

Last update: 22.04.2026

Location: autonomy/simulation/utilities/vehicle_state/vehicle_state.h

Classes

Namespaces

Includes

Included by

Source



#ifndef AUTONOMY_SIMULATION_UTILITIES_VEHICLESTATE_VEHICLESTATE_H
#define AUTONOMY_SIMULATION_UTILITIES_VEHICLESTATE_VEHICLESTATE_H

#include <iostream>
namespace simulation_framework
{
namespace utilities
{
namespace vehicle
{
namespace state
{

template <typename T>
struct OrientationT
{
    T yaw;
    T roll;
    T pitch;
};

template <typename T>
struct Vector3DT
{
    T x;
    T y;
    T z;
};

template <typename T>
struct MotionStateT
{
    Vector3DT<T> position;
    OrientationT<T> orientation;
    Vector3DT<T> velocity;
    Vector3DT<T> acceleration;
};

template <typename T>
struct ControlInputT
{
    T steering_angle;
    T acceleration;
};

template <typename T>
void PrintMotionState(const MotionStateT<T>& state, std::ostream& os = std::cout)
{
    os << "Position: (" << state.position.x << ", " << state.position.y << ", " << state.position.z << ")\n";
    os << "Orientation: (Yaw: " << state.orientation.yaw << ", Roll: " << state.orientation.roll
       << ", Pitch: " << state.orientation.pitch << ")\n";
    os << "Velocity: (" << state.velocity.x << ", " << state.velocity.y << ", " << state.velocity.z << ")\n";
    os << "Acceleration: (" << state.acceleration.x << ", " << state.acceleration.y << ", " << state.acceleration.z
       << ")\n";
}

using Orientation = OrientationT<double>;
using Vector3D = Vector3DT<double>;
using MotionState = MotionStateT<double>;
using ControlInput = ControlInputT<double>;

}  // namespace state
}  // namespace vehicle
}  // namespace utilities

}  // namespace simulation_framework

#endif  // AUTONOMY_SIMULATION_UTILITIES_VEHICLESTATE_VEHICLESTATE_H

Connect with Ansys