Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Clinometer setting

Pages: [1]
Author Topic: Clinometer setting
BigJosh
Member
Posts: 1
Post Clinometer setting
on: May 23, 2016 (GMT)

Are the “Degrees” setting changeable to “percent”?

I have searched in settings of app and in this forum, could not find answer.

Thanks

Josh

Capp777
Member
Posts: 2681
Post Re: Clinometer setting
on: May 23, 2016 (GMT)

Nope but…

If Torque supports TAN function…

%Grade = Tan(Slope Degrees)*100

For example…

100% Grade = Tan(45°)*100
57.7% Grade = Tan(30°)*100
10.5% Grade = Tan(6°)*100
5.24% Grade = Tan(3°)*100

If Torque does support it you could create a
custom pid with the appropriate equation:

Name: Percent Grade
Header: blank
Mode/Pid: blank
Equation:
EWMAF(0.05:Avg(10:Tan(abs([FF124C])*0.017453293)*100)) or
EWMAF(0.05:Avg(10:Tan(abs(Val{Tilt(z)})*0.017453293)*100))
Units: %Grade

Note my pitch degrees went negative as my
phone tilted upward from a calibrated position
hence abs().

If its not supported maybe Ian can add?
Please? Please? :-)

Edited.

Z axis worked better than Y for matching
pitch meter.

piemmm
Administrator
Posts: 6071
Post Re: Clinometer setting
on: June 21, 2016 (GMT)

Ok, I’ll look at adding sin,tan/etc to an update after the one that’s hopefully going to be released later today

piemmm
Administrator
Posts: 6071
Post Re: Clinometer setting
on: June 23, 2016 (GMT)

Added in the update just sent out. Functions can’t be nested at the moment (I’ll sort that out in a later release) so at the moment sin(cos(abs(tan(x)))) probably won’t work, though sin(x)+cos(y) and sin(val{name}) will work

Also recommend using the N0, N1, N2 variables now instead of the A, B, C stuff

Capp777
Member
Posts: 2681
Post Re: Clinometer setting
on: June 23, 2016 (GMT)

Have the variables R0, R1, etc changed to
N0, N1, etc?

Capp777
Member
Posts: 2681
Post Re: Clinometer setting
on: June 23, 2016 (GMT)

Tan(45 radians)=1.61???

not…

Tan(45 degrees)=1.00!!!

Torque is defaulting to radians.

degrees * 0.017453293 = radians so…

Equation:
EWMAF(0.05:Avg(10:Tan(abs([FF124C])*0.017453293)*100)) or
EWMAF(0.05:Avg(10:Tan(abs(Val{Tilt(z)})*0.017453293)*100))
from a calibrated vertical position

Edited.

piemmm
Administrator
Posts: 6071
Post Re: Clinometer setting
on: June 24, 2016 (GMT)

Hi!

Yep – the functions are basically as in the documents from: https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#cos(double)

so it will be radians

Edit: see below

piemmm
Administrator
Posts: 6071
Post Re: Clinometer setting
on: June 24, 2016 (GMT)

Thinking about it, it isn’t entirely helpful being in radians, so I’m likely to change this to degrees in the next update (which should hopefully save on equation ‘cruft’)

Whilst I’m there – if there are any others in that list(or not in the list) that you could see being useful, let me know :)

Capp777
Member
Posts: 2681
Post Re: Clinometer setting
on: June 24, 2016 (GMT)

SQRT could be used to calculate
acfm if the delta p is known.

No comment about the variable names
in the post above? R0 vs N0.

piemmm
Administrator
Posts: 6071
Post Re: Clinometer setting
on: June 24, 2016 (GMT)

Hi!

R0 is the ‘raw’ variable (includes part of the response before the A,B,C start). The ABC variables start from the actual data after headers, lengths, ID bytes (etc, etc) are sent depending on the protocol used

But as far as the Nx variables go:

N0 is the same as A
N1 is the same as B
(etc)
for the variable naming thing – it’s basically a replacement for the A,B,C stuff – this is mainly due to the way the parser works. The A,B,C variables will continue to work and I have no plan to stop them being used, though if you get strange results, try with N0, N1, (etc) variables instead

Capp777
Member
Posts: 2681
Post Re: Clinometer setting
on: November 25, 2017 (GMT)

Since you are adding J1939, adding a %Grade
gauge would be very useful for your heavy equipment
users. Just a suggestion :-) .

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.323 seconds.

  Follow me on twitter