• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Rolling and pitching AI ships in FSX

Messages
216
Country
unitedkingdom
In FSX (with or without SP1) my AI ships used to "shunt" a lot (i.e. show down and speed up frequently). This used to make them very unrealistic to land a helicopter on. Acceleration solved this problem for me and the ships now move very smoothly. However, they are now too smooth and easy to land on!

What I'd like to be able to do is make them roll and pitch according to 1) local wind speed; and 2) local wind direction. This would mean if the wind was broadside to the ship it would roll more than pitch and if the wind was directly from the bow or stern it would pitch more than roll. If the wind was in a quarter (i.e. 45 degrees) it would produce equal amounts of pitch and roll. The wind speed would control the amplitude and frequency of rolling and pitching. This would all produce some very interesting and realistic motion!

Does anyone know if this is possible using the standard Living World SDK, some interesting XML and default ships?? Please discuss... :)
 
Hi,

That is an interesting idea. I have played around with simObjects - adding them anywhere in the world and having them move along a path. You can do this yourself with simconnect - AI example. I wonder if you can pitch and roll the ships just like you can the aircraft. Don't see why not.

You should be able to get the weather data and make the ships pitch and roll accordingly.

I'll play around with my program and see.

If you want to have a copy of my program see:

www.fsinfotech.com

download the livingworld v1.2 beta.
 
Hi Ron,

Many thanks for your reply.

I haven't had a shot at this yet, but like you say it seems that setting the pitch and roll angles according to wind speed and direction should be possible. However, I'm guessing the issue will be how to make the pitch and roll angles change over time (a few seconds) to create a nice smooth, sinusoidal oscillation. The frequency of this oscillation will also have to be dynamic, according to changing wind speeds (such as gusting), and the amplitude would have to change as winds (or the ship's heading) veer...

In an ideal [virtual!] world I'd love to see the ships suddenly pitch up dramatically (as if riding a random big wave) when the winds gust strongly. This would be great for simulating storm conditions. Just add low visibility and driving rain and you're "there"! :)

BTW, looking at the 3wireX blog from April 2007 it seems rolling and pitching is possible... but how?! This gives me great hope. Its also unclear whether this motion was dynamically linked the the weather.

http://3wirefsx.blogspot.com/

Andy
 
Andy,

I have been mulling it over in my mind. :scratchch

Get METAR data from nearest site. You would have to set up a timer. This can be done in simconnect. You can then change the pitch,heading and altitude of the simobject (assumption now). Set up a max pitch and bank and then randomly tell the sim object to roll left and right and pitch up and down. I would also randomize the amount of pitch and roll so that it is now always +- 15 degrees say. Sometimes less that 15 sometimes more.

The timer is the concern - only think I can get it down to every second. Need to make this longer to nudge the ship every 10-15 seconds.

You could change the "altitude" slightly for the really large waves. I have made flying whales in the Great Lakes hover about 20-30 feet above the water.

The 3wire carrier needs to abandon ship :eek: It's really low in the water and listing heavily.
 
Thanks again for your reply Ron.

I'm also wondering if its possible to use the default Traffic Toolbox to have the ships sail around as normal... but design custom ships in GMAX which are themselves animated in pitch and roll. I'm thinking this would allow the ship animation to be linked to the weather (just like animated windsocks, designed by others on this forum, react to changing wind speed and direction). However, I'm wondering if this would have an impact on a helicopter landing on the deck...?
 
Hi Folks

Apologies I'd lost track of this thread
having intended to reply earlier.

The AI "shunting" is possibly the result of nodes being too close together.

AFAIK
all AI objects already respond to the weather.
They just need tweaking to behave appropriately.

You can make any object pitch & roll -
by tweaking the MOIs,
raising the CoG,
and adjusting the contact point damping values.

If tweaked as is,
most 'aircraft.cfg' files have insufficient mass,
and behave more like a bobbing dinghy.

The only impact of landing on the deck,
should be down to the pilot handling.

PS
If as IRL
that 3-wire carrier would be sunk.

HTH
ATB
Paul
 
Last edited:
I have had some sucess with using the throttle example and giving the aircraft carrrier a "kick". Paul has a point in that when I kick the carrier it rolls 15 degrees - it gets set to 15 degrees roll and then oscillates back and forth and comes to rest.

I basically set the carrier "PLANE BANK ANGLE" rather than throttle lever position. The sim variables seem to work on boats too. They probably work on animals too, but an elephant rolling and pitching ... well. Next I will try the acceleration ones and see if I can get something more realistic.

Oh and to any MS guys reading the posts - is there an errata to the SDK? The throttle example won't work unless you change the SIMCONNECT_REQUEST:

//hr = SimConnect_RequestDataOnSimObject(hSimConnect, REQUEST_THROTTLE, DEFINITION_THROTTLE, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_ONCE);

// uses
// case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
// {
// SIMCONNECT_RECV_SIMOBJECT_DATA *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*)pData;

hr = SimConnect_RequestDataOnSimObjectType(hSimConnect, REQUEST_THROTTLE, DEFINITION_THROTTLE, 0, SIMCONNECT_SIMOBJECT_TYPE_USER);

// uses
// case SIMCONNECT_RECV_ID_SIMOBJECT_DATA_BYTYPE:
// {
// SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE*)pData;
 
Hi Paul,

"Welcome aboard" this thread... I feel like I should pipe a tune on a whistle!

I see what you mean, the ships do actually react to weather. It seems like the default ships (US Navy Destroyer and Cruiser, USCG Cutter etc,. Boy do I love that USCG Cutter!) need some severe weather to get them to move at all, and even then its only a slight "bob", just like you said. Therefore, do you know of any freeware ships that I can use as AI boats which have "better" MoI, high CoG and appropriate damping for contact points IYO? Also, I don't seem to get any roll at all... is this possible?

On a related note, even with very high wind speeds and gusting I still don't get what I would call "angry" seas. Am I doing something wrong? All I want is high winds, low visibility, driving rain (no probs so far)... and huge rolling waves with big white caps... All this so I can have "fun" (twisted??!!) landing on the pitching and rolling decks of rig support vessels and warships! On top of this my animated seas don't seem to move with the wind direction. Indeed they always seem to move in the same direction. Do 3rd party addons like X Graphics, Flight Environment X and Active Sky solve these issues and allow more "heavy" seas to be realistically portrayed???

ATB
Andy
 
Last edited:
Hi Folks

Airtrooper -
This is a matter I'd been intendng to address
but due to other matters,
it's been on the backburner for ~3 years.

IRL the bow of a ship the size of a carrier
could be heaving by > 30'.

The gear travel set on most FDEs
currently used for FS vessels
is probably set in the region of 1'. :D

AFAIK
none of the vessel models I've come across
have suitable FDEs to represent anything near IRL movement.

'Angry seas' are not yet available in FSX.
The nearest visual representation is DX10 mode, (albeit flat).

HTH
ATB
Paul
 
Very interesting thread. This is something I would really like to see in FSX when landing on deck. Has anyone got any closer to getting it to work?
 
Pilotable, yes. AI, no. AFAIK.
AI ships in FSX that are 'steered' by the 'Living World' do not have that many possibilities to change something in the sim.cfg nor do they have an .air file.
So I haven't the faintest where to start changing the dynamics.
For AI ships that are controlled by the AI engine, I haven't tried yet as that option is only for short distances and gives some problems in other aspects.
 
Pilotable, yes. AI, no. AFAIK.
AI ships in FSX that are 'steered' by the 'Living World' do not have that many possibilities to change something in the sim.cfg nor do they have an .air file.
So I haven't the faintest where to start changing the dynamics.
For AI ships that are controlled by the AI engine, I haven't tried yet as that option is only for short distances and gives some problems in other aspects.

Could you provide us with the pilot able one? I'd like to see it.
 
It is a matter of adapting the aircraft.cfg and sometimes the .airfile, depending on the vessel.
In the contact points section of the cfg decrease the lateral and longitudinal distance of the float points. You might have to change weight and moi as well.
In the air file go to the 1101 primary dynamics and adapt the roll and pitch entries.
 
Well, that is the whole point.
Every vessel is different and the .airfile and aircraft.cfg entries (dimensions, weight, fuel tank placement, moi, etc.) are different. That is why a contact points example is rather futile unless it gives you some info on what points to change.
But do not take the figures for granted because they will be for a particular vessel and not for all.
 
I saw a similar video before. One thing that strikes me is that most (all?) of the motion is in pitch... not roll. Of course pitch usually dominates as a vessel sails into oncoming waves, but roll is also pretty significant. The combination of the two depends on the heading of the vessel and the heading of the wind/waves/swell, which is complex.

Andy
 
Ships become subs

I'd settle for just having them float, my ships seem to sit on the surface for a few seconds then pitch nose down and sink - complete with bubbles!

dover.jpg
 
Last edited:
Hi,

I guess it is your own model.
So you will know for sure where the cg of your vessel is.
Go to the contact points section of your aircraft.cfg and adjust the static height of your vessel to the cg height of your model.
Then make sure the float points are placed at the right height and depending on the cg of your vessel (where are your fuel tanks placed) adjust the lateral and longitudinal position of the floats.
Finally make sure the wheels are placed right as well.
 
Back
Top