You need to add an identifier to each "0" record so they can be grouped together. One simple measure is the number of non-zero records before it in the data.
select latitude, longitude, min(time) as StartTime, max(time) as EndTime
from (select t.*,
(select count(*)
from tracker t2
where t2.time <= t.time and
t2.speed > 0
) as grp
from tracker t
) t
group by grp, latitude, longitude;
You can then use a having
clause to get the rows you are interested in:
having max(time) >= min(time) + interval 1 hour
For instance.