> However I got some problems about the placement of the new object. Where
> are defined the coordinates into the virtual world? I've found that every
> new object inherit the coordinates of the airplane when it's created
> (_user_lat_node->getDoubleValue(), _user_lon_node->getDoubleValue() ... are
> stored into the IC struct), but they are defined with lat, lon and alt.
> Will they be converted into another class?
>
> Additionally there's another problem. When the particle system is created
> it needs a 3D vector defining x, y and z. How this could be connected with
> the data obtained from the airplane and, this could involve a relocation of
> the whole object?

The original function SubmodelSystem::transform() uses very simplistic (i.e. 
wrong) calculations to determine the submodel's initial conditions.  This is 
because I didn't have the mathematics handy to do a proper transformation of 
axes.

Vivian has been working on the matrix math required, and it may take some time 
to get it working well.

The problem is this.  The submodel's position is defined in body coordinates 
(x_offset, y_offset, z_offset).  The submodel's initial velocity vector 
(relative to the airplane) is defined by (yaw_offset, pitch_offset, speed), 
also in body coordinates.   

At the time of release the airplane's position (lat, lon, alt) is known and 
its orientation (pitch, roll, yaw) is known, both in world coordinates.  A 
rotation matrix must be used to then find the submodel's initial position in 
world coordinates (lat, lon, alt).  

The velocity vector is trickier.  The airplane's velocity vector must be found 
first.  Then the submodel's initial velocity vector must be transformed to 
world coordinates.  Then the vectors need to be summed to get the submodel's 
initial condition.


Dave
-- 
****************************
David Culp
[EMAIL PROTECTED]
****************************

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to