SDM and Kite Aerial Photography

SDM contains all the usual features needed for ordinary photography together with some additional ones that are of benefit to KAP's.

Compared with the standard CHDK, the menu structure is simpler and the less-used features of the original CHDK have been removed.
In addition, many rarely-used uBasic commands have been removed without compromising the most useful scripts (including those for KAP).
To record a movie, use the simple command 'shoot_movie_for' followed by the duration in seconds.
All the motion-detection scripts work and you may now set image size and quality with script commands.
Two motion-detection commands may be useful for taking a photo when movement of the kite is at a minimum.
These are 'shoot_when_camera_steady' and 'shoot_when_no_movement_for'.
See SDM uBasic commands for details.

(if you think an important uBasic command should be re-included, post your comments at Yahoo 'StereoDataMaker' Group).
If you take RAW photos, these may be rapidly uploaded via the USB link and automatically converted to Adobe digital negative (DNG) format (and renamed if desired).
Dave Mitchell has provide an editor that allows you to readily view all your configuration menu choices, change them and save with current or new name.
You have the option, on certain cameras, of choosing whether the lens extends on power-up.
You also have the ability to force cameras, that only have automatic exposure mode, set a higher shutter-speed than they otherwise would.
This is done by setting 'ND Override' option to 'Out' and choosing constant exposure mode.
In bright light, the ND filter will be prevented from swinging into position and to compensate a higher shutter-speed will be set.
The speed could be 4x or 8x faster than what the camera intended using.

In a script, you may use the commands 'nd_filter_off', 'nd_filter_in' and 'nd_filter_out'.
It is often useful to have visible indication at a distance that your script has completed various steps.
Flashing the bright auto-focus LED can be used for this, using the commands 'af_led_on', 'af_led_off' and 'blink_led_for' .
The last command is probably safer as the af LED is probably not meant to be lit for long periods.
It will blink the LED for the time in the parameter following it.

e.g. blink_led_for 5 blinks the af LED for five seconds.

You may save up to ten (0 to 9) parameter sets for each script and Dave Mitchell has produced a script debugger for SDM.

For scripting, the uBasic command 'get_usb_power' returns the length of time (in 10 msec units) that a signal was present on the USB connector.
Devices such as the GentLED can output pulses of varying width (30, 60, 90, 120, 150 and 180) that your script can act on accordingly.

Here is an example by Dave Mitchell :-

@title gentled chdk2 script
rem author Dave Mitchell -
rem this script does nothing except display the state of the two transmitter joysticks that
rem correspond to the two receiver servo slots connected to the Gentled CHDK2
rem it's designed to let you test that your Gentled CHDK2 is working properly
rem you can modify this script by putting whatever camera actions you like in place of the "print" statements

while 1
a = get_usb_power
until a>0
if a <=4 then gosub "ch1up" else if a <=7 then gosub "ch1mid" else if a <=10 then gosub "ch1down" else if a <=13 then gosub "ch2up" else if a <=16 then gosub "ch2mid" else if a <=19 then gosub "ch2down" else print "error"

print "channel 1 up"

print "channel 1 middle"

print "channel 1 down"
print "channel 2 up"

print "channel 2 middle"

print "channel 2 down"

The USB signal is also treated by uBasic as a key, named "remote".
If you have a camera with a combined AV/USB socket and wish to use both (with a video downlink), see thisKAP Discussion posting. While the signal is present, the key is regarded as being pressed.

Here is a simple script to take a photo when the USB signal is present :-

@title Remote shutter
wait_click 1
is_key k "remote"
if k=1 then shoot
goto "loop"

When using scripts, remember that if Synch is enabled the shooting sequence will pause until the switch is released.
If you want to take a photo as soon as the switch is pressed or with the single pulse-width gentLES receiver,disable Synch by adding the command 'sync_off' at the start of your script.
The text 'Synch' will then not be displayed at the top of the screen.
If you set focus_mode in Bracketing mode to anything other than Off and you are in single shot mode, FAST is displayed at top of screen.
SDM should then react to the shortest of pulses
. For certain devices that generate multiple pulses (such as the receivers for wireless doorbells !), you may set a lockout time during which the pulses are ignored.
That is menu option Advanced\Miscellaneous\USB lockout time.
If you are interested in seeing examples of KAP, check Michael Layefsky's flickr gallery and Jim Power's Rome images.