Is it possible in any way to use a 3-axis accel+tilt sensor as dirrection sens?

So I want to make a robot that can navagate a path(hallway), then find it's way back along the path it just took.
The only problem is the robot does not have any way to sense which dirrection it is facing.
I wish the Parallax continuos rotation servo encoded it's movements,
But as far as i can tell you need a seprate sensor to do that with servos...
Also I don't have any working compass sensors... (Just a KMZ52 chip, but nothing to put it on)
What I do have is a 3-axis accelerometer with tilt sensor....
Can I use this to sense the way my robot is facing?
I know the accel. sensor whould either need additional hardware, say some mechanics that tilt the sensor everytime a wheel does 1 revolotion...
or having it extening out of the robot to measure acceleration when the robot turns....

is there any other way i can do this?
-Thanks-

Maybe if you made the hallway slope, that might help.

i think u r confused...
the "hallway" is a room in my house.
i don't plan on any renavations in the near future

No, I'm not confused.
You asked if there was a way, so I pointed one way out.

Another way would be to place a planetary-scale mass at one end of the hallway, but I guess they're hard to come by.

ok sorry
how about any way to get this to work that only involves the robot being modified?
also please excuse my poor spelling...

Also any Planet that I put in my hallway would become a real nightmare...
Due to the fact that you only need to shrink a planet, say the earth, to about half the size it is currently it becomes a black hole...(which is still around 1million times larger than my halllway)

so if u put a equivalently sized planet in my hallway... well.. it won't be very nice to have a black hole that is 1Million times worse than normal!!! lol

Also I don't have any working compass sensors... (Just a KMZ52 chip, but nothing to put it on)

Well, the cheapest solution would be to get a working compass sensor. A 3-axis accelerometer just won't be able to give you any sort of usable direction data.

Hmm how exact does it have to be? From the acceleration you can calculate the speed, from the speed the distance.
you could calculate the distance the robot drove in 5 second steps, and then trace it back in these 5 second windows.

p.s.

a = s/t² <=> a * t² = s

since you know a and t....