RaceChronoDiyBleDevice/can_db/mazda_mx5_nd.md

29 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

# Mazda MX-5 Miata (ND generation)
2021-07-04 23:40:47 -07:00
Here is information on some of the CAN IDs that you're most likely to use with
RaceChrono and equations to get the right scale, etc.
2021-07-04 23:40:47 -07:00
These CAN IDs were tested on 2019 Mazda MX-5 Miata RF, but should apply to other
model years of the ND generation as well. If you find any mistakes, or model
2021-07-04 23:40:47 -07:00
year specific CAN IDs, please send a pull request!
2021-07-04 23:40:47 -07:00
## Recommended CAN IDs:
2021-07-04 23:40:47 -07:00
Here are CAN IDs and RaceChrono equations for data channels that should be
enough for most people:
2021-07-04 23:40:47 -07:00
Channel name | CAN ID | Equation | Notes
------------ | --- | -------- | -----
Accelerator position (%) | 514 | `E/2.5` |
Brake position (%) | 120 | `min(max(bitsToUInt(raw, 28, 12) - 156, 0) / 2.56, 100)` | Might need more tweaking
Steering angle | 134 | `(16000 - bytesToUInt(raw, 0, 2)) * 0.1` | Positive value = turning right. You can add a `-` if you prefer it the other way around.
Speed | 514 | `bytesToInt(raw, 2, 2) / 360.0` |
Engine RPM | 514 | `bytesToUInt(raw, 0, 2) / 4` | If someone records >8192 rpms to confirm, let me know :)
2021-07-04 23:40:47 -07:00
### Would be nice to find CAN IDs for ...
Essentials: fuel level, coolant temperature, clutch pedal, current gear.
Advanced: tire pressures, tire temperatures, lat/long acceleration (if
available), yaw rate, individual wheel speeds.