Author Topic: Average car contains 100 million lines of code, The State of Autosoftware  (Read 7058 times)

0 Members and 1 Guest are viewing this topic.

Offline mendip_discovery

  • Frequent Contributor
  • **
  • Posts: 844
  • Country: gb
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #25 on: January 25, 2023, 07:50:55 pm »
3d fuel maps, logging and interpretation of various sensors. Safety devices. Then you have the reversing camera, self parking etc. This is before you get to the infotainment side of stuff. It's not unsurprising how much code in the car. Things are worse as more cpu power and memory is available so code doesnt need to be as efficient as it used to be.

Oh there is of course the amount of coding that goes into making the car really good for the environment..especially during testing.

I'm driving a 2003 Mercedes this week and that has a ton of buttons, it took ages just to find out how to open the fuel cap. I think the buttons moving to a touch screen is just the next step of the evolution of cars, more crap. Worse is some things are going to be subscription based, want heated seats that will be 9.99 a month.
Motorcyclist, Nerd, and I work in a Calibration Lab :-)
--
So everyone is clear, Calibration = Taking Measurement against a known source, Verification = Checking Calibration against Specification, Adjustment = Adjusting the unit to be within specifications.
 
The following users thanked this post: bigfoot22

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 6843
  • Country: va
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #26 on: January 25, 2023, 09:35:06 pm »
Quote
My finger was moving up and down side to side according to the road surface.

Yes, that's one issue (the other is no tactile feedback). I wonder if a touchscreen could be programmed to only accept touch on active buttons (that is, those available to be touched). Then you could rest a couple of fingers on the inactive part of the screen to steady your hand, which would go a long way to resolving the wandering finger issue.

I have no idea how modern car touchscreens work so this is based on smartphone screens. However, I always have problems with my center-console satnav which often thinks I want to scroll the map rather then depress a virtual button.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6987
  • Country: ca
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #27 on: January 25, 2023, 09:41:51 pm »
Tesla's infotainment systems wearing out their FLASH memory, an embarrassing fiasco that required NHTSA pressure for a full recall. The S/W wearing out the H/W.

Oh that makes me feel so much better about driving a gas guzzler. Thank you.

It's an issue of lifetime, the amount of data logged in the EV infotainment unit (FLASH writes) is huge, more so with self-driving. Tesla thought  6 years is OK despite the purported extra life an EV is supposed to offer.
You just know it's going to be an expensive repair, and surely "oh they are obsolete now, you should buy a new car" line coming out of the dealership service rep.
 
The following users thanked this post: bigfoot22

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 689
  • Country: gb
    • Electronic controls
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #28 on: January 25, 2023, 09:47:09 pm »
The problem with code is once it is written how long do you spend testing it and rewriting the crap parts ?
Management think once its written then its done.
The next stage is thorough testing which can take as long as writing it in the first place if done properly.

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #29 on: January 25, 2023, 09:58:37 pm »
The problem is feature creep + software developers deciding how products should be developed.
To paraphase a famous quote, software is much too serious a matter to be left to software developers.
 :popcorn:
 
The following users thanked this post: tooki, MrMobodies

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 6843
  • Country: va
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #30 on: January 25, 2023, 10:14:02 pm »
Reminds me of Toyota and the unintended vehicle acceleration.

https://www.edn.com/toyotas-killer-firmware-bad-design-and-its-consequences/

Holy shit!  :o

Quote
Vehicle tests confirmed that one particular dead task would result in loss of throttle control, and that the driver might have to fully remove their foot from the brake during an unintended acceleration event before being able to end the unwanted acceleration.
 
The following users thanked this post: tom66, tooki, MrMobodies

Online tom66

  • Super Contributor
  • ***
  • Posts: 6706
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #31 on: January 25, 2023, 11:06:07 pm »
Tesla's infotainment systems wearing out their FLASH memory, an embarrassing fiasco that required NHTSA pressure for a full recall. The S/W wearing out the H/W.

Oh that makes me feel so much better about driving a gas guzzler. Thank you.

Tesla's incompetent engineering wrt to flash has nothing to do with them making electric vehicles, nor any other EV manufacturer.
 
The following users thanked this post: NiHaoMike, tooki

Online tom66

  • Super Contributor
  • ***
  • Posts: 6706
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #32 on: January 25, 2023, 11:12:49 pm »
Holy shit!  :o

Quote
Vehicle tests confirmed that one particular dead task would result in loss of throttle control, and that the driver might have to fully remove their foot from the brake during an unintended acceleration event before being able to end the unwanted acceleration.

From what I remember a bug that affected some Toyota ECUs related to the cruise control handling.  The cruise control loop would read some global state variable for engine speed and gearbox selection to determine vehicle speed.  The problem was, if you crashed the sensor loop that measured engine rpm, it was possible the cruise control loop could over-run on its acceleration.  It's pretty easy to see if the cruise control is at 70 mph, but vehicle is at 69.5 mph, it might add 1% to the vehicle throttle.  If the sensor doesn't update the data, then it will continue to add to the vehicle throttle until it hits its authority limit. 

The authority limit will vary, on simpler control systems it will be just be fixed, but on more advanced systems it will use the gearbox angle sensor to provide better response, so if going uphill it will allow more power to be mixed in more quickly.  So this sensor also becomes important because if the data from that goes awry then the cruise control could be allowed to use full power on even downhill slopes.  Worst case the bit flips just as you crest a hill, cruise control  has full power authority, and you're going down the hill with throttle heading towards 100%.

According to the report I read, there's absolutely no 'stale data' handling, in any of the cruise control logic.  And this is not the only fatal design flaw in the software. 
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 6843
  • Country: va
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #33 on: January 25, 2023, 11:24:42 pm »
I can't imagine any circumstance where I would acquire a Toyota.
 
The following users thanked this post: MrMobodies

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #34 on: January 26, 2023, 01:08:57 am »
Toyota used to make pretty reliable vehicles. Until millions of lines of software code started to creep in. How sad.
Of course that's not just with Toyota. It's everywhere.

Does that mean we'll have to accept that having tons of features is more important than reliability, and take this as our new normal? And meanwhile paying millions to consulting firms that will come up with the promise of a definitive method to solve it all? :popcorn:
 
The following users thanked this post: MrMobodies

Online Berni

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: si
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #35 on: January 26, 2023, 06:41:07 am »
Yeah these new automatic emergency braking systems are not to be relied on to just work in every situation. There is a mountain of software that makes it work, even involving AI into the mix.
I would say they are great based on a recent experience.  Car in front slammed on their brakes but they had no functioning brake lights, only to decide to turn off in front of me with no indicator either.  I probably should have noticed clues from their driving, as they seemed erratic and their vehicle was in poor condition, but I was in 'autopilot' as brains tend to do while driving.  The radar picked this up well before I noticed.  I was following with 3-sec distance and the immediate beep and red flashing warning in my face immediately directed my attention and I braked hard.  The nice thing is when AEB detects an event, it always enhances the brake response, so even a slight press is interpreted as significant braking.  Then ABS and ESP handle the stability of the vehicle.  Plenty of space to safely stop ... would I have avoided hitting them without, well quite possibly, but it definitely gave me extra margin.  Do I rely on them?  Absolutely no, the radar cannot detect all events, it's only there in addition to the meatbag in the driver's seat.

Yeah i really like emergency braking feature. Volvo seams to have tuned them really well in my opinion(low false positives, but triggers when it should)

The warning beeps it makes are the most useful to me. As a human i have to watch a car and observe it getting closer and closer oddly fast before i realize this is a dangerous situation. Yet the radar just has to watch the doppler shift in the reflected signal to instantly get an information about how fast that car is going, so it figures out this is a bad situation much much sooner. At this point i hover my foot over the brake pedal whenever i hear the red warning. When on cruse control it even starts more gently applying the brake itself before the warning (good for the cars behind me)

But this is the easiest example for the system to handle. It just tracks the moving targets on the radar and looks for any that slow down at a high rate. The fancy AI tech comes in to process the information from the cameras. That is because the radar can't  easily see stationary/slow targets (they could be just be lamp post or a reflection from the road). So for situations where you come around a blind corner and there is a car stopped on the other end it uses a camera to actually see the car. Similar for pedestrians that cross the road.

But i still would not want to rely on the system to do the right thing for me. I treat it more as a 2nd layer of defense for when my human reflexes end up being too slow. Not letting it do all the braking, since it probably would eventually hit a weird edge condition where it decided not to brake when it should. Same reason why i am not so trustful of full self driving cars, sure they work well most of the time, but most of the time is not good enough when your life is on the line.
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: si
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #36 on: January 26, 2023, 06:53:46 am »
Quote
My finger was moving up and down side to side according to the road surface.

Yes, that's one issue (the other is no tactile feedback). I wonder if a touchscreen could be programmed to only accept touch on active buttons (that is, those available to be touched). Then you could rest a couple of fingers on the inactive part of the screen to steady your hand, which would go a long way to resolving the wandering finger issue.

I have no idea how modern car touchscreens work so this is based on smartphone screens. However, I always have problems with my center-console satnav which often thinks I want to scroll the map rather then depress a virtual button.

At one point i was curious and tested the multitouch implementation (modern Volvo). It only registers the first touch location. So once you press and hold one finger on the display it will track that finger as the touched location, ignoring any other touches happening elsewhere. So yeah leaning on the screen is not possible there. Other cars likely do similar.

Tho i would think this is all a software thing. Pretty much all modern capacitive touchscreens support multitouch (that's why other touches didn't disturb the tracking of the first touched finger location) so the touchscreen controller is likely spitting out all the touch locations. But probably was the easiest in software to just take the first touch location is reports as a "mouse cursor" and ignore the rest.

Hopefully they sort out this giant touchscreen bullshit by the time i switch cars, i don't want to go from having dedicated buttons to a touchscreen.
 
The following users thanked this post: PlainName

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #37 on: January 26, 2023, 08:06:14 am »
The problem is feature creep + software developers deciding how products should be developed.
To paraphase a famous quote, software is much too serious a matter to be left to software developers.
 :popcorn:
Since I am EE by education and SWE for 25+ years for occupation I can say this from my experiences:

GUI's design : yes you need people who have an deep understanding of human thinking esp those with lower iq to design a good and clear GUI.

Software coding: no you need SW architects for a good clean architecture, skilled SWE en designers to use the correct statemachines, designpatterns etc.
Hardware engineers programming software, few are really good but unfortunately most suffer from the Dunning-krugereffect in this regard and this forum is full of it  >:D

Embedded software boundary of HSI yes you really like an EE involved as well.
 
The following users thanked this post: tooki, JPortici

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7384
  • Country: nl
  • Current job: ATEX product design
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #38 on: January 26, 2023, 08:56:54 am »
100 million lines of code?
I don't believe that for a minute unless there are reams and reams of comments and full source revision history in every file, along with an essay of legalese and copyright information, although none of this is really 'code'.
You shouldn't, this guy has zero credibility, and just comes with controversial statements that carry zero real world value when it comes to cars. I particularly loved that video from him where he stated that because of an injection moulded air valve, Teslas are superior to every other electric car.
 

Online tom66

  • Super Contributor
  • ***
  • Posts: 6706
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #39 on: January 26, 2023, 09:22:37 am »
100 million lines of code?
I don't believe that for a minute unless there are reams and reams of comments and full source revision history in every file, along with an essay of legalese and copyright information, although none of this is really 'code'.
You shouldn't, this guy has zero credibility, and just comes with controversial statements that carry zero real world value when it comes to cars. I particularly loved that video from him where he stated that because of an injection moulded air valve, Teslas are superior to every other electric car.

Sandy's knowledge of anything outside of his specific area of expertise (which seems to be assembly and fasteners, I'd guess) is kinda poor.  And it's poor as in he often guesses, rather than saying "I don't understand this".

He also seems very bitter about being fired from Ford, I wonder if there is more to that story.

Still, if you ignore Sandy, the other Munro&Assoc. engineers are very interesting to watch.
 

Offline jonpaul

  • Super Contributor
  • ***
  • Posts: 3366
  • Country: fr
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #40 on: January 26, 2023, 02:31:23 pm »
How many lines in Apolo 1960s computers,8192?

How many lines in 1980s Star wars SDI antimissile défense control system?

How many lines  in your "smart" internet connected TV?

Jon


« Last Edit: January 27, 2023, 09:16:58 am by jonpaul »
Jean-Paul  the Internet Dinosaur
 

Offline MTTopic starter

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #41 on: January 26, 2023, 03:32:09 pm »

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #42 on: January 26, 2023, 11:08:33 pm »
The problem is feature creep + software developers deciding how products should be developed.
To paraphase a famous quote, software is much too serious a matter to be left to software developers.
 :popcorn:
Since I am EE by education and SWE for 25+ years for occupation I can say this from my experiences:

GUI's design : yes you need people who have an deep understanding of human thinking esp those with lower iq to design a good and clear GUI.

Yes, and this was actually a thing back in the 80s/90s, it seems to have gone downhill ever since. Now it's all good if it is shiny and flat. (You can replace "shiny" with "dark mode" which is the new trendy shit, but same.)

Software coding: no you need SW architects for a good clean architecture, skilled SWE en designers to use the correct statemachines, designpatterns etc.

Oh yes, but it isn't really compatible with the agile methods in general, which have plagued the industry.
This is less obvious in heavily regulated fields (such as automotive, medical), but still has some impact at many places.

Hardware engineers programming software, few are really good but unfortunately most suffer from the Dunning-krugereffect in this regard and this forum is full of it  >:D

Well, software programming has gone downhil too IMHO in general, but you are right in pointing out that "embedded development" is much too often done by EEs with only very basic software development skills.
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 6843
  • Country: va
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #43 on: January 27, 2023, 12:05:26 am »
Quote
"dark mode" which is the new trendy shit

Amazing how many products list dark mode as the top or second to top feature. For example: https://vovsoft.com/software/text-edit-plus/
 

Offline MTTopic starter

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #44 on: January 27, 2023, 12:32:02 am »
Just let ChatGPT3 write the car code and all will be fine and dandy! Surely it can figure out all the "safety situation issues"!  :horse:
 

Offline eti

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #45 on: January 27, 2023, 02:31:55 am »
There were already enough *physical* variables to cause cars to crash, long before this madness of “software fixes everything!” arrived. Now there’s more to crash, virtual affecting physical. Don’t tell the EV obsessives, they’ll downplay it and find some reason to justify all this bullshit.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #46 on: January 27, 2023, 04:58:01 am »
Just let ChatGPT3 Microsoft write the car code and all will be fine and dandy! Surely it can figure out all the "safety situation issues"!  :horse:

Fixed that. :-DD
 

Offline MrMobodies

  • Super Contributor
  • ***
  • Posts: 1912
  • Country: gb
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #47 on: January 27, 2023, 06:00:57 am »
Toyota joke: They were treating it like a car but it wasn't. It was a computer controlling a car but where was the reset button?

I see that 1996 Corolla did have a key (as expected in that day and age) so I wonder why didn't he use it to turn it off or maybe it was so quick when it accelerated that he didn't have a chance despite pushing the breaks.
« Last Edit: January 27, 2023, 06:03:03 am by MrMobodies »
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3704
  • Country: nl
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #48 on: January 27, 2023, 06:40:55 am »
Just let ChatGPT3 write the car code and all will be fine and dandy!

Could not find it anymore, but my wife read part of an article to me a couple of days back about the IQ of AI. According to it the best at the moment was about 80. My searches on google only showed me an IQ for AI of ~47. An average six year old human is smarter then that  :-DD

So I see your sarcasm here, but I'm afraid a lot of people do think it is the solution for everything in the near future. My fear is that it is all down hill from here on out.  |O

P.S. That is the ritual here. The wife scans the internet every morning for all kinds of news and if there is something technical she mentions it to me.  :)

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3704
  • Country: nl
Re: Average car contains 100 million lines of code, The State of Autosoftware
« Reply #49 on: January 27, 2023, 06:49:48 am »
I see that 1996 Corolla did have a key (as expected in that day and age) so I wonder why didn't he use it to turn it off or maybe it was so quick when it accelerated that he didn't have a chance despite pushing the breaks.

A lot of people freeze in an emergency situation and the only response is the foot on the break or no response at all. My response in car emergency situations is the handbrake, which I believe still to be fully mechanical on most cars. Might not do a lot when full throttle drive is on the wheels, but it did help us a while back when the wife responded a bit late on the highway and traffic in front was coming to a halt. As a passenger I tend stay alert and in driving mode  :-DD


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf