Function rotate_2d_vector

Function Documentation

arma::vec rotate_2d_vector(const arma::vec &vector, const double &angle)

Rotates a 2D vector by a given angle.

This function takes a 2D position vector and rotates it by a given angle

Parameters:
  • vector – A constant reference to a vector that has to be rotated.

  • angle – A constant reference to an angle in radians that tells the difference in the orientation between ENU coordinates and car’s reference frame.

Returns:

A 2D vector representing the rotated vector as arma::vec