Project a new CamShake-like addon, to feel "Gs"

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
Hello, Orbinauts! Here is my initial release (pre-pre-alpha) of an add-on to "feel" the accelerations during a flight.... endlessly calling for 1G-Navigation tools, like here and here :) ... This is my first add-on and now, I am facing some issues.... so can you give me some good tips to go further?

Please report any bug. This new MFD is "LifeMFD" (to be installed in Modules > Plugin and selected in the Launchpad before loading a scenario):
  • it displays a plot of the "felt" acceleration during a flight (select MFD > LIFE Monitor)
  • in Virtual Cockpit views (VC), it shakes the cam according to the felt accelerations and the thrust
I would like it to work also in "REPLAY", in order to see in the MFD plots how much Gs were experienced by the crew (and create additional visual effects, black/red veil.....). But I cannot find any flag in the API to tell this status. Once this issue is solved, I would also like this MFD to be a mandatory part of a vessel design. Can you help?

=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
(edit) latest version in Orbiter Add-on: v1.0 (alpha)
-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
edit 2022-08-21: made open source, contributions welcome here: https://gitlab.com/SecretBoxx/lifemfd
 

Attachments

  • LifeMFD.zip
    16.8 KB · Views: 34
Last edited:

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
Just gave it a quick try from the VC of the XR2.
Really nice! (y)

I like the way the view shifts in high G turns. This is a step up from the old CamShake addon which IIRC only provided a jitter during engine burns.

One question though. Shouldn't the MFD read 1G when landed on Earth? Currently it shows 0 G.
Sure there is no ship acceleration from engine thrust, but there is still 1G due to gravity.

The oscillations (jitter) during burns was too much for my liking. Perhaps you can add a cfg file where the users may "tune" the oscilations to their liking (within a predefined range). I think that a big heavy ship shouldn't "rattle" as much as a smaller/lighter one, when they experience the same Gs.

For the black-out/red-out effect, here is what I had tried in the past (only in the default DG, the result wasn't too bad).
Create a spherical mesh with the normals pointing inside and insert it at the VC camera's position, to surround the user's view. Then you can modulate the alpha channel with
oapiSetMeshProperty (hMesh,MESHPROPERTY_MODULATEMATALPHA,value)
Have a look at this old thread for more info. This was for a heatshield but the technique is the same.

Nice work! CamShake and LoadMFD wrapped up in a single plugin for Orbiter2016.
 

clipper

Well-known member
Joined
Feb 27, 2018
Messages
256
Reaction score
388
Points
63
please excuse my ignorance but I'm not really able to make this work in O2016 (tried both my main installation as well as a completely fresh one); moved the .dll file to modules/plugin and activated in launchpad as instructed but can't really find any new MFD mode or see any effects in the VC (tried with default DG and XR2)
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
611
Reaction score
449
Points
78
Location
FRANCE
Website
francophone.dansteph.com
Hello

I think it is a very interesting MFD !

I tried it on my Cessna (an addon in preparation but not yet finished) ;) and it works well : the panel is shaken, it's fun. (y)

life.jpg

Just 2 remarks :

1a) It would be nice to have a possibility of adjusting the amplitude of the shaking (more or less "strong")
( Like dgatsoulis said)

1b) And maybe also ... a button that can stop the shaking "upon request ", and finally... may it should be nice if it stop shaking when the acceleration (or the motor?) is at zero.

2) I noticed one thing : when the engine starts, the VC is like "lifted" upwards, as seen with my following image:

life2.jpg

otherwise well done, it's very promising !!!
 
Last edited:

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
Thank you all, for this feedback. It's really cool to read about your feeling.

it should be nice if it stop shaking when the acceleration (or the motor?) is at zero.
Well, it does so (or should!): when thrust < 10% the shaking is not added to the camera motion, only the acceleration is taken into account. When thrust > 10%, the shaking amplitude is proportional to the thrust. Then, the frequency of the shaking is a very simple algorithm to keep it at low-CPU.

when the engine starts, the VC is like "lifted" upwards
Yes, it is intended :) and nice CESSNA views by the way! With unlimited fuel, did you fly until space with it?

When you apply thrust, your head is pulled backward, and so on for any motion... The strongest Gs are received when pulling the stick (climbing), and so the motion... The idea is to pull/push the eyes of the pilot in the direction of the "weight", within some limits though: hence, the camera location and its tilt are modified (not the default direction because it produces bad side-effects).

Maybe the amplitudes are still to be fine-tuned... Also, the field of view can be enlarged a little to allow for such amplitudes, and the combinations Ctrl+Alt+Arrow keys are still usable to turn the head left/right or to push the head forward, which makes sense actually.

One question though. Shouldn't the MFD read 1G when landed on Earth? Currently it shows 0 G.
Sure there is no ship acceleration from engine thrust, but there is still 1G due to gravity.
Indeed, thank you for noticing, I'm investigating...

It seems that Orbiter does not provide the full state vector when the vessel is landed. Does anybody know about a "Landed flag" that I could use to switch the computation? Also, does anybody know of a flag for "replay" status (then, the computation is totally different but the MFD mode would be still worth playing...)

For the black-out/red-out effect, here is what I had tried in the past (only in the default DG, the result wasn't too bad).
Create a spherical mesh....
Thank you! I think I get the idea, as soon as I'm becoming more familiar with textures in VC.

1a) It would be nice to have a possibility of adjusting the amplitude of the shaking (more or less "strong")
( Like dgatsoulis said)
okay, I should adapt that! However, after fine-tuning, I think it should be an intrinsic property of each vessel (and its damping systems), it should not be up to the user, should it?

can't really find any new MFD mode or see any effects in the VC
Ouch! Don't you have a "LIFE monitoring" entry when you select the MFD? maybe in page 2 of the list of MFD modes....
 
Last edited:

clipper

Well-known member
Joined
Feb 27, 2018
Messages
256
Reaction score
388
Points
63
Ouch! Don't you have a "LIFE monitoring" entry when you select the MFD? maybe in page 2 of the list of MFD modes....
Nothing at all really; tested on a fresh install as well (160828 + D3D9 R4.25) so there was no 2nd page on MFD to speak of, still no joy.
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
611
Reaction score
449
Points
78
Location
FRANCE
Website
francophone.dansteph.com
Thank you all, for this feedback. It's really cool to read about your feeling.
Your welcome ! :salute:
Well, it does so (or should!): when thrust < 10% the shaking is not added to the camera motion, only the acceleration is taken into account. When thrust > 10%, the shaking amplitude is proportional to the thrust. Then, the frequency of the shaking is a very simple algorithm to keep it at low-CPU.
So .. I'll do a flight test again .... And I'll tell you.. :unsure:

[edit] Ah yes ... my apologies I had not noticed that: if I cut the engine the shaking stops ... [/edit] ?
Yes, it is intended :) and nice CESSNA views by the way!
Thank you !! :hailprobe:
With unlimited fuel, did you fly until space with it?
No, that is not possible :ROFLMAO: ... I tried to make this plane take off on Mars: it does not take off !!! :cool:
okay, I should adapt that! However, after fine-tuning, I think it should be an intrinsic property of each vessel (and its damping systems), it should not be up to the user, should it?
Ok if not, maybe a button on the side? ?
Ouch! Don't you have a "LIFE monitoring" entry when you select the MFD? maybe in page 2 of the list of MFD modes....
Strange... I have no problem with it... it is in the Mfd list...?
 
Last edited:

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
Nothing at all really; tested on a fresh install as well (160828 + D3D9 R4.25) so there was no 2nd page on MFD to speak of, still no joy.
Do you see the option to select "LifeMFD" in the Launchpad > Modules before running a scenario?
 

clipper

Well-known member
Joined
Feb 27, 2018
Messages
256
Reaction score
388
Points
63
Do you see the option to select "LifeMFD" in the Launchpad > Modules before running a scenario?
yes and i've enabled it; i've also just noticed this error in orbiter.log on a clean install:
============================ ERROR: ===========================
Failed loading module Modules\Plugin\LifeMFD.dll (code 126)
[Orbiter::LoadModule | .\Orbiter.cpp | 600]
looked around in the forum for same error code and one of the suggested solutions was installing ModuleMessagingExt which didn't do much; then i've tried installing c++ and directx libraries but that didn't really help either as the same error keeps persisting
 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
At least, it explains your problem, but the solution is far beyond my skills... If LifeMFD uses a pre-requisite library not present in Orbiter 2016 baseline, it will be worth knowing. Can anybody help for diagnosis?
 

Nikogori

Donator
Donator
Joined
Mar 14, 2015
Messages
235
Reaction score
92
Points
43
Location
Osaka
Website
orbinautjp.github.io
please excuse my ignorance but I'm not really able to make this work in O2016 (tried both my main installation as well as a completely fresh one); moved the .dll file to modules/plugin and activated in launchpad as instructed but can't really find any new MFD mode or see any effects in the VC (tried with default DG and XR2)

same here. LifeMFD doesn't show up in the MFD list.

**** Orbiter.log
000000.000: Build Aug 28 2016 [v.160828]
000000.000: Timer precision: 1e-007 sec
000000.000: Found 2 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 160828, API 160828]
000000.000: Module AtmConfig.dll ......... [Build 160828, API 160828]
000000.000: Module DGConfigurator.dll .... [Build 160828, API 160828]
000000.000: ---------------------------------------------------------------
BaseDir : J:\Orbiter_Vanilla\Orbiter2016\
ConfigDir : J:\Orbiter_Vanilla\Orbiter2016\Config\
MeshDir : J:\Orbiter_Vanilla\Orbiter2016\Meshes\
TextureDir : J:\Orbiter_Vanilla\Orbiter2016\Textures\
HightexDir : J:\Orbiter_Vanilla\Orbiter2016\Textures2\
ScenarioDir: J:\Orbiter_Vanilla\Orbiter2016\Scenarios\
000000.000: ---------------------------------------------------------------
D3D9 DLLs : C:\WINDOWS\SYSTEM32\d3d9.dll [v 10.0.19041.1387]
: C:\WINDOWS\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client.dll ........ [Build 211009, API 160828]
000000.000: Module XRSound.dll ........... [Build 200703, API 160828]
000000.000: Module ScnEditor.dll ......... [Build 160828, API 160828]
============================ ERROR: ===========================
Failed loading module Modules\Plugin\LifeMFD.dll (code 126)
[Orbiter::LoadModule | .\Orbiter.cpp | 600]
===============================================================
000000.000:
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
D3D9: 3D-Adapter.............. : Radeon RX 570 Series
D3D9: MaxTextureWidth......... : 16384
D3D9: MaxTextureHeight........ : 16384
D3D9: MaxTextureRepeat........ : 8192
D3D9: VolTexAddressCaps....... : 0x3F
D3D9: NumSimultaneousRTs...... : 4
D3D9: VertexDeclCaps.......... : 0x3FF
D3D9: MiscCaps................ : 0x3FCCF2
D3D9: XNA Math Support........ : Yes
D3D9: Vertex Texture.......... : Yes
D3D9: Separate AlphaBlend..... : Yes
D3D9: Shadow Mapping.......... : Yes
D3D9: D3DFMT_A16B16G16R16F.... : Yes
D3D9: D3DFMT_A32B32G32R32F.... : Yes
D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
D3D9: D3DFMT_A2R10G10B10...... : Yes
D3D9: D3DFMT_L8............... : Yes
D3D9: D3DDTCAPS_DEC3N......... : Yes
D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
D3D9: Runs under WINE......... : No
D3D9: D3D9Build Date.......... : 211009
D3D9: Available Texture Memory : 4089 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: [Loading Constellations]
000000.000: D3D9: [D3D9Client Initialized]
000000.000: Module Sun.dll ............... [Build 160828, API 160828]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
000000.000: Module Mercury.dll ........... [Build 160828, API 160828]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
000000.000: Module Venus.dll ............. [Build 160828, API 160828]
000000.000: Module VenusAtm2006.dll ...... [Build 160828, API 160828]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
000000.000: Module Earth.dll ............. [Build 160828, API 160828]
000000.000: Module EarthAtmJ71G.dll ...... [Build 160828, API 160828]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
000000.000: Module Moon.dll .............. [Build 160828, API 160828]
ELP82: Precision 1e-005, Terms 116/829
000000.000: Module Mars.dll .............. [Build 160828, API 160828]
000000.000: Module MarsAtm2006.dll ....... [Build 160828, API 160828]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
000000.000: Module Phobos.dll ............ [Build ******, API 060425]
000000.000: Module Deimos.dll ............ [Build ******, API 060425]
000000.000: Module Galsat.dll ............ [Build 160828, API 160828]
000000.000: Module Jupiter.dll ........... [Build 160828, API 160828]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
000000.000: Module Io.dll ................ [Build 160828, API 160828]
000000.000: Module Europa.dll ............ [Build 160828, API 160828]
000000.000: Module Ganymede.dll .......... [Build 160828, API 160828]
000000.000: Module Callisto.dll .......... [Build 160828, API 160828]
000000.000: Module Satsat.dll ............ [Build 160828, API 160828]
000000.000: Module Saturn.dll ............ [Build 160828, API 160828]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
000000.000: Module Mimas.dll ............. [Build 160828, API 160828]
SATSAT Mimas: Terms 113
000000.000: Module Enceladus.dll ......... [Build 160828, API 160828]
SATSAT Enceladus: Terms 33
000000.000: Module Tethys.dll ............ [Build 160828, API 160828]
SATSAT Tethys: Terms 101
000000.000: Module Dione.dll ............. [Build 160828, API 160828]
SATSAT Dione: Terms 59
000000.000: Module Rhea.dll .............. [Build 160828, API 160828]
SATSAT Rhea: Terms 68
000000.000: Module Titan.dll ............. [Build 160828, API 160828]
SATSAT Titan: Terms 100
000000.000: Module Iapetus.dll ........... [Build 160828, API 160828]
SATSAT Iapetus: Terms 605
000000.000: Module Uranus.dll ............ [Build 160828, API 160828]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
000000.000: Module Miranda.dll ........... [Build ******, API 060425]
000000.000: Module Ariel.dll ............. [Build ******, API 060425]
000000.000: Module Umbriel.dll ........... [Build ******, API 060425]
000000.000: Module Titania.dll ........... [Build ******, API 060425]
000000.000: Module Oberon.dll ............ [Build ******, API 060425]
000000.000: Module Neptune.dll ........... [Build 160828, API 160828]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
000000.000: Finished initialising world
000000.000: Module DeltaGlider.dll ....... [Build 160828, API 160828]
000000.000: Module LuaInline.dll ......... [Build 160828, API 160828]
000000.000: Module ShuttleA.dll .......... [Build 160828, API 160828]
000000.000: Module ShuttlePB.dll ......... [Build 160828, API 160828]
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: D3D9: [Scene Initialized]
000000.000: Finished initialising panels
000000.000: XRSound 2.00 (Build Date: Jul 3 2020) initialized using sound driver DirectSound8; irrKlang version = 1.6.0. XRSound UpdateInterval = 0.050 (20.0 updates per second)
D3D9: NewShader [DG\deltaglider_ns]=4
D3D9: NewShader [DG\deltaglider_ns]=4
D3D9: ERROR: SurfHandle=0x775C940, Never use Sketchpad::GetDC() hDC not available
000004.825: D3D9: [Session Closed. Scene deleted.]
000004.825: D3D9: [Destroy Render Window Called]
000004.825: XRSound 2.00 (Build Date: Jul 3 2020) terminating.
000004.825: **** Closing simulation session
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
611
Reaction score
449
Points
78
Location
FRANCE
Website
francophone.dansteph.com
same here. LifeMFD doesn't show up in the MFD list.
Strange.... For me, no problem...

Just for Boxx, here is my log file :

**** Orbiter.log
000000.000: Build Aug 28 2016 [v.160828]
000000.000: Timer precision: 3.00289e-007 sec
000000.000: Found 1 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 160828, API 160828]
000000.000: Module AtmConfig.dll ......... [Build 160828, API 160828]
000000.000: Module DGConfigurator.dll .... [Build 160828, API 160828]
000000.000: Module OrbiterSound.dll ...... [Build 200824, API 160828]
000000.000: Module ScnEditor.dll ......... [Build 160828, API 160828]
000000.000: ---------------------------------------------------------------
BaseDir : D:\ORBITER 2016 Europa2\
ConfigDir : D:\ORBITER 2016 Europa2\Config\
MeshDir : D:\ORBITER 2016 Europa2\Meshes\
TextureDir : D:\ORBITER 2016 Europa2\Textures\
HightexDir : D:\ORBITER 2016 Europa2\Textures2\
ScenarioDir: D:\ORBITER 2016 Europa2\Scenarios\
000000.000: ---------------------------------------------------------------
D3D9 DLLs : C:\Windows\system32\d3dx9_43.dll [v 9.29.952.3111]
: C:\Windows\system32\d3d9.dll [v 6.1.7601.17514]
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client.dll ........ [Build 210805, API 160828]
000000.000: Module Multistage2015_MFD.dll [Build 170626, API 160828]
000000.000: Module DX9ExtMFD.dll ......... [Build 210805, API 160828]
000000.000: Module ExtMFD.dll ............ [Build 160828, API 160828]
000000.000: Module FlightData.dll ........ [Build 160828, API 160828]
000000.000: Module Framerate.dll ......... [Build 160828, API 160828]
000000.000: Module Rcontrol.dll .......... [Build 160828, API 160828]
000000.000: Module transx.dll ............ [Build 160216, API 160214]
000000.000: Module LuaMFD.dll ............ [Build 160828, API 160828]
000000.000: Module GenericCamera.dll ..... [Build 210805, API 160828]
000000.000: Module CustomMFD.dll ......... [Build 160828, API 160828]
000000.000: Module TrackIR.dll ........... [Build 160828, API 160828]
000000.000: TrackIR module not found.
000000.000: Module Meshdebug.dll ......... [Build 160828, API 160828]
000000.000: Module LuaConsole.dll ........ [Build 160828, API 160828]
000000.000: Module ScriptMFD.dll ......... [Build 160828, API 160828]
000000.000: Module ParkingBrakeMFD.dll ... [Build 210307, API 160828]
000000.000: Module LifeMFD.dll ........... [Build 220103, API 160828]
000000.000:
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
D3D9: 3D-Adapter.............. : NVIDIA GeForce GTX 550 Ti
D3D9: MaxTextureWidth......... : 8192
D3D9: MaxTextureHeight........ : 8192
D3D9: MaxTextureRepeat........ : 8192
D3D9: VolTexAddressCaps....... : 0x3F
D3D9: NumSimultaneousRTs...... : 4
D3D9: VertexDeclCaps.......... : 0x30F
D3D9: MiscCaps................ : 0x2FCEF2
D3D9: XNA Math Support........ : Yes
D3D9: Vertex Texture.......... : Yes
D3D9: Separate AlphaBlend..... : Yes
D3D9: Shadow Mapping.......... : Yes
D3D9: D3DFMT_A16B16G16R16F.... : Yes
D3D9: D3DFMT_A32B32G32R32F.... : Yes
D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
D3D9: D3DFMT_A2R10G10B10...... : Yes
D3D9: D3DFMT_L8............... : Yes
D3D9: D3DDTCAPS_DEC3N......... : No
D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
D3D9: Runs under WINE......... : No
D3D9: D3D9Build Date.......... : 210805
D3D9: Available Texture Memory : 4026 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: [Loading Constellations]
000000.000: D3D9: [D3D9Client Initialized]
000000.000: Module Sun.dll ............... [Build 160828, API 160828]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
000000.000: Module Mercury.dll ........... [Build 160828, API 160828]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
000000.000: Module Venus.dll ............. [Build 160828, API 160828]
000000.000: Module VenusAtm2006.dll ...... [Build 160828, API 160828]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
000000.000: Module Earth.dll ............. [Build 160828, API 160828]
000000.000: Module EarthAtmJ71G.dll ...... [Build 160828, API 160828]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
000000.000: Module Moon.dll .............. [Build 160828, API 160828]
ELP82: Precision 1e-005, Terms 116/829
000000.000: Module Mars.dll .............. [Build 160828, API 160828]
000000.000: Module MarsAtm2006.dll ....... [Build 160828, API 160828]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
000000.000: Module Phobos.dll ............ [Build ******, API 060425]
000000.000: Module Deimos.dll ............ [Build ******, API 060425]
000000.000: Module Galsat.dll ............ [Build 160828, API 160828]
000000.000: Module Jupiter.dll ........... [Build 160828, API 160828]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
000000.000: Module Io.dll ................ [Build 160828, API 160828]
000000.000: Module Europa.dll ............ [Build 160828, API 160828]
000000.000: Module Ganymede.dll .......... [Build 160828, API 160828]
000000.000: Module Callisto.dll .......... [Build 160828, API 160828]
000000.000: Module Satsat.dll ............ [Build 160828, API 160828]
000000.000: Module Saturn.dll ............ [Build 160828, API 160828]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
000000.000: Module Mimas.dll ............. [Build 160828, API 160828]
SATSAT Mimas: Terms 113
000000.000: Module Enceladus.dll ......... [Build 160828, API 160828]
SATSAT Enceladus: Terms 33
000000.000: Module Tethys.dll ............ [Build 160828, API 160828]
SATSAT Tethys: Terms 101
000000.000: Module Dione.dll ............. [Build 160828, API 160828]
SATSAT Dione: Terms 59
000000.000: Module Rhea.dll .............. [Build 160828, API 160828]
SATSAT Rhea: Terms 68
000000.000: Module Titan.dll ............. [Build 160828, API 160828]
SATSAT Titan: Terms 100
000000.000: Module Iapetus.dll ........... [Build 160828, API 160828]
SATSAT Iapetus: Terms 605
000000.000: Module Uranus.dll ............ [Build 160828, API 160828]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
000000.000: Module Miranda.dll ........... [Build ******, API 060425]
000000.000: Module Ariel.dll ............. [Build ******, API 060425]
000000.000: Module Umbriel.dll ........... [Build ******, API 060425]
000000.000: Module Titania.dll ........... [Build ******, API 060425]
000000.000: Module Oberon.dll ............ [Build ******, API 060425]
000000.000: Module Neptune.dll ........... [Build 160828, API 160828]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
000000.000: Finished initialising world
000000.000: Module VesselBuilder1.dll .... [Build 190415, API 160828]
000000.000: ---------------------------------------------------------------
000000.000: >>> WARNING: Obsolete API function used: VESSEL::CreateVariableDragElement
000000.000: At least one active module is accessing an obsolete interface function.
000000.000: Addons which rely on obsolete functions may not be compatible with
000000.000: future versions of Orbiter.
000000.000: ---------------------------------------------------------------
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: D3D9: [Scene Initialized]
000000.000: Finished initialising panels
000014.665: D3D9: [Session Closed. Scene deleted.]
000014.665: D3D9: [Destroy Render Window Called]
D3D9: ERROR: UnDeleted Surface(s) Detected
D3D9: ERROR: [Failed to Reset DirectX Device] (Likely blocked by undeleted resources)
000014.665: **** Fast process shutdown

 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
I tested with a fresh install of Orbiter, adding only these add-ons: XRSound and XR fleet. It works well with all vessels that have got a VC (DG, DG-S, XR1, XR2... the G-monitoring in LifeMFD also works with XR5 that has not any VC).

However, I have a non permanent bug, that seems to be related to the initialisation sequence of the MFD. Could you confirm if it happens to you, as well?

same here. LifeMFD doesn't show up in the MFD list.
Actually Orbiter.log should confirm that LifeMFD was loaded
Code:
000000.000: Module LifeMFD.dll ........... [Build 220103, API 160828]

Sometimes, when I start the simulation with a 2D-Panel, not the VC, then keep the 2D, add thrust (take off...) and then go to VC, the shaking effect does not apply anymore, and the Life MFD is frozen (and locked on previous values). Still frozen if I switch to another Vessel, or exit to launchpad and start a new simulation with a new vessel or the same. I have to exit Orbiter entirely and re-run to get back the shaking effect in VC (and the Life MFD monitoring).

No relevant error in the log.
Any idea about the classical mistakes in constructor / destructor or starting sequence in clbk...? (yes, I de-allocate the monitoring in the destructor, although it seems to be kept from a simu to the next!!!)
 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
I could work a little more on this add-on and here is a new version 0.2 (put the dll in Orbiter's Modules\Plugin subfolder):

1°) the oscillation amplitude was reduced, and it now assumes that the vessel's damping is optimized for 1G thrust. The amplitude grows in terms [thrust*(thrust-thrust_at_1G)], i.e.:
  • it increases from 10% to the thrust value that corresponds to 1G (for the main thrusters)
  • then goes to zero around 1G
  • then increases beyond 1G (and quiet strongly....)
2°) You can still "feel" the accelerations and shocks in the VC (with or without oscillation) due to non gravitational forces, i.e. during climb turns, sideslip curves or atmosphere re-entry.

For those who are not displayed Life MFD in the MFD list, the module being selected in the launchpad but a "(code 126)" error appearing in the Orbiter log. Please see there and there in the fofo, and tell us if the solution works.

Other issues: I found the flag for landing/in-flight and will probably make a fix soon. More urgent is the occasional crash (back to launchpad): I'm using the DLLCLBK void opcPreStep, but I read somewhere that it is deprecated. I tried to implement the core-algorithm into a "void <MFD_name>::clbkPreStep(...." but the method does not seem to be called by the main loop... any suggestion for the best place to implement the code instead?
 

Attachments

  • LifeMFD_v0.2.zip
    16.9 KB · Views: 18

clipper

Well-known member
Joined
Feb 27, 2018
Messages
256
Reaction score
388
Points
63
tried both suggested solutions but the error persists

here's the list of installed VC on my setup:
c++.JPG
 

OvalDreamX

Active member
Joined
Sep 16, 2019
Messages
85
Reaction score
164
Points
33
Location
Bariloche, Patagonia Argentina
As soon as I saw it I installed it as quickly as a could. Absolutely amazing!!! Just what Orbiter needed to feel more immersive. Just a quick suggestion. The movement is quite extreme when pulling a lot of Gs (phasing through the roof in the DG for example), but at those rates the human wouldnt be conscious. Why not cover this with a black out (screen to black or red) starting from the edges (if you can manage a bit of desaturation with +Gs would be amazing) so that, at the point where the camera phases through the mesh, we dont see it cuz our screen went to black. Maybe this will be easier than implementing a hard limit on translation.

And maybe some rotation lag for roll and pitch would be cool down the line.

And will this be compatible with TrackR?
Srry for the avalanche but Im pretty excited about this one haha

Keep up the good work!
 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
Hi, all. I just turned this addon open source, as I am still a new developer in Orbiter environment and the excellent suggestions are beyond my current skills:
  • I agree with @OvalDreamX, it would be nice to have red (resp.black) veil when strong negative (resp.positive) Gs are experienced for too long. But I need some help to play with such textures.
  • Some instabilities or install issues were reported above, I think they must come from my "dirty" implementation of some oapi or MFD/MFD2 classes.
I hope some experienced developers can give a hand (clean / consolidate the code, add the veil animations). Gitlab repo is here: https://gitlab.com/SecretBoxx/lifemfd, under MIT license. Any contributors will be ackowledged (important: you'll have to agree on the free re-use of your contributions). I will keep testing / coding / maintaining this addon and, hence, I hope I could learn from the best orbinauts.
 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
I'm trying to add/draw information in the GraphMFD of this add-on, reducing the size of the graph in void LifeMFD::Update(HDC hDC) and drawing things above with bool LifeMFD::Update(oapi::Sketchpad skp). But it seems I cannot overload this second Update in the graphMFD class. In other words, either I use the hDC context OR I use the skp context but not both! (the MFDTemplate.cpp seems to say so, no example with both contexts)

Can anyone confirm?
 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
178
Reaction score
123
Points
58
Location
Paris Area
Eventually, I decided to remove the graphs as they do not appear relevant when piloting (but there is a branch in the git with this option). Instead, the priority went to the real-time monitoring and warnings. See the alpha version, just uploaded on OHM:

https://www.orbiter-forum.com/resources/life-mfd.5474/ <= screenshots available

The git is also up-to-date. The MFD was quiet entirely re-coded and I think it will be more stable now than before (although you must leave Orbiter entirely to re-use the MFD in another scenario, due to some global variables...). Reviews, suggestions, bug reports welcome as usual....

Hope you will enjoy as much as I have :)
 
Top