57 #include "libgravix2/libgravix2_export.h"
321 GRVX_EXPORT
double grvx_lat(
double z);
331 GRVX_EXPORT
double grvx_lon(
double x,
double y);
345 grvx_vlat(
double vx,
double vy,
double vz,
double lat,
double lon);
357 GRVX_EXPORT
double grvx_vlon(
double vx,
double vy,
double vz,
double lon);
417 double angular_error,
GRVX_EXPORT double grvx_v_scrcl(double r)
Velocity of a missile on a small circle for isolated planets.
Definition: pot.c:107
struct GrvxPlanets * GrvxPlanetsHandle
Handle to a set of planets forming a closed universe.
Definition: api.h:79
GRVX_EXPORT double grvx_lat(double z)
Computes the latitudinal position, , from Cartesian coordinates.
Definition: helpers.c:8
GRVX_EXPORT const char * grvx_version(void)
Returns the version of the library.
Definition: version.c:4
GRVX_EXPORT double grvx_vlon(double vx, double vy, double vz, double lon)
Computes the (scaled) longitudinal speed, , from Cartesian coordinates.
Definition: helpers.c:31
GRVX_EXPORT void grvx_delete_missiles(GrvxTrajectoryBatch batch)
Deletes a batch of missiles and frees the allocated memory.
Definition: missile.c:17
GRVX_EXPORT GrvxTrajectoryBatch grvx_new_missiles(uint32_t n)
Creates a new batch of uninitialized missiles.
GRVX_EXPORT int32_t grvx_init_missile(struct GrvxTrajectory *trj, double lat, double lon, double v, double dlat, double dlon)
Initializes the position and velocity of a missile on the sphere.
Definition: missile.c:28
GRVX_EXPORT double grvx_lon(double x, double y)
Computes the longitudinal position, , from Cartesian coordinates.
Definition: helpers.c:13
GRVX_EXPORT GrvxPlanetsHandle grvx_new_planets(uint32_t n)
Creates a new planets handle.
GRVX_EXPORT void grvx_perturb_measurement(GrvxPlanetsHandle planets_handle, uint32_t planet_id, double angular_error, double *lat, double *lon)
Perturbs measurement by assuming finite angular resolution.
Definition: missile.c:242
GRVX_EXPORT struct GrvxTrajectory * grvx_get_trajectory(GrvxTrajectoryBatch batch, uint32_t i)
Extracts a missile by ID from the given missile batch.
struct GrvxTrajectory * GrvxTrajectoryBatch
Handle to a batch of trajectories.
Definition: api.h:175
GRVX_EXPORT void grvx_delete_planets(GrvxPlanetsHandle handle)
Deletes all planets of the associated handle and frees the allocated memory.
Definition: planet.c:17
GRVX_EXPORT uint32_t grvx_count_planets(GrvxPlanetsHandle handle)
Counts the planets.
Definition: planet.c:23
GRVX_EXPORT int32_t grvx_set_planet(GrvxPlanetsHandle handle, uint32_t i, double lat, double lon)
Initializes or overwrites the spatial position of a planet.
GRVX_EXPORT uint32_t grvx_pop_planet(GrvxPlanetsHandle handle)
Removes the last planet from the universe.
Definition: planet.c:64
GRVX_EXPORT int32_t grvx_get_planet(GrvxPlanetsHandle handle, uint32_t i, double *lat, double *lon)
Retrieves the spatial position of a planet.
GRVX_EXPORT struct GrvxConfig * grvx_get_config(void)
Returns static configuration.
Definition: config.c:7
GRVX_EXPORT double grvx_v_esc(void)
Escape velocity for isolated planets.
Definition: pot.c:96
GRVX_EXPORT uint32_t grvx_propagate_missile(struct GrvxTrajectory *trj, GrvxPlanetsHandle planets, double h, int32_t *premature)
Propagates a missile in the gravitational force field of planets.
GRVX_EXPORT double grvx_orb_period(double v0, double h)
Orbital period for isolated planets.
Definition: missile.c:196
GRVX_EXPORT double grvx_vlat(double vx, double vy, double vz, double lat, double lon)
Computes the latitudinal speed, , from Cartesian coordinates.
Definition: helpers.c:18
GRVX_EXPORT void grvx_free_config(struct GrvxConfig *cfg)
Frees GrvxConfig instance.
Definition: config.c:28
GRVX_EXPORT int32_t grvx_launch_missile(struct GrvxTrajectory *trj, GrvxPlanetsHandle planets_handle, uint32_t planet_id, double v_abs, double psi)
Initializes a missile on the rim of a given planet.
Static configurations.
Definition: api.h:444
int32_t int_steps
Number of integration steps between trajectory points.
Definition: api.h:497
double min_dist
Minimal allowed distance between missiles and planets.
Definition: api.h:507
int32_t n_pot
Approximation order of potential.
Definition: api.h:476
const char * pot_type
Type of potential.
Definition: api.h:454
int32_t trajectory_size
Size of trajectory.
Definition: api.h:486
int32_t n_stages
Number of stages of the composition method.
Definition: api.h:522
const char * composition_scheme
Composition method of integrator.
Definition: api.h:515
Set of planets.
Definition: planet.h:20
Sequence of spatial and velocity data of a missile.
Definition: api.h:88
double x[100][3]
Definition: api.h:89
double v[100][3]
Definition: api.h:90