IAP GITLAB

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

added LineTrajectory

parent e201d83e
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,8 @@ class Helix // TODO: inherit from to-be-implemented "Trajectory"
Length const radius;
public:
Helix(Point const pR0, phys::units::quantity<phys::units::frequency_d> pOmegaC,
SpeedVec const pvPar, SpeedVec const pvPerp) :
Helix(Point const& pR0, phys::units::quantity<phys::units::frequency_d> pOmegaC,
SpeedVec const& pvPar, SpeedVec const& pvPerp) :
r0(pR0), omegaC(pOmegaC), vPar(pvPar), vPerp(pvPerp), uPerp(vPerp.cross(vPar.normalized())),
radius(pvPar.norm() / abs(pOmegaC))
{
......
#ifndef _include_LINETRAJECTORY_H
#define _include_LINETRAJECTORY_H
#include <Framework/Geometry/Point.h>
#include <Framework/Geometry/Vector.h>
#include <Units/PhysicalUnits.h>
class LineTrajectory // TODO: inherit from Trajectory
{
using SpeedVec = Vector<Speed::dimension_type>;
Point const r0;
SpeedVec const v0;
LineTrajectory(Point const& pR0, SpeedVec const& pV0) :
r0(r0), v0(pV0)
{
}
auto getPosition(Time t) const
{
return r0 + v0 * t;
}
};
#endif
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