You should really post code with either code tags or an attachment... can you see how your posting got mangled?
Having said that... You really need to look at what you're doing after the encode command.
So as written, you only update your speed if the location hasn't changed? Same with the time, you only check the time if both the location and speed didn't change? Don't you always want to check to see if the time is updated?
You don't want the if/else structure here. Worst case something like:
if (gps.location.isUpdated()) {
latitude = ...
longitude = ...
}
if (gps.speed.isUpdated()) {
vel = ...
}
if (gps.time.isUpdated()) {
hourdata = ...
mindata = ...
secdata = ...
}
Does that help?
Regards,
Brad
KF7FER