]> git.tdb.fi Git - r2c2.git/blobdiff - locos.dat
Rewrite rod simulation code
[r2c2.git] / locos.dat
index cb097cde51b41aedb98a2778c12c378ab7f75645..2fb9181192ceb0d868ff89e206433a2c4bf37eb7 100644 (file)
--- a/locos.dat
+++ b/locos.dat
@@ -59,153 +59,160 @@ vehicle \29820-02
        axle { position -29.5; wheel_diameter 16; powered true; object "br50-axle.object"; };
        axle { position -49; wheel_diameter 16; powered true; object "br50-axle.object"; };
 
-       rod
+       rod "coupling_r"
        {
-               pivot_axle 2;
-               position 0 -10.5 -3.5;
-               limit FIXED;
+               move
+               {
+                       target_axle 3;
+                       target_position 0 -10.5 -3.5;
+               };
                object "br50-rod-coupling.object";
        };
-       rod
+
+       rod "main_r"
        {
-               pivot_body;
-               position 27 -14 8;
-               limit SLIDE_X;
-               tag "piston";
-               object "br50-rod-piston.object";
+               move
+               {
+                       target_axle 3;
+                       target_position 0 -13 -3.5;
+               };
+               rotate
+               {
+                       target_rod "piston_r";
+                       target_position 0 1 0;
+                       local_position 37.5 0 0;
+               };
+               object "br50-rod-main.object";
        };
-       rod
+
+       rod "piston_r"
        {
-               pivot_axle 2;
-               position 0 -13 -3.5;
-               limit ROTATE;
-               connect "previous" 37.5 0 0 0;
-               object "br50-rod-main.object";
+               initial_position 28 -14 8;
+               move
+               {
+                       target_rod "main_r";
+                       target_position 37.5 -1 0;
+               };
+               slide
+               {
+                       target_position 27 -14 8;
+                       axis 1 0 0;
+               };
+               object "br50-rod-piston.object";
        };
-       rod
+
+       rod "eccentric_r"
        {
-               pivot_axle 2;
-               position 1.5 -15 0;
-               limit ROTATE;
+               move
+               {
+                       target_axle 3;
+                       target_position 1.5 -15 0;
+               };
+               rotate
+               {
+                       target_rod "expansion_r";
+                       target_position 0 -0.5 -4.5;
+                       local_position 21 0 0;
+               };
                object "br50-rod-eccentric.object";
        };
-       rod
+
+       rod "expansion_r"
        {
-               pivot_body;
-               position 10.5 -14.5 16.5;
-               limit ROTATE;
-               connect "previous" 0 -4.5 21 0;
-               tag "link";
+               initial_position 10.5 -14.5 16.5;
+               rotate
+               {
+                       target_rod "eccentric_r";
+                       target_position 21 0.5 0;
+                       local_position 0 0 -4.5;
+               };
                object "br50-rod-link.object";
        };
-       rod
-       {
-               pivot_body;
-               position 32 -16 15.5;
-               limit SLIDE_X;
-               object "br50-rod-valve.object";
-       };
-       rod
-       {
-               pivot_rod "link";
-               position 0.2 -0.5 -2.5;
-               limit ROTATE;
-               connect "previous" 22 -1.5 0 0;
+
+       rod "radius_guide_r"
+       {
+               initial_position 33 -16 15.5;
+               move
+               {
+                       target_rod "valve_r";
+               };
+               rotate
+               {
+                       target_rod "radius_r";
+                       target_position 22 -1 0;
+                       local_position 0 0 1.5;
+               };
+       };
+
+       rod "radius_r"
+       {
+               initial_position 11 -15 17;
+               move
+               {
+                       target_rod "expansion_r";
+                       target_position 0.2 -0.5 -2.5;
+               };
+               rotate
+               {
+                       target_rod "radius_guide_r";
+                       target_position 0 1 1.5;
+                       local_position 22 0 0;
+               };
                object "br50-rod-radius.object";
        };
-       rod
-       {
-               pivot_rod "previous";
-               position 22 -0.5 0;
-               limit ROTATE;
-               object "br50-rod-combination.object";
-       };
-       rod
+
+       rod "union_r"
        {
-               pivot_rod "piston";
-               position 0 -1.5 -2;
-               limit ROTATE;
-               connect "previous" 5.5 0 0 -11.5;
+               move
+               {
+                       target_rod "piston_r";
+                       target_position 0 -1.5 -2;
+               };
+               rotate
+               {
+                       target_rod "combination_r";
+                       target_position 0 0 -11.5;
+                       local_position 5.5 0 0;
+               };
                object "br50-rod-union.object";
        };
 
-       rod
-       {
-               pivot_axle 2;
-               position 3.5 10.5 0;
-               limit FIXED;
-               object "br50-rod-coupling.object";
-               mirror_object true;
-       };
-       rod
-       {
-               pivot_body;
-               position 27 14 8;
-               limit SLIDE_X;
-               tag "piston";
-               object "br50-rod-piston.object";
-               mirror_object true;
-       };
-       rod
-       {
-               pivot_axle 2;
-               position 3.5 13 0;
-               limit ROTATE;
-               connect "previous" 37.5 0 0 0;
-               object "br50-rod-main.object";
-               mirror_object true;
-       };
-       rod
-       {
-               pivot_axle 2;
-               position 0 15 1.5;
-               limit ROTATE;
-               object "br50-rod-eccentric.object";
-               mirror_object true;
-       };
-       rod
-       {
-               pivot_body;
-               position 10.5 14.5 16.5;
-               limit ROTATE;
-               connect "previous" 0 -4.5 21 0;
-               tag "link";
-               object "br50-rod-link.object";
-               mirror_object true;
+       rod "combination_r"
+       {
+               initial_position 38 -15.5 17;
+               move
+               {
+                       target_rod "radius_r";
+                       target_position 22 -0.5 0;
+               };
+               rotate
+               {
+                       target_rod "union_r";
+                       target_position 5.5 0 0;
+                       local_position 0 0 -11.5;
+               };
+               object "br50-rod-combination.object";
        };
-       rod
+
+       rod "valve_r"
        {
-               pivot_body;
-               position 32 16 15.5;
-               limit SLIDE_X;
+               initial_position 33 -16 15.5;
+               move
+               {
+                       target_rod "combination_r";
+                       target_position 0 -0.5 -1.5;
+               };
+               slide
+               {
+                       target_position 32 -16 15.5;
+                       axis 1 0 0;
+               };
                object "br50-rod-valve.object";
-               mirror_object true;
-       };
-       rod
-       {
-               pivot_rod "link";
-               position 0.2 0.5 -2.5;
-               limit ROTATE;
-               connect "previous" 22 -1.5 0 0;
-               object "br50-rod-radius.object";
-               mirror_object true;
        };
-       rod
-       {
-               pivot_rod "previous";
-               position 22 0.5 0;
-               limit ROTATE;
-               object "br50-rod-combination.object";
-               mirror_object true;
-       };
-       rod
+
+       mirror_rods
        {
-               pivot_rod "piston";
-               position 0 1.5 -2;
-               limit ROTATE;
-               connect "previous" 5.5 0 0 -11.5;
-               object "br50-rod-union.object";
-               mirror_object true;
+               phase_offset -90;
        };
 };