Google Earth Interface

We are building an interface to Google Earth and Google maps. This is webpage is merely a blog of progress.

Interface of the IRCF360 sensor is achieved using USB interface on the Teensy2.0. The teensy can be configured as a Joystick/Keyboard/mouse. We tested all HID types and concluded that the Joystick gives the best control. It is also easier to manage with other applications running - as the keyboard or mouse emulation makes things rather unpredictable in regards to what strange things happen on your screen or with other applications (keyboard emulation will send a lot of WASD characters in your text documents). It's only doing what it's suppose to.

To obtain some degree of control to the Keyboard and mouse USB emulation, we'll probably need to add a 'sleep' function to the sensor to avoid strange things happening when you didn't expect them too.

This blog therefore details the interface using the USB joystick interface to Google Earth.

From within Arduion select "Teensy2.0" as board type (compared to Teensy) and USB type "Flight Sim Control"

It is possible to configure Google Earth's interfaces via .ini files. There are many types Joystick and the one used here is the Generic joystick

C:\Program Files\Google\Google Earth\client\res\flightsim\controller".

Generic .ini file

%

% Joystick controls for typical PC joystick.

%

% Controller axes are numbered from A0 to A[n-1], (n is the number of axes).

% Controller buttons are number from B0 to B[m-1], (m is the number of

% buttons).

%

% Variable names are:

% DF, DG: Flaps, gear (0 = retracted, 1 = extended)

% DA, DE, DR: Aileron, elevator, rudder (-1..1).

% DE_T: Elevator trim (-1..1).

% DP_i: i-th power lever (counting from 0; (0..1)).

% DB_i: i-th wheel brake (counting from 0 (left brake); (0..1))

%

% Manipulators are:

% Axes:

% set(var, value, offset): Set var to "(axis position) * value + offset"

% Axis position is between 0 and 1

%

% Buttons:

% set(var, value): Set var to value.

% add(var, delta, min, max): Add delta to var, keep it between min and max.

% toggle(var): Set var to 0 if it's 1 or to 1 otherwise.

% toggle(var, min, max, step) Change var between min and max adding step.

%

%

% The controllers_supported section defines controllers supported by this

% configuration file. The block consists of the sequence of "controller"

% expressions. Controllers mapped by the Flight Simulator have to match at

% least one of the "Controller" expressions. The expression consists of five

% parts (controller name, minimal number of buttons, maximal number of buttons,

% minimal number of axes, maximal number of axes). The controller name is a

% regular expression that has to match the product name reported by the USB

% layer. All conditions have to be fulfilled for the configuration file to be

% used.

%

%

% Generic controls for a single-engine aircraft. Supports elevator, aileron,

% power and rudder and one POV to set the horizontal angle if present.

%

controllers_supported = [

Controller('*', 0, 100, 0, 100)

]

button_press = [

]

axes = [

A1 set(DE, 1.0, 0.0)

A0 set(DA, 1.0, 0.0)

A2 set(DP_0, -0.5, 0.5)

A3 set(DR, 1.0, 0.0)

]

povs = [

P0 set(HAngle, 1.0, 0.0)

]

ref:

http://www.gearthblog.com/blog/archives/2007/09/flight_simulator_hud_display_guide.html

the