Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: 1 2 [3] 4 5 ... 15

Author Topic: Integrating with another sim  (Read 59575 times)

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #30 on: June 06, 2014, 04:04:28 am »

JSBSim can be made to work that way, DCS works that way, and I guess others can be too. Those engines compute all the forces that affect the object, various aerodynamic ones and from the propeller etc, not just the applied ones. At the heart of simulator is an integrator, that takes the force impulses and integrates the speeds and positions. One could usually separate the integrator from the rest. This allows to have many simulation cores using one common integrator, while still being able to interact with other objects (running other cores) because contact forces are handled by the universal core.

There can be small differences in the used integrator algorithms, and for some simulators the one used in OT can be unsuitable in the eyes of their users, but in that case we'd at least need a way to send contact points or forces back to those simulators.
Logged

planetsim

  • Jr. Member
  • *
  • Posts: 38
  • newbie
Re: Integrating with another sim
« Reply #31 on: June 06, 2014, 01:08:53 pm »

Thanks for detailed reply.

Yes I agree Orbiter should be able to integrate with OT by providing the required forces. All the forces on an object can be got from Orbiter and the vectors given to OT. OT can then integrate them.

My question is, doesnt JSBSim or DCS also maintain the position/velocity of the object at this time ? Or as you said, do they just calculate the forces based on the aircraft engine type or propellor blade design and give it to OT. Are their integrators disabled at this time ?

I guess for Orbiter I could create some sort of situation for a vessel where its held in one place in space as far as Orbiter's internal position/orientation is concerned. Yet the vessel will be able to fire its thrusters or retro jets as needed. So it would not move at all in Orbiter as it would be somehow 'locked down'

But since all the forces that the vessel  is generating would be given to OT, which would then integrate it, the vessel will move in OT, in the direction of the resultant force.

---------

But hmm, I guess I may actually need to move the vessel in Orbiter too because some of the forces on the vessel depends on its location. Especially when the vessel is close to orbital velocity.  If it ends up in space then there is the tug between gravity and centrifugal forces. So I ll need to set the current position/orientation, translational velocity/rotational velocity  of the vessel in OT back in Orbiter too. Guess there is no skipping the feedback loop.

« Last Edit: June 06, 2014, 01:45:18 pm by planetsim »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #32 on: June 09, 2014, 01:24:26 am »

My question is, doesnt JSBSim or DCS also maintain the position/velocity of the object at this time ? Or as you said, do they just calculate the forces based on the aircraft engine type or propellor blade design and give it to OT. Are their integrators disabled at this time ?
I just described how they can work with their addon aircraft. Since they are integrating the forces themselves, this is what they expect from any addons - a collection of forces to integrate each frame.

These simulators usually do not expect to be a provider of the simulated forces for another simulator, so connecting them to OT is usually much simpler by providing positions and speeds instead. You will lose the interactivity though. Ultimately I expect that someone will implement physics plugin into OT that will work at the force level, and will allow vehicles to use that physics module using its higher level API.

Logged

planetsim

  • Jr. Member
  • *
  • Posts: 38
  • newbie
Re: Integrating with another sim
« Reply #33 on: June 09, 2014, 10:44:35 am »

Ok, I understand. I am thinking of starting out a bit simpler with the Railway Vehicles, so I can get a bit familiar with how custom physics can be implemented from a plugin for vehicles: http://forum.outerra.com/index.php?topic=2720.0

To that end, is it possible to add physics models to the main bullet physics world in OT. How do I retrieve this world ? Is there an API for this ? Also is it possible to do some debug drawing of the physics rigid bodies like the bullet debug drawer does ? Like local co-ordinate systems and the outline of btCollisionShapes etc ?
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1773
  • newbie
Re: Integrating with another sim
« Reply #34 on: June 13, 2014, 01:04:17 am »

So....... Whatever happened to this topic?
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

planetsim

  • Jr. Member
  • *
  • Posts: 38
  • newbie
Re: Integrating with another sim
« Reply #35 on: June 18, 2014, 09:41:12 am »

I am able to use the plugin now to set the camera position as I want and vary it at runtime.  I noticed that the plugin sets an absolute position in the global frame to

double3 startPos = double3(-2286686.1965365410 + vary,-3734648.0835802061,4638811.4431277402);

How were these co-ordinates arrived at ? What is the origin and orientation of this frame ? Is the planetary center the origin ?

How do I convert a point on the surface of the earth, specified in terms of the (long, lat, alt) into this global frame of (x, y, z) ? When I want to setup something somewhere specific then all I have is the long, lat from google maps.
Edit: Ok I got it from the Saved Locations > Lat/Lon/Alt tab, but this does not give me the numbers in global frame (x,y,z), that I can pass to igc::setPos().
« Last Edit: June 18, 2014, 10:03:39 am by planetsim »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #36 on: June 18, 2014, 10:45:17 am »

It's the ECEF frame.
I guess we should add the geographic<->ECEF conversions there too.
Logged

planetsim

  • Jr. Member
  • *
  • Posts: 38
  • newbie
Re: Integrating with another sim
« Reply #37 on: June 18, 2014, 10:56:49 am »

That would be useful !

2 overloads please :), for conversion, one that accepts the lat, long in degrees and another in decimals : https://support.google.com/maps/answer/18539?hl=en
« Last Edit: June 18, 2014, 11:05:47 am by planetsim »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #38 on: June 18, 2014, 11:42:37 am »

The latter is already in comm/token.h, toangle() method:

///Convert angle string to value, consuming input
/// formats: 49°42'32.91"N, +49°42.5485', +49.7091416667°
double toangle();

usage:
coid::token tok("49°42'32.91\"N");
double lat = tok.toangle();
Logged

galayko

  • Newbie
  • Posts: 2
  • newbie
Re: Integrating with another sim
« Reply #39 on: March 22, 2015, 02:54:29 pm »

Ok, i've downloaded OT-API for VS2013.
Compiled successfully, put it into the plugins dir, but while loading Outerra says:

INFO: starting io_man...
DEBUG: program directory: C:\Program Files (x86)\Outerra\Anteworld\
INFO: Outerra 0.8.4, build 5244 from Wed, 18 Feb 2015 21:18:04 GMT
DEBUG: Nvidia driver profile "Outerra" found...
DEBUG: Initializing engine...
DEBUG: data root directory: C:\Users\NiKe\Outerra\
DEBUG: Windows version: 6.2.9200
...
DEBUG: (c4e) baad upd rect: 0,0 17,17
DEBUG: loading plugin: igc_plugin.dll
DEBUG: removing window from zorder list "logger"
DEBUG: windows z-order:
    fading_logger visible  disabled  type=16
    fading_message disabled  type=16
    logo_widget visible  disabled  type=16
    login_window type=64
    www/lib/desktop/desktop-manager.html visible  type=16
    logger visible  disabled  type=32

ERROR: failed to load plugins/igc_plugin.dll
DEBUG: Buffer created (1569) 'smoke' size 3KB
...

Tried x86, x64, Debug, Release. No way.
Using Visual Studio 2013 12.0.31101.00 Update 4 on Windows 8.1.

Please, tell what am i doing wrong?
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #40 on: March 22, 2015, 03:16:43 pm »

It looks that the API is outdated and wont work with the current version. We'll update it with the next patch.
Logged

galayko

  • Newbie
  • Posts: 2
  • newbie
Re: Integrating with another sim
« Reply #41 on: March 22, 2015, 03:32:12 pm »

Is it possible to roll back to an older version, that supports currently available OT-API?
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #42 on: October 24, 2015, 01:52:35 am »

Hi,
Is the OT-API working in the current version?
I've compiled igc-plugn.dll but fails to load.

Thanks.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6542
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Integrating with another sim
« Reply #43 on: October 24, 2015, 01:17:55 pm »

I have updated the api files for the new version.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #44 on: October 25, 2015, 08:59:18 pm »

Thanks,
Works well now.
Logged
Pages: 1 2 [3] 4 5 ... 15