From 3d56e66e1e8487f5197e881c615c80756a0a104c Mon Sep 17 00:00:00 2001 From: Timur Iskhodzhanov Date: Tue, 5 Jul 2022 23:50:46 -0700 Subject: [PATCH] Invert the recommended equation for steering angle so that it matches what RaceChrono expects --- can_db/ft86.md | 2 +- can_db/ft86_gen2.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/can_db/ft86.md b/can_db/ft86.md index f4c0aee..7a11bda 100644 --- a/can_db/ft86.md +++ b/can_db/ft86.md @@ -24,7 +24,7 @@ Channel name | CAN ID | Equation | Notes Accelerator position (%) | 320 | `A/2.55` | Brake position (%) | 209 | `min(C / 0.7, 100)` | The 0.7 divider seems to be a good value to get 100% at pressure slightly higher than those you're likely to use on the track for cars with no aero. You can use 0.8 or 0.9 if you see 100% too often. Brake pressure | 209 | `C * 128` | -Steering angle | 208 | `bytesToIntLe(raw, 0, 2) * 0.1` | Positive value = turning right. You can add a `-` if you prefer it the other way around. +Steering angle | 208 | `bytesToIntLe(raw, 0, 2) * -0.1` | Positive value = turning left. You can add a `-` if you prefer it the other way around. Speed | 209 | `bytesToIntLe(raw, 0, 2) * 0.015694` | May want to check the multiplier against an external GPS aevice Engine RPM | 320 | `bitsToUIntLe(raw, 16, 14)` | Coolant temperature | 864 | `D - 40` | diff --git a/can_db/ft86_gen2.md b/can_db/ft86_gen2.md index 066afdf..57dce7b 100644 --- a/can_db/ft86_gen2.md +++ b/can_db/ft86_gen2.md @@ -20,7 +20,7 @@ Channel name | CAN ID | Equation | Notes Accelerator position (%) | 64 | `E / 2.55` | Brake position (%) | 313 | `min(F / 0.7, 100)` | The 0.7 divider seems to be a good value to get 100% at pressure slightly higher than those you're likely to use on the track for cars with no aero. You can use 0.8 or 0.9 if you see 100% too often. Brake pressure | 313 | `F * 128` | Coefficient taken from 1st gen cars, seems to match fine? -Steering angle | 312 | `bytesToIntLe(raw, 2, 2) * 0.1` | Positive value = turning right. You can add a `-` if you prefer it the other way around. +Steering angle | 312 | `bytesToIntLe(raw, 2, 2) * -0.1` | Positive value = turning left. You can add a `-` if you prefer it the other way around. Speed | 313 | `bitsToUIntLe(raw, 16, 13) * 0.015694` | You may want to check the multiplier against an external GPS device, especially if running larger/smaller diameter tires Engine RPM | 64 | `bitsToUIntLe(raw, 16, 14)` | Coolant temperature | 837 | `E - 40` |