yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] AndyInFl:
Here is something I found : http://www.gpsy.com/gpsinfo/gps-faq.txt

"1.3 What accuracy can I expect?

The Standard Positioning Service (SPS) available to civilian users should give 20 metre horizontal accuracy, however it is normally degraded to 100 metres (95% of the time) due to Selective Availability (SA). (That is, the reported position will be within 100 metres of the true position 95% of the time.) The vertical accuracy is about 1.5 times worse than horizontal, due to satellite geometry. (Satellites are more likely to be near the horizon, than directly overhead.) ...

...The accuracy can be improved by averaging readings over some time. When taking readings for this purpose, there is apparently no point in taking the readings more often than every 15 min, or so. "

Logically:

A static navigation device moving at less than about 5mph will not report a proper speed (within the normal margin of error.) Also not moving more than 60 feet +/- will not give a proper location (within the normal margin of error.) So "accuracy can be improved by averaging readings over some time." Therefore if the total time is known and the trip distance is known, the average speed can be calculated for a speed consistantly below 5 mph. (Someone walking, riding in a boat in a no wake zone at 3 mph, or stuck in traffic.)

Just trying to use the available data to the fullest.
[Windows Mobile Apps and Games] URPREY:
I edited my post - I guess my initial password was different than what I thought it was. It looks like it tried to update the account anyway but populated with empty data. Once I entered the right password it started working. I appreciate you checking!
[Windows Mobile Apps and Games] AndyInFl:
A great idea if also used in reverse! An email could be sent when then device enters a boundry. (Oh no! She's almost home.....)
[Windows Mobile Apps and Games] powerppc:
Staryon, when will you be implementing what JCleek has for Google Maps. I really like the gray icons and other distinguished icon between start icon and end icon. Or is it already implemented on your luisespinosa.com/trackme/ page and I'm missing something?

Thanks and keep up the good work.

BTW, still trying to figure out how to convert KML to XML or straight write to XML so Yahoo Maps can read it. If Yahoo Maps were to be used to be viewed from PIE, it won't refresh itself, you have to refresh it yourself on the device, which is annoying, but usefull if you're on the go.

I also noticed Opera 8.65 can view Google Maps. So if everyone has Opera 8.65, then there is no need for Yahoo Maps API to be created for this project. But of course that's not reality because we all know PIE isn't all the great. Not even IE 7. :)
[Windows Mobile Apps and Games] jcleek:
It is working fine for me. The views (normal, satellite and hybrid) are all google map functions and not part of my code.
[Windows Mobile Apps and Games] warmkiwi99:
App works great for me. well done to all of the developers involved

New feature suggestion:-

Ability to add a free text note that will be tagged on to the first tracked point of a trip so it can be viewed in Google Maps/Earth.

Ability to email or SMS the trip link (http://luisespinosa.com/trackme/routes/<username>.kml to someone after uploading the kml file
[Windows Mobile Apps and Games] SPYUK:
Great work guy's much appreciated.

I'd like to show my current location in in a simple personal homepage, I don't have MySQL. Is it possible to just show a google map or earth in a kind of applet format?
[Windows Mobile Apps and Games] jcleek:
Staryon has the application configured to use his server by default. If you don't have access to all of the requirements to run your own server just use his.
[Windows Mobile Apps and Games] SPYUK:
Is there a way to embed that into a simple personal homepage without the need to login etc?
[Windows Mobile Apps and Games] _LEM_:
Maybe jcleek knows a better way, but if you have the KML files on the server, you just need to go to Google Maps and enter there the address of the KML file.
[Windows Mobile Apps and Games] bottkars:
Artemis /P3300

I Have exactly the Same issue. All other GPS Tool work fine on COM4. A BT Connected GPS Receiver on COM6 works fine.
[Windows Mobile Apps and Games] _LEM_:
Did you try the GPSInit tool that I mentioned before?
[Windows Mobile Apps and Games] _LEM_:
Ok, it's done. Just get the latest server files (I only modified the export.php file)
[Windows Mobile Apps and Games] while(!(linux)){wm}:
SPYUK,

If you have Perl/CGI capabilities on your server, you could use the script i wrote. You can find it HERE.

PHP is screwed up on my system here, and i havent had the time to fix it... so i've just been using this script. Oh, if you want altitude to work, you just need to change the cgi param line to

$alt = $cgi->param('altitude');
[Windows Mobile Apps and Games] jcleek:
Serious issue with the tracking piece. I am on the road to North Carolina right now headed down 95 below Richmond. But if you look at my current track on the map it shows me out near 81. This is my current setup:

Connect/Disconnect GPS automatically

Upload every 15 minutes

Do not upload if change is less than 15 meters

I have unchecked the connect/disconnect GPS option to see if that cleans up the plotting. Whether it does or not there is definitely an issue with it tracking location using the settings I have. More to report as the trip progresses.
[Windows Mobile Apps and Games] jcleek:
New version sent to Staryon. Only change is for private servers. I modified the code to use a cookie to store usuername and password info rather than passing that information on every page load. The net result (besides better security) is that the SHOW LAST LOCATION page will honor the auto-refresh setting now.

Next up is the additional fields in the baloon text.
[Windows Mobile Apps and Games] odie3:
So, you are driving and writing code? That pretty cool!

What additional fields are you adding?
[Windows Mobile Apps and Games] daesimps:
I am having a similar problem. It shows me as going from Leeds to Portsmouth, via Guernsey in 20 minutes. It also shows me as being on my motorbike at 34,000 ft doing 190MPH!!!

Not sure what the problem is. The data in the DB is definitely wrong.
[Windows Mobile Apps and Games] _LEM_:
For people who are having problems....

Did you check the physical data in the database? In order to see where the error happened, we need to see how it really looks.

Also take a pair (lat,long) that you think are wrong from the database and plot them with Google Earth to see if there are not displayed correctly.
[Windows Mobile Apps and Games] _LEM_:
ok, it should be updated now.
[Windows Mobile Apps and Games] jcleek:
I am adding the fields Andy asked for. You can see his example image here.

And yes, wife is driving while I code. Gotta love it.
[Windows Mobile Apps and Games] jcleek:
I got the average speed and point of points data added as well as placeholders for the other items. We are almost at our destination so I am done coding for now but will most likely work more on it tonight. Hope to have all of the fields Andy asked for by tomorrow. Anyone have any thoughts?

Example here
[Windows Mobile Apps and Games] _LEM_:
By the way, regarding the altitude, I have seen a negative value sometimes.

I'm trying to reproduce the problem here.

Regarding the speed... you guys have to keep in mind this is just an estimate but it should work in most of the cases. I just take the last 2 positions received, calculate the distance and divide it by the elapsed time when they occurred.

As you know, if you are inside a building or rounded by tall buildings, in some cases, you GPS still may get positions but these positions could be bumping from one place to another. In that case, the calculated speed will be completely wrong.

On the other hand, as jcleek said yesterday, if you are walking or driving in circles, the speed will be wrong too.

However, all the testing that I have done seems to be very accurate but I have never been in the scenarios that I just mentioned.

If you guys know a better way of calculating the speed, please let me know.
[Windows Mobile Apps and Games] _LEM_:
You must be now at the Everest. You last position says you are located at 7,871m :D

Houston, we have a problem.
[Windows Mobile Apps and Games] daesimps:
Staryon,

I have check the DB and it is definitely the data that is wrong, not the display. I have an example below of data from my DB. I was on a motorbike with the phone on the tank so there was nothing blocking reception of GPS. It only really started going wrong this morning and afternoon. Not sure if it is a bug that has crept into the last version, or if I have just been lucky so far.

Here is the data (select * from positions):-

| 250 | 222 | 119 | 53.7872868833333 | -1.57632963333333 | 2007-11-21 16:21:12 | 2007-11-21 16:21:12 | -652.5 | 2.695 |

| 251 | 222 | 119 | 53.7888480833333 | -1.578996 | 2007-11-21 16:23:47 | 2007-11-21 16:23:46 | -861.5 | 1.601 |

| 252 | 222 | 119 | 52.46591965 | -2.48242166666667 | 2007-11-21 16:26:22 | 2007-11-21 16:26:21 | -722 | 1025.616 |

| 253 | 222 | 119 | 52.2033991166667 | -2.59490865 | 2007-11-21 16:29:03 | 2007-11-21 16:29:02 | -1145.5 | 187.422 |

| 254 | 222 | 119 | 51.9932720166667 | -2.66346573333333 | 2007-11-21 16:31:59 | 2007-11-21 16:31:58 | -1248.5 | 135.396 |

| 255 | 222 | 119 | 49.6576731333333 | -2.53868006666667 | 2007-11-21 16:34:40 | 2007-11-21 16:34:39 | 11386.5 | 1614.003 |

| 256 | 222 | 119 | 50.0234958166667 | -2.3064431 | 2007-11-21 16:37:35 | 2007-11-21 16:37:34 | 10853.5 | 251.17 |

| 257 | 222 | 119 | 50.2610657666667 | -2.15356086666667 | 2007-11-21 16:40:15 | 2007-11-21 16:40:14 | 10844.5 | 178.594 |

| 258 | 222 | 119 | 50.4809080833333 | -2.01128628333333 | 2007-11-21 16:42:56 | 2007-11-21 16:42:55 | 10843 | 164.261 |

| 259 | 222 | 119 | 50.62652475 | -1.89914906666667 | 2007-11-21 16:45:41 | 2007-11-21 16:45:40 | 10842.5 | 109.249 |

| 260 | 222 | 119 | 50.6931316666667 | -1.84142961666667 | 2007-11-21 16:48:16 | 2007-11-21 16:48:15 | 10834 | 54.518 |

Daesimps
[Windows Mobile Apps and Games] AndyInFl:
"Distance: Say you travel in a 100 mile circle at 100 miles per hour. In an hour you travel 100 miles, right? If you have the GPS set to get a new position every hour it will show you didn't travel at all."

...The accuracy can be improved by averaging readings over some time. When taking readings for this purpose, there is apparently no point in taking the readings more often than every 15 min, or so. "

This is a tool that needs to be calibrated based upon the particular use. An adjustable wrench will fit most nuts if you adjust it properly. If you are going to drive in cirlcles, update more frequently. If you are driving straight, update accordingly.
[Windows Mobile Apps and Games] AndyInFl:
Looking good!

Thank you.
[Windows Mobile Apps and Games] Rescue9:
Don't have a clue what happened. It was working well yesterday. I downloaded the new server zip on the front page and now I'm not getting anything. A white page is all I get and no source code.

I've set this up 5 or 6 times now and no problem... this is the first time this has happened. In addition, I'm seeing "pxpx" for the width and height instead of the correct "px".

Any clue on the blank page?
[Windows Mobile Apps and Games] Rescue9:
Ok... I think I found my problem. Install.php is writing all the information it gathers in config.inc. However... all the other php pages are referencing config.php. I think install.php needs to copy config.inc to config.php. Otherwise, all the other pages will reference config.php which includes clear text instead of db names, passwords, etc.

As far as the "pxpx" I haven't tracked that down yet.
[Windows Mobile Apps and Games] stabilo66:
thanks, its awesome !
[Windows Mobile Apps and Games] jcleek:
You need to replace everything in the trackme folder. We have not been using the .inc file for a week...
[Windows Mobile Apps and Games] Rescue9:
Hmmm... I downloaded the link on the first page 3 or 4 times. It kept writing to config.inc. Maybe it hasn't been updated?

In addition, can we start having version numbers next to the links instead of just "newest file" This way if I already have the newest one, I don't have to redownload it to find out.
[Windows Mobile Apps and Games] jcleek:
Right you are. I forgot to change the file name in the install file. Rename config.inc to config.php and you should be fine. I sent an updated version to Staryon to put on the front.

I will start versioning my overall package, but not each file. Consider the package there now version 1.0.
[Windows Mobile Apps and Games] jcleek:
PHP guys, I need some coding help with the time travelled. Here is what I am trying to do:

1) Take the time a trip is started and put it to a hold var: $hold_time

2) At each point take the timestamp for that point and determine the time difference between $hold_time and the time for the current point.

The time stamps are in this format: 2007-11-14 13:15:04

Can someone tell me the php code to make this calculation? Cause I am evidently mathmatically challenged...
[Windows Mobile Apps and Games] Rescue9:
Ok... quick question. I've not played with Google Earth in quite a while. When I load the kml file in there it displays only the most recent trip. How do I get individual trips from the kml file to display?

Thanks!
[Windows Mobile Apps and Games] cruchot_:
Hi,

Realtime tracking works fine (remotely). But now I want to store data locally for later upload. Here are my settings:

Storage tab : Local KML file

Realtime Tracking tab : Local KML file

When export is launched KML file is well generated and upload went fine -> the KML file can be loaded via Google Maps. But the database is not updated with new trips ...

Maybe I am doing something wrong ? Did I miss something ?

Thx :)
[Windows Mobile Apps and Games] jcleek:
The automatic KML is only from the current trip. You can use the export feature to create a new KML with other data. The KML file isn't a seperate database of all trips which is what I think you are asking.
[Windows Mobile Apps and Games] Rescue9:
Yes... that is what I was thinking. So then, Do I have to export my trips after every trip?
[Windows Mobile Apps and Games] jcleek:
No, just copy off the current KML to a location and rename it. Then the next trip will make a new KML with the same username.kml format. When that trip ends, save off the KML. Or you can use the export feature on the device.
[Windows Mobile Apps and Games] AndyInFl:
(Repost).......
[Windows Mobile Apps and Games] Rescue9:
Hmmm... it would be nice if the program would do that for us. For example, have a checkbox inside the client.... something like "Always created new trip". Then have code on the server that increases the trip count by 1.

For example... lets say I have trips:

Rescue9_1.kml

Rescue9_2.kml

Rescue9_3.kml

Rescue9.kml

Now, Rescue9_3.kml and Rescue9.kml would be the same data. However, on the next trip, the "new" Rescue9.kml would get copied to Rescue9_4.kml.

Make sense? Seems like it would be easier to code this on the server than to have to imput a trip name every time I press start.
[Windows Mobile Apps and Games] jcleek:
Remember guys, Staryon wrote this and hosts it on his server FREE OF CHARGE. So any additional storage will cost him. Additional KML files stored on his server, many of which will never get used, don't make a whole lot of sense. If you want to host it on your server you can change the code to automatically name the files pretty easily.
[Windows Mobile Apps and Games] AndyInFl:
If I am storing the files remotely on my storage card, there would be no issues with someone else's server.

I plan and hope to take this finished product and run it on my own server. Therefore all of the options that are not hardcoded will keep someone like me from having to ask for future fixes/enhancements.

Again, thanks to all!
[Windows Mobile Apps and Games] Rescue9:
I understand what you're saying, and I agree to a point. However, having the ability already hardcoded in, and either charging for that ability, or blocking it completely on his end would make it easier for the rest of us. While I'm sure a good deal of people use his server, there are also a good deal who have our own servers setup. This is obvious by the amount of troubleshooting we've been doing to fix bugs serverside.

Having an option in ADVANCED settings on the client would be great. That way, if people change the url, they will be allowed to check the option. Otherwise, everyone who uses our own servers are going to have to manually code in the change every time we upgrade.
[Windows Mobile Apps and Games] justdavesj:
Something like this?

http://www.befriend.com/code_gallery/php/get_elapsed_time/
[Windows Mobile Apps and Games] _LEM_:
Repost....
[Windows Mobile Apps and Games] _LEM_:
Hi cruchot_,

When you export data it's always written to the same file. So if you want to have KML files for each trip, you will have to export one by one, and save them locally to a different name.

However, this is not really needed. All your data is in the database, always available. As soon as you need a certain trip, just export and view it. You don't really need to save anything because it will always stay in the database.
[Windows Mobile Apps and Games] odie3:
That looks like what jcleek needs (from what I can tell). Nice find, I looked all over but Google failed me (or rather I am sure I failed Google).
[Windows Mobile Apps and Games] _LEM_:
I don't know why you need to create separate KML files for each trip.

The data will be always in the database. If you think about it, a KML file is just like a subset of the database, like a 'view'. Only if you plan to delete a trip physically from the database, in that case it would make sense to generate a separate KML file and keep it.

I don't know, that's how I see it. Other people may have a different point of view.
[Windows Mobile Apps and Games] _LEM_:
The new version is ready.
[Windows Mobile Apps and Games] jcleek:
Perfect! I have been poking numbers in for hours trying to figure out how to get that. I believe this is what Andy had requested and I think the data is as accurate as the database data.

I changed the title and added the version (1.1) so it will be easy to see what version you are running. I also added comments to the install.php and index.php including the version number.

Staryon has the new version and will post when he gets a chance to test. Thanks for all of the help guys!
[Windows Mobile Apps and Games] Rescue9:
I guess i'm just confused then. I tried importing the kml into my google earth and it only gave me the last trip. I don't know how to see all the trips that are in the kml.
[Windows Mobile Apps and Games] _LEM_:
Just go to 'Export' and select the trip that you are interested in viewing with GE.

Go back to GE and click on Refresh. Quick and easy! :D
[Windows Mobile Apps and Games] _LEM_:
Ready to download!!!
[Windows Mobile Apps and Games] wafwot:
LOL jcleek's altitude is 25,698.82 ft at his final position! That's about 3,300 feet less than Mount Everest, and about 11,200 feet higher than the highest point in the continental US.

Color me dubious!
[Windows Mobile Apps and Games] _LEM_:
:o yeah yeah... I'm trying to find the bug :o

I went out and tested it for 2h, but I couldn't get the error. So I'll try again

tomorrow.
[Windows Mobile Apps and Games] odie3:
FYI - I do not think Adv Speed is working properly. Every point is showing 13.92 MPH, even on my first position where I have not moved yet (the other two are showing nulls).
[Windows Mobile Apps and Games] _LEM_:
Ok, I found part of the problem. This probably will not fix it completely, but at least it's something that was wrong.

If you had offline data, and you upload it later, the speed was saved in the Altitude field.

I uploaded this new version.
[Windows Mobile Apps and Games] jcleek:
Yes, it is working. The average speed is for the entire trip from the first point until the last point. Every point will show the same Average speed. That's why its called "average".

The first point has 0 time and 0 distance because you have traveled... nowhere. The second point will indicate the travel time and distance to THAT point. Each subsequent point shows the cumulative time and distance for the trip up to that point.

Does that make sense? Because that is the only way I could think to do it that made sense to me.
[Windows Mobile Apps and Games] odie3:
Yes, that make sense now that you explained it (I was assuming you would be working the Speed the same way as the other two values).

Also, perhaps you should not use the speed in the database to come up with Adv Speed because the math does not look right when looking at the final trip marker.

Example on my last marker:

Adv Speed 13.92

Adv Dist 34.18 (note: for the last marker it should be total Dist - IMO)

Time Traveled: 01:20.20

However, if I calculate Adv Speed (by using Total Dist and Time Traveled) my speed is really 25.528630705394193 (or 25.53 rounded).

Here is a nice little Time/Speed Distance Calculator
[Windows Mobile Apps and Games] jcleek:
The three fields are:

Time Traveled - Cumulative time since leaving the start point

Average Speed - Average of all speeds recorded in the database

Distance Traveled - Cumulative distance traveled since leaving the start point

Computing the average speed by using the total time and distance is even more flawed when you stop for a burger on the road. Using the actual recorded speeds will leave out the dead time when you stop. Not to mention in order to compute the average speed using your method I have to add code to go through the positions to make calculations and then go through a second time to draw the points on the map. Why? I need the average speed calculation before the first point is put on the map.
[Windows Mobile Apps and Games] odie3:
True and very good points. I'll let it pass and not worry about it (and tell my wife to bugger off too).
[Windows Mobile Apps and Games] AndyInFl:
Good job and thank you for doing this.

Is it possible to set the starting point value for the 3 fields to 0 and populate the remaing points? Right now you have an average speed but lack a value for time and have a value for distance.

I don't know the logic but maybe something like :

if point 1 of array

then value of Time Traveled = 0hr: 0mn : value of Ave. Speed = 0mph : value of Dist. Traveled = 0 miles

else point 2 to array..... then start filling in the data values.

This way your logic is correct as you described it and the first balloon is also correct.

As I said in a previous post I am not a programmer and I think I just proved that with my "code"....
[Windows Mobile Apps and Games] cruchot_:
I agree. But when export is launched (source : local , destination : remote) the database is not filled whereas the KML file is uploaded. Is there something wrong ?
[Windows Mobile Apps and Games] odie3:
staryon,

Would it be possiable if you are going under, say 30 MPH, to have a higher setting distance between uploads? Since I find myself in traffic a lot here in Austin I get a *lot* of positions uploaded during these times. Perhaps if the distance between uploads had a higher threshold for lower speeds there would be more balance.

Just a thought...

Edit:

I guess the just changing .."distance is less than X meters would do the same I guess".
[Windows Mobile Apps and Games] _LEM_:
If your source is local, your database is on your PDA. You are not using the server at all. If you export remotely you are just creating the kml file on the server, nothing else.

That configuration that you chose makes sense if you want to have an easier way to access to the kml file when you are showing routes with GE or GM.
[Windows Mobile Apps and Games] _LEM_:
Exactly, that's what that option is for.
[Windows Mobile Apps and Games] cruchot_:
Ok, so I didn't understand well ;) Is there a way to upload the locally generated database to the remote server ?

In fact, I'd like to work offline (ie without grps, edge ou 3G) and when I'm back home I'd like to update the database with trips I made.

And thank you for your quick replies :cool: