42#define TELEMETRY_SIM_DEFAULT() \
43 (telemetry_sim_cfg_t) { \
45 .cell_nominal_v = 4.05f, \
46 .internal_ohms = 0.018f, \
48 .no_load_amps = 1.4f, \
49 .stall_amps = 78.0f, \
50 .pack_mah = 5000.0f, \
The bench readings, in the units a person reads: V, A, W, rpm (revolutions per minute),...
#define s
Short name for esc_stick_s inside the five stick-class files.
Definition esc_stick_panel_int.h:295
The bench readings in the units a person reads: V, A, W and rpm, with their peaks.
Definition bench_state.h:54
The configuration of the telemetry model: pack, motor and propeller.
Definition telemetry_sim.h:31
float internal_ohms
Definition telemetry_sim.h:34
float no_load_amps
Definition telemetry_sim.h:36
float pack_mah
Definition telemetry_sim.h:38
float stall_amps
Definition telemetry_sim.h:37
float rpm_tau_s
Definition telemetry_sim.h:39
float kv
Definition telemetry_sim.h:35
The state of the telemetry model.
Definition telemetry_sim.h:57
float drawn_mah
Definition telemetry_sim.h:60
float temp_esc
Definition telemetry_sim.h:62
float temp_motor
Definition telemetry_sim.h:63
telemetry_sim_cfg_t cfg
Definition telemetry_sim.h:58
float drawn_wh
Definition telemetry_sim.h:61
float rpm
Definition telemetry_sim.h:59
void telemetry_sim_init(telemetry_sim_t *s, const telemetry_sim_cfg_t *cfg)
Sets up the model from its configuration.
Definition telemetry_sim.c:13
void telemetry_sim_step(telemetry_sim_t *s, float throttle_pct, float dt_s, bench_state_t *out)
Advance by dt_s at throttle_pct and fill out.
Definition telemetry_sim.c:24