Measure Distance with RF Links and arduino

I’m wondering if there is a way to measure distance between 2 arduino’s using the 434 or 315 MHz rf links from sparkfun. Currently I have the Tx send out a Char ‘H’ and the Rx reads the incoming signal and if it is ‘H’ then it counts it in increments. I’m trying to gauge the distance by the count so that when it seperates a certain distance, 15ft or more, it triggers a speaker but it is very unstable. When it is right next to each other the count will jump from anywhere to 0 to 215 then when they are far apart say 30 ft it also jumps. This is for a project as a group. If that doesnt work I was thinking of sending a msg and if it doesnt receive the msg then I know how far it is. Any suggestions on how to go about this? I can post my code later since its on my laptop. Also this is done indoors so thats why we chose rf instead of sonar or ir.