Skip to content
27 changes: 23 additions & 4 deletions opendbc/car/nissan/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,44 @@ class NissanPlatformConfig(PlatformConfig):


class CAR(Platforms):
# Wheelbase validated based off owner's manual,
# Mass based off Nissan spec spreadsheet, averaging MY 2017 4WD curb weight ranges
# https://uk.nissannews.com/en-GB/channels/x-trail?selectedTabId=x-trail-specsAndPricing -> 2017/08/01 The new Nissan X-Trail - Technical Specifications
NISSAN_XTRAIL = NissanPlatformConfig(
[NissanCarDocs("Nissan X-Trail 2017")],
NissanCarSpecs(mass=1610, wheelbase=2.705)
NissanCarSpecs(mass=1675, wheelbase=2.705)
)

# Wheelbase validated based off owner's manual
# Mass based off Nissan press kit for MY 2018
# centerToFrontRatio calculated from curb front and rear axle weights
# https://usa.nissannews.com/en-US/releases/us-2018-nissan-leaf-press-kit -> 2018 Nissan LEAF Press Kit Specs.pdf
NISSAN_LEAF = NissanPlatformConfig(
[NissanCarDocs("Nissan Leaf 2018-23", video="https://youtu.be/vaMbtAh_0cY")],
NissanCarSpecs(mass=1610, wheelbase=2.705),
NissanCarSpecs(mass=1591, wheelbase=2.700, steerRatio=17.68, centerToFrontRatio=0.58),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the 1591kg mass is only for the base model with the 40kWh pack, which didn't include ProPilot until 2025. I measured my 60kWh car at a Transport Canada scale, and it weighs 1780kg while empty.

{Bus.pt: 'nissan_leaf_2018_generated'},
)

# Leaf with ADAS ECU found behind instrument cluster instead of glovebox
# Currently the only known difference between them is the inverted seatbelt signal.
NISSAN_LEAF_IC = NISSAN_LEAF.override(car_docs=[])

# Wheelbase validated based off owner's manual
# Mass based off Nissan press kit, averaging MY 2018 SL FWD and AWD curb weights
# centerToFrontRatio calculated from averaged MY 2018 SL FWD and AWD curb front and rear axle weights
# https://usa.nissannews.com/en-US/releases/us-2018-nissan-rogue-press-kit
NISSAN_ROGUE = NissanPlatformConfig(
[NissanCarDocs("Nissan Rogue 2018-20")],
NissanCarSpecs(mass=1610, wheelbase=2.705)
NissanCarSpecs(mass=1632, wheelbase=2.706, centerToFrontRatio=0.57)
)

# Wheelbase validated based off owner's manual
# Mass based off Nissan news release for MY 2019
# centerToFrontRatio calculated from curb front and rear axle weights
# https://usa.nissannews.com/en-US/releases/2019-nissan-altima-specifications
NISSAN_ALTIMA = NissanPlatformConfig(
[NissanCarDocs("Nissan Altima 2019-20", car_parts=CarParts.common([CarHarness.nissan_b]))],
NissanCarSpecs(mass=1492, wheelbase=2.824)
NissanCarSpecs(mass=1558, wheelbase=2.825, centerToFrontRatio=0.61)
)


Expand Down
Loading