ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
velocity.h
Go to the documentation of this file.
1 #pragma once
2 
5 struct Velocity {
10  Velocity() : x(0), y(0), z(0) {}
18  Velocity(double x, double y, double z) : x(x), y(y), z(z) {}
19  double x;
20  double y;
21  double z;
22 
30  bool operator==(const Velocity &v) const {
31  return (x == v.x && y == v.y && z == v.z);
32  }
40  bool operator!=(const Velocity &v) const { return !(*this == v); }
41 };
double z
z component in m/s
Definition: velocity.h:21
Velocity(double x, double y, double z)
Constructor with explicit instantiation.
Definition: velocity.h:18
bool operator!=(const Velocity &v) const
Check if two vectors are not equal.
Definition: velocity.h:40
double x
x component in m/s
Definition: velocity.h:19
Velocity()
Constructor with implicit instantiation of velocity vector to zero.
Definition: velocity.h:10
Store velocity vector.
Definition: velocity.h:5
double y
y component in m/s
Definition: velocity.h:20
bool operator==(const Velocity &v) const
Check if two velocity vectors are the same.
Definition: velocity.h:30