I've been working on my FGPositioned ideas in a local git tree, to get a feel for the scale of the changes. One thing I did last night was the slightly painful conversion of FGRunway to be heap, instead of stack based.
One interesting thing I've come across is how the runway _length and _width fields are used - it turns out they're pretty much always used to calculate some particular positions on the runway, notably the threshold and the 'other end' point (sorry, there must be a better piece of terminology than that), or some offset from those points - eg five metres in, or several NM 'out' along the extended runway centreline. A few users are using the width to find the runway corners, and sometimes to perform a 'is point inside the runway' test - including the ATCDCL code, the Mk-VIII, the groundradar and the runway HUD instrument. All of which is fine, except in each case we get an ugly block of 'geo_direct_wgs_84' calls at each use site. So, I'm going to add some helpers to Runway - to return the threshold point directly, or a point on the extended centerline at an offset (in metres) from the threshold, and probably some other helpers to get the corners, and do a 'is point inside the runway' test. But, doing this, I wondered - there's these displaced threshold and stopway values in Robin's data, which we are parsing, storing in memory, and which are never used by any C++ code - they do get passed to Nasal, but I'd bet some money no one on that sides uses them either. Should I be checking them when computing my threshold point? Right now, everything is using the runway lat/lon, then moving half the runway length to get the threshold. I have the feeling I should be either adding or subtracting the threshold displacement value, but I don't know which. Or perhaps the displaced threshold offset is irrelevant to some / most people, and should be a separate, explicit accessor. Clearly people computing the runway corners / edges want the edge of the paved surface, but I wonder if (for example) the fg_init code that positions the plane at the runway threshold would be better using the displaced value? And I don't have a clue about the stopway information, any insight would be appreciated. Regards, James ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

