G-value is a flight parameter that can be successfully used
for driving the 'heave' motion. An experimental version of Portdrv was used
to investigate the behavior of FS2004 G-value. Note that the
new Portdrvr utility includes options to
add many other parameters, and therefore you need to modify the program
below to make it extract the correct G-value parameter.
The G-value raw data from FS2004 will output 623 when sitting on the runway. The 623 value
represents the constant gravity factor. In flight, when pulling 1G will make
the G-value data go to 1246. weightlessness will result in 0. More negative
G's will result in negative numbers.
The raw data is quite dynamic, and should give good input for
driving heave (vertical) motion.
A test program was written to check the G-value data on scope and
platform drive. See also Data Extraction
page, but keep in mind that the experimental Portdrv sends one flight
parameter only
20 ON ERROR GOTO 185
30 CLOSE #1
40 OPEN "com1:9600,n,8" FOR RANDOM AS #1
50 A$=""
55 ON ERROR GOTO 50
60 LINE INPUT#1, A$
70 A=VAL(RIGHT$(A$,8))
'gets the value of the raw G-value string
100 G=623-A
'invert and subtract the gravity offset
135 DAC1=CINT(128+G/4.86) 'scale to max ±1G
from DAC1 center value
140 PRINT DAC1
150 OUT 888,128
155 OUT 890,3
160 OUT 890,11
163 IF DAC1>255 or DAC1<0 then goto 180
165 OUT 888,DAC1
170 OUT 890,9
175 OUT 890,11
180 GOTO 50
185 RESUME 20
Above graph, showing a nice soft landing, main gear first, then front gear.
This shows that G-value can be used for landing effects motion drive.
Above graph shows the DAC1 output, from level flight, going into a steep 45
degree turn, G's being pulled in the turn, then return to level flight.
When the signal as shown above would be used for driving heave, there
would be no feeling of the continuing G-s during the turn, as the heave
motion will only have a limited range. A possibility to mimic continuous G's
could be done by tilting the platform when G-s are pulled for some time.
This means that the G-value waveform needs to be split into short-term
dynamic and long term average G-value components. This can be done by
averaging the raw G-value data, as shown in the programming example below.
20 ON ERROR GOTO 185
23 N=60
'N is averaging period
25 DIM G(N)
'define N-deep array for G value
30 CLOSE #1
40 OPEN "com1:9600,n,8" FOR RANDOM AS #1
50 A$=""
55 ON ERROR GOTO 50
60 LINE INPUT#1, A$
70 A=VAL(RIGHT$(A$,8))
95 GSUM=0
'reset GSUM
100 G=623-A
'invert and subtract the gravity offset
105 G(N)=G
'give highest array value actual G-value
110 FOR I=0 TO N-1
115 G(I)=G(I+1)
'fill and shift the array with previous G-values
117 GSUM=GSUM+G(I)
'add all current array values
120 NEXT I
125 GAVE=GSUM/N
'average = sum of array values divided by array size
130 DAC2=CINT(128+GAVE/4.86)
'scale average G value and send to DAC1
135 DAC1=CINT(128+(G-GAVE)/4.86) 'remove average value from G and
scale, send to DAC2
140 PRINT CINT(G);CINT(GAVE)
145 IF DAC2>255 or DAC2<0 then goto 163
150 OUT 888,DAC2
155 OUT 890,3
160 OUT 890,11
163 IF DAC1>255 or DAC1<0 then goto 180
165 OUT 888,DAC1
170 OUT 890,9
175 OUT 890,11
180 GOTO 50
185 RESUME 20
The result of this program is shown below.
DAC2 (G-value) and DAC1 (averaged G value over 60 periods) during steep turn
maneuver. The top waveform can be used to drive the short dynamic heave
motion drive, the bottom waveform can be used to tilt the platform during
continuous G's.
Landing effect with this program is still useful. Main gear and front gear
bump.
Waveforms with weather turbulence set at "moderate"
Waveforms with weather turbulence set at "severe". You'll probably loose
your lunch.
These waveforms were tried on the tilting platform (DIY
motion platform II) The smoothness of G-value is quite good. The
behavior on ground is somewhat extreme, may need some scaling back to keep
the platform in one piece.
Keep in mind that the raw data calculation is done in 16 bits, then
scaled back to 8 bits. Since G-value data is very dynamic, the data transfer
from FS should preferably be 12 bits or 16 bits. Experiments with 8-bit raw
data introduced some coarseness in the drive.
Back