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

New GPS functionality for the SX230

  • 34 Replies
  • 9436 Views
Re: New GPS functionality for the SX230
« Reply #20 on: 02 / December / 2014, 15:14:07 »
Advertisements
After exchanging numerous messages with philmoz,  I backed out all the code for converting the GPS functionality to module format. *

That still leaves quite a few changes & improvements (in addition to translation to English for support reason) :
  • Improve interlocks so that a task can never be started while it is already running and all tasks shutdown cleanly when not needed anymore.
  • Protect shared data region used by multiple tasks so that data updates never corrupt data reads.
  • Numerous small tweaks for unused variables, mallocs without free, and dead code sections.
  • Activate the GPS functionality when selected regardless of whether the CHDK OSD is visible or not.
  • Cleanups to the menu entries so mutually exclusive entries deselect the unused entry when selected.

Still to do :
  • The compass needle wanders randomly when you stand still. Probably want to lock at last valid value.
  • Text messages really need to use a semi-transparent grey background.  Errors have been converted to solid background already.
  • Auutomatic shutdown modes (i.e. when image tagged) should be optional via menu choice.
  • Location of on screen icons and text should be edited by OSD editor
  • Allow user to acknowledge  "can't navigate to xxx" error messages with a key press rather than just a five second timeout
  • Center error messages on screen

* note that many of the small changes will also make it easier to convert to module format in the future


« Last Edit: 02 / December / 2014, 15:18:34 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 13295
Re: New GPS functionality for the SX230
« Reply #21 on: 12 / December / 2014, 23:33:57 »
I'm OK with adding this to 1.3 in principle, but since I don't have a GPS enabled cam, I'd appreciate if anyone else who uses the GPS code could provide feedback.
Don't forget what the H stands for.

Re: New GPS functionality for the SX230
« Reply #22 on: 13 / December / 2014, 14:53:16 »
I'm OK with adding this to 1.3 in principle, but since I don't have a GPS enabled cam, I'd appreciate if anyone else who uses the GPS code could provide feedback.
I've posted patches and changes here several times over the last couple of weeks.  Interest in this seems to be pretty low - at least in part because there are only a small handful of models with GPS.   At this point,  I have not really changed any of the existing functionality - I've just made it not occasionally crash and cleaned up the UI.

Maybe this will help? Attached are two patch files that add a "simulator" to the GPS code.  The gps_simulate_current patch will allow any camera to build with the current svn code as if it has GPS capability and simulate movement.  The gps_simulate_new patch file is the new version with the simulation capability added.   

To use either patch,  add  #define CAM_HAS_GPS 1  to the platform_camera.h of the camera you want to test.

I know this is not the same as field testing with a GPS camera.  But it should give you an indication of the value of the changes.  I'm going to use the simulation function as I work on better performance after this gets into the svn.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 13295
Re: New GPS functionality for the SX230
« Reply #23 on: 13 / December / 2014, 15:36:20 »
I've posted patches and changes here several times over the last couple of weeks.  Interest in this seems to be pretty low - at least in part because there are only a small handful of models with GPS.   At this point,  I have not really changed any of the existing functionality - I've just made it not occasionally crash and cleaned up the UI.
Yup, understood. I mainly wanted to encourage anyone who is currently using this functionality to make sure it still does what they expect.

Quote
Maybe this will help? Attached are two patch files that add a "simulator" to the GPS code.  The gps_simulate_current patch will allow any camera to build with the current svn code as if it has GPS capability and simulate movement.  The gps_simulate_new patch file is the new version with the simulation capability added.   

To use either patch,  add  #define CAM_HAS_GPS 1  to the platform_camera.h of the camera you want to test.

I know this is not the same as field testing with a GPS camera.  But it should give you an indication of the value of the changes.  I'm going to use the simulation function as I work on better performance after this gets into the svn.
This definitely seems like a good idea. Thanks :)
Don't forget what the H stands for.


Re: New GPS functionality for the SX230
« Reply #24 on: 13 / December / 2014, 15:53:12 »
This definitely seems like a good idea. Thanks :)
Would it make sense to do a little cleanup and make this into a more permanent build option rather than a one time patch?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 13295
Re: New GPS functionality for the SX230
« Reply #25 on: 13 / December / 2014, 16:26:25 »
This definitely seems like a good idea. Thanks :)
Would it make sense to do a little cleanup and make this into a more permanent build option rather than a one time patch?
Without having looked at the code yet, that sounds useful unless it makes it a significantly harder to maintain.
Don't forget what the H stands for.

Re: New GPS functionality for the SX230
« Reply #26 on: 13 / December / 2014, 16:31:34 »
Without having looked at the code yet, that sounds useful unless it makes it a significantly harder to maintain.
Working on it now.  The simulation is simplistic - walks in a big circle at 25 km/hr.   I think it will make it a lot easier to experiment with and optimize the rest of the code.   But I would not hold up adding the core stuff to 1.3.0 for it - another good 1.4.0 project ;)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 13295
Re: New GPS functionality for the SX230
« Reply #27 on: 13 / December / 2014, 16:38:52 »
Working on it now.  The simulation is simplistic - walks in a big circle at 25 km/hr.   I think it will make it a lot easier to experiment with and optimize the rest of the code.   But I would not hold up adding the core stuff to 1.3.0 for it - another good 1.4.0 project ;)
Agreed, doesn't need to be in the 1.3 patch :)

Don't forget what the H stands for.


Re: New GPS functionality for the SX230
« Reply #28 on: 13 / December / 2014, 18:16:37 »
Made some updates to the simulator file - turns out position data is stored as D:M:S so the M & S part needs to be handled modulus 60.   I also added increasing clock data to the simulation.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: New GPS functionality for the SX230
« Reply #29 on: 14 / December / 2014, 12:36:18 »
The simulator is proving useful for shaking out the new code.  Once the bugs in the simulator are fixed that is.

New reference versions attached - fixes to simulator and to new GPS code included.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics