Thomas Geymayer
5e85bcacc8
Canvas: Expose more methods to Nasal.
...
- Expose canvas::Group::getElementById to Nasal
- Expose canvas::Group::getChild to Nasal
2012-11-30 17:32:13 +01:00
Thomas Geymayer
f7544744bb
Update for latest SimGear changes and remove some old code
2012-11-29 17:57:01 +01:00
Thomas Geymayer
af0bbfd657
Expose simgear::canvas::Group::createChild to Nasal
2012-11-29 01:25:01 +01:00
Thomas Geymayer
e5286f1217
More work on Canvas event handling/adapt for simgear changes
2012-11-27 13:56:53 +01:00
Thomas Geymayer
d51499382d
Clean up CanvasWidget and more work on Canvas/Nasal bindings
2012-11-18 16:46:03 +01:00
Thomas Geymayer
1a0fcd5f56
NasalCanvas: Clean up and expose Element node ghost
2012-11-16 12:34:38 +01:00
Thomas Geymayer
0761af344d
Visual Studio bug workaround
2012-11-15 12:43:35 +01:00
Thomas Geymayer
859e92a8ed
Experiment with exposing more canvas methods
2012-11-15 12:43:34 +01:00
Thomas Geymayer
892806cb3f
More cleanup an move of helper classes to simgear
2012-11-15 12:43:34 +01:00
Thomas Geymayer
724d54b3a3
Clean up and some more testing
2012-11-15 12:43:34 +01:00
Thomas Geymayer
863cd6a290
Canvas/Nasal and Nasal/C++ binding experiments
2012-11-15 12:43:34 +01:00
ThorstenB
1d99401c04
Remove osg dependency for isNaN only.
2012-11-11 17:22:42 +01:00
James Turner
afcdbd3158
Overhaul the ground-net / parking code.
...
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
Thomas Geymayer
c79510ef34
Fix include and compiler warning
2012-11-04 23:03:06 +01:00
Thomas Geymayer
28779e7a51
Update for new simgear Canvas system.
...
A refactored version of the Canvas system can now be found in
SimGear.
2012-11-04 14:18:31 +01:00
Thomas Geymayer
79f7907a82
Let Nasal props.Node.removeChildren behaviour consistent (Don't keep deleted nodes)
2012-10-22 17:59:19 +02:00
Thomas Geymayer
b22ede2fd5
Expose SGPropertyNode::addChildren to Nasal
2012-10-14 17:39:53 +02:00
ThorstenB
076bbb8487
Fix some compiler warnings.
...
Unused vars, loss of precision, bool type conversions.
2012-10-13 17:59:47 +02:00
ThorstenB
60eaa22fda
Drop sorting of Nasal scripts.
...
simgear::Dir now always provides results in a deterministic order.
2012-10-13 15:45:15 +02:00
Thomas Geymayer
78b5dfb58b
Expose SGPropertyNode::addChild to Nasal
2012-10-13 15:13:56 +02:00
James Turner
b1ff365a8f
Make FGTaxiNode and FGParking inherit FGPositioned.
...
In preparation for caching the groundnet in the NavCache, make taxi-nodes and parkings inherit from FGPositioned. As part of this, make them heap (as opposed to value) classes, disable their copy-constructors, remove many mutating operations, and give them real constructors.
2012-09-25 00:31:17 +01:00
Stuart Buchanan
a3a40af860
Simplify code for taxiways.
2012-09-20 21:53:31 +01:00
Stuart Buchanan
ac1fc699b7
Expose surface types and taxiways via the airportinfo() Nasal call.
2012-09-19 22:33:43 +01:00
James Turner
3cf7715485
Expose the route-path of leg to Nasal.
...
In advance of converting the Map and NavDisplay to use the canvas, expose the full route-path vector for each flight plan leg, as a vector on the leg. Use leg.path() to get this.
E.g.:
var fp = flightplan();
for (var i=0; i<fp.getPlanSize(); i += 1)
{
var leg = fp.getWP(i);
debug.dump(leg.path());
}
2012-09-19 18:40:34 +01:00
James Turner
9b900e9430
Implement a persistent cache for navigation data.
...
Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).
Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
2012-09-19 11:38:19 +01:00
ThorstenB
fa0a7f8700
Avoid compiler warnings.
2012-09-17 13:45:31 +02:00
Mathias Froehlich
26664aaff0
Push SGMaterial use into these classes that need it.
2012-08-29 06:29:29 +02:00
James Turner
688d76613e
Expose SGCondition as a ghost to Nasal directly.
2012-08-19 21:13:31 +01:00
James Turner
bd0a5d825d
Cocoa clipboard implementation.
...
Fix OS-X build by supplying a Cocoa clipboard implementation.
2012-08-05 21:00:05 +01:00
Thomas Geymayer
d6a5a911bc
Complete X11 clipboard support.
...
- Now ClipboarX11 also supports writing to the clipboard and
sending the data to another application if requested.
2012-08-05 11:19:24 +02:00
Thomas Geymayer
aa9d0e3a8a
Basic clipboard access from Nasal.
...
- Add platform independent clipboard layer for Nasal access
to clipboard (thanks to Hooray for basic code)
- Add Windows clipboard access
- Add partial X11 clipboard access (only reading from clipboard)
- Add fallback clipboard for application internal clipboard if
platform not supported
- Add some helper functions to FGNasalSys
2012-08-04 17:33:48 +02:00
James Turner
f94b2d127b
Avoid a naming clash on 'canvas'
2012-08-03 10:21:26 +01:00
James Turner
f703882ffa
Skeleton Nasal-Canvas integration.
...
This code is non-functional, but contains most of the stubs to show what's required to add property get/set access, convert to from ghost & C++ types, and manage ownership. Element derived classes & inheritance (e.g., methods on image/path/map elements) will follow, along with some actual functionality!
2012-08-02 12:18:38 +01:00
Thomas Geymayer
a876ff93e1
NasalPositioned: Expose actual postion of parkings
2012-07-31 23:19:22 +02:00
Thomas Geymayer
373d511c69
Canvas: Allow using canvases as PUI widgets.
...
- Add new widget type canvas
- Set canvas view dimension from the gui xml.
- Expose mouse events to canvas widget properties.
2012-07-31 23:19:22 +02:00
Markus Pargmann
ecfbb951ae
Remove most compile warnings
2012-07-26 11:10:27 +01:00
James Turner
ffac5ff889
Standard property to ignore unusably short runways in NavDB.
...
Default values should match existing behaviour. Set
/sim/navdb/min-runway-length-ft to skip short runways
in GPS / Map / ND / Nasal queries.
2012-05-16 16:51:39 +01:00
James Turner
1ef77b2bc2
More route-manager functionality moved to Nasal.
...
The routing behaviour now happens entirely in Nasal,
using a delegate, and can be over-ridden or disable
by aircraft authors. Default behaviour should be
unchanged.
2012-05-15 17:53:30 +01:00
James Turner
ce92730ef6
Expose FlightPlan delegates to Nasal, finally.
...
This will permit Nasal (e.g., FMS) to update nicely when the FlightPlan
is modified from anywhere else.
2012-05-12 17:23:17 +01:00
James Turner
0f61108f5b
Break FlightPlan out into its own file.
2012-05-12 10:25:56 +01:00
James Turner
acd8fa25e6
Expose procedure routing and fixes to Nasal.
2012-05-11 17:07:56 +01:00
James Turner
ea2c73e8b5
Expose airways via Nasal, and allow waypoint creation and deletion via Nasal too.
2012-05-08 21:06:28 +01:00
Frederic Bouvier
71622dc3ca
SID is a predefined type under windows
2012-05-07 10:19:55 +02:00
James Turner
1b7b69b498
Create a real FlightPlan (and Leg) class
...
Convert the route-manager to use a flight-plan internally, and expose
flightplan, leg and procedure data to Nasal. Move the Level-D parser
into its own file.
2012-05-07 00:35:48 +01:00
Frederic Bouvier
75fc136931
Remove redundant inclusion of math/SGMath.hxx
2012-05-05 11:20:04 +02:00
ThorstenB
c808376927
Use separate header file for vector properties.
...
(We could drop the "SGMath.hxx" include in many places now...)
2012-05-05 00:12:41 +02:00
James Turner
f4318044ef
And expose the published navaid range to Nasal, since we can.
2012-04-28 23:35:19 +01:00
James Turner
78afdb3c22
Convert all the Nasal wrappers around FGPositioned to use ghost-member-access
...
Lazy-ness is good. Along the way, expose the course on ILS/LOC navaids to Nasal.
2012-04-28 23:28:12 +01:00
James Turner
a318baa9e2
Update some nasal-positioned code to use new ghost-member support
...
(Requires latest SimGear)
2012-04-28 22:33:13 +01:00
James Turner
de975699fe
Expose single-runway query on airport.
2012-04-26 00:27:18 +01:00
James Turner
4d39882ab2
Expose SGBucket index computation to Nasal.
2012-04-26 00:00:46 +01:00
James Turner
c5781546b9
Expose greatCircleMove to Nasal, and allow geo.Coord to be passed into methods.
2012-04-25 16:54:40 +01:00
Mathias Froehlich
4d6a4eb836
Fix explicit reference counting with waypoints and positions.
2012-04-24 23:25:51 +02:00
James Turner
fb66aeade1
More search functions exposed to Nasal, also airport parking.
2012-04-24 22:12:56 +01:00
James Turner
3d46809ea8
Expose waypoint source (airport/runway/navaid) to Nasal
2012-04-24 10:53:46 +01:00
James Turner
b57d24913a
Hacking to expose route/waypt data via Nasal, API not final yet.
2012-04-23 23:55:22 +01:00
James Turner
a132ced084
Nasal airport functions for various ancillary data pieces now work.
2012-04-23 23:04:59 +01:00
James Turner
3edd350c55
Work on extending the Nasal airports API - attempt to give methods to airport hashes.
2012-04-21 11:15:23 +01:00
James Turner
f1ad01478e
Expose more things to Nasal for FMSs in particular - still work in progress.
2012-04-16 10:18:37 +01:00
ThorstenB
fdff9291bd
Fix build for Linux, really.
...
;-)
2012-04-15 16:07:17 +02:00
James Turner
ef796e88bc
Fix build for non-Mac, hopefully.
2012-04-15 14:20:03 +01:00
James Turner
f5a79fc893
Start refactoring how FGPositioned classes are exposed to Nasal, more to come.
2012-04-15 13:54:50 +01:00
ThorstenB
5f1435b4fd
Avoid "using..." in header files.
2012-04-05 21:02:09 +02:00
ThorstenB
578df0f484
#553 : decouple OSG callbacks from Nasal subsystem
2012-02-06 22:19:33 +01:00
ThorstenB
e82c36d76b
#587 : don't crash on negative sizes
...
(see simgear commit)
2012-01-09 20:29:51 +01:00
ThorstenB
d47342a5a4
Add --log-class option, improve logging classes.
...
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
--log-level=debug --log-class=environment
to only get environment debug messages, or
--log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
James Turner
70b4f38ebc
Goodbye automake.
2011-11-01 11:15:53 +00:00
Torsten Dreyer
b82ea065c3
Add the frequency to the navinfo hash
2011-08-22 09:18:04 +02:00
Torsten Dreyer
3723de56ca
Experimental navinfo() Nasal extension function
...
Add a navinfo() Nasal extension function to provide
information about navaids. Inspired by the airportinfo
function.
This is work in progress, do not rely on this in your Nasal
code - the interface might change over the next weeks.
2011-07-22 12:37:41 +02:00
James Turner
1c8d8e7908
More CMake headers support
2011-07-19 07:58:03 +01:00
ThorstenB
4fd1e219a4
#348 related: More places where missing files were not reported properly
...
Whenever resolving a (relative) path to an absolute path with
'resolve_maybe_aircraft_path', check if the result is empty and report original
(relative) path as missing. Otherwise no or a meaningless message is
issued ("File '' not found.").
2011-07-03 13:06:41 +02:00
ThorstenB
88f7c05274
Introduce "PRESERVE" flag to protect properties on sim reset.
...
Some specific properties need protection and shouldn't be restored to their
original values on sim-reset.
2011-06-12 20:31:56 +02:00
ThorstenB
370645e593
Olaf Flebbe: #332 , Improve Nasal's "systime" method
...
Use gettimeofday for determine time, rather than time() and gettimeofday()
2011-06-02 23:53:42 +02:00
ThorstenB
3c8a80d968
Deterministic loading sequence for Nasal scripts
...
Avoid loading Nasal scripts in (random) file system order
2011-05-29 18:44:15 +02:00
ThorstenB
93180eb004
On-demand loading of Nasal modules.
...
Load a module whenever its /nasal/foo/enabled flag is set,
even if it was disabled at start-up. Also expose a property if it was
successfully loaded.
2011-04-03 15:30:25 +02:00
ThorstenB
298f832d43
Support optional Nasal modules in fgdata/Nasal/MyModuleFoo
...
- Allow structuring generic Nasal sources into modules (i.e. support
separate source folders for multiplayer/local weather/... sources)
- Option to enable/disable loading of generic Nasal modules (i.e we only
need to load stuff that is really needed/enabled).
- Provide basic loading sequence: subfolders are strictly loaded _after_
the base directory. So submodules can rely on .nas-scripts like math.nas,
io.nas, debug.nas, ... to be already loaded - dropping the need for
awkward listeners/timers to delay module initialization (loading order
within Nasal/*.nas is still random)
2011-04-02 15:15:59 +02:00
James Turner
664817b0a7
Make the Nasal NaN check less aggressive - still SG_ALERT, but return nil instead of terminating the Nasal script completely.
2011-01-14 20:04:20 +00:00
James Turner
ce2a112639
When attempting to pass a NaN between Nasal and property nodes, catch this.
2010-12-28 11:58:03 +00:00
James Turner
a91ec5f9f9
Initial work on CMake build files, with considerable help from Olaf Flebbe.
2010-12-19 15:06:04 +00:00
Christian Schmitt
0a5e86f4e6
remove old .cvsignore files
2010-11-11 01:16:29 +01:00
James Turner
db4b84bc5c
Convert nasal directory() helper to use simgear::Dir
2010-10-24 07:10:51 +01:00
James Turner
dd2eec7bd8
Airways/procedures code - add new data structures to store waypoints and
...
procedures, and routing algorithms, and modify the GPS, route manager and
WaypointList to use the new objects.
2010-10-20 09:02:02 +01:00
Torsten Dreyer
a5017f218f
Fix mean nasal bug when calling setprop("foo")
...
Reported on the forum from Thorsten Renk and analyzed by
Hooray, fixes this issue:
var x="/test/X";
var y="/test/Y";
setprop(x,100); # sets x=100
setprop(y); # sets x=0
setprop(x,100);
setprop(200); # sets x=200
by checking for at least 2 parameters for setprop
2010-09-13 22:15:50 +02:00
James Turner
2e69930c7d
Expose path resolver to Nasal.
2010-08-15 11:02:27 +01:00
James Turner
ab495d1370
Add --fg-aircraft option, and aircraft dir path list. Partial support in places that load files, for respecting the setting.
...
Add helper to look for an aircraft branch path in multiple candidate locations.
Update the main subsystems to use the helper, and hence load from any aircraft dir.
2010-07-28 22:03:10 +01:00
Tim Moore
7ff80d11a0
changes for SGPropertyNode::getPath return type
...
It's now a std::string.
2010-03-09 11:24:45 +01:00
fredb
00e9ad3055
MINGW patch from Benoît Laniel
2010-01-25 17:12:04 +01:00
Tim Moore
3836abcf4b
Merge branches 'jmt/spatial', 'jmt/ref_ptr', 'jmt/navradio' and 'jmt/gps'
2010-01-12 00:09:19 +01:00
jmt
52905875f9
Fix airportinfo() ILS frequency listing to use underscores.
2009-12-22 07:44:12 +01:00
jmt
88dc75695b
Probably best if the string and its length agree. :)
2009-12-20 08:44:50 +01:00
jmt
3180d5f4f2
Add runway ILS frequency to Nasal airportinfo() query, as discussed on the list.
2009-12-20 08:44:47 +01:00
Tim Moore
e503591af4
Merge branch 'jmt/gps'
...
Conflicts:
src/Instrumentation/gps.cxx
2009-11-27 06:40:47 +01:00
jmt
9cdcd76c6b
Make Nasal airportinfo() tolerant of invalid airport idents.
2009-11-07 08:57:57 +01:00
Tim Moore
2c6cfca38b
Fixes for changes in simgear/math/sg_types.hxx
2009-10-18 12:16:54 +02:00
Tim Moore
5b29cd4cc0
fix warnings in Multiplayer, Scripting, and Time
2009-08-24 18:07:19 +02:00
Tim Moore
7d6c567fde
Refer to property types using props:: namespace
...
BOOL, FLOAT etc. conflict with typedefs in windows.h.
2009-07-17 14:54:12 +02:00
timoore
5cf18d30c6
Support for VEC3D and VEC4D properties.
...
Tiny update to property_list for extended properties.
New property types in nasal.
2009-07-16 12:10:47 +02:00
timoore
4cc3084256
SGPropertyNode::Type moves to simgear::props namespace
2009-07-16 12:10:47 +02:00
frohlich
ee9dc0c93a
No need to zero the _props variable.
...
This reference is released by the SGSharedPtr destructor anyway.
Modified Files:
src/Scripting/NasalSys.cxx
2009-06-11 16:05:20 +02:00
mfranz
3930967645
FGNasalModelData: use model XML path as module source
2009-04-01 09:23:54 +02:00