Robotran C Documentation
Functions
realtime_functions.h File Reference

useful functions used by the real-time modules More...

Go to the source code of this file.

Functions

void guess_tsim_index (double request_tsim, double *tsim_save, int min_ind, int max_ind, double min_tsim, double max_tsim, int buffer_size, int flag_round, int *prev_ind, int *next_ind)
 get the indexes for a requested time on a turning vector of time values More...
 

Detailed Description

useful functions used by the real-time modules

Author
Nicolas Van der Noot

Function Documentation

◆ guess_tsim_index()

void guess_tsim_index ( double  request_tsim,
double *  tsim_save,
int  min_ind,
int  max_ind,
double  min_tsim,
double  max_tsim,
int  buffer_size,
int  flag_round,
int *  prev_ind,
int *  next_ind 
)

get the indexes for a requested time on a turning vector of time values

Parameters
[in]request_tsimrequested simulation time [s]
[in]tsim_savevector with past simulation time values [s]
[in]min_indindex of tsim_save corresonding to the minimal time value
[in]max_indindex of tsim_save corresonding to the maximal time value
[in]min_tsimminimal time value [s]
[in]max_tsimmaximal time value [s]
[in]buffer_sizesize of tsim_save
[in]flag_round1 if tsim_save already filled, 0 otherwise
[out]prev_indindex before the requested time
[out]next_indindex after the requested time