ThorstenHellert / SC

6 stars 4 forks source link

SCregister support #1

Closed lnadolski closed 2 years ago

lnadolski commented 2 years ago

Dear Thorsden,

Could you please add a warning instead of an error if the longitudinal error is not given ? In other register scripts you set the longitfuinal error to 0 and make a warning.

if any(strcmp(varargin,{'Offset'})) offset = varargin{find(strcmp(varargin,{'Offset'}))+1}; if size(offset,2)~=3 || (size(offset,1)~=1 && size(offset,1)~=2) error('Support structure offset uncertainty of ''%s'' must be given as [1x3] (start end endpoints get same offset errors) or [2x3] (start end endpoints get independent offset errors) array.',varargin{1}) end end

    if any(strcmp(varargin,{'Roll'}))
        if length(varargin{find(strcmp(varargin,{'Roll'}))+1})~=3
            error('''%s'' roll uncertainty must be [1x3] array [az,ax,ay] of roll (around z-axis), pitch (roll around x-axis) and yaw (roll around y-axis) angle.',varargin{1})
        end
    end
ThorstenHellert commented 2 years ago

Done. Thanks for the suggestion! Cheers,

Thorsten

On 13. Feb 2022, at 19:37, Laurent S. Nadolski @.***> wrote:

Dear Thorsden,

Could you please add a warning instead of an error if the longitudinal error is not given ? In other register scripts you set the longitfuinal error to 0 and make a warning.

if any(strcmp(varargin,{'Offset'})) offset = varargin{find(strcmp(varargin,{'Offset'}))+1}; if size(offset,2)=3 || (size(offset,1)=1 && size(offset,1)~=2) error('Support structure offset uncertainty of ''%s'' must be given as [1x3] (start end endpoints get same offset errors) or [2x3] (start end endpoints get independent offset errors) array.',varargin{1}) end end

if any(strcmp(varargin,{'Roll'})) if length(varargin{find(strcmp(varargin,{'Roll'}))+1})~=3 error('''%s'' roll uncertainty must be [1x3] array [az,ax,ay] of roll (around z-axis), pitch (roll around x-axis) and yaw (roll around y-axis) angle.',varargin{1}) end end — Reply to this email directly, view it on GitHub https://github.com/ThorstenHellert/SC/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHUUFR4XNI6ZMT65LCGR6TU2726BANCNFSM5OJPBS2Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.