channel editor

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

channel editor

Postby MS2tester » Sun Sep 10, 2017 5:31 am

could the channel editor get some more attention
it,s overly sensitive to white spaces and refuses some very simple calculations
Attachments
channel editor small.PNG
channel editor small.PNG (237.1 KiB) Viewed 371 times
MS2tester
Master MS/Extra'er
 
Posts: 437
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands

Re: channel editor

Postby LT401Vette » Mon Sep 11, 2017 7:56 am

In what way is it overly sensitive to white spaces?

TS does not know how to handle division by 0 as I do not know how to.
When you are attempting to divide by 0, what would be your desired behavior?
- Allow an over-ride? (It will then churn out errors to the AppDebug at runtime)
- Perhaps suggest a fix to protect against the divide by 0?

In this case, what you would perhaps want to put in that expression:

vss2 > 0 ? vss1 / vss2 : 1

That will prevent your expression from creating errors.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 10389
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: channel editor

Postby MS2tester » Mon Sep 11, 2017 11:18 am

this is sort of what i mean exact the same calculations but one gives an error the other does not
not clear why
maybe this is an excel sheet background some how that gives this error when there is no data
Attachments
prop_slip_calculation_small_d.PNG
prop_slip_calculation_small_d.PNG (195.5 KiB) Viewed 337 times
channel editor small.PNG
channel editor small.PNG (237.1 KiB) Viewed 337 times
divide by zero_small.PNG
divide by zero_small.PNG (141.27 KiB) Viewed 337 times
MS2tester
Master MS/Extra'er
 
Posts: 437
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands

Re: channel editor

Postby LT401Vette » Mon Sep 11, 2017 1:17 pm

Hmmm, now what is different where it passed the validation?

I tried:
(vss1 / vss2)
( vss1 / vss2 )
(vss1/vss2)
( vss1 / vss2 )
etc.. I haven't been able to get a valid expression based on spaces. And they really should not matter.

The only thing that should make that pass is if some how vss2 is not 0.
Which if you were online it could have a left over value of non-zero.

I am curious..
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 10389
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: channel editor

Postby MS2tester » Wed Sep 13, 2017 11:15 am

i guess when trying to make it work i somehow turned off my ecu while trying different ways off making the calculation work
being offline is definitely a bonus when making a custom channel
i don,t know if this is a vss specific issue or if there are more inputs affected
Attachments
vss1_test_small.PNG
vss1_test_small.PNG (232.09 KiB) Viewed 303 times
vss1_test2_small.PNG
vss1_test2_small.PNG (223.17 KiB) Viewed 303 times
MS2tester
Master MS/Extra'er
 
Posts: 437
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands

Re: channel editor

Postby jsmcortina » Wed Sep 13, 2017 11:32 am

I'm guessing that "Not a number" divided by "Not a number" is 1 ?

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: channel editor

Postby Matt Cramer » Wed Sep 13, 2017 1:41 pm

jsmcortina wrote:I'm guessing that "Not a number" divided by "Not a number" is 1 ?

James


It depends on how big your number that is not a number is. The math parser probably doesn't understand calculus limit functions. :P
Matt Cramer
Super MS/Extra'er
 
Posts: 13646
Joined: Thu Apr 16, 2009 8:08 pm

Re: channel editor

Postby LT401Vette » Wed Sep 13, 2017 1:47 pm

jsmcortina wrote:I'm guessing that "Not a number" divided by "Not a number" is 1 ?

James

I think that is sort of it... It the variables are non initialized and are NaN, then NaN/NaN=NaN
That doesn't cause an exception as divide by 0 does.


MS2tester wrote:i guess when trying to make it work i somehow turned off my ecu while trying different ways off making the calculation work
being offline is definitely a bonus when making a custom channel
i don,t know if this is a vss specific issue or if there are more inputs affected


I don't think you are quite getting it.. You want to listen to the errors, not find ways around them. If you make expressions with errors, then at run time TS will be churning errors and filling the AppDebug with error entries.

It seems I do need to tighten up these validations.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 10389
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: channel editor

Postby MS2tester » Wed Sep 13, 2017 11:25 pm

obviously correct calculus is important
i am just a little worried that the validation will be over protective and have a "why do you want to do that!" attitude
like dividing vss1 by vss2 making no sense
but the math is correct!
so if i want to multiply the fuel pressure by rpm i am able to do so, even if there is no possible use for it
MS2tester
Master MS/Extra'er
 
Posts: 437
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands

Re: channel editor

Postby jsmcortina » Thu Sep 14, 2017 5:36 am

Phil,
how about implementing automatic divide by zero protection? Many customers don't understand why it is a problem and will continue to trip over it.

A failsafe could be x/0 = 0

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: channel editor

Postby LT401Vette » Thu Sep 14, 2017 5:47 am

jsmcortina wrote:Phil,
how about implementing automatic divide by zero protection? Many customers don't understand why it is a problem and will continue to trip over it.

A failsafe could be x/0 = 0

James


I'll think think about that. I am somewhat hesitant to make the TS math parse do incorrect math, perhaps make it x/0=NaN.

I could also perhaps make it automatically add/suggest the divide by 0 protection upfront.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 10389
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC

Re: channel editor

Postby MS2tester » Thu Sep 14, 2017 10:29 pm

correct me if i am wrong but within megasquirt 0 will be a true value
fuel pressure will be 0 with the pump not running
wheel speed sensors will be 0 with the car not moving
pulse width will be 0 with the engine not running :?
MS2tester
Master MS/Extra'er
 
Posts: 437
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands

Re: channel editor

Postby LT401Vette » Fri Sep 15, 2017 7:09 am

MS2tester wrote:correct me if i am wrong but within megasquirt 0 will be a true value
fuel pressure will be 0 with the pump not running
wheel speed sensors will be 0 with the car not moving
pulse width will be 0 with the engine not running :?


Yes, now you are getting it..
You don't want those in the divisor unless it is checked and handled, your expression should have protection up front like outlined above.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 10389
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC


Return to Tuner Studio

Who is online

Users browsing this forum: No registered users and 1 guest

cron