Use quaternion to transform coordinate system in yade
Hi,everyone!
I try to use quaternion in yade source code to convert between granular coordinate system and geodetic coordinate system.
Suppose there is a fixed point, p, on the particle, and its coordinate is p1 in the particle coordinate system. We want to obtain the coordinate p2 of the fixed point in the geodetic coordinate system under each time step by the quaternion,Q, of this particle.
I wrote the following code:
#######
bool Ig2_Sphere_
const shared_ptr<Shape>& cm1,
const shared_ptr<Shape>& cm2,
const State& state1,
const State& state2,
const Vector3r& shift2,
const bool& force,
const shared_
{
......
const Se3r& se31 = state1.se3;
const Sphere *s1 = static_
Vector3r p1(0,0,s1->radius);
Vector3r p2;
......
}
################
May I ask if this method is correct?
Thanks for your help :).
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: