• 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.

Vector coordinates of SEPARATION_PLANE

Messages
18
Country
czechrepublic
Hi,

I tried to make docking guidance system according to arno's tutorial. Everything works when the object is rotated 360. ( Vector is 0,0,-1 that means at opposite dircetion 180 ). But it does not work in another rotation.

There is no description how the vector in SEPARATION_PLANE should look. I tried both Z, X, Y and X, Z, Y and it didn't work. I wrote vector with length of 1 into it ( f.e. for gate that has heading 245 i tried 0.906, 0, 0.4226, and 0, 0.906, 0.4226, and none of them worked ). :banghead:

It is always easier to ask than to reinvent the wheel, so I am asking. Thankx for help.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Filip,

It is much easier to make your object so that you can use one of the main axis for your distance checking. You can then rotate it while you place your object.

It is possible to define the vector at an angle, but I would have to lookup the source for that. Can't remember it by mind.
 
Messages
18
Country
czechrepublic
So the vector is relative to the object and not absolute to FS?
This was what I was trying to make as my first attempt and did not work neither. But I might have done something wrong, I'll give it another try.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Yes, that is how it should be. Relative to your object. The only thing you should remember is that it is your viewpoint that is used and not the reference point of the aircraft. So when you are in spotplane view it might work different then you thought.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,947
Country
us-wisconsin
I don't know if this will help, but here's the reference from the FS2000 Scenery SDK:

Code:
BGL_SEPARATION_PLANE (0x25) – Normal vector with a dot product reference used to decide which side of an imaginary plane the eye is on.

Length            14 bytes

ENUM16           opcode              BGLOP_SEPARATION_PLANE = 0x25
SINT16            alternate_jump    jump to if normal * eye – dot_ref < 0
XYZ16             normal               normal vector of the polygon (32767 =1.0, -32767 = -1.0) 
SINT32            dot_ref              dot product reference

So the XYZ are the normals, and they would range from -1.0 to 1.0 ( -32767 decimal to 32767 decimal ).


Dick
 
Messages
18
Country
czechrepublic
Hi, I still can not make the docking work in any direction but 360.
I am adding my code and testing XML, maybe you can help me find what is wrong and why distance works on object rotated 360, and does not work on object rotated 245. Maybe I just do understand it wrong way.

Thanx a lot

edit : I corrected it works when rotation is 360.
 

Attachments

  • Docking_0.asm
    41.4 KB · Views: 414
  • Docking.asm
    2 KB · Views: 500
  • Docking.xml.txt
    1.3 KB · Views: 434
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
OK, I will have a look at your files (and test my own docking system again to be sure). But it is too late now, will have a look tomorrow evening.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Filip,

Oops, you are right. They do indeed not turn when you rotate the object. I am going to test something else on my docking system now and will update the tutorial if it does work. Making a docking system for each heading is no option :).
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Filip,

For me this worked, can you verify if it also solves your problem.

I replaced this code:

Code:
SEPARATION_PLANE di11, 0, 0, -1, 26

With this code:

Code:
IFIN1 di11, 0386h, 13, 14

The variable 0386h is the negative y axis in GMax, which is the axis along which I made my docking system. It seems that the unit for the SEPARATION_PLANE command was in 0.5 meters, but 0386h seems in meters. So I divided by 2.
 
Messages
18
Country
czechrepublic
Thank you a lot, I am going to try it now.

If I can test Y axis, I suppose I can test X axis too. Can you give me its adress too? Or simplier, is there any documentation about all adresses taht can be tested?

And one more question... if such an adress exist, can it be also used by cat?
 
Messages
18
Country
czechrepublic
Hi,

I wass testing adress 0386h you wrote to me ( and also 0382h and 037Eh ) and they appears that they do not rotate with the object. It apears to me that theese are distances at X, Y and Z axis of the FS itself, not of the Gmax object and they do not rotate with object.

Here is again a sample of code:
 

Attachments

  • Docking_0.asm
    45.6 KB · Views: 440
  • Docking.asm
    2 KB · Views: 478

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
This is getting irritating :). I will have another look at it.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Humm, you are right :(. This is very frustrating. It seems there is no distance check command that does respond to rotations made with the XML commands. Let me think of a new solution....
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
I have done some thinking and the only working alternative for my docking system would be to use the distance variable 033B I think. As long as you are lined up correctly that works, but it is not really optimal.

Any comments or suggestions?
 
Messages
18
Country
czechrepublic
033Bh of course does work as expected. I'll use it until I'll find some more elegant solution. One more is not as good for me - in your docking system, the position of the plane to the side is simple because of the stick.

On LKPR, there is a moving yellow stripe and that will be harder to achieve without testing the rotation, but I hope I'll find some workaround.

Thank you a lot for your help..



One more small idea to think about...

I was thinking about objects in FS and I found one object, that actualy shows depending on position of the aircraft. The lights before the runway. How are they displayed? Cannot we try to use that? Just an idea of course....
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi Filip,

Yes, I also have a different type of docking system where the left/right indication is done digital. At this moment I have no clear idea yet how to solve this. It frustrates me that most commands don't work properly in the new RIFF format.

I think the runway lighting is hard coded in the scenery engine, so I am not sure if we can see what kind of commands are used there.
 
Top