x- Caratteristiche avanzate: EVAL Espressione matematica


Solo per utenti avanzati

L’espressione matematica Eval per dati telemetrici:
Dalla versione v1.03, puoi inserire un’espressione matematica da eseguire con il dato telemetrico prescelto per ottenere un risultato in unità di misura diverse o per effettuare alcuni calcoli con la telemetria. Questo topic dedicato al campo EVAL è una caratterisctica davvero avanzata, pertanto NON sei obbligato a considerarla per l’utilizzo del VDASH-EMU.

EVAL FIELD:

Evaluation Visibility: nasconde l’oggetto se il valore di telemetria è zero o se il risultato della formula è uguale a zero

Ecco un esempio fatto con il valore dell’ERS o del KERS per ottenere un valore in percentuale e non in Kj (guarda lo screenshot):

DATA / 4000

o

DATA / (400000 / 100)

Nota: il campo DATA viene sostituito automaticamente dal valore prescelto della telemtria (es: il dato telemetrico corrente, il valore di KERS o ERS value nello screenshot in esempio).

Un altro esempio che darà un risultato di zero e che non accetta valori negativi:
IF(DATA<0,0,DATA)

o

ABS(DATA)

 

 

Mathematical Operators
+ Additive operator
– Subtraction operator
* Multiplication operator
/ Division operator
% Remainder operator (Modulo)
^ Power operator

Boolean Operators*
== Equals
!= Not equals
<> Not equals
< Less than
<= Less than o equal to
> Greater than
>= Greater than o equal to
&& Boolean and
|| Boolean or

Bitwise Operators:
& AND
| OR

*Gli operatori Booleani saranno sempre espressi in valori di 1 o 0 (zero).

Funzioni supportate
ABS(expression) Returns the absolute (non-negative) value of the expression
ACOS(expression) Returns the angle of acos (in degrees)
ASIN(expression) Returns the angle of asin (in degrees)
ATAN(expression) Returns the angle of atan (in degrees)
CEIL(expression) Rounds the value up to the nearest integer
COS(expression) Returns the trigonometric cosine of an angle (in degrees)
COSH(expression) Returns the hyperbolic cosine of a value
DEG(expression) Converts an angle measured in radians to an approximately equivalent angle measured in degrees
FLOOR(expression) Rounds the value down to the nearest integer
IF(condition,value_if_true,value_if_false) Returns one value if the condition evaluates to true or the other if it evaluates to false
LOG(expression) Returns the natural logarithm (base e) of an expression
LOG10(expression) Returns the common logarithm (base 10) of an expression
MAX(e1,e2, …) Returns the biggest of the given expressions
MIN(e1,e2, …) Returns the smallest of the given expressions
NOT(expression) Boolean negation, 1 (means true) if the expression is not zero
RAD(expression) Converts an angle measured in degrees to an approximately equivalent angle measured in radians
RANDOM() Produces a random number between 0 and 1
ROUND(expression,precision) Rounds a value to a certain number of digits, uses the current rounding mode
SIN(expression) Returns the trigonometric sine of an angle (in degrees)
SINH(expression) Returns the hyperbolic sine of a value
SQRT(expression) Returns the square root of an expression
TAN(expression) Returns the trigonometric tangens of an angle (in degrees)
TANH(expression) Returns the hyperbolic tangens of a value
toDegrees(expression) Return converted value
toRadians(expression) Return converted value

v1.1-32f additions:
buttonState(n) result 0 or 1 – (n is the index of the button from 1 to 32)
ledState(n) result 0 or 1 (n is the index of the LED; Marshal Led from 1 to 6; External Led from 7 to 13)
isChanged() result 1 when the DATA (telemetry) has been changed

*I nomei delle funzioni sono case insensitive (nessuna differenza tra minuscole e maiuscole).

Costanti supportate
E
Euler
PHI
PI

Dalla versione 1.07 di Android / 0.3.5 di Windows, alcune variabili telemetriche sono esposte in maniera tale da essere utilizzate nel campo EVAL, come dalla seguente lista.

VARIABILI DEI DATI:

RAWGEAR
SPEEDKMH
SPEEDMPH
NUMBEROFLAPS
TOTALLAPS
COMPLETEDLAPS
POSITION
ENGINERPM
MAXENGINERPM
CARSPEED
ENGINEOILTEMP
ENGINEWATERTEMP
ENGINEOILPRESSURE
FUELPRESSURE
VOLTAGE
FUELLITERS
FUELCAPACITYLITERS
BRAKEBIAIS
BRAKETEMPFL
BRAKETEMPFR
BRAKETEMPRL
BRAKETEMPRR
TIREPRESSUREFL
TIREPRESSUREFR
TIREPRESSURERL
TIREPRESSURERR
LAPTIMECURRENT
LAPTIMEBEST
LAPTIMELAST
TRACKSIZE
LAPDIST
KERSLEVEL
KERSMAXLEVEL
DRS
SECTOR
LASTSECTOR1
LASTSECTOR2
TIMEELAPSED
TURBOBOOSTPRESSURE
FUELMIX
THROTTLESHAPE
TIRESCOMPOUND
THROTTLEPEDAL
BRAKEPEDAL
CLUTCHPEDAL
FRONTBRAKEBIAS
REARBRAKEBIAS
FRONTANTIROLLBAR
REARANTIROLLBAR
LEFTWEIGHTJACKER
RIGHTWEIGHTJACKER
DIFFENTRY
DIFFMIDDLE
DIFFEXIT
ENGINEBRAKING
ENGINEPOWER
PITSTOPFRONTFLAPADJUSTMENT
TIRETEMPERATUREFLIN
TIRETEMPERATUREFLMID
TIRETEMPERATUREFLOUT
TIRETEMPERATUREFRIN
TIRETEMPERATUREFRMID
TIRETEMPERATUREFROUT
TIRETEMPERATURERLIN
TIRETEMPERATURERLMID
TIRETEMPERATURERLOUT
TIRETEMPERATURERRIN
TIRETEMPERATURERRMID
TIRETEMPERATURERROUT
TIRETEMPERATUREFL
TIRETEMPERATUREFR
TIRETEMPERATURERL
TIRETEMPERATURERR
LOCALACCELERATIONX
LOCALACCELERATIONY
LOCALACCELERATIONZ
GFORCE
TIRELOADFL
TIRELOADFR
TIRELOADRL
TIRELOADRR
TIREWEARFL
TIREWEARFR
TIREWEARRL
TIREWEARRR
TOTALCARS
RAINING
AMBIENTTEMP
TRACKTEMP
WIND
WINDDIRECTION
STARTLIGHTS
STEER
NUMPENALTIES
SESSIONTYPE
SESSIONSTATE
SESSIONFLAGS

Aggiunte della v1.1-25:
DELTATIMELAST
DELTATIMEBESTRECORDS
CURRSECTOR1
CURRSECTOR2
TIMEBEHINDLEADER
TIMEBEHINDNEXT

VARIABILI DEI FLAG:

GREENFLAGWARNING
YELLOWFLAGWARNING
BLUEFLAGWARNING
REDFLAGWARNING
REDZONEWARNING
ENGINEWARNING
FUELPRESSUREWARNING
OILWARNING
WATERWARNING
DETACHEDPARTS
ISLASTLAP
ISINPITS
HEADLIGHTS
ENGINESTALL
TCLEVEL
ABSLEVEL
PITLIMITER
DRSLEGALSTATUS
IGNITIONSTARTER
SAFETYCARFLAG
ONPITROAD
BLACKFLAG
ISENGLISHUNIT

————–
v1.1.-31g Addition:
PAGEBLOCKED

v1.1-32 Addition:
CURRENTLAP

SUSPENSIONDEFLECTIONFL    << suspension position or max travel
SUSPENSIONDEFLECTIONFR
SUSPENSIONDEFLECTIONRL
SUSPENSIONDEFLECTIONRR
SUSPENSIONVELOCITYFL
SUSPENSIONVELOCITYFR
SUSPENSIONVELOCITYRL
SUSPENSIONVELOCITYRR
PITCHRAW
YAWRAW
ROLLRAW
LAPSREMAININGINTANK    << laps remaining based on average of fuel per lap consumption
FUELPERLAP                     << fuel per lap consumption
PUSHTOPASS                    << 1=Allowed; 2=Activated
PTPAMOUNTLEFT               << Push To Pass left
DELTAVERSUSCARBEHIND     << Delta time versus Car behind you
VELOCITYX
VELOCITYY
VELOCITYZ
ANGULARVELOCITYX
ANGULARVELOCITYY
ANGULARVELOCITYZ