If the problem is only some sort of senor then how does that explain the bad shifting?
My first guess is your battery is dead. I would get that checked first.
If the battery is OK then you will have to bring the car in, there are way too many things this could be to diagnose over the internet.
Straight lines are for fast cars...turns are for fast drivers
'04 M3 - track
'06 650i Cab - daily driver
'02 Highlander - kid hauler
'01 330Ci - winter beater