maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   N900 + Google Latitude (https://talk.maemo.org/showthread.php?t=38542)

rubberduck 2011-01-23 14:27

Re: N900 + Google Latitude
 
ah, got it.
Thanks for your help and for the time you spend on this project.

greetings

rubberduck

MasterZap 2011-01-23 18:39

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 926665)
@rubberduck the version 4.6 is not the same version of traysh

the actual method is use the cell tower because is power efficient, the gps will drain your battery, you can not change it.

This shpuld be up to me! I ABSOLUTELY want the real GPS, but I only want the GPS to turn on at every update.

ALL latitude clients I got to work on the n900 was unusable either because
a) they used cell tower location only
or
b) they turned on the gps and kept it on constantly, even though I asked it to update every 10 minutes...

Please solve this!

/Z

rlinfati 2011-01-23 23:25

Re: N900 + Google Latitude
 
@MasterZap

the agps need about 15s in optimal condition to get your position in good condition (in a park) , in a poor condition (inside of a house/office) maybe never get yours position...

then, the problem is when stop the gps... if i stop early the accuracy will be worst of the cell-tower. if i wait a lot of time the battery drain...

i'm not sure what is a good method using gps without a battery drain... maybe using qt-mobile... but i'm not sure...

tip: if you open another app using the gps ( nokia maps, location test, chat, etc ) the google latitute will get the gps position ( by design )

traysh 2011-01-24 06:52

Re: N900 + Google Latitude
 
2 Attachment(s)
Quote:

Originally Posted by rlinfati (Post 926665)
@rubberduck the version 4.6 is not the same version of traysh

the actual method is use the cell tower because is power efficient, the gps will drain your battery, you can not change it.

the interval is in seconds, and not new position are submit before of last_update_time + interval

the daemon is not running at the startup, i need more testing before of enable this option ( roaming, 3g can be expensive and a battery drain )

the version of traysh have some bugs, and need to be fixed before to submit to extras... but i backport some features from their code.

btw, if you run from terminal, can see a log of the operations...

It's good to know you're back in development. I didn't thought you did, that's why I didn't upload my hacks this week.

By moving the gui out of the daemon to a separate file and using QCoreApplication instead of QApplication, I got a working daemon that only takes 2MB of RAM, including shared libraries. The updates are working as they should now, the program won't connect to internet and will update when connected. Also, I implemented some code to not update the location with a less accurate position, it considers the uncertainty of the new and of the previous positions. As a daemon, it is working really very well now, tough bigger update intervals are still missing.

To reduce battery drain, might we could turn the gps off and turn it on only when we want a new position. Of course this aproach will only work if the update interval is big.

About using cell tower, here where I am it's not possible to get a position with a better accuracy than 800 meters, and that's a lot. My girlfriend has an iPhone 4 and her positions are very precise, so I'm pretty sure the official Google updater uses the GPS. It would be nice if we could measure the battery drainage...

I think we should split the app into 3 standalone binaries: a very lightweight daemon that only updates the position, a settings GUI witch can be run from the system settings but also from the daemon or the latitudeGUI (this already happens if the username is wrong) and the latitudeGUI witch is only a viewer and witch may run the daemon if it's not already running (to provide the updates) and the settings, to configure it. But that's your decision.

I'm attaching a new deb, please have a try. As I mentioned, the gui won't work, it won't load at all, but the daemon is working really very well.

Probably the changes I made to the code I was working on won't fit in the git anymore, will they? I'm a git newbie. How can I upload my changes? I'm attaching my current code here as well.

traysh 2011-01-24 08:07

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 927011)
i'm not sure what is a good method using gps without a battery drain... maybe using qt-mobile... but i'm not sure...

qt-mobility would be a nice idea, at least it would reduce the #ifdefs and we would be instantly ready for meego (I guess)

petur 2011-01-24 08:46

Re: N900 + Google Latitude
 
How about having some options on its positioning behaviour?
1) only use celltower info
2) use celltower + GPS it that happens to be on when updating
3) use GPS (activate it)

option 3 could have another setting that specifies the amount of time to wait fot it to get a fix (example: 30 seconds or 1 minute), so the user can limit batt drain.

Splitting daemon, settings and viewer sems like a splendid idea. The daemon should be as lightweight as possible.

Thanks a lot for your work!

rlinfati 2011-01-24 09:36

Re: N900 + Google Latitude
 
@traysh make a branch in git..., no push the updates to the master branch

rlinfati 2011-01-24 15:07

Re: N900 + Google Latitude
 
Quote:

Originally Posted by traysh (Post 927154)
Also, I implemented some code to not update the location with a less accurate position, it considers the uncertainty of the new and of the previous positions.

what happen if my last update was in a park (gps, very accurate) and now i'm in my house (cell tower, no accurate) ??

Quote:

Originally Posted by traysh (Post 927154)
As a daemon, it is working really very well now, tough bigger update intervals are still missing.

Please, check my last updates to git... i backport allmost all yours important features.

To include the config in "control panel" please not use the UI file...

Quote:

Originally Posted by traysh (Post 927154)
About using cell tower, here where I am it's not possible to get a position with a better accuracy than 800 meters, and that's a lot.

the accurate depend of yours city... i have 200~ mts

traysh 2011-01-24 15:48

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 927417)
what happen if my last update was in a park (gps, very accurate) and now i'm in my house (cell tower, no accurate) ??

The location will be updated if the distance between the two places is bigger than the sum of the two uncertainties (eph). As in the park the precision was very good, it's eph will be almost 0, so it will depend on the distance and the uncertainty of your house. If the eph in your house is 200m and the park is closer than that, there will be only an update if randomly you get a good precision. We can set a timeout to force the update after some minutes, tough. The way it is now is working very well for me. If it isn't for someone we can change it.

Quote:

Originally Posted by rlinfati (Post 927417)
Please, check my last updates to git... i backport allmost all yours important features.

I will.

Quote:

Originally Posted by rlinfati (Post 927417)
To include the config in "control panel" please not use the UI file...

I'm sorry, I didn't understand what you mean

traysh 2011-01-24 20:59

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 927417)
what happen if my last update was in a park (gps, very accurate) and now i'm in my house (cell tower, no accurate) ??

on second thought, this is a bug that will happen in situations like the one you described. I'll think about it.


All times are GMT. The time now is 04:38.

vBulletin® Version 3.8.8