Roman,
I am not saying that getting the lights in their
correct geographical locations is an easy task. (that
is why I left that difficult part to Curt, if he
recollects).
tell me -
Do you know the lat, lon, alt of your runway - this
has to be YES. I am sure you dont want to position
your runway somewhere.
Then you also know in which tile (or tiles) your
runway lies. I suppose your answer is YES. If not you
can use the code in bucket.cxx to calculate tile index
from lat, lon of your runway.
Once you have the tile id, you have the gbs-center
coords of the tile (that is used for intersection
testing and culling.)
All runway light points transform using the same
transformation matrix. Here you have to take care
about runways with gradients or irregular terrain.
Your lights have to be positioned accordingly. This is
real difficult and you may have to do it by trial and
error, OR get into TerraGear and do it there (I
presume it will be simpler there). Otherwise you will
have lights underground/depth buffer fighting
problems.

All I am saying is - your lights are in object coords
such as 
{0,0,0}{100,0,0}{200,0,0},{0,50,0},{100,50,0}{200,50,0}
and you multiply all of them with the single
transformation matrix using lat/lon of runway and
translate using gbs coords of the tile in which it
lies and you wull have the coords of the lights in
tile coords. In case your runway overlaps two tiles
then you split the lights also into two groups for
transformation.

Regards
Ranga

--- Roman Grigoriev <[EMAIL PROTECTED]> wrote:
> 
> ----- Original Message -----
> From: "VS Renganathan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 01, 2002 1:08 PM
> Subject: RE: [Flightgear-devel] Post 0.7.9
> priorities (lights)
> 
> 
> > Roman,
> > If you know the light posns in runway (object)
> coords all you need to know
> > is the lat, lon  and alt of the centre/corner
> (0,0,0) of the runway.
> > Construct transformation matrix as is done for
> dynamic objects in
> main.cxx.
> > Rotate first for lat, lon and translate by
> Objtrans (see below).
> >
> >         //object gbs-posn in cartesian coords
> >         Point3D obj_posn = Point3D(
> obj_lon,obj_lat,obj_alt);
> >         Point3D obj_pos = sgGeodToCart( obj_posn
> );
> >
> >         // Translate object w.r.t tile center
> >         Point3D Objtrans = obj_pos - tile_center;
> >
> > This should work. This can be done offline and
> stored in a seperate file
> or
> > done on the fly.
> >
> > Regards
> > Ranga
> 
> Ranga you don't understand what i want to say (my
> bad english)
> Another problem using your method is calculating
> positions in lat/lon scheme
> and problem here is calculate altitude
> and it's not convinient to place this type of lights
> 
> >
> > -----Original Message-----
> > Okey guys, I'm trying to implement runway lights
> but I have some
> > mathematical trouble:
> > I know  4 corners of runway in local tile
> coordinates O1 O2 O3 O4 {x,y,z}
> > And I have runway sheme of lights for example let
> O1 will have
> {100,100,100}
> > in FG coordinates and {0,0,0} in local lights
> coordinate system. All I
> need
> > to have formulas to convert this local lights
> coordinates to tile fg
> > coordinates. I know that I can construct plane by
> 3 points using plib sg
> > routine  but wthat formulas?
> > O2                    O3
> > y
> > |
> > 0------0--------0
> > |                        |
> > |                        |
> > |                        |
> > 0------0--------0-->x
> > O1                    O4
> > so in runway coordinate system we have 6 points
> >
>
{0,0,0}{100,0,0}{200,0,0},{0,50,0},{100,50,0},{200,50,0}
> and have simple
> > routine to convert it to tile coordinate system
> > I try many formulas but no success :((
> > So if some on do it we HAVE runway lights
> > because you simply construct it using
> tileentry.cxx routines
> >
> >
> >
> >
>
_________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at
> http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Flightgear-devel mailing list
> > [EMAIL PROTECTED]
> >
>
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> >
> 
> _______________________________________________
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
>
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

Reply via email to