Zephyr Scientific Library (zscilib)
projectiles.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_PROJECTILES_H_
23 #define ZEPHYR_INCLUDE_ZSL_PROJECTILES_H_
24 
25 #include <zsl/zsl.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
46  zsl_real_t *viv);
47 
66  zsl_real_t *t);
67 
87  zsl_real_t *t);
88 
104 
121  zsl_real_t *yf);
122 
138 
154  zsl_real_t *xf);
155 
173  zsl_real_t yi, zsl_real_t xf, zsl_real_t *yf);
174 
187 
199 int zsl_phy_proj_angle(zsl_real_t vfh, zsl_real_t vfv, zsl_real_t *theta);
200 
216  zsl_real_t yi, zsl_real_t *dist);
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #endif /* ZEPHYR_INCLUDE_ZSL_PROJECTILES_H_ */
223  /* End of projectiles group */
zsl_phy_proj_angle
int zsl_phy_proj_angle(zsl_real_t vfh, zsl_real_t vfv, zsl_real_t *theta)
Calculates the angle in radians between the floor and the total velocity of an object under projectil...
zsl_phy_proj_ver_vel
int zsl_phy_proj_ver_vel(zsl_real_t viv, zsl_real_t t, zsl_real_t *vfv)
Calculates the vertical velocity in meters per second of an object under projectile motion based on t...
zsl_phy_proj_vel
int zsl_phy_proj_vel(zsl_real_t vfh, zsl_real_t vfv, zsl_real_t *vf)
Calculates the module of the total velocity in meters per second of an object under projectile motion...
zsl_phy_proj_time
int zsl_phy_proj_time(zsl_real_t viv, zsl_real_t yi, zsl_real_t yf, zsl_real_t *t)
Calculates the total time of travel in seconds of an object under projectile motion from an initial h...
zsl_phy_proj_trajectory
int zsl_phy_proj_trajectory(zsl_real_t vih, zsl_real_t viv, zsl_real_t xi, zsl_real_t yi, zsl_real_t xf, zsl_real_t *yf)
Calculates the vertical position in meters of an object under projectile motion at any given horizont...
zsl_phy_proj_time_first
int zsl_phy_proj_time_first(zsl_real_t viv, zsl_real_t yi, zsl_real_t yf, zsl_real_t *t)
Calculates the total time of travel in seconds of an object under projectile motion from an initial h...
zsl_phy_proj_range
int zsl_phy_proj_range(zsl_real_t vih, zsl_real_t viv, zsl_real_t xi, zsl_real_t yi, zsl_real_t *dist)
Calculates the horizontal distance in meters between the launching point of an object and the point w...
zsl_phy_proj_time2
int zsl_phy_proj_time2(zsl_real_t viv, zsl_real_t vfv, zsl_real_t *t)
Calculates the total time of travel in seconds of an object under projectile motion based on the vert...
zsl_phy_proj_hor_motion
int zsl_phy_proj_hor_motion(zsl_real_t vih, zsl_real_t t, zsl_real_t xi, zsl_real_t *xf)
Calculates the horizontal position in meters of an object under projectile motion based on the horizo...
zsl.h
API header file for zscilib.
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_phy_proj_ver_motion
int zsl_phy_proj_ver_motion(zsl_real_t viv, zsl_real_t t, zsl_real_t yi, zsl_real_t *yf)
Calculates the height in meters of an object under projectile motion based on the initial vertical ve...
zsl_phy_proj_init_vel
int zsl_phy_proj_init_vel(zsl_real_t vi, zsl_real_t theta, zsl_real_t *vih, zsl_real_t *viv)
Decomposes the initial velocity of an object under projectile motion into its horizontal and vertical...