b80b9a8fc0
New Nasal method get_cart_ground_intersection Returns where the given position in the specified direction will intersect with the ground. Returns whether or not a certain position and direction pair intersect with the ground, and if so the intersection point. Useful for radars, terrain avoidance (GPWS), etc. Input parameters: 1. vec3d(x,y,z) position 2. vec3d(x,y,z) direction Returns nil or geod hash (lat:rad,lon:rad,elevation:Meters) intersection Example Usage: var end = geo.Coord.new(start); end.apply_course_distance(heading, speed_horz_fps*FT2M); end.set_alt(end.alt() - speed_down_fps*FT2M); var dir_x = end.x() - start.x(); var dir_y = end.y() - start.y(); var dir_z = end.z() - start.z(); var xyz = { "x":start.x(), "y" : start.y(), "z" : start.z() }; var dir = { "x":dir_x, "y" : dir_y, "z" : dir_z }; var geod = get_cart_ground_intersection(xyz, dir); if (geod != nil) { end.set_latlon(geod.lat, geod.lon, geod.elevation); var dist = start.direct_distance_to(end)*M2FT; var time = dist / speed_fps; setprop("/sim/model/radar/time-until-impact", time); } ----------- Nasal method aircraftToCart : This allows easily computing offsets in aircraft-relative coordinates, and converting to global cartesian (ECEF) reference frame. |
||
---|---|---|
.. | ||
AIModel | ||
Aircraft | ||
Airports | ||
ATC | ||
Autopilot | ||
Canvas | ||
Cockpit | ||
Environment | ||
FDM | ||
GUI | ||
Include | ||
Input | ||
Instrumentation | ||
Main | ||
Model | ||
MultiPlayer | ||
Navaids | ||
Network | ||
Radio | ||
Scenery | ||
Scripting | ||
Sound | ||
Systems | ||
Time | ||
Traffic | ||
Viewer | ||
CMakeLists.txt |