bugGNU Octave - Bugs: bug #55752, [octave forge] (quaternion) rot2q...

 
 

bug #55752: [octave forge] (quaternion) rot2q can't handle multiple inputs but the quaternion constructor can

Submitted by:  Rick T <ratulloch>
Submitted on:  Wed 20 Feb 2019 10:01:20 PM UTC  
 
Category:  Octave Forge Package Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  other Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 20 Feb 2019 10:01:20 PM UTC, original submission:  

The rot2q.m function found in the Quaternion package seems not intended to handle multiple inputs.  On the other hand the quaternion constructor can handle multiple inputs. 

Test code that errors with:

"error: rot2q: first argument 'axis' must be a length three vector
error: called from
    rot2q at line 74 column 5
    test_quaternion_array_coversion at line 10 column 21"

clear all
pkg load quaternion
xyz_angle=[0  1  0  1.570796326794897;0.5  1  0  1.570796326794897]
pt_xyz_angle_to_quat=rot2q ([xyz_angle(:,1),xyz_angle(:,2),xyz_angle(:,3)], xyz_angle(:,4))

This is my logic:
1) Convert multiple xyz points in array to quaternions using the function rot2q
2) Do calculations on multiple points from array in quaternions using the function quaternion
3) Convert quaternion array data back to xyz points using the function q2rot
4) Plot new xyz points using the function scatter3

Kai Torben Ohlhus from the Octave list
Recommended some possible changes see attached files of Kai's code suggestions.

Rick T <ratulloch>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46319:  rot2q_changes.m added by ratulloch (4KiB - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ratulloch (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-20 mtmiller Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupNone => Feature Request
        Release5.0.91 => other
        SummaryQuaternion Package rot2q.m can't handle multiple inputs but the quaternion constructor can => [octave forge] (quaternion) rot2q can't handle multiple inputs but the quaternion constructor can
    2019-02-20 ratulloch Attached File- => Added rot2q_changes.m, #46319

    Back to the top


    Powered by Savane 3.5