Re: [QTMOKO] GPS pedometer app up on github

2009-09-22 Thread Jim Morris
Jim Morris wrote:
 I have checked in my very recent attempt to write a GPS based pedometer for 
 Qtmoko.
 It is at http://github.com/wolfmanjm/qtpedometer
 

I have completed this project (I think), short of fixing any bugs.

It seems to work pretty well now, especially with the final method of 
accumulating Trip distance, 
see the new settings dialog for setting that up.

Final feature list includes...

* Position and speed and bearing
* Trip time, distance and average speed
* Waypoint distance and direction
* Compass showing where north is and where the waypoint is
* Metric or US units
* Suspends sleep while running

Thanks to Anton for the Icon and the package feed. The new version will be up 
on the feed pretty 
soon I hope :)

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-22 Thread Jim Morris
Radek Polak wrote:
 Jim Morris wrote:

 I tried to build a package but I get the following error, if anyone knows 
 how to fix it please let
 me know and I'll build a package.
 myapps/qtpedometer $QPEDIR/bin/qbuild packages
 mkpkg qtpedometer
 You must run configure before you can run mkpkg
   at /aux/Stuff/qtmoko/build/sdk/src/build/bin/mkpkg line 25
 *** Error
 /myapps/qtpedometer/packages: Prerequisite failed
 /myapps/qtpedometer/package_pkg: Command execution failed
 $$path(QtopiaSdk:/src/build/bin/mkpkg,generated) 
 $$shellQuote($$path(/bin/qbuild,existing))
 $$shellQuote($$(FORMAT)) $$shellQuote($$path(.package_pkg,generated)) 
 $$shellQuote($$arch)
 $$shellQuote(unused) $$shellQuote($$LANGUAGES) $$shellQuote($$PKG_PATH)
 $$shellQuote($$path(.,project)) $$shellQuote($$path(.,generated)) 
 $$shellQuote(qtpedometer)
 $$shellQuote(A GPS based pedometer) $$shellQuote(untrusted) $$shellQuote() 
 $$shellQuote()
 $$shellQuote(1.0) $$shellQuote(Untrusted) $$shellQuote(GPL) $$shellQuote(Jim 
 Morris
 mor...@wolfman.com) $$shellQuote(Anonymous2 install_target 
 install_desktop) $$shellQuote(0)
 $$shellQuote($$(SPLIT_I18N))
 
 You must run configure before you can run mkpkg
   at /aux/Stuff/qtmoko/build/sdk/src/build/bin/mkpkg line 25
 


I found the problem it is related to taht sdk/sdk bug it appears that gets put 
in a lot of files, 
rather than trying to fix that, I simply do this and it fixes the problem..

  cd build/sdk
  ln -s ../sdk sdk



-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-20 Thread ANT

Jim Morris wrote:
As I still can't seem to build a package I would appreciate if ANT could
update the package for me.

I've just updated the package according to your commit ad0ac0ea. when you'll
achieve new milestone or fix major bug, let me know. BTW, please add an icon
for desktop entry.

Cheers,
Anton
-- 
View this message in context: 
http://n2.nabble.com/QTMOKO-GPS-pedometer-app-up-on-github-tp3666550p3679075.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-20 Thread Jim Morris
ANT wrote:
 
 I've just updated the package according to your commit ad0ac0ea. when you'll
 achieve new milestone or fix major bug, let me know. BTW, please add an icon
 for desktop entry.

Thanks Anton,

I'm not very good at icons, but I put one in pics, and updated the desktop file 
and qbuild file.

It'll do as a placeholder.

Thanks

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-19 Thread Jim Morris
I have updated this since the initial announcement.

Added metric option for the Europeans :)

Added a compass display to show where North is relative to motion.

Added waypoint, will show distance from waypoint and the compass will show the 
direction to the way 
point.

Now suspends suspend when running.

Numerous fixes, and some improvement of the accuracy of the trip distance in 
some cases.

As I still can't seem to build a package I would appreciate if ANT could update 
the package for me.
(TIA).

the latest binary and source is on GITHUB 
http://github.com/wolfmanjm/qtpedometer

Thanks


-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread ANT

Hello, Jim,

Thanks for the apps.
I added QtPedometer package to QtMoko feed. Small patch was applied to the
.desktop file to make the package installable. You can pull changes from
[1]. This is an intermediate place between your repo and qtmoko-apps [2].

As for QtopiaGPS, it would be nice if the app could start/stop required
services by itself (which is impossible just now becouse it is needed to
modify gpsd config file).

[1] http://github.com/radekp/qtpedometer/
[2] http://github.com/Sektor/qtmoko-apps/

Regards,
Anton

-- 
View this message in context: 
http://n2.nabble.com/QTMOKO-GPS-pedometer-app-up-on-github-tp3666550p3668606.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
ANT wrote:
 Hello, Jim,
 
 Thanks for the apps.
 I added QtPedometer package to QtMoko feed. Small patch was applied to the
 .desktop file to make the package installable. You can pull changes from
 [1]. This is an intermediate place between your repo and qtmoko-apps [2].
 
 As for QtopiaGPS, it would be nice if the app could start/stop required
 services by itself (which is impossible just now becouse it is needed to
 modify gpsd config file).
 
 [1] http://github.com/radekp/qtpedometer/
 [2] http://github.com/Sektor/qtmoko-apps/
 
 Regards,
 Anton
 

Thanks Anton,

Yea qtopiagps is more of a testing app, and requires GPSD as the Whereabouts 
API in Qt does not 
provide satellite info. It is easy enough to start and stop gpsd from the app, 
but as you say out of 
the box that won;t work as the configuration file needs to be modified.

One solution is for me to eliminate gpsd, and talk directly to the chip as 
qtpedometer does, but 
that is not the right way to do it either as you can only have one gps app 
running.

I think the long term solution is to copy FSO, and use DBUS.

What do you think?

Thanks
Jim

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread ANT

Jim Morris wrote:
I think the long term solution is to copy FSO, and use DBUS. 
What do you think? 

As for me, it would be better to add necessary functionality to Whereabouts
API (if we are talking about long term plans).

Cheers,
Anton

-- 
View this message in context: 
http://n2.nabble.com/QTMOKO-GPS-pedometer-app-up-on-github-tp3666550p3671080.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Vincent Meurisse
 I added QtPedometer package to QtMoko feed. 
Great idea.
two suggestions:
- disallow the phone from suspend
- http://en.wikipedia.org/wiki/Metre_Convention

-- 
Vincent Meurisse

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Radek Polak
ANT wrote:

 Jim Morris wrote:
 I think the long term solution is to copy FSO, and use DBUS. 
 What do you think? 
 
 As for me, it would be better to add necessary functionality to Whereabouts
 API (if we are talking about long term plans).

I havent looked at neither whereabouts nor GPSD api, but i think it
would be nice if we could support both of them. So that qtopia apps can
use whereabouts api and X or some legacy applications can use gpsd at
the same time.

It would mean, that whereabouts server has to open socket at the same
port as gpsd does and emulate it.

But it's just an idea :)

Regards

Radek


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
Vincent Meurisse wrote:
 I added QtPedometer package to QtMoko feed. 
 Great idea.
 two suggestions:
 - disallow the phone from suspend
 - http://en.wikipedia.org/wiki/Metre_Convention
 
Next on my list is to allow switch to metric or US system. (Its relatively 
easy).

I'll see how to stop the phone from suspending.

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
Radek Polak wrote:
 
 It would mean, that whereabouts server has to open socket at the same
 port as gpsd does and emulate it.
 

Actually the default built-in plugin for the Whereabouts API does use GPSD, and 
if you run my app 
with the parameter gpsd, it will use gpsd instead of opening the serial port 
directly.

However GPSD has been deprecated in favor of ogpsd in FSO, which provides the 
same functionality.

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread ANT

Jim Morris wrote:
I'll see how to stop the phone from suspending.

Tips:
#include QtopiaApplication
QtopiaApplication::setPowerConstraint(QtopiaApplication::DisableSuspend);
//prevent suspending
QtopiaApplication::setPowerConstraint(QtopiaApplication::Enable); //restore
power saving settings

--
Anton
-- 
View this message in context: 
http://n2.nabble.com/QTMOKO-GPS-pedometer-app-up-on-github-tp3666550p3671931.html
Sent from the Openmoko Community mailing list archive at Nabble.com.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
ANT wrote:
 Jim Morris wrote:
 I'll see how to stop the phone from suspending.
 
 Tips:
 #include QtopiaApplication
 QtopiaApplication::setPowerConstraint(QtopiaApplication::DisableSuspend);
 //prevent suspending
 QtopiaApplication::setPowerConstraint(QtopiaApplication::Enable); //restore
 power saving settings

Already done and checked in :)

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Vincent Meurisse
On Friday 18 September 2009 21:31:57 Jim Morris wrote:
 I'll see how to stop the phone from suspending
 
The best would be to have this included in Whereabouts so any application 
using GPS automatically benefit from it. If it also let the screen blank, it 
would be perfect for battery life.

-- 
Vincent Meurisse

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
Vincent Meurisse wrote:
 On Friday 18 September 2009 21:31:57 Jim Morris wrote:
 I'll see how to stop the phone from suspending

 The best would be to have this included in Whereabouts so any application 
 using GPS automatically benefit from it. If it also let the screen blank, it 
 would be perfect for battery life.
 

I don't think changing the Whereabouts API is an option, technically we could 
do it for qtmoko, but 
then any app written would only work on qtmoko and not other qtextended device. 
Which defeats the 
whole purpose of using Qt.

Right now I temporarily disable suspend, ut the screen will still blank if the 
global options are 
set accordingly.

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QTMOKO] GPS pedometer app up on github

2009-09-18 Thread Jim Morris
Jim Morris wrote:
 I have checked in my very recent attempt to write a GPS based pedometer for 
 Qtmoko.
 It is at http://github.com/wolfmanjm/qtpedometer
 

There is a serious accuracy problem with determining the distance traveled 
during a trip.

I did some research, and there does not seem to be a consensus on how to do it, 
and the GPS device 
manufacturers obviously have proprietary solutions they do not disclose or 
discuss.

All the open source programs I looked at do it the simple but very inaccurate 
way I first tried. 
They basically calculate the distance between successive fixes (segments) and 
accumulate that as the 
distance. This has about a 20%-50% error (estimated).

The next attempt I discovered on the web (and how I do it now) is 
non-intuitive, but basically you 
take the current speed, and multiply it by the delta time since the last 
update. This is much more 
accurate, but still accumulates errors even if you are standing still it 
accumulates a small error. 
It works really well when driving though, but for walking (and I suspect 
biking), it is still 
inaccurate.

Next I added a speed threshold, which you must go over before the distance will 
accumulate, for 
walking I set that to .4 miles per hour or 0.1788159993648455703 meters per 
second.

This works well if you are standing still, as it does not accumulate any 
distance, but it increased 
the error significantly on a driving trip, when I compared the trip distance of 
my cars GPS with my 
version. I haven't tried a walking test yet.

So if anyone has any ideas how to make this more accurate I would welcome 
suggestions.

Thanks
Jim

-- 
Jim Morris, http://blog.wolfman.com

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


[QTMOKO] GPS pedometer app up on github

2009-09-17 Thread Jim Morris
I have checked in my very recent attempt to write a GPS based pedometer for 
Qtmoko.
It is at http://github.com/wolfmanjm/qtpedometer

I also updated qtopiagps (an xgps clone) to run on qtmoko: 
http://github.com/wolfmanjm/qtopiagps

There is a binary there too if you don't want to compile it.
The only way to make it run at the moment is scp it to your device and run it 
from file manager.

I tried to build a package but I get the following error, if anyone knows how 
to fix it please let
me know and I'll build a package.

myapps/qtpedometer $QPEDIR/bin/qbuild packages
mkpkg qtpedometer
You must run configure before you can run mkpkg
  at /aux/Stuff/qtmoko/build/sdk/src/build/bin/mkpkg line 25
*** Error
/myapps/qtpedometer/packages: Prerequisite failed
/myapps/qtpedometer/package_pkg: Command execution failed
$$path(QtopiaSdk:/src/build/bin/mkpkg,generated) 
$$shellQuote($$path(/bin/qbuild,existing))
$$shellQuote($$(FORMAT)) $$shellQuote($$path(.package_pkg,generated)) 
$$shellQuote($$arch)
$$shellQuote(unused) $$shellQuote($$LANGUAGES) $$shellQuote($$PKG_PATH)
$$shellQuote($$path(.,project)) $$shellQuote($$path(.,generated)) 
$$shellQuote(qtpedometer)
$$shellQuote(A GPS based pedometer) $$shellQuote(untrusted) $$shellQuote() 
$$shellQuote()
$$shellQuote(1.0) $$shellQuote(Untrusted) $$shellQuote(GPL) $$shellQuote(Jim 
Morris
mor...@wolfman.com) $$shellQuote(Anonymous2 install_target install_desktop) 
$$shellQuote(0)
$$shellQuote($$(SPLIT_I18N))

You must run configure before you can run mkpkg
  at /aux/Stuff/qtmoko/build/sdk/src/build/bin/mkpkg line 25


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community