hexagon logo

How to make same request as 907 using functions?

Hello, I want to make request same as 907 (measuring displacement) but with functions:
request_subrutine
My request using functions:
request_function
To obtain same translational displacement for F2 i had to add minus sign:
comparison_1
Problem is with angles. Yaw angle values are perfectly same:
comparison_yaw
Roll angles are not perfectly same:
comparison_roll
Biggest difference is in pitch angle. To have same sign of values i have used minus in F7 function of request:,
comparison_pitch
Why are pitch angles so different? Is there some problem in my function request?
 
Also what I do not understand is why subrutine 907 for longitudinal displacement is giving positive values (i think vehicle is going in minus direction of GCS).
 
Thanks
 
Jozef
  • Without the source code of req907 that'll be difficult to say, but other codes I ran across use the fortran utility SYSARY with the option DISP to fill a result array and then return that to ADAMS.
    The solver documentation states that SYSARY/DISP evaluates DX/DY/DY/PSI/THETA/PHI which is exactly what you tried.
     
    But you also noticed that the results were negative.
    So in your case I'd first try to invert i/j in the function expressions instead of negating the results.
     
  • Joseph, the functions AX, AY, AZ does each expect that the angle around the other two axles are small. And you simply get the wrong sequence of angles when using them. Think for example that the vehicle have yawed 90°. Then you claim that the roll is the rotation around the global X-axle? At this position, when the vehicle travels along the global Y axis, the roll should be measured around the global Y. So AX, AY and AZ are unsuitable for this purpose.
     
    Luckily there exists the functions YAW, PITCH, ROLL that actually measures the rotations in the right sequence. Use those instead and it probably will work out better for you.