Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2]

Author Topic: Potential Line Length Calculation using Broadcom Diagnostics  (Read 1253 times)

boozy

  • Member
  • **
  • Posts: 81
Re: Potential Line Length Calculation using Broadcom Diagnostics
« Reply #15 on: July 20, 2018, 09:22:36 PM »

@Konrado5

I did one, as I realised I had an extra 30 minutes more that I thought - much noisier than before at the low frequencies.
Logged

boozy

  • Member
  • **
  • Posts: 81
Re: Potential Line Length Calculation using Broadcom Diagnostics
« Reply #16 on: July 24, 2018, 07:40:14 PM »

I fleshed out the length calculation and added a Butterworth High Pass filter but embarrassingly, given my background, the Low Pass isn't working yet.  I'll disable it if I can't make it work and post code... but in the meantime b*cat can make himself a new utility if he hasn't got one already ;D

Code: [Select]
    public class Calculator
    {

        const double speedOfLight  = 299792458.0;
        const double frequencyStep = 4312.5;
        const double propogationVelocity = 0.666666666666;
        const double baseDistance = speedOfLight * propogationVelocity / (frequencyStep * 2); // 2 is for there and back to get the distance
        static double baseLn = Math.Log(baseDistance); //can't be a const

        public static double TonesToLength(double tones, int dips)
        {
            double ret = 0.0;
            if (tones > 0)
            {
                if (dips == 1)
                {
                    tones *= 2;// the first dip will be at half the period
                }
                else
                {
                    tones = tones / (double)(dips - 1);//  need to remove 1 dip to get the number of periods
                }

                ret = Math.Exp(baseLn - Math.Log(tones));
            }
            return ret;
        }
    }
Logged

boozy

  • Member
  • **
  • Posts: 81
Re: Potential Line Length Calculation using Broadcom Diagnostics
« Reply #17 on: July 26, 2018, 12:03:19 AM »

Slightly easier to use - I've now added Low and High pass filters (you will almost certainly need to move the cut off values down).  A value of zero will return the original data.  I've included the executable in the zip file too.

As the functionality is rather useful - I've also added the ability to put the points on the command line as the first argument (comma separated, no spaces and no validation ;)).

I'm fairly impressed with Stephen Butterworth - the filters are clever given what was known in the 1930s (actually there just clever full stop).
Logged
Pages: 1 [2]
 

anything