[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Gimbal passthrough & triggering in r214 - readme

Gimbal passthrough & triggering in r214 - readme

News, Setup, Compiling, Flashing, Development

Gimbal passthrough & triggering in r214 - readme

Postby Max » Fri Aug 23, 2013 1:31 am

Long-awaited (by some) changes to allow several radio passthrough and camera triggering options. Will update QGC soon to reflect all the settings and new logging. The following text outlines the changes (we'll get our "documentation team" on adding details to the wiki ASAP ;) ).

Please do note that this release changes the current behavior of the GMBL_PITCH_PORT setting. See below for details.

Cheers,
-Max

-----------------

New/changed params with default values:

GMBL_PITCH_PORT 0 // Gimbal pitch stabilization output port. 0 == disabled
GMBL_TILT_PORT 0 // Gimbal manual/PoI tilt control output port (can be same as PITCH_PORT to combine the 2 functions). 0 == disabled
GMBL_TRIG_PORT 0 // Triggering output port. 0 == disabled
GMBL_TRIG_CH_NEU 0 // Trigger radio channel AQ value at neutral position (to allow automated triggering)
GMBL_TRIG_ON_PWM 2100 // PWM output of trigger at full-press (on) position (for automated triggering)
GMBL_TRIG_ON_TIM 1000 // Time to keep shutter at on position, in ms
GMBL_TRIG_DIST 0.0f // Activate trigger every this many meters. 0 == disabled
GMBL_TRIG_TIME 0 // Activate trigger every this many seconds. 0 == disabled
GMBL_PSTHR_CHAN 0 // Pure passthrough radio channel (eg. camera zoom, pan axis, lights, etc). 0 == disabled
GMBL_PSTHR_PORT 0 // Pure passthrough output port. 0 == disabled


Stabilized pitch control vs. AUX3 tilt passthrough:

GMBL_PITCH_PORT - Provides only stabilization output. * New behavior *
GMBL_TILT_PORT - Provides manual tilt control via AUX3, mixed with PoI tilt (when active).

You can enable either or both ports at once. To combine the 2 functions to one output (which is the old GMBL_PITCH_PORT behavior), configure BOTH params for the SAME port number. This is a change from the old behavior which may require current users to reconfigure. But it is very flexible, with minimum amount of configuration.


GEAR channel passthrough:

GMBL_TRIG_PORT - Output port for the camera trigger (same PWM freq. as roll/pitch outputs). For basic usage, this is simply a direct passthrough for GEAR channel. If not needing automated triggering, there is nothing else to configure.


For automated triggering based on time/distance (or custom code, eg. wpt triggering):

GMBL_TRIG_CH_NEU - This defines the "neutral" state of the GEAR channel when no manual triggering is being done. It is used by the automated triggering to determine when it is OK to fire (it can also be thought of as the "on" position for auto-triggering). This can be set to any "AQ" radio value (-1024 - +1024), for example zero for a middle switch position, or -500 for switch low. The actual radio value must be within ( GMBL_TRIG_CH_NEU +/- p[CTRL_DEAD_BAND] ). So if zero is defined for this param, the actual channel value would need to be within +/- 40 (by default).

GMBL_TRIG_ON_PWM - Pulse width to output when trigger is active. _This is for automatic mode only_ (manual mode is completely passthrough).

GMBL_TRIG_ON_TIM - How long to keep the trigger output level active, in ms. After this, the output returns to whatever GEAR channel is sending. Which would typically be back to the neutral (trigger off) position, unless the user has moved the GEAR channel on purpose (which overrides auto mode anyway).

GMBL_TRIG_DIST & GMBL_TRIG_TIME - Set one/both to a value to enable automatic triggering. The triggering starts/runs only when in FLYING state. If both are set, whichever condition is met first will fire the trigger (time is checked first). Manual (GEAR channel) control has priority over automatic triggering. If manual override is active, the next auto-trigger will happen right after GEAR is moved back to neutral position, or when the next time/distance interval is reached, whichever is later.

To use the GEAR channel to turn automatic triggering on/off, simply keep the channel at a non-neutral position, and move it to neutral when you want auto triggering to run. If your manual trigger device (IR/USB/servo/etc) would normally react to that channel position, simply disconnect it, change the script, pick an unsed radio channel position, or whatever.

To activate trigger from within custom code, be sure to include gimbal.h and then simply set gimbalData.trigger = 1 when needed.

Trigger Logging:

Each activation of the trigger, automatic or manual, is logged as an incrementing number in LOG_GMBL_TRIGGER. While the trigger is active (automatically held at GMBL_TRIG_ON_PWM, or when GEAR is not at neutral), the current trigger count is logged. When no trigger is active (and channel at neutral), a zero value is logged. This logs multiple things at once-- exactly when the trigger was activated, the duration of activation, plus the activation count. It does not distinguish between auto triggers and manual, but that data is available via the GEAR channel log. Exact position of photo could be derived by taking the initial activation time and adding the time it takes for your camera to fire. Export options will be added to LogDump, including KML/GPX waypoint markers.


Extra Passthrough option:

GMBL_PSTHR_CHAN & GMBL_PSTHR_PORT - Simply provide an auxiliary passthrough port for any use. It runs at the same PWM freq. as roll/pitch outputs. To enable, configure input radio channel and output PWM port number.
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Gimbal passthrough & triggering in r214 - readme

Postby r0sewhite » Fri Aug 23, 2013 2:03 am

Max, you're the hero of the day. ;)

That all sounds very promising and comes in the right time for me to make the first test flight with the BL gimbal.
r0sewhite
 
Posts: 113
Joined: Tue Oct 16, 2012 12:08 am

Re: Gimbal passthrough & triggering in r214 - readme

Postby Jdmagoo » Fri Aug 23, 2013 5:02 am

Awesome work guys, this feature looks really good. Just love the continued development of this, so glad I invested into autoquad
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Re: Gimbal passthrough & triggering in r214 - readme

Postby LPR » Fri Aug 23, 2013 5:28 am

Max

Great work.

Larry
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA

Re: Gimbal passthrough & triggering in r214 - readme

Postby Cookiemonsta » Fri Aug 23, 2013 7:07 am

Well done Max ;)
Will test some of these soon.

Tobi
Cookiemonsta
 
Posts: 126
Joined: Thu Apr 11, 2013 3:31 pm

Re: Gimbal passthrough & triggering in r214 - readme

Postby Ecky » Fri Aug 23, 2013 8:05 am

Hi Max,

the implementation sounds realy great.
I cant await the end of my vacation to test !

Greatings
Christian
Ecky
 
Posts: 70
Joined: Wed Nov 21, 2012 11:11 am
Location: Germany, Bonn

Re: Gimbal passthrough & triggering in r214 - readme

Postby sandmen » Fri Aug 23, 2013 8:52 am

Hi Max,
can we implement a min/max parameter to get out the pitch angle in degree/rad?
Or a factor, what ever. I/We need it for poi calculations.
sandmen
 
Posts: 997
Joined: Fri Jun 22, 2012 7:25 am

Re: Gimbal passthrough & triggering in r214 - readme

Postby JussiH » Fri Aug 23, 2013 9:37 am

Max, thanks again for taking time to do this and document it so well. I am gonna run some tests over the weekend and report back.
JussiH
 
Posts: 2103
Joined: Thu Jun 21, 2012 9:25 pm

Re: Gimbal passthrough & triggering in r214 - readme

Postby kinderkram » Fri Aug 23, 2013 2:06 pm

Oh boy, how many sleepless nites passed by to make you achieve this? :lol:

Great stuff as always, Max!
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Gimbal passthrough & triggering in r214 - readme

Postby Kisssys » Fri Aug 23, 2013 2:24 pm

As was mentioned in another thread, as it is tested we need to figure out what we need as far as triggering at a waypoint to round out the whole package.
Steve
Kisssys
Kisssys
 
Posts: 1340
Joined: Sat Jun 23, 2012 9:23 pm

Next

Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 11 guests

cron