Jump to content
Varanon

Advanced Flight Model: XML coordinate system

Recommended Posts

I've not been able to find firm information about the coordinate system used in the AFM XML files. I'Ve read in a comment of one Chopper that the position of the main rotor disc would be the reference point. Elsewhere, it said "center of mass". On the BIKI, it says "relative to the vehicle body coordinate system".

 

Not only are all three mutually exclusive, none of them makes any sense given the observations in relation to the Ground contacts.

 

So the question is, what IS actually the coodinate system used ? "Body coordinate system" doesn't make any sense, if you go by the bounding box,  the wheels/skids are almost always the lower end of the bounding box, so they should be zero if the bounding box is the reference frame. Unless of course if the zero point is in the center of the bounding box, but that is difficult to measure...

 

So, honestly, where IS the coordinate system's origin ?

Share this post


Link to post
Share on other sites

Can it be modelToWorld [0,0,0] ?

 

No, modelToWorld would convert to world coordinates, that wouldn't make sense.

Share this post


Link to post
Share on other sites

Then in model space it should be [0,0,0] with bounding box going in negative area by z coordinate, why not? And I personally don't see any problem with model origin being not in bounding box center.

Share this post


Link to post
Share on other sites

Then in model space it should be [0,0,0] with bounding box going in negative area by z coordinate, why not? And I personally don't see any problem with model origin being not in bounding box center.

 

Because modelToWorld generates world coordinates. How should that be an origin for the bounding box ? 

 

In the meantime, I know that all coordinates are relative to a point that is given be the rtd_center in class RotorLibHelicopterProperties, referencing a memory point. Moving that memory point up and down moves the land contacts as well.

 

Now, I just need to find out what the actual scale is, because it's not simply in "meters"

 

Edit: Suspension length also seems to be a factor

Share this post


Link to post
Share on other sites

Because modelToWorld generates world coordinates. How should that be an origin for the bounding box ? 

I didn't say 'world' this time.

Imagine that you create a helicopter body model in 3d modelling software. You start with what? You place some generic form in software's [0,0,0] position. It becomes model's origin. Model's [0,0,0] point. It does not necessary situated in geometrical center of your vehicle's body, or more than that it's bounding box. However this point is fixed once and forever to the "static" part of your vehicle. No matter what gear relative position is or rotors'.

It is not the body what rises above gear, it is gear lowers below. Static part remains static.

Let's say the [0,0,0] point is on pilot's seat. That means vehicle body was placed that such that seat becomes in [0,0,0] in 3d modelling software. And you are trying to place all other vehicle parts in this coordinate system.

 

Bounding box is by itself a dynamic system and shoud not be considered as reference for anything. It wobbles around teh static part as moving parts... well, move. If you have a tank and you rotate its main turret 90 degrees right, bounding box will expand in this direction.

 

Returning to the helicopter. If you lower the gear, yes, it will lower land contacts relative to static part, therefore expanding bounding box downwards, but it will not move anything else in the model.

 

Sorry for being too repetitive, but in general, model coordinate space is originated from the point where model was started in model editor. And it has nothing to do with world (and bounding box).

Share this post


Link to post
Share on other sites

I didn't say 'world' this time.

 

Yeah, you said it last time, I misunderstood.

 

In any case, what you say is irrelevant in this case because as I said before, the origin is NOT the bounding boxes origin, nor is there any correlation between the model coordinates and the XML coordinates

 

Coordinates are relative to a point given by rtd_center, and all coordinates are relative to that The coordinate system is reversed (x and y have to change sign) and the actual ground contacts for gears are the coordinates of the wheel's center relative to the rtd_center, offset by the suspension length, taking the wheel radius into account.

 

 

Let's say the [0,0,0] point is on pilot's seat. 

 

But there, you touch the very matter of the subject. "Let's say it is at X"... That is EXACTLY the question I was asking... where IS X ? I know how coordinate systems work, but any coordinate system is defined by it's origin, and "let's say" doesn't work if the engine somehow gives you an origin that you don't know. You are basically answering the question with the question itself.

 

In any case, I've found out how it work, no need to discuss it further.

Share this post


Link to post
Share on other sites

In any case, I've found out how it work, no need to discuss it further.

Rright. Keep it secret. Keep it safe.

Share this post


Link to post
Share on other sites

Rright. Keep it secret. Keep it safe.

 

Huh ? What the hell ? Would you kindly READ what I wrote before accusing me of something like that ? 

 

To quote myself:

 

"Coordinates are relative to a point given by rtd_center, and all coordinates are relative to that The coordinate system is reversed (x and y have to change sign) and the actual ground contacts for gears are the coordinates of the wheel's center relative to the rtd_center, offset by the suspension length, taking the wheel radius into account."

 

How is that "keep it secret" ?

 

Uhm, re-reading that, the first sentence should probably just read "Coordinates are relative to a point given by rtd_center."

Share this post


Link to post
Share on other sites

Exactly. All other stuff is just as obvious as the things I was mumbling here, I know how offsetting work.

Except for that rtd_center that did said me nothing.

Just in case somebody else does not know what rtd_center is, good point to start: https://forums.bistudio.com/topic/122251-cog/

 

UPD. My apologies, Varanon.

 

UPD2. I've crossed the info that not both coordinates are reversed. So that positive directions for both x and y give you back and right. Does not make too much difference for symmetric (almost all) vehicles though. Nvm, that was about tilting

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×