IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 135ade86 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

fixed sign issue in Helix

parent c940bcad
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#include <Geometry/Point.h> #include <Geometry/Point.h>
#include <Units/PhysicalUnits.h> #include <Units/PhysicalUnits.h>
#include <cmath>
class Helix // TODO: inherit from to-be-implemented "Trajectory" class Helix // TODO: inherit from to-be-implemented "Trajectory"
{ {
using SpeedVec = Vector<Speed>; using SpeedVec = Vector<Speed>;
...@@ -19,8 +21,8 @@ class Helix // TODO: inherit from to-be-implemented "Trajectory" ...@@ -19,8 +21,8 @@ class Helix // TODO: inherit from to-be-implemented "Trajectory"
public: public:
Helix(Point const pR0, phys::units::quantity<phys::units::frequency_d> pOmegaC, Helix(Point const pR0, phys::units::quantity<phys::units::frequency_d> pOmegaC,
SpeedVec const pvPar, SpeedVec const pvPerp) : SpeedVec const pvPar, SpeedVec const pvPerp) :
r0(pR0), omegaC(pOmegaC), vPar(pvPar), vPerp(pvPerp), uPerp(vPar.normalized().cross(vPerp)), r0(pR0), omegaC(pOmegaC), vPar(pvPar), vPerp(pvPerp), uPerp(vPerp.cross(vPar.normalized()),
radius(pvPar.norm() / pOmegaC) radius(pvPar.norm() / abs(pOmegaC))
{ {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment