/** * ENGINE POLICY: two modelling rules the platform car follows, checked from the package alone (plus, when a simulation * ran, the instrument's own ungoverned top speed). * * 1. THE PLATFORM CAR RUNS UNGOVERNED. A market or gentlemen's-agreement speed governor (a domestic-market 180 km/h cap, * a 250 km/h agreement) is a rule about the car, not the car's physics. `physics.engine.speedLimiterKph` is read by * the engine's INSTRUMENT only (`measureVehicle({ speedLimitKph })`); the live land solver never applies it, so * authoring one makes the instrument, `targets.topSpeedKph`, the description and the gates say "180" about a car that * really drives at its drag-limited speed. A limiter far below the ungoverned top speed is therefore a WARN. * 2. THE TORQUE CURVE TARGETS THE DECLARED CRANK FIGURES. The maker's peak torque and power, at the crank, are the * target. Real-world losses live in `drivetrainEfficiency` and aero drag, and 0-100 / top speed are met with grip, * gearing and launch, never with an engine inflated to a dyno figure or a speed number. * * Both are WARNINGS: the declared figures are read from prose (manufacturer citation titles), not a structured field, so * a hard error could refuse a legitimate car on a misread; `helix vehicle validate` and `simulate` print them with the * fix. Everything here is generic: it names no car. */ import type { VehicleIssue } from './validate'; /** A limiter below this fraction of the ungoverned top speed is a market governor, not the car's physics. */ export declare const GOVERNOR_FRACTION = 0.9; /** The authored curve (and the fields that state it) may exceed the declared crank figure by this much. */ export declare const DECLARED_FIGURE_TOLERANCE = 0.05; /** Peak torque figures quoted in `text`, as N·m. Accepts N·m / N.m / Nm, kgm and lb-ft. */ export declare function torquesNm(text: string): number[]; /** Peak power figures quoted in `text`, as kW. Accepts kW, PS / CV, hp / bhp. */ export declare function powersKw(text: string): number[]; export interface DeclaredFigures { torqueNm: number | null; powerKw: number | null; /** Where each figure came from: a manufacturer citation id, or the package's own peak field. */ torqueFrom: string | null; powerFrom: string | null; } /** * The maker's declared crank figures. A `manufacturer` citation that quotes them wins; with none, the package's own * `physics.engine.peakTorqueNm` / `peakPowerKw` stand in. When several manufacturer citations quote different figures * (variants), the largest is used: the check only ever flags a curve ABOVE every declared figure. */ export declare function declaredCrankFigures(pkg: unknown): DeclaredFigures; /** One authored crank curve: `physics.engine.torqueCurve` and, separately, the one the land solver runs. */ export interface AuthoredCurve { path: string; points: Array<[number, number]>; } /** * Every authored crank curve. The package states one (`physics.engine.torqueCurve`) and the land solver runs another * (`simulation.land.driveline.engine.torqueCurve.points`); editing only the first changes nothing in the simulation, so * both are held to the declared figures. */ export declare function authoredCurves(pkg: unknown): AuthoredCurve[]; export interface EnginePolicyOptions { /** The instrument's ungoverned top speed, km/h, used when the package declares no `targets.ungovernedTopSpeedKph`. */ simulatedUngovernedKph?: number | null; } /** The speed-governor rule. */ export declare function speedGovernorIssues(pkg: unknown, opts?: EnginePolicyOptions): VehicleIssue[]; /** The torque rule: no authored curve may exceed the declared crank figures by more than ~5 %. */ export declare function declaredTorqueIssues(pkg: unknown): VehicleIssue[]; /** * AWD authoring: the land solver reads the split from `simulation.land.driveline.centre`, but each wheel's `powered` flag * comes from `physics.driveBiasFront` (front wheels powered iff it is above 0, rear wheels iff it is below 1). An AWD car * whose bias is exactly 0 or 1 therefore has an unpowered axle whatever its centre diff says (measured: the front axle * got 0 % of the drive and the car lost a third of its top speed). Inside (0, 1) the bias is the nominal front share, so * it should agree with `centre.torqueSplit`. */ export declare function awdBiasIssues(pkg: unknown): VehicleIssue[]; /** Every engine-policy finding for a package. */ export declare function enginePolicyIssues(pkg: unknown, opts?: EnginePolicyOptions): VehicleIssue[];