Configuration
JetECU-Core uses a flat JSON file for all tuning parameters. No constants are hard-coded in the control logic — everything is data-driven and can be changed without recompilation.
JSON Format
{
"rpm_idle": 45000,
"rpm_max": 120000,
"rpm_start_target": 60000,
"egt_max": 1100,
"egt_start_min": 150,
"fuel_start_pct": 8.0,
"fuel_max_pct": 100.0,
"fuel_ramp_rate": 5.0,
"prestart_timeout_ms": 5000,
"spinup_timeout_ms": 10000,
"ignition_timeout_ms": 8000,
"rpm_ramp_rate": 400,
"pid_kp": 0.5,
"pid_ki": 0.1,
"pid_kd": 0.01
}
The default configuration is stored in config/default.json.
Parameters
Parameter |
Unit |
Description |
|---|---|---|
|
RPM |
Idle shaft speed |
|
RPM |
Maximum allowable RPM (overspeed threshold) |
|
RPM |
Target RPM for the startup sequence |
|
deg C |
Absolute exhaust gas temperature limit |
|
deg C |
Minimum EGT confirming successful ignition |
|
% |
Fuel valve position during ignition phase |
|
% |
Maximum fuel output |
|
%/s |
Maximum rate of fuel change |
|
ms |
Prestart phase timeout |
|
ms |
Spinup phase timeout |
|
ms |
Ignition phase timeout |
|
RPM/s |
RPM acceleration rate during ramp |
|
— |
PID proportional gain |
|
— |
PID integral gain |
|
— |
PID derivative gain |
Loading
On the POSIX simulator, configuration is loaded from a file path:
ecu_config_t cfg;
ecu_config_load_file("config/default.json", &cfg);
On embedded targets, the JSON string can come from NVRAM or a host command:
ecu_config_load_str(json_buf, &cfg);
Both functions parse the JSON and populate an ecu_config_t struct.
Unknown keys are silently ignored; missing keys retain their defaults
(from ecu_config_defaults()).