Function rotate_vector

Function Documentation

arma::vec2 rotate_vector(const arma::vec2 &vector, const double &angle)

Rotates a 2D vector by a given angle.

This function takes a 2D position vector and rotates 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