-
Couldn't load subscription status.
- Fork 14
Description
I've already asked a related question in a different issue #16, but our use case is slightly different than I explained beforehand therefore this new issue.
In our case, we aim to combine two signals from the same CAN frame. The objective is to obtain a signed value, for example, longitudinal acceleration. We have one signal representing the acceleration magnitude and another signal representing its sign.
Here are the signals as defined in the DBC:
SG_ sigLongAcceleration : 35|12@0+ (0.01,0) [0|40.95] "m/s²"
SG_ sigLongAccelerationSign : 36|1@0+ (1,0) [0|1] ""
The
sigLongAccelerationSignwill be mapped in the DBC itself to-1for negative values and1for positive values.
Feature Request / Question:
Would it be possible to extend the mapping syntax to allow combining such signals from the same frame?
Proposed syntax:
Vehicle.Acceleration.Longitudinal:
type: sensor
datatype: float
dbc:
combinedSignals: sigLongAcceleration, sigLongAccelerationSign
interval_ms: 100
transform:
math: (x * y)This would enable us to perform basic arithmetic using multiple signals (e.g., applying the sign to the magnitude).
Is this something that could be supported in future or considered for future development?
Bests Philipp