New GPS functionality for the SX230 - General Discussion and Assistance - CHDK Forum

New GPS functionality for the SX230

  • 34 Replies
  • 14259 Views
New GPS functionality for the SX230
« on: 07 / March / 2012, 15:10:09 »
Advertisements
Hi,

genie (a german developer) and me have integrated enhanced functionality to GPS. The functionality was integrated on the german trunk first and is about to be released in the international trunk soon.

I want to point out especially the delayed tagging (we named it this way), where a picture is not necessarily been tagged at once (when there is no GPS availabe), but CHDK tries for a certain amount of time to get a GPS-tag before it powers down the cam automatically.

We documented all the GPS settings - nevertheless the documentation still misses some features to be explained like a blinking LED when the cam searches for a GPS signal.

Unfortunately the documentation is only available in german. I have translated it using google translate. I have not read through the doc, so you will find some strange phrases inside the doc.

Here it is - enjoy:

goo.gl/ta69u

Re: New GPS functionality for the SX230
« Reply #1 on: 09 / March / 2012, 14:21:39 »
Hi again,

today golem.de (famous for its IT-news) released an article about our GPS-work.

Check it out:

http://goo.gl/Yzhhu

Re: New GPS functionality for the SX230
« Reply #2 on: 27 / November / 2014, 22:03:01 »
I finally spend some time over the last week looking at CHDK GPS functionality on my S100.  Started out just wanting to update the CHDK manual (using the CHDK-DE google translated manual as a basis) but then things got a little out of control.

Attached is a patch file with the results so far.  Principal changes are :

  • Tranlated symbols & comments from German to English.  I hope nobody will be too offended by this but as philmoz pointed out here having the code all in German has & will hinder much further development
  • Added rudi's changes from this post : http://chdk.setepontos.com/index.php?topic=12076.msg118315#msg118315
  • Start the main data task from spytask rather than CHDK OSD. Previously, CHDK GPS code would not run until CHDK OSD was enabled.
  • Conversion to .flt module format for memory space saving.
  • Changes to many (English) text strings to more closely define their function and to fit on the S100 LCD (which is narrower than the SX230 apparently)
  • Change to the main GPS menu so that selecting one of compass or track to home or track to picture mode resets the the others (they are mutually exclusive).
  • Converted error & warning messages to have a solid white background (from tranparent) to make sure they are seen.
  • Show compass mode no longer displays navigation info ( although I will put back some direction and rate info when I get a minute)
  • Simplified the code that gets (optionally) added to kbd.c (used so that pressing the DISP button cancels timeouts).
  • Assorted small bug fixes - things like mallocs without free, tasks that end without calling ExitTask(),  interlock that don't always interlock, and variable that do not do anything

As far as the conversion to .flt module,  I'm not too happy with how I had to add stuff to generic/wrappers.c so that non-GPS cameras build properly (labels in module_exportlist.c require real target addresses - unlike labels in core/gps.c which seem to be ignored by the linker if the code is not actually called?)  I'm sure there must be a better way?

Oh, and it crashes occasionally.   But it also crashed occasionally prior to my making any changes.  So it may be the same bug or I may have fixed that one but created others.  Looking at ROMLOG.LOG, it seems to kill random task although InitCHDKPTP seems to be come up a lot of the time (both before and after the patch is applied).

Just thought I'd put this out for comments prior to putting a lot more work into it.


Edit : added point 3 about starting GPS_DATA task from spytask rather that CHDK OSD
« Last Edit: 28 / November / 2014, 04:39:30 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: New GPS functionality for the SX230
« Reply #3 on: 28 / November / 2014, 14:33:18 »
Update : revised patch that handles resetting menu items better when CHDK GPS functionality is disabled.  Also fixed the interlock for gpx logging unload so that it can be reloaded.

This version still unloads the GPS modules when CHDK GPS is disabled and all its GPS tasks have closed.  If I disable that, I can't make the application crash.  With it enabled, you can very occasionally get a crash when unloading.  Not sure if it's my code or something in the module load/unload.  Most likely mine.

Update : the occasional crash when unloading usually happens after you cause the GPS module to unload and then try to load something else ( modinsp.flt or  dng.flt for example).
« Last Edit: 28 / November / 2014, 18:42:02 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: New GPS functionality for the SX230
« Reply #4 on: 28 / November / 2014, 18:57:06 »
Update : the occasional crash when unloading usually happens after you cause the GPS module to unload and then try to load something else ( modinsp.flt or  dng.flt for example).

Can you post the romlog.log, modules.log and dump files please.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: New GPS functionality for the SX230
« Reply #5 on: 28 / November / 2014, 20:23:10 »
Can you post the romlog.log, modules.log and dump files please..
Working on it.  Apparently the best way to fix this sort of problem is compile so that all the dump files are preserved.  That way you will never get the camera to crash.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: New GPS functionality for the SX230
« Reply #6 on: 28 / November / 2014, 20:37:46 »
Can you post the romlog.log, modules.log and dump files please..
Working on it.  Apparently the best way to fix this sort of problem is compile so that all the dump files are preserved.  That way you will never get the camera to crash.
Okay - got bored pressing buttons so I changed spytask to cause the gps module to load and then unload a lot.  Dump files from that build and the ROMLOG.LOG and MODULES.LOG attached.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: New GPS functionality for the SX230
« Reply #7 on: 28 / November / 2014, 20:42:29 »
Update : revised patch that handles resetting menu items better when CHDK GPS functionality is disabled.  Also fixed the interlock for gpx logging unload so that it can be reloaded.

This version still unloads the GPS modules when CHDK GPS is disabled and all its GPS tasks have closed.  If I disable that, I can't make the application crash.  With it enabled, you can very occasionally get a crash when unloading.  Not sure if it's my code or something in the module load/unload.  Most likely mine.

Update : the occasional crash when unloading usually happens after you cause the GPS module to unload and then try to load something else ( modinsp.flt or  dng.flt for example).

Only had a quick look so far, couple of minor things:
- use GPS_VERSION in h_gps instead of SIMPLE_MODULE_VERSION (modules.c)
- gps.c uses camera_info and conf structs so set versions for these in _module_info (CONF_VERSION & CAM_INFO_VERSION).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: New GPS functionality for the SX230
« Reply #8 on: 28 / November / 2014, 21:13:19 »
Can you post the romlog.log, modules.log and dump files please..
Working on it.  Apparently the best way to fix this sort of problem is compile so that all the dump files are preserved.  That way you will never get the camera to crash.
Okay - got bored pressing buttons so I changed spytask to cause the gps module to load and then unload a lot.  Dump files from that build and the ROMLOG.LOG and MODULES.LOG attached.

Did you manually start the Module Inspector while spytask was loading/unloading the GPS module?

It looks like it crashed when the module inspector called GetMemInfo; but I'm not sure where in the firmware it got to (which firmware version do you have?).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: New GPS functionality for the SX230
« Reply #9 on: 28 / November / 2014, 21:47:50 »
Did you manually start the Module Inspector while spytask was loading/unloading the GPS module?
Yup - a lot of time the crashes I have seen were when I clicked on the Module Inspector to run it. That time too.

Quote
It looks like it crashed when the module inspector called GetMemInfo; but I'm not sure where in the firmware it got to (which firmware version do you have?).
101a
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics