/**
 * simulator.h
 * @brief simulator controller
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 1.0.5
 * @since 0.6
*/

// header guard
#ifndef SIMULATOR_H
#define SIMULATOR_H

// set the number of particles per experiment
#define N_PARTICLES 100

/**
 * random operation mode
 * false by default, the random generator will get the same seed
 * every time the experiment is run.
 * change to true to get different result every time
*/
#define RANDOM_MODE false

/**
 * function set_velocity_from_spherical()
 * @brief takes the Particle pointer and sets velocity fields according to specified vector
 * @param p Particle pointer to set the velocity vector of
 * @param radius absolute length of the vector [0, inf)
 * @param azimuth alpha angle in radians [0, 2* PI)
 * @param inclination polar angle in radians [0, PI)
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 1.0.2
 * @since 1.0.2
*/
void set_velocity_from_spherical(Particle * p, double radius, double azimuth, double inclination);

/**
 * function rand_float
 * @brief outputs random floating point number between min and max
 * @param min lowest number the function will output
 * @param max highest number the function will output
 * @return random number of type double
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 1.0.3
 * @since 1.0.3
*/
double rand_float(double min, double max);

/**
 * function get_speed
 * @brief outputs the absolute speed based on particle state vector
 * @param p particle with valid state vector
 * @return absolute speed of the particle
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 1.0.4
 * @since 1.0.4
*/
double get_speed(Particle * p);
/**
 * function sim1
 * @brief demonstrating difference in error propagating of RK4 vs Euler method
 * @return 0 if simulation concluded successfully, -1 if IO error occured
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 0.6
 * @since 0.6
 */
int sim1();

/**
 * function sim2
 * @brief demonstrating difference in effect, that magnetic field has on subatomic particles
 * @return 0 if simulation concluded successfully, -1 if IO error occured
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 0.6
 * @since 0.6
 */
int sim2();

/**
 * function sim3
 * @brief demonstrating the 3D motion of charged particles
 * @return 0 if simulation concluded successfully, -1 if IO error occured
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 0.7
 * @since 0.7
 */
int sim3();

/**
 * function sim4
 * @brief demonstrating a real particle motion (using real proton values at relativistic speeds)
 * @return 0 if simulation concluded successfully, -1 if IO error occured
 * @author Michael Roth <xrothm00@stud.fit.vutbr.cz>
 * @version 1.0.2
 * @since 0.8
 */
int sim4();

#endif // end of the header guard