Robotran C Documentation
Macros | Functions
mbs_trigo.c File Reference
#include "math.h"
#include "mbs_data.h"
#include "useful_functions.h"
#include "mbs_message.h"

Macros

#define _MBS_TRIGO_H_
 

Functions

int mbs_init_sin_cos_q_vecs (MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec, int *qrot_qv_indvec)
 Initialize the three vectors of indices (they are usually contained in the mbs_aux structure) More...
 
void mbs_compute_sin_cos_quc (MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec)
 Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are independent qu or driven qc mbs_init_sin_cos_q_vecs must having been called during the module init, to fill qrot_qu_indvec and qrot_qc_indvec. More...
 
void mbs_compute_sin_cos_qv (MbsData *s, int *qrot_qv_indvec)
 Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are dependent qv mbs_init_sin_cos_q_vecs must having been called during the module init, to fill qrot_qv_indvec. More...
 
void mbs_compute_sin_cos_q_all (MbsData *s)
 Compute the sine and cosine of the q_sin and q_cos, for all the rotational joints. More...
 

Macro Definition Documentation

◆ _MBS_TRIGO_H_

#define _MBS_TRIGO_H_

Function Documentation

◆ mbs_compute_sin_cos_q_all()

void mbs_compute_sin_cos_q_all ( MbsData mbs_data)

Compute the sine and cosine of the q_sin and q_cos, for all the rotational joints.

Parameters
[in]MbsDataThe MBS structure in which the vector q_sin and q_cos are updated after calling this function.

◆ mbs_compute_sin_cos_quc()

void mbs_compute_sin_cos_quc ( MbsData mbs_data,
int *  qrot_qu_indvec,
int *  qrot_qc_indvec 
)

Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are independent qu or driven qc mbs_init_sin_cos_q_vecs must having been called during the module init, to fill qrot_qu_indvec and qrot_qc_indvec.

Parameters
[in]MbsDataThe computed MBS structure
[in]qrot_qu_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qu
[in]qrot_qc_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qc

◆ mbs_compute_sin_cos_qv()

void mbs_compute_sin_cos_qv ( MbsData mbs_data,
int *  qrot_qv_indvec 
)

Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are dependent qv mbs_init_sin_cos_q_vecs must having been called during the module init, to fill qrot_qv_indvec.

Parameters
[in]MbsDataThe computed MBS structure
[in]qrot_qv_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qv

◆ mbs_init_sin_cos_q_vecs()

int mbs_init_sin_cos_q_vecs ( MbsData s,
int *  qrot_qu_indvec,
int *  qrot_qc_indvec,
int *  qrot_qv_indvec 
)

Initialize the three vectors of indices (they are usually contained in the mbs_aux structure)

Parameters
[in]MbsDataThe MBS structure giving the nature of joint (rot, qu, qv, qc)
[out]qrot_qu_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qu
[out]qrot_qc_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qc
[out]qrot_qv_indvec(ivec_1, size 1xnjoint) the vector containing 0 or 1,depending if the joint is rotationnal and qv

return error, negative in case of failure, 0 in case all went well