Is there a script that would allow for pictures to be taken based on GPS - General Discussion and Assistance - CHDK Forum

Is there a script that would allow for pictures to be taken based on GPS

  • 5 Replies
  • 3950 Views
Advertisements
I am currently working on a NASA-backed High Altitude Weather Balloon project and I was curious if there was as script that would allow for a canon to start taking pictures based on it's GPS coordinates or a script that would allow a gps module to tell the camera to start taking a rapid series of pictures when you reach this height?

*

Offline reyalp

  • ******
  • 14121
Re: Is there a script that would allow for pictures to be taken based on GPS
« Reply #1 on: 24 / January / 2016, 14:57:20 »
I am currently working on a NASA-backed High Altitude Weather Balloon project and I was curious if there was as script that would allow for a canon to start taking pictures based on it's GPS coordinates or a script that would allow a gps module to tell the camera to start taking a rapid series of pictures when you reach this height?
If you are using an external flight computer (could be an arduino etc), than you could start a script using the USB Remote or PTP Extension. Or if you control the power with it, just use a startup script and power on the camera when you reach the desired altitude.

If you want to use a camera with a built-in GPS, I think you could do this using the GPS propcase. You would need to write the script yourself, or find someone to write it. Look at core/gps.c in the CHDK source for how this is used.

If you just want to start at some approximate altitude, some kind of pressure switch connected the USB remote might be a simpler approach.
Don't forget what the H stands for.

Re: Is there a script that would allow for pictures to be taken based on GPS
« Reply #2 on: 26 / January / 2016, 13:07:05 »
Hello to all.
If I may add to the question, would it be possible with a script to get the altitude from the propcase ?

*

Offline reyalp

  • ******
  • 14121
Re: Is there a script that would allow for pictures to be taken based on GPS
« Reply #3 on: 26 / January / 2016, 16:22:05 »
Hello to all.
If I may add to the question, would it be possible with a script to get the altitude from the propcase ?
I don't have a GPS capable camera to verify, but it should be possible. I'd suggest looking at the gpsLib.lua module included in the CHDK/LUALIB

The C code may also be a useful reference https://www.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/core/gps.c#ln598

IIRC there are some speed/altitude limits on commercial GPS modules, and Canon wouldn't expect these to be used much over ~40k ft, so I wouldn't bet your mission on the assumption you will get good data at HAB altitudes.
Don't forget what the H stands for.


Re: Is there a script that would allow for pictures to be taken based on GPS
« Reply #4 on: 27 / January / 2016, 05:49:13 »
Thanks Reyalp for answering.
I'm afraid i'm not able to understand all this. I can hardly write some scripts for kap, with SDM, and never started learning lua ) but I was thinking that since playback mode can read this altitude ( with the S100 at least i'm sure , although with some major errors ) maybe this was written in some propcase. More probably in Exif ? not sure.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Is there a script that would allow for pictures to be taken based on GPS
« Reply #5 on: 27 / January / 2016, 08:11:21 »
Lua is easier to learn than the rudimentary uBASIC. ;)

The GPS lib returns all necessary values from the GPS propertycase in human readable format as an array. There is an example script in the script subfolder 'test', called gps_test.lua.

msl
« Last Edit: 27 / January / 2016, 08:13:07 by msl »
CHDK-DE:  CHDK-DE links

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal