Update TransX development

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
That's why I asked which one you mean. Both examples of my previous post need a maneuver at (or close to) periapsis, not a SlingDirect plan.

The plans flytandem and blixel posted are examples of Sling Direct plans.
Thanks for clarifications then. Now that I have all the info I needed in one place, I need some time to digest it.

With Prograde, Ch.Plane and Outward set at "Auto-min" I noticed a drop from 120 fps to 90 fps, while I was changing the date.
It went back up to 120 as soon as I stopped clicking on the "++" for the date variable.
Funny, hadn't noticed it before. Great job for taking care of that. :thumbup:
My intuition and experience told me that there had to be a bottleneck somewhere, because I couldn't believe that simple floating point operations could take so much CPU. It would be a waste not to get rid of the bottlenecks. And it was fun and really easy to do it :)
 
Last edited:

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
AutoCenter

Guess who's here!?

Use Shift+C in Target Vector view (C for Center), after setting a manoeuvre. In any other views it is automatically disabled. The code and UI are still dirty and require some polish.

On your side, I'd ask for tests on your favorite interplanetary vessels, and provide me with download links of those vessels which fail to get automatically centered.

Have a nice start of weekend.
 

Attachments

  • TransX.dll.zip
    65.3 KB · Views: 11

aldarion

Member
Joined
Oct 20, 2007
Messages
47
Reaction score
0
Points
6
Location
Gdansk
Enjo, could you also fix the bug which cuses the transX to lose the surface base information occasionally. In these situations you cannot see the offplane distance until you retarget the base in the Map MFD.

Sent from my SM-T310 using Tapatalk 4
 

Pioneer

Well-known member
Joined
Mar 2, 2012
Messages
507
Reaction score
272
Points
78
Location
Greater Detroit
I have an idea for a new function. Instead of continuously clicking on and on to set the best flight track available, why wouldn't it be able to set such a course automatically? After setting up the course, you would be able to change it and adjust it from there.
 

blixel

Donator
Donator
Joined
Jun 29, 2010
Messages
647
Reaction score
0
Points
16
Feature request: This idea comes from a feature found in IMFD. When you are waiting for launch, you want to take off from your launch site when you can have a 90 degree heading. IMFD actually tells you how many seconds you are from having a 90 degree heading. This is useful for timing your launch as close to the Eject Date as possible. Would it be possible to implement this feature into TransX?
 

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Looks like we're talking past each other.
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
Working auto-center in maneuver mode? :hailprobe:

Great job Enjo! From a very quick test I just did with the standard DG, I am reporting this:


I got the DG into a 1000x1000km orbit around Earth with the editor
I entered a maneuver with 1000 pro, 1000 pl.ch and 500 out, Total: 1500 m/s. I set the time 1000 seconds from "now".

Auto-center oriented the vessel correctly as soon as I pressed Shift-C
I made the burn and it kept the spacecraft dead-center. :thumbup:

Close to the end of the burn (~20 m/s left), I disengaged with Shift-C again but TransX was still trying to orient the vessel. (The debug msg on the lower left said: "Auto-Rotation Disabled. Press Shift-C in Target View to enable".

I got out of target view but it was as if an rcs thruster was "stuck", and kept turning the DG, eventhough Auto-Center was disabled.

I exited and run the Current state scenario and the spacecraft was still trying to orient itself. It wasn't trying to get back to the burn orientation. It was just as if the thruster was stuck.

For anyone that wants to help testing; here is a scenario with a DG at 1000 km orbit around Earth with a burn preset in the maneuver mode. Time to burn 300 secs. You can try different ships by simply changing the line:
GL1:DeltaGlider
to
GL1: (yourshipclass)

Code:
BEGIN_DESC
Contains the latest simulation state.
END_DESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 56661.3421020439
  Script DV
END_ENVIRONMENT

BEGIN_FOCUS
  Ship GL1
END_FOCUS

BEGIN_CAMERA
  TARGET GL1
  MODE Cockpit
  FOV 45.00
END_CAMERA

BEGIN_HUD
  TYPE Surface
END_HUD

BEGIN_MFD Right
  TYPE User
  MODE TransX
  Ship  GL1
  FNumber 1
  Int 0
  Orbit True
  Vector  -1537166.40739 6291254.01444 -3519806.36993
  Vector  7055.50978207 616.743979666 -1978.95964216
  Double  3.98600439969e+014
  Double  56661.3414298
  Handle Earth
  Handle NULL
  Handle NULL
Select Target
 0 None
Autoplan
0 0
Plan type
0 0
Plan
0 0
Plan
0 0
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 1
Base Orbit
0 0
Prograde vel.
 1  1000
Man. date
 7  56661.3459618
Outward vel.
 1  1000
Ch. plane vel.
 1  1000
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Finvars
  Finish BaseFunction
END_MFD

BEGIN_SHIPS
GL1:DeltaGlider
  STATUS Orbiting Earth
  RPOS -1124993.81 6316490.95 -3628795.47
  RVEL 7132.414 251.968 -1772.693
  AROT 171.19 -75.76 129.52
  AFCMODE 7
  PRPLEVEL 0:0.102943 1:0.032704
  NAVFREQ 0 0 0 0
  XPDR 0
  AAP 0:0 0:0 0:0
END
END_SHIPS

BEGIN_ExtMFD
END

Will have time to do more extensive testing this afternoon.
:salute:
 

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Great. Thanks for the test and for the clear test case!
The RCS locking should be resolved now. It's a similar case like in Launch MFD.

I redesigned the UI of the Auto-Center. Now it's not accessible through Shift+C anymore, but as one of the Manouevre's variables, like the Base Orbit Update variable.
I also readjusted PID variables, so the AP should converge faster, although with some "overcontrol" (exactly like Launch MFD). Therefore please retest.

Regarding switching off the Auto-Center before the burn ends, I think that a good technique instead would be to gruadualy decrease the thrust in the last 30 seconds of the predicted burn, and use short bursts / RCS in translation mode, just like IMFD does.
 

Attachments

  • TransX.dll.zip
    65.5 KB · Views: 19
Last edited:

blixel

Donator
Donator
Joined
Jun 29, 2010
Messages
647
Reaction score
0
Points
16
Great addition Enjo. I requested this feature about 2 years ago, but the response I got was not very good. (Someone told me I was trying to turn TransX into a "monkey-push-button, Monkey-go-to-mars end-game") I'm glad someone else realized the benefit of having the X stay automatically centered throughout the entire burn.

Anyway, I was just trying this feature out, so here's my feedback.

The auto-center does a great job of holding the vessel at the proper orientation, but it's not efficient at orienting the vessel into position in the first place. It uses quite a bit of RCS thrust, and it will "overshoot" the position and then have to backtrack.

Throughout the burn, the auto-center keeps the X perfectly in the center... Awesome! ... until you get down to about 200 m/s. At that point, I feel like I really need to back way off the main engines to allow the auto-center to do its job. But even with the main engines backed down to just 10% or so, it still slips off to the side.

But here's the biggest issue I see with it at this point. Since I'm still doing the burn manually, if I over shoot the burn by even 1/10th meter per second, the auto-center wants to turn the vessel "backwards" because now the green x is technically straight behind me. So there should be some kind of logic to turn off the auto-center when the burn is complete.

Here's a test scenario I'm using. You have the standard DG in a 200x200 LEO with a burn set up to go to the moon. The burn is in about 300 seconds.

Code:
BEGIN_DESC
END_DESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 55723.7786915250
END_ENVIRONMENT

BEGIN_FOCUS
  Ship GL-Earth
END_FOCUS

BEGIN_CAMERA
  TARGET GL-Earth
  MODE Cockpit
  FOV 50.00
END_CAMERA

BEGIN_HUD
  TYPE Orbit
  REF AUTO
END_HUD

BEGIN_MFD Left
  TYPE User
  MODE TransX
  Ship  GL-Earth
  FNumber 2
  Int 0
  Orbit True
  Vector  5058728.69247 427050.402624 4152174.48245
  Vector  -4914.4750953 -528.136901259 6040.0593739
  Double  3.98600439969e+014
  Double  55723.7750342
  Handle Earth
  Handle NULL
  Handle Moon
Select Target
 0 Moon
Autoplan
0 0
Plan type
0 0
Plan
0 0
Plan
0 0
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 1
Auto-Center™
0 0
Base Orbit
0 0
Prograde vel.
 4  3125.63097961
Man. date
 6  55723.7832238
Outward vel.
 1  0
Ch. plane vel.
 1  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Finvars
  Finish BaseFunction
  Int 5
  Orbit True
  Vector  370517991.87 33710107.6866 21042514.4112
  Vector  -857.539298229 -77.9247477993 -36.0124851866
  Double  4.90279493298e+012
  Double  55722.9709375
  Handle Moon
  Handle NULL
  Handle NULL
Select Target
 0 None
Autoplan
0 0
Plan type
0 1
Plan
0 0
Plan
0 2
Plan
0 0
Select Minor
 0 None
Manoeuvre mode
0 0
Auto-Center™
0 0
Base Orbit
0 0
Prograde vel.
 1  0
Man. date
 1  55723.7786908
Outward vel.
 1  0
Ch. plane vel.
 1  0
Intercept with
0 0
Orbits to Icept
0 0
Graph projection
0 0
Scale to view
0 0
Advanced
0 0
Draw Base
0 0
Finvars
  Finish BaseFunction
END_MFD

BEGIN_MFD Right
  TYPE User
  MODE TransX
END_MFD

BEGIN_SHIPS
GL-Earth:DeltaGlider
  STATUS Orbiting Earth
  RPOS 3189134.73 233829.41 5726359.27
  RVEL -6778.842 -680.456 3805.883
  AROT 52.04 -31.20 52.22
  AFCMODE 7
  PRPLEVEL 0:0.554057 1:0.993606
  NAVFREQ 166 484 0 0
  XPDR 0
  TRIM 0.033887
  AAP 0:0 0:0 0:0
END
END_SHIPS

BEGIN_ExtMFD
END
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
I redesigned the UI of the Auto-Center. Now it's not accessible through Shift+C anymore, but as one of the Manouevre's variables, like the Base Orbit Update variable.
I also readjusted PID variables, so the AP should converge faster, although with some "overcontrol" (exactly like Launch MFD). Therefore please retest.

I can confirm the RCS problem resolved. I also prefer the Auto-burn setting in the variables instead of a button combination.

Tested various burns with the "small" ships (DG,DGIV,XR1-2). The auto-center works as advertised. It was pretty cool to be able to complete burns at 10x without worrying about centering the spacecraft. :thumbup:

A few things I noticed:

-I had the spacecraft oriented prograde ( with the default Orbiter AP "]" ) and I entered a pure prograde burn of 3000 m/s. When I disabled the AP and pressed "Auto-Center™", the spacecraft changed its orientation to "Horizontal level" and centered the green x in the target view.
It's not that big a deal, it just seems unnecessary.

-One thing that I believe would be useful is to disable the default autopilots while the auto-center is on. Again, just a detail.

-The larger ships (XR5 and Arrow with almost full load) took a while until centering the x but that's to be expected as they are pretty sluggish when fully loaded.

I have not tested any tail-sitters yet.
Normally TransX wasn't good at handling maneuvers with tailsitters, since the "x" needed to be rotated 90° before the burn. So if the auto-center does its job (orient the spacecraft's longitutional axis with the "x" in the crosshairs) the same problem should still exist. But that's a TransX limitation, not an "Auto-Center™" limitation.
Also, some developers build tail-sitters with the spacecraft oriented along the z axis and use hover engines, while others build them oriented along the y axis and use main engines.
Not sure how this can be addressed.

Regarding switching off the Auto-Center before the burn ends, I think that a good technique instead would be to gruadualy decrease the thrust in the last 30 seconds of the predicted burn, and use short bursts / RCS in translation mode, just like IMFD does.

Yep, that's a pretty good way to handle the burn. Another is to use BurnTimeMFD in tandem. Both work very nicely.
:cheers:
 

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Someone told me I was trying to turn TransX into a "monkey-push-button, Monkey-go-to-mars end-game"
:lol:
Perhaps Steve was just bored with developing for Orbiter by then. Other than that, as I'm an author of an autopilot myself (initially for Launch MFD), I understand his reasoning and agree with it. What you requested isn't super easy to do. Even though we have those "standard" autopilots in Orbiter working perfectly, they are not exposed to public, although it would probably only take a very little effort on Martin's site, by exposing a parametric function OrientTo(VECTOR3 tgt), which is probably already used internally, only with 4 predefined vectors - pro/retro-grade & normal/antinormal. It would be better to ask Martin for this first.
As for the problem of reimplementing the autopilots everywhere, this is just what is happening, and nobody is willing to write a library that centralizes the AP. Very few people even use libraries, let alone writing them. So I understand Steve's frustration even more.
Other his points are a matter of taste to me.

The auto-center does a great job of holding the vessel at the proper orientation, but it's not efficient at orienting the vessel into position in the first place. It uses quite a bit of RCS thrust, and it will "overshoot" the position and then have to backtrack.
It's PID based - not a perfect one. As such I think that it still does a great job, by being operational even under 100x TACC. You can use 10x TACC to get it on point faster.

Throughout the burn, the auto-center keeps the X perfectly in the center... Awesome! ... until you get down to about 200 m/s. At that point, I feel like I really need to back way off the main engines to allow the auto-center to do its job. But even with the main engines backed down to just 10% or so, it still slips off to the side.

But here's the biggest issue I see with it at this point. Since I'm still doing the burn manually, if I over shoot the burn by even 1/10th meter per second, the auto-center wants to turn the vessel "backwards" because now the green x is technically straight behind me. So there should be some kind of logic to turn off the auto-center when the burn is complete.
I've resolved the issue by cutting main engines after the burn is considered complete (dV starts increasing). If you want to disable to Auto-Center, then just disable it. After all, you might want to correct that 0.1 m/s error, in case you were trying to rendezvous with a satellite.

-I had the spacecraft oriented prograde ( with the default Orbiter AP "]" ) and I entered a pure prograde burn of 3000 m/s. When I disabled the AP and pressed "Auto-Center™", the spacecraft changed its orientation to "Horizontal level" and centered the green x in the target view.
It's not that big a deal, it just seems unnecessary.
I have to cancel the rotation somehow. Whether the target bank is 0* like now or 90* like in prograde AP is also a matter of taste, but the rotation has to be canceled. I could work on it somehow to only cancel the rotation's velocity, and not target a given rotation angle, but this requires time and tuning (more time). Maybe later.

-One thing that I believe would be useful is to disable the default autopilots while the auto-center is on. Again, just a detail.
Point. Fixed and attached.

-The larger ships (XR5 and Arrow with almost full load) took a while until centering the x but that's to be expected as they are pretty sluggish when fully loaded.
It's enough if they just work and it's not such a sure thing when it comes to PID controllers, unlike the analytic solution based standard Orbiter APs.

I have not tested any tail-sitters yet.
From what you've described, I deduct that they won't work.
 

Attachments

  • TransX.dll.zip
    65.8 KB · Views: 13
Last edited:

blixel

Donator
Donator
Joined
Jun 29, 2010
Messages
647
Reaction score
0
Points
16
I've resolved the issue by cutting main engines after the burn is considered complete (dV starts increasing).

Sounds good, but I downloaded your latest dll and tested it using the scenario I posted in my previous comment. The Auto-Center seems to be disabled or something because when I turn it on, the ship doesn't orient at all any more.

Perhaps it has something to do with this new fix?:

dgatsoulis said:
-One thing that I believe would be useful is to disable the default autopilots while the auto-center is on. Again, just a detail.

Enjo said:
Point. Fixed and attached.
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
tested it using the scenario I posted in my previous comment. The Auto-Center seems to be disabled or something because when I turn it on, the ship doesn't orient at all any more.

I cannot confirm that. The auto-center worked fine on my end. I used your scenario and the dll attached on post #91

Point. Fixed and attached.

Tested and it works on my end. With the prograde AP switched on, I pressed the Auto-Center and the prograde AP was disabled.

I tried to check if it was "stupidproof" by pressing the prograde AP again. The spacecraft tried to orient itself somewhere between the prograde and the green x.
Of course pressing the prograde AP while the spacecraft is already centered for the maneuver is a stupid thing to do, but is it possible to completely disable the use of the default APs while the auto-center is switched on?
 

blixel

Donator
Donator
Joined
Jun 29, 2010
Messages
647
Reaction score
0
Points
16
I cannot confirm that. The auto-center worked fine on my end. I used your scenario and the dll attached on post #91

Do this:

  • Open the scenario.
  • Press FWD on the right side to take TransX to Stage 2.
  • Press VW on the left side twice to View: Target.
  • Click ++ to turn on Auto-Center.

--EDIT--

Here's a video to show what I'm seeing.

 
Last edited:

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
Do this:

  • Open the scenario.
  • Press FWD on the right side to take TransX to Stage 2.
  • Press VW on the left side twice to View: Target.
  • Click ++ to turn on Auto-Center.

Aha, I see what you mean. When both sides were on the same stage (stage1) and one of them was in Target View, the Auto-Center worked.

But when one side was on stage1 Target View and the other was on stage2 (to see the encounter with the target) the Auto-Center did not work.

Confirmed. Behaved in exactly the same way on my end.

I had not checked that in the previous version. All the maneuvers I made had either one side open or both sides in the same stage.
 
Last edited:

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Thanks for catching this bug and analyzing it. I was able to reproduce it and fix it. I had introduced this because I wanted the user to be able to disable the Auto-Center even when not being in the Target View, but it seems that it's not possible after all. Original TransX' limitation.

I tried to check if it was "stupidproof" by pressing the prograde AP again. The spacecraft tried to orient itself somewhere between the prograde and the green x.
Of course pressing the prograde AP while the spacecraft is already centered for the maneuver is a stupid thing to do, but is it possible to completely disable the use of the default APs while the auto-center is switched on?
Done

aaaand, here's another thing - drawing reference line of nodes, ie. such that is effective when no change plane velocity is applied, but now that I think about it, it should be rather so, that the reference line of nodes should be solid, and the hypothetical dashed, as the yellow trajectory of the plan's hypo vel.
[EDIT] Fixed in the DLL. Is it better?
 

Attachments

  • line-of-nodes.png
    line-of-nodes.png
    25.6 KB · Views: 109
  • TransX.dll.zip
    66 KB · Views: 15
Last edited:

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Feature request: This idea comes from a feature found in IMFD. When you are waiting for launch, you want to take off from your launch site when you can have a 90 degree heading. IMFD actually tells you how many seconds you are from having a 90 degree heading. This is useful for timing your launch as close to the Eject Date as possible. Would it be possible to implement this feature into TransX?
In the Escape Plan accelerate time and wait until the craft's green "orbit" visually touches the planet's surface, then Set your Ej. Orientation so that you have your heading as close to 90* as possible, then pass the Inc and Lan to Launch MFD in ecliptic mode as target, and there you have all what is missing in TransX compared to IMFD plus some more.
It's described in more detail in Launch MFD's manual under TransX integration
 
Last edited:

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
Amazing job Enjo. I can confirm the bug gone and the APs disabled while the auto-center is switched on. Looks really good on my end.

aaaand, here's another thing - drawing reference line of nodes, ie. such that is effective when no change plane velocity is applied, but now that I think about it, it should be rather so, that the reference line of nodes should be solid, and the hypothetical dashed, as the yellow trajectory of the plan's hypo vel.
[EDIT] Fixed in the DLL. Is it better?

Nice! Looks really good with the fixed line solid and the hypothetical line dashed.
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
...I redesigned the UI of the Auto-Center...
shop550.jpg


Sorry...
:rofl:

Thanks Enjo!!! Terrific job, as usual!

:cheers:
 
Last edited:

aldarion

Member
Joined
Oct 20, 2007
Messages
47
Reaction score
0
Points
6
Location
Gdansk
Auto-min -》Auto-center -》and... now maybe Auto-burn ? :)

Wysłane z mojego SM-T310 przy użyciu Tapatalka
 
Top