Re: Any glaring errors in this simplified data card?
don't know how many computer folks there are out there that might want to try this with JBM to make a custom card.
This is what I did.
I created three VERY short programs in perl to create a csv file that can be imported into excel.
Basically, the idea is to cut and paste a set of files from the JBM output and run them through this set of three programs to create as many wind values as you wish for your range card.
So, you create the first "output" file by running the "first_file_parse" program and, this is that script:
#!/usr/bin/perl
open(FILE,"$ARGV[0]") || die ;
open(OUT,">./outfile") || die ;
print "Yds,MOA DROP,MPH/WIND MOA,LEAD\n" ;
print OUT "Yds,MOA DROP,MPH/WIND MOA,LEAD\n" ;
while(<FILE>) {
($yds,$drop,$moa_drop,$wind_in,$wind_moa,$fps,$mach,$ft_lbs,$energy,$lead_in,$lead) = split ;
print "YDS: $yds DROP: $moa_drop " . $ARGV[1] . "/" . "$wind_moa\n" ; ;
print OUT "$yds,$moa_drop,$ARGV[1]/$wind_moa\n" ; ;
}
close(FILE) ;
The input to that program is just the filename of the cut/paste file you created.
The second program can be run over and over... once for each wind value you wish to add to the spreadsheet.... so, if you want to create a card with a 1,3,5,7,10,12,15mph values, you create one cut and paste file for each wind value. After you have that data, you run the "add_wind" program that adds the value of wind to the "outfile" that you created before with the other program. It looks like this:
#!/usr/bin/perl
open(FILE,"./outfile") || die ;
while(<FILE>) {
chomp ;
($yds,$moa_drop,$wind) = split(',') ;
$ARR{$yds} = $_ ;
}
close(FILE) ;
open(FILE,"$ARGV[0]") || die ;
while(<FILE>) {
chomp ;
($yds,$drop,$moa_drop,$wind_in,$wind_moa,$fps,$mach,$ft_lbs,$energy,$lead_in,$lead) = split ;
$ARR{$yds} = $ARR{$yds} . "," .$ARGV[1] . '/'. $wind_moa . "\n" ;
}
close(FILE) ;
open(OUT,">./outfile") || die ;
foreach $ky ( sort { $a <=> $b } keys %ARR ) {
print OUT $ARR{$ky} ;
}
The last part was to put in the lead for movers... so create a cut/paste file with the proper lead you wish to see on your card and run this file against it.
#!/usr/bin/perl
open(FILE,"./outfile") || die ;
while(<FILE>) {
chomp ;
($yds,$moa_drop,$wind) = split(',') ;
$ARR{$yds} = $_ ;
}
close(FILE) ;
open(FILE,"$ARGV[0]") || die ;
while(<FILE>) {
chomp ;
($yds,$drop,$moa_drop,$wind_in,$wind_moa,$fps,$mach,$ft_lbs,$energy,$lead_in,$lead) = split ;
$ARR{$yds} = $ARR{$yds} . "," . "$lead_in\n" ;
}
close(FILE) ;
open(OUT,">./outfile") || die ;
foreach $ky ( sort { $a <=> $b } keys %ARR ) {
print OUT $ARR{$ky} ;
}
This is a VERY simple set of three scripts but, it's how I created my last custom card set... I may have to spend some time and do something nicer.