Alexander Kappes <[EMAIL PROTECTED]> said:

> I had the same problem when I thought about how to get all (approach)
> stations <100 miles around the player's plane. In the end I assigned to
> each station the appropriate tile number (bucket) and sorted the stations
> according to this number. As the buckets are of course smaller than 100
> miles I have to search a square of let's say 9x9 buckets (the actual
> number depends on the exact position on the plane). Though it seems
> to work I have tested it up to now only with a single station so I don't
> know what happens if you have a lot of stations/models.
> 
> All the best
>         Alexander
> 

It might be interesting to have a general class for accomplishing these kinds 
of sorts and calculations.  For example with the tower view it'd be nice to be
able to calculate nearest airport, so that the tower could change rather than
staying with the starting location.

Best,

Jim

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

Reply via email to