[Galaxy S III Themes and Apps] dankoman:
thought i'd share this setup. it took me a couple days to get it working right. i wanted tasker to determine whether or not i was driving without using GPS. i have it polling for network location (by cell tower triangulation), and using the distance formula:

d = sqrt((x2-x1)^2 + (y2-y1)^2))

but first had to convert from latitude/longitude coordinates (what %LOCN gives you) into radians so that i could measure linear distance. it's all done in a scriptlet. check it out...

this runs whenever screen turns on (you can do time intervals instead, but this is what i used). it gets location, waits 2 minutes, gets location again. stores as two separate variables:

<TaskerData sr="" dvi="1" tv="1.3.3u2m">
<Task sr="task9">
<cdate>1360240542952</cdate>
<edate>1361748606749</edate>
<id>9</id>
<nme>Poll Screen On</nme>
<pri>10</pri>
<stayawake>true</stayawake>
<Action sr="act0" ve="3">
<code>549</code>
<Str sr="arg0" ve="3">%LOCA</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>549</code>
<Str sr="arg0" ve="3">%LOCB</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act2" ve="3">
<code>902</code>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="10"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
</Action>
<Action sr="act3" ve="3">
<code>547</code>
<label>"x1,y1"</label>
<Str sr="arg0" ve="3">%LOCA</Str>
<Str sr="arg1" ve="3">%LOCN</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act4" ve="3">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="2"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act5" ve="3">
<code>902</code>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="10"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="1"/>
</Action>
<Action sr="act6" ve="3">
<code>547</code>
<label>"x2,y2"</label>
<Str sr="arg0" ve="3">%LOCB</Str>
<Str sr="arg1" ve="3">%LOCN</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act7" ve="3">
<code>130</code>
<Str sr="arg0" ve="3">Distance Poll</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="5"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Img sr="icn" ve="2">
<cls>com.anydo.activity.Main</cls>
<pkg>com.anydo</pkg>
</Img>
</Task>
</TaskerData>

and then this is the distance poll. sets variable %CARMODE to 1 if distance traveled between two intervals is more than 0.5 miles, and to 0 if it's less. you can set up profiles with state context for %CARMODE = 1 or 0 to do what you want, such as control bluetooth, volume, etc.:

<TaskerData sr="" dvi="1" tv="1.3.3u2m">
<Task sr="task7">
<cdate>1360240542952</cdate>
<edate>1361748586490</edate>
<id>7</id>
<nme>Distance Poll</nme>
<pri>10</pri>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LASTDISTPOLL</Str>
<Str sr="arg1" ve="3">%TIME</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%DISTTRAV</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act10" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LAT1</Str>
<Str sr="arg1" ve="3">%loca1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act11" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LON1</Str>
<Str sr="arg1" ve="3">%loca2</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LAT2</Str>
<Str sr="arg1" ve="3">%locb1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act13" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LON2</Str>
<Str sr="arg1" ve="3">%locb2</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act14" ve="3">
<code>129</code>
<label>Distance script</label>
<Str sr="arg0" ve="3">var lat1 = global('LAT1');
var lat2 = global('LAT2');
var lon1 = global('LON1');
var lon2 = global('LON2');

var rrr = 3963.191;
var dLat = (lat2-lat1) * (Math.PI / 180);
var dLon = (lon2-lon1) * (Math.PI / 180);
var lat1 = lat1 * (Math.PI / 180);
var lat2 = lat2 * (Math.PI / 180);

var aaa = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);
var ccc = 2 * Math.atan2(Math.sqrt(aaa), Math.sqrt(1-aaa));
var ddd = rrr * ccc;

setGlobal('DISTTRAV', ddd)</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="20"/>
</Action>
<Action sr="act15" ve="3">
<code>37</code>
<label>Traveled more than xxx miles.</label>
<lhs>%DISTTRAV</lhs>
<op>4</op>
<rhs>0.5</rhs>
</Action>
<Action sr="act16" ve="3">
<code>37</code>
<label>Carmode already on</label>
<lhs>%CARMODE</lhs>
<op>5</op>
<rhs>1</rhs>
</Action>
<Action sr="act17" ve="3">
<code>192</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="5"/>
</Action>
<Action sr="act18" ve="3">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act19" ve="3">
<code>43</code>
<label>Carmode not on</label>
</Action>
<Action sr="act2" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LAT1</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act20" ve="3">
<code>192</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="5"/>
</Action>
<Action sr="act21" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%CARMODE</Str>
<Str sr="arg1" ve="3">1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act22" ve="3">
<code>523</code>
<Str sr="arg0" ve="3">Driving Set By Distance</Str>
<Str sr="arg1" ve="3">Distance traveled = %DISTTRAV</Str>
<Img sr="arg2" ve="2"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act23" ve="3">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act24" ve="3">
<code>38</code>
</Action>
<Action sr="act25" ve="3">
<code>43</code>
<label>Traveled less than xxx miles</label>
</Action>
<Action sr="act26" ve="3">
<code>37</code>
<label>Carmode already off</label>
<lhs>%CARMODE</lhs>
<op>5</op>
<rhs>0</rhs>
</Action>
<Action sr="act27" ve="3">
<code>192</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="5"/>
</Action>
<Action sr="act28" ve="3">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act29" ve="3">
<code>43</code>
<label>Carmode not off</label>
</Action>
<Action sr="act3" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LAT2</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act30" ve="3">
<code>192</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="5"/>
</Action>
<Action sr="act31" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%CARMODE</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act32" ve="3">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act33" ve="3">
<code>38</code>
</Action>
<Action sr="act34" ve="3">
<code>38</code>
</Action>
<Action sr="act4" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LON1</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act5" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%LON2</Str>
<Str sr="arg1" ve="3">0</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act6" ve="3">
<code>547</code>
<label>Pull globals...</label>
<Str sr="arg0" ve="3">%loca</Str>
<Str sr="arg1" ve="3">%LOCA</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act7" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%locb</Str>
<Str sr="arg1" ve="3">%LOCB</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act8" ve="3">
<code>590</code>
<Str sr="arg0" ve="3">%loca</Str>
<Str sr="arg1" ve="3">,</Str>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act9" ve="3">
<code>590</code>
<Str sr="arg0" ve="3">%locb</Str>
<Str sr="arg1" ve="3">,</Str>
<Int sr="arg2" val="0"/>
</Action>
</Task>
</TaskerData>

if anyone else wants to try it out, let me know what you think.