 

fileformat v100 / plugin v1.3b5 / 07/2012
_________________________________________________________________________________________________________________________________________________________________________



The .xdo scripts are arranged in a structure like that :

Custom Scenery/
     user-folder/
           dynobjs/
               +40+010/
                  +41+011/
                     test1.xdo
                     test2.xdo
                  +42+011/
                     test3.xdo


all object wich interact with another should be in the same group
errors are logged in Log.txt in the X-Plane's root folder



Datarefs provided by every object :

GRPNAME   Name of the group given with the 'NAME' tag ( 11 chars for now. )
IDX	  objectindex in the group (starts by 0)

xpdo/obj/[GRPNAME_IDX]/X		double
xpdo/obj/[GRPNAME_IDX]/Z		double
xpdo/obj/[GRPNAME_IDX]/Y		double
xpdo/obj/[GRPNAME_IDX]/lat		double	deg     latitude
xpdo/obj/[GRPNAME_IDX]/lon		double	deg     lontitude
xpdo/obj/[GRPNAME_IDX]/alt       	double  m	altitude
xpdo/obj/[GRPNAME_IDX]/ftmsl       	double  ft	altitude
xpdo/obj/[GRPNAME_IDX]/pitch		float   deg     The pitch   of the object in degrees
xpdo/obj/[GRPNAME_IDX]/roll		float  	deg     The roll    of the object in degrees
xpdo/obj/[GRPNAME_IDX]/heading		float   deg     The heading of the object in degrees
xpdo/obj/[GRPNAME_IDX]/turn_angle	float   deg     experimental, esp.used to auto-rotate front wheels
xpdo/obj/[GRPNAME_IDX]/drag_dis		double  m       incremental meter per move,esp.used to rotate wheels         
xpdo/obj/[GRPNAME_IDX]/speed		float   m/s 	real moving speed in cartesian space 
xpdo/obj/[GRPNAME_IDX]/tgt_tilt		float	
xpdo/obj/[GRPNAME_IDX]/tgt_bearing	float
xpdo/obj/[GRPNAME_IDX]/tgt_dist		double
xpdo/obj/[GRPNAME_IDX]/flag		int
xpdo/obj/[GRPNAME_IDX]/var0		double
xpdo/obj/[GRPNAME_IDX]/var1		double
xpdo/obj/[GRPNAME_IDX]/var2		double
xpdo/obj/[GRPNAME_IDX]/var3		double
xpdo/obj/[GRPNAME_IDX]/var4		double
xpdo/obj/[GRPNAME_IDX]/var5		double


DataRefs provided global :
(This enables the use of 'library-objects' with same animation-datarefs.
 The datarefs should only be used in the objects animation-commands 
 since the values are only valid while drawing the object. )

xpdo/mgr/animation/draw_obj_flag		int	
xpdo/mgr/animation/draw_obj_turn_angle		float	degrees	experimental, esp.used to auto-rotate front wheels
xpdo/mgr/animation/draw_obj_drag_dis		double	m incremental meter per move,esp.used to rotate wheels
xpdo/mgr/animation/draw_obj_var0		double
xpdo/mgr/animation/draw_obj_var1		double
xpdo/mgr/animation/draw_obj_var2		double
xpdo/mgr/animation/draw_obj_var3		double
xpdo/mgr/animation/draw_obj_var4		double
xpdo/mgr/animation/draw_obj_var5		double
xpdo/mgr/animation/draw_obj_flash_seq_timer 	float   one second loop timer esp. usefull for flashing lights 



Defs :


NAME  (string)   						name of the group (11 Chars) , must be unique 
								is no name given no datarefs for the group are generated 

REGION  double(south) double(west) double(north) double(east)   region where the group lives. 
								if the view in this Box ,this group would be loaded and run
								The region specified in a file is limited to a 1*1 degree tile.
								The region can go 0.3 deg over the borders 
								 (to handle little scenes near a tile border).

ALTITUDE double(alt m)					        optional a altitude range (0-value) can be defined .
								Without the default is 9999m .


*					        a asterix in the line befor a object definition let the plugin add the datarefs of  
						them to ' DatarefEditor ' via interplugin-communication.  					        

DYNOBJ_BEGIN [int(varcnt)] (objectpath)		starts a dynobj definition . Can be a library-path , or 'none'  if there no object to load.
(command)				        Optional a Number of variables can given .Setting to 0 if there no vars needed (for performance)
						max and default 6 .
 ....
 ....
DYNOBJ_END					end of the dynobj definition .  
						after last step , the first step is processed.



Commands :

// 		comment
:(string) 	label(jump-mark)  			label must be unique per objectdef

Wait 	double(s)

Sleep	
	
Awake   int(objidx)					index of object in the group  	

HookUp  int(objidx) double(offs1) double(offs2)
	objidx : index of object in group to link to  
		 (negativ number means n-th object before this)
	offs1  : offset from origin of towing object
	offs2  : offset from origin of this object 
	is released by waking the object

SetToGnd int(1=on/0=0ff)  				There are some limitations with probing the 
	 draw object on surface 			terrain for getting altitude information’s. 
	 default off					The probe naturaly fails detecting terrain height
							in a scenery-area which is currently not loaded.
							If you set a object far far away(greater then 1,5 deg lat/lon),
							you must set the altitude manualy.

.
SetGndOffs double(offs)   							        set y-offset added if SetToGnd enabled
SetGndOffs string(dataref[idx]) double(offs)
						 
SetFlsqTimer int(1=on/0=0ff) 								starts a one second loop timer provided by Dataref
										        'xpdo/mgr/animation/draw_obj_flash_seq_timer'
											for driving esp. flashing lights on aircraft.
SetAutoHdg int(1=on/0=0ff) 
	   auto change the yaw to Movement direction (MovePos,TurnPos)
           default on

SetReverse int(1=on/0=0ff)
	   take effekt to AutoYaw and TravelDist  
           default off

DrawBeam   int(1=on/0=0ff)								set to drawing a beam from view to the object (for debug purpose)

SetFlag   int(value)									 provided by dataref ...flag
AddFlag   int(value)									 provided by dataref ...flag

Jump      string(jumpmark)

Call 	  string(jumpmark)								
	
Return  

SetPos    double(lat)  double(lon) double(alt m) double(hdg)	
SetNav 	  navaid(*1.)) double(alt m) double(hdg)		

MovePos   double(lat) double(lon) double(alt m) double(speed m/s)
MoveNav   navaid(*1.)) double(alt m) double(speed m/s)

TurnCtr   double(lat_cp1) double(lon_cp1) double(lat_cp2) double(lon_cp2)  		bezier controlpoints for a curve   
											commands only with following Turn-command , object fails otherwise
TurnPos   double(lat) double(lon) double(alt) double(average speed m/s)		        move along beziercurve to endpoint  
TurnNav   navaid(*1.)) double(alt m) double(average speed m/s)				
											the speed along the curve is not ever constant and depends
											on the position of the controlpoints,
											(other maths would be to much expensive)
											A side-effect is, we can make accelerated moving with that. 
											
YawTo     double(value)   double(rate deg/s)
YawTo     string(dataref[idx]) double(offs) double(rate deg/s)

RollTo    double(value)   double(rate deg/s)
RollTo    string(dataref[idx]) double(offs) double(rate deg/s)

PitchTo   double(value)   double(rate deg/s)
PitchTo   string(dataref[idx]) double(offs) double(rate deg/s)
 
	  positive rate -> cw  rotation
          negative rate -> ccw rotation 
	  

MoveX     double(valueX m)   double(time s)
MoveX     string(dataref[idx]) double(offs) double(time s)

MoveY     double(valueY m)   double(time s)
MoveY     string(dataref[idx]) double(offs) double(time s)				y means not real altitude ,it's y in certesian space

MoveZ     double(valueZ m)   double(time s)   						OGL coords -z is north 
MoveZ     string(dataref[idx]) double(offs) double(time s)

MoveXZ    double(valueX m) double(valueZ m) double(time s)
MoveZY    double(valueZ m) double(valueY m) double(time s)
MoveXY    double(valueX m) double(valueY m) double(time s)
Move3D    double(valueX m) double(valueY m) double(valueZ m) double(time s)
	  
	  move -/+ value meters in time  
	
MoveVar   int(idx) double(value) double(time s)					 	value is absolute(goto value in time)
MoveVar   int(idx) string(dataref[idx]) double(offs) double(time s)			provided by dataref ...var(n) 

LoopVar   int(idx) double(value) double(time s)						like MoveVar , but loops between current to given value  
LoopVar   int(idx) string(dataref[idx]) double(offs) double(time s)			until next MoveVar command
			
LinkVar   int(idx) string(dataref[idx])							bind dataref to var(n) / writable float/float-array datarefs only
	   	 
TargetX   double(X)   									OGL coords  x is east  
TargetX   string(dataref[idx]) double(offs)						OGL coords  x is east + offset 
TargetY   double(Y)   									OGL coords  y is height 
TargetY   string(dataref[idx]) double(offs)						OGL coords  y is height + offset 
TargetZ   double(Z)   									OGL coords -z is north   
TargetZ   string(dataref[idx]) double(offs)						OGL coords -z is north + offset 
TargetH   double(Hdg)   								degree  
TargetH   string(dataref[idx]) double(offs)						degree + offset 

TgtOffsX   double(X)   									meters  x is east    
TgtOffsX   string(dataref[idx]) double(offs)						meters  x is east   + offset 
TgtOffsY   double(Y)   									meters  y is height    
TgtOffsY   string(dataref[idx]) double(offs)						meters  y is height + offset 
TgtOffsZ   double(Z)   									meters  z is north    
TgtOffsZ   string(dataref[idx]) double(offs)						meters  z is north  + offset
TgtOffsH   double(Hdg)   								degree
TgtOffsH   string(dataref[idx]) double(offs)						degree + offset

TgtToOff   sets the target to target+offset and clear offset
	   this is a helper to add more offsets to a target 

TgtToPos  double(lat) double(lon) double(alt m) double(hdg)				set the target and clear the offset
TgtToNav  navaid(*1.)) double(alt m) double(hdg)
TgtToAcf  int(idx) 									aircraft 0-19										
TgtToObj  int(idx)									index of object in same group
	   
DockTgt   double(curveoffs) double(dockoffs) double(dockangle) double(speed m/s)	 

Request   string(jumpmark) string(label)						check/stores a request for this object if no other one exists for 'label' 
Release   string(label)									release a existing request from this object 
											(Works only in a group.Implemented to avoid collision-checking or somthing else)

CheckFlag string(jumpmark) int(objidx) int(value)					jump to label if not flag = value	

CheckArea string(jumpmark) double(lat) double(lon) double(alt) double(tolerance)        check if targetpoint in area  +/- tolerance meters
											jump to label if not

CheckData string(jumpmark) string(dataref[idx]) float(min) float(max)           	jump to label if not min >= datarefvalue <= max     
											dynobj-datrefs only accessible from oneself or from objects, which previously defined . 
   
Scheduled int(1=fastforward) string(jumpmark) sttime(hh:mm:ss) endtime(hh:mm:ss)	Jumps to jumpmark if actualtime between start and end .
											Executes the following command if not.
											If fastforward is set ,the object starts at the position where it should be 
											depending on the time difference of the given starttime and the actual time.
											All times are ZULU .

ScheduledWait										Monitors time and Wait here until endtime of last Scheduled.
											

											
TextOut  int(0|1) string(text)
DataOut  int(0|1) string(dataref)        
	  0 = more text follows 
	  1 = output after that
 
     
          
*1.) navaids and fixpoints are given by type and id  ( ILS OEV , FIX HUSKY)
     types are : APT,NDB,VOR,ILS,LOC,FIX,GS,OM,MM,IM


  
