Complicated but interesting.....Need some thoughts


Results 1 to 20 of 20

Threaded View

  1. #12
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Complicated but interesting.....Need some thoughts

    Hi Megahertz,

    As I understand it, you are going to have an boom length variable that will probably be in between two numbers on the boom chart. And you will also have a radius variable that will be between two of the numbers on the boom chart.

    The excel example is a bit cleaner (ok, alot cleaner), but you will still have to do an average between two (of the of 5 separate equations for weight at given boom length) since your radius isn't likely to lie right on a radius in the table.

    One way to do this, would be to have a lookup table for each boom length listed on the chart. You would perform a lookup on the two tables (one above and one below) your actual boom length. You would give those an average, based upon what the value on the boom length was, as shown in the earlier example. First this would be done for a radius on the chart that was below your actual radius, then you would perform this below your actual radius. Then, as in the averaging example, you would average for the results at the two radius's depending on how close your actual radius was to the chart.

    Using the excel equations, you only have to do one of these creative averaging. Using the lookup, you would have to do two creative averaging.

    I started trying to show an example, but pretty much I think I would have to write the whole thing out. And I leave on a internet free vacation in about 30 minutes

    Ok, here are a few raw uncomplete thoughts. No where near complete, but might give you an idea:

    Code:
    
    Weight      var word    'capacity at given radius
    Weight1     var word    'Low capacity at higher boom length
    Weight2     var word    'high capacity at lower boom length
    Weight3     var word    'Low capacity at high boom (at next closest radius)
    weight4     var word    'high capacity at lower boom length (at next closest radius)
    weightDiff1 var word    'weight difference between nearest values Weight1 & 2
    weightDiff2 var word    'weight difference between nearest values Weight3 & 4
    radiusLook  var byte    'lookup radius value = (radius/100) -1
    'radius      var word    'radius in centimeters: 100 = 10 meters
    remainder   var byte
    'boomLength  var word    ' boom length in centimeters 593 = 5.93 meters
    radiusLeftover  var byte ' remainder radius from division
    radius con 50          'set radius to 5.0 meters
    boomLength con 1050  ' set boom length to 10.5 meters
    
    
    Main:
    
    
    radiusLook = radius/10 - 2  'sets up our lookup table value 0 starting at 2
    radiusLeftover = radius//10
    gosub lookThemUp
    weight3 = weight1
    weight4 = weight2
    radiusLook = radiuslook + 1 'next highest radius and put values into weight1 & 2
    gosub logthemup
    weightdiff1 = weight1 - weight2
    weightdiff1 = weight3 - weight4
    radiusleftover * weightdiff1
    
    
    
    end
    '************************************************
    lookThemUp:
    select case boomLength
        case boomLength > 1293 and boomlength < 1386    'halfway between 13.85 and 12.00 
        'and all the way up to max radius without manual extension ... 
        'probably need another lookup table exclusively for the extension
            gosub lookup_col5  'get weight value from column 5 of the table 
            weight1 = weight
            gosub lookup_col4  'get weight value from column 4 of the table
            weight2 = weight 
            
        case boomlength > 1100
            gosub lookup_col4
            weight1 = weight
            gosub lookup_col3
            weight2 = weight 
            
        case boomlength > 900
            gosub lookup_col3
            weight1 = weight
            gosub lookup_col2
            weight2 = weight   
    
        case boomlength > 593
            gosub lookup_col2
            weight1 = weight
            gosub lookup_col1
            weight2 = weight    
    
    end select
    return
    
    
    lookup_col1:      
          'radius = 5.93
          lookup2 radiusLook,[7500,7500,5750,0,0,0,0,0,0,0,0,0,0],Weight
    return
    
    lookup_col2:      
          'radius = 8
          lookup2 radiusLook,[7500,7500,5700,4400,3600,0,0,0,0,0,0,0,0],Weight
    return
    
    lookup_col3:      
          'radius = 10
          lookup2 radiusLook,[7500,6900,5070,4760,3525,2900,2400,0,0,0,0,0,0],Weight
    return      
    
    lookup_col4:
        'radius = 12
        lookup2 radiusLook,[0,5200,4500,4000,3475,2900,2478,2130,0,0,0,0,0],Weight
    return
    
    lookup_col5:
        'radius = 13.85  
        lookup2 radiusLook,[0,0,3970,3460,3100,2750,2400,2080,1775,1550,1350,0,0],Weight
    return
    Then need to go through again at
    Last edited by ScaleRobotics; - 6th July 2012 at 20:21.
    http://www.scalerobotics.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts