Zephyr Scientific Library (zscilib)
kinematics.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020 Kevin Townsend (KTOWN)
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
22 #ifndef ZEPHYR_INCLUDE_ZSL_KINEMATICS_H_
23 #define ZEPHYR_INCLUDE_ZSL_KINEMATICS_H_
24 
25 #include <zsl/zsl.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
44  zsl_real_t *dist);
45 
61  zsl_real_t xf, zsl_real_t *xi);
62 
78  zsl_real_t xf, zsl_real_t *xi);
79 
94  zsl_real_t *time);
95 
109 int zsl_phy_kin_vel(zsl_real_t vi, zsl_real_t time, zsl_real_t accel,
110  zsl_real_t *vf);
111 
126  zsl_real_t *vf);
127 
142  zsl_real_t *vi);
143 
158  zsl_real_t *vi);
159 
174  zsl_real_t *vi);
175 
187 int zsl_phy_kin_av_vel(zsl_real_t dist, zsl_real_t time, zsl_real_t *vel);
188 
202  zsl_real_t *accel);
203 
216 
217 #ifdef __cplusplus
218 }
219 #endif
220 
221 #endif /* ZEPHYR_INCLUDE_ZSL_KINEMATICS_H_ */
222  /* End of kinematics group */
zsl_phy_kin_init_pos
int zsl_phy_kin_init_pos(zsl_real_t vi, zsl_real_t t, zsl_real_t a, zsl_real_t xf, zsl_real_t *xi)
Calculates the initial position of a moving body based on the final position (xf),...
zsl_phy_kin_vel2
int zsl_phy_kin_vel2(zsl_real_t vi, zsl_real_t dist, zsl_real_t accel, zsl_real_t *vf)
Calculates the velocity in meters per second of an object under a constant acceleration (accel) based...
zsl_phy_kin_dist
int zsl_phy_kin_dist(zsl_real_t vi, zsl_real_t time, zsl_real_t accel, zsl_real_t *dist)
Calculates the change in distance based on initial velocity, time and acceleration.
zsl_phy_kin_init_pos2
int zsl_phy_kin_init_pos2(zsl_real_t vi, zsl_real_t vf, zsl_real_t a, zsl_real_t xf, zsl_real_t *xi)
Calculates the initial position of a moving body based on the final position (xf),...
zsl_phy_kin_init_vel2
int zsl_phy_kin_init_vel2(zsl_real_t dist, zsl_real_t a, zsl_real_t t, zsl_real_t *vi)
Calculates the initial velocity in meters per second of an object under a constant acceleration (a) b...
zsl_phy_kin_ener
int zsl_phy_kin_ener(zsl_real_t v, zsl_real_t m, zsl_real_t *ke)
Calculates the kinetic energy in joules of a moving body based on its velocity (v) and mass (m).
zsl_phy_kin_vel
int zsl_phy_kin_vel(zsl_real_t vi, zsl_real_t time, zsl_real_t accel, zsl_real_t *vf)
Calculates the velocity in meters per second of an object under a constant acceleration (accel) based...
zsl_phy_kin_init_vel
int zsl_phy_kin_init_vel(zsl_real_t vf, zsl_real_t a, zsl_real_t t, zsl_real_t *vi)
Calculates the initial velocity in meters per second of an object under a constant acceleration (a) b...
zsl_phy_kin_accel
int zsl_phy_kin_accel(zsl_real_t vi, zsl_real_t vf, zsl_real_t time, zsl_real_t *accel)
Calculates the acceleration of a moving body in meters per second squared based on its initial (vi) a...
zsl.h
API header file for zscilib.
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_phy_kin_time
int zsl_phy_kin_time(zsl_real_t vi, zsl_real_t vf, zsl_real_t accel, zsl_real_t *time)
Calculates the time in seconds that it takes an object to change its velocity from vi to vf under a c...
zsl_phy_kin_init_vel3
int zsl_phy_kin_init_vel3(zsl_real_t vf, zsl_real_t a, zsl_real_t dist, zsl_real_t *vi)
Calculates the initial velocity in meters per second of an object under a constant acceleration (a) b...
zsl_phy_kin_av_vel
int zsl_phy_kin_av_vel(zsl_real_t dist, zsl_real_t time, zsl_real_t *vel)
Calculates the average velocity in meters per second of a moving object based on the time and distanc...