dB Difference Calculator

Software Defined Radios of all Types
User avatar
IB4TL
Member
Member
Reactions:
Posts: 4237
Joined: Mon Nov 05, 2018 6:02 pm

dB Difference Calculator

#1

Post by IB4TL »


This calculator finds the difference between two dB values.

function doValidate_1(form) { window['cff_enabling_form' ] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); _form.validate().settings.ignore = '.ignore,.ignorepb'; _form.removeData('being-submitted'); _form.find('.submitbtn-disabled').removeClass('submitbtn-disabled'); _form.find('.cff-processing-form').remove(); }; window['cff_disabling_form'] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); if(cff_form_disabled(_form)) return; _form.find('.pbSubmit').addClass('submitbtn-disabled'); _form.data('being-submitted',1); var d = document.createElement('div'); $dexQuery(d).addClass('cff-processing-form').appendTo(_form.find('#fbuilder')); }; window['cff_form_disabled' ] = function(_form){ if(!(_form instanceof $dexQuery)) _form = $dexQuery(_form); return ('undefined' != typeof _form.data('being-submitted')); }; var form_identifier = '_1'; if(typeof cpcff_validation_rules == 'undefined') cpcff_validation_rules = {}; if(typeof cpcff_validation_rules[form_identifier] == 'undefined') cpcff_validation_rules[form_identifier] = {}; var $dexQuery = (fbuilderjQuery) ? fbuilderjQuery : jQuery.noConflict(), _form = $dexQuery("#cp_calculatedfieldsf_pform"+form_identifier), form_disabled = function(){cff_form_disabled(_form);}, disabling_form = function(){cff_disabling_form(_form);}, enabling_form = function(){cff_enabling_form(_form);}; if(form_disabled()) return false; _form.validate().settings.ignore = '.ignore'; var cpefb_error = !_form.validate().checkForm(); var validation_rules = cpcff_validation_rules[form_identifier], processing_form = function() { for(var rule in validation_rules) { if(!validation_rules[rule]) return; } _form.find("[name$='_date'][type='hidden']").each(function(){ var v = $dexQuery(this).val(), name = $dexQuery(this).attr( 'name' ).replace('_date', ''), e = $dexQuery("[name='"+name+"']"); if( e.length ){ e.val( $dexQuery.trim( e.val().replace( v, '' ) ) ); } }); _form.find("select option[vt]").each(function(){ var e = $dexQuery(this); e.attr('cff-val-bk', e.val()).val(e.attr("vt")); }); _form.find("input[vt]").each(function(){ var e = $dexQuery(this); e.attr('cff-val-bk', e.val()).val(e.attr("vt")); }); _form.find('.cpcff-recordset,.cff-exclude :input,[id^="form_structure_"]') .add(_form.find( '.ignore' )).attr('cff-disabled', 1).prop('disabled', true); disabling_form(); _form[ 0 ].submit(); setTimeout(function(){ _form.find('[cff-val-bk]').each(function(){ var e = $dexQuery(this); e.val(e.attr('cff-val-bk')).removeAttr('cff-val-bk'); }); _form.find('[cff-disabled]').prop('disabled', false).removeAttr('cff-disabled'); if(!/^(\s*|_self|_top|_parent)$/i.test(_form.prop('target'))) { enabling_form(); } $dexQuery(document).trigger('cff-form-submitted', _form); }, 4000); }; _form.find('[name="cp_ref_page"]').val(document.location.href); validation_rules['fields_validation_error'] = (cpefb_error==0); /* 1: Do not submit if the equations are being evaluated */ validation_rules['no_pending'] = (!(form_identifier in $dexQuery.fbuilder.calculator.processing_queue) || !$dexQuery.fbuilder.calculator.processing_queue[form_identifier]) && !$dexQuery.fbuilder.calculator.thereIsPending(form_identifier); if(!validation_rules['no_pending']) { $dexQuery(document).on('equationsQueueEmpty', function(evt, formId){ if(formId == form_identifier) { $dexQuery(document).off('equationsQueueEmpty'); validation_rules['no_pending'] = true; processing_form(); } }); } /* End :1 */ if (validation_rules['fields_validation_error']) { processing_form(); } else { _form.valid(); var page = $dexQuery('.cpefb_error:not(.message):eq(0)').closest('.pbreak').attr('page')*1; gotopage(page, _form); enabling_form(); } return false; } form_structure_1=[[{"form_identifier":"","name":"fieldname2","shortlabel":"","index":0,"ftype":"fnumber","userhelp":"","audiotutorial":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"dB1","predefined":"30","predefinedClick":false,"required":false,"exclude":false,"readonly":false,"numberpad":false,"spinner":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"form_identifier":"","name":"fieldname14","shortlabel":"","index":1,"ftype":"fnumber","userhelp":"","audiotutorial":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"dB2","predefined":"10","predefinedClick":false,"required":false,"exclude":false,"readonly":false,"numberpad":false,"spinner":false,"size":"small","thousandSeparator":"","decimalSymbol":".","min":"","max":"","formatDynamically":false,"dformat":"number","formats":["digits","number","percent"],"fBuild":{},"parent":""},{"dependencies":[{"rule":"","complex":false,"fields":[""]}],"form_identifier":"","name":"fieldname12","shortlabel":"","index":2,"ftype":"fCalculated","userhelp":"","audiotutorial":"","userhelpTooltip":false,"tooltipIcon":false,"csslayout":"","title":"dB = dB1-dB2","predefined":"","required":false,"exclude":false,"size":"small","eq":"fieldname2 - fieldname14","min":"","max":"","suffix":"","prefix":"","decimalsymbol":".","groupingsymbol":"","readonly":true,"currency":false,"noEvalIfManual":true,"formatDynamically":false,"hidefield":false,"fBuild":{},"parent":""}],{"0":{"title":"","description":"","formlayout":"top_aligned","formtemplate":"cp_cff_clean","evalequations":1,"evalequationsevent":2,"loading_animation":0,"autocomplete":1,"persistence":0,"animate_form":0,"customstyles":"","request_cost":"fieldname2"},"formid":"cp_calculatedfieldsf_pform_1","setCache":false,"cache":false}]; Payment options Example Calculation Let’s say you have an RF attenuator with a value 30 dB followed by an amplifier with gain 20 dB.

The total attenuation is 30 dB – 20 dB = 10 dB



The post dB Difference Calculator appeared first on OneSDR - A Wireless Technology Blog.


Source: https://www.onesdr.com/db-difference-calculator/
Chow
IB4TL

Who is online

Users browsing this forum: No registered users and 0 guests