BAT 3 UAV

Looking for a personal UAV you can launch from your car? These guys have one they want to sell you, starting at $40k. The software is most interesting.


package com.fortunemegastore.groovy.tests;
import groovy.lang.GroovyShell;
import groovy.lang.Binding;
import groovy.lang.Closure;
import org.codehaus.groovy.control.CompilationFailedException;
import java.io.File;
import java.io.IOException;
public class GroovyTest {
public static void main(String[] args){
GroovyShell shell = new GroovyShell(new Binding());
try {
shell.setVariable("g", new Double(9.8));
shell.setVariable("m1", new Double(10));
shell.setVariable("m2", new Double(20));
shell.setVariable("d", new Double(2));
shell.evaluate(new File("equation.groovy"));
Closure solve = (Closure) shell.getVariable("foo");
System.err.println(solve.call());
} catch(IOException ioe){
ioe.printStackTrace();
} catch(CompilationFailedException cfe){
cfe.printStackTrace();
}
}
}
foo = { f = (g*m1*m2)/(d*d); return f; }
package com.fortunemegastore.groovy.tests;
import java.io.File;
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
public class GroovyTest2 {
public static void main(String[] args){
GroovyShell shell = new GroovyShell(new Binding());
try {
NameInterface ni = (NameInterface) shell.evaluate(new File("class.groovy"));
System.err.println("Name: " + ni.getName());
System.err.println("Foo Result: " + ((FooInterface) ni).foo(5,6));
} catch(Exception e){
e.printStackTrace();
}
}
}
import com.fortunemegastore.groovy.tests.NameInterface;
import com.fortunemegastore.groovy.tests.FooInterface;
class Thing implements NameInterface, FooInterface {
String name
int foo(int a, int b){
return a + b;
}
}
return new Thing(name:"The Thing");
package com.fortunemegastore.groovy.tests;
public interface NameInterface {
public void setName(String name);
public String getName();
}
package com.fortunemegastore.groovy.tests;
public interface FooInterface {
public int foo(int a, int b);
}
Name: The Thing
Foo Result: 11