Author Topic: Dragon 2 ISS docking simulator  (Read 22507 times)

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Dragon 2 ISS docking simulator
« on: 05/12/2020 06:07 pm »
https://iss-sim.spacex.com/

twitter.com/spacex/status/1260269423090208768

Quote
Simulator of Crew Dragon docking with @space_station → http://iss-sim.spacex.com

https://twitter.com/spacex/status/1260269425199992832

Quote
Crew Dragon missions will autonomously dock and undock with the space station, but crew can take manual control of the spacecraft if necessary

Edit to add: basic screenshot from my phone
« Last Edit: 05/12/2020 06:16 pm by FutureSpaceTourist »

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #1 on: 05/12/2020 06:22 pm »
https://twitter.com/thesheetztweetz/status/1260273848060203008

Quote
The virtual simulator is the actual interface that NASA astronauts Bob Behnken and Doug Hurley will use when they manually pilot Crew Dragon.

A few docking tips:

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #2 on: 05/12/2020 06:34 pm »
The gauntlet has been thrown down  :D

https://twitter.com/jimbridenstine/status/1260271033489260548

Quote
Last year I got to try out the @SpaceX #CrewDragon docking simulator with @Astro_Doug and @AstroBehnken. And yes, I nailed it on my first try! Learn more about Crew Dragon’s control systems and custom-made spacesuits: go.nasa.gov/3ctjQO3 #LaunchAmerica

Re: Dragon 2 ISS docking simulator
« Reply #3 on: 05/12/2020 07:34 pm »
Nailed on the first try as well. Where do I redeem my free tickets for the ISS?
Failure is not only an option, it's the only way to learn.
"Tradition is not the worship of ashes, but the custody of fire" - Gustav Mahler

Offline Jarnis

  • Full Member
  • ****
  • Posts: 1314
  • Liked: 832
  • Likes Given: 204
Re: Dragon 2 ISS docking simulator
« Reply #4 on: 05/12/2020 07:44 pm »
Easily a success on the first try...  8)

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #5 on: 05/12/2020 08:27 pm »
https://twitter.com/astrobehnken/status/1260303242212319239

Quote
Really cool that @SpaceX shared this! Now you can share the experience of docking to @Space_Station with @Astro_Doug and I!

Online Vettedrmr

  • Full Member
  • ****
  • Posts: 1686
  • Hot Springs, AR
  • Liked: 2287
  • Likes Given: 3430
Re: Dragon 2 ISS docking simulator
« Reply #6 on: 05/12/2020 09:19 pm »
Nice little diversion between hosting Zoom meetings for my junior Engineering high school students!
Aviation/space enthusiast, retired control system SW engineer, doesn't know anything!

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #7 on: 05/12/2020 09:44 pm »
Credit where credit’s due:

https://twitter.com/astro_g_dogg/status/1260316766095335424

Quote
Check out the sweet displays and controls we developed for the Crew Dragon. Kudos to @SpaceX software & space ops engineers who designed them: @shanemielke, Mike Westenhaver, Mike Heiman, George Mychaskiw, Ceili Burdhimo and others - including @AstroBehnken  & @Astro_Doug

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #8 on: 05/13/2020 02:27 am »
Didn't know there's a separate thread for this.

Might as well:

If you do NOT want to know the easter eggs in this simulator in advance, do NOT look at the party thread ;)

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #9 on: 05/13/2020 03:28 am »
https://twitter.com/astrobehnken/status/1260388538518065154

Quote
I can't leave this thread without adding another name from the @SpaceX display software team, Sofian Hnaide. It isn't easy trying to chase down all the nuances we notice during hours of sim time! Thank you for that!

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #10 on: 05/13/2020 03:49 am »
How to enable HARD MODE in the simulator:

I haven't found a hidden feature to enable this, but since its all browser based, you can hack this, too.

1. Start the simulator in Firefox or Chrome
2. Right click on the HUD, select "Inspect Element"
3. Find the <div> with id="hud"
4. Change the inline style from "visibility: inherit;" to "display: none"
5. Press enter or click elsewhere, then close the Inspection Console
6. Hard mode enabled. Good luck aligning with the docking port, much less getting below 0.2 degree accuracy in all 3 axis >:>>>

Edit: Now someone needs to create a greasemonkey script or so to customize the sim and its difficulty ;)
« Last Edit: 05/13/2020 03:50 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #11 on: 05/13/2020 04:47 am »
How to enable Cheat Mode:

1. Start the simulator in Firefox (Should work in Chrome but untested)
2. Open the JavaScript Console
Enter the following code:

function checkCollision(){}


3. This overrides/removes the code to check for (successful or failed) game ending. You can now fly through the ISS, or make a deorbit burn or even try to reach the moon. (Warning, the simulator might not be capable of letting you reach either of these destinations) - successful docking is also no longer detected.

If - instead of an empty function - the original function which can be found in the javascript source is copied - one can relax the requirements for successful game ending - which might be useful to make hard mode playable - increase the maximum allowed distance from ISS (default 500m)  or even try to dock with alternative docking ports.

Once again it should be possible to make these changes/overrides permanent using greasemonkey or similar.
« Last Edit: 05/13/2020 04:48 am by CorvusCorax »

Offline launchwatcher

  • Full Member
  • ****
  • Posts: 766
  • Liked: 730
  • Likes Given: 996
Re: Dragon 2 ISS docking simulator
« Reply #12 on: 05/13/2020 02:35 pm »
the KSP forum's speedrun thread is here:

https://forum.kerbalspaceprogram.com/index.php?/topic/193816-spacex-dragon-docking-simulator-speedrun/

"Ultimate Steve"'s 0:46 speedrun:


Offline webdan

  • Full Member
  • **
  • Posts: 235
  • Clearwater, FL
  • Liked: 252
  • Likes Given: 272
Re: Dragon 2 ISS docking simulator
« Reply #13 on: 05/13/2020 03:00 pm »
Really glad to see this... success on first try, took my time, it's not a race unless ya gotta, you know, go.

Back when I was writing graphic software for my Amiga 1000, I built a similar simulator, with a self digitized Shuttle and LDEF. I was essentially flying around both using the awesome MMU.

The earth was wireframed for land masses, major rivers and large lakes. Orbiting every 90 minutes, the earth rotated once a day. I would leave it alone for hours and try to guess where I was upon my return.

So this was fun, thanks SpaceX :)

Dang it, that's about 30 years ago!

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #14 on: 05/13/2020 05:22 pm »
OMG! Sounds like the sort of thing Elon would do

https://twitter.com/thesheetztweetz/status/1260607694110691330

Quote
There is a red Tesla Roadster floating in orbit in the SpaceX Crew Dragon docking simulator

Offline webdan

  • Full Member
  • **
  • Posts: 235
  • Clearwater, FL
  • Liked: 252
  • Likes Given: 272
Re: Dragon 2 ISS docking simulator
« Reply #15 on: 05/13/2020 05:42 pm »
Anybody else notice that we're orbiting retrograde? I don't think the inclination is correct either...

Offline FutureSpaceTourist

  • Global Moderator
  • Senior Member
  • *****
  • Posts: 50841
  • UK
    • Plan 28
  • Liked: 85434
  • Likes Given: 38218
Re: Dragon 2 ISS docking simulator
« Reply #16 on: 05/13/2020 06:11 pm »


Edit to add: link for full video

« Last Edit: 05/13/2020 08:41 pm by FutureSpaceTourist »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #17 on: 05/13/2020 06:18 pm »
OMG! Sounds like the sort of thing Elon would do

https://twitter.com/thesheetztweetz/status/1260607694110691330

Quote
There is a red Tesla Roadster floating in orbit in the SpaceX Crew Dragon docking simulator

OK, now that the secret is out, you CAN look at the party thread.  Posted the screenshot there yesterday:

Test 10: Find the Easteregg!!!!

( Fun fact: The Soyuz docked to ISS has no collission box -- but the cherry red roadster (which oddly enough has its roof closed) has ;) )

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #18 on: 05/13/2020 06:57 pm »
How to play ISS-SIM Offline.

SpaceX provided us with a real gem. The Simulator is entirely written in Javascript and runs in the browser. As such, it is technically open source.

That means, you also can download it and run it offline. Modify it, exchange the models and graphics, add lasers and plasma guns, etc...

Now lacking a license that allows redistribution (I found no licensing information from SpaceX but they use 3rd party libraries who's license disallow redistribution) I can't provide it for download, and neither can you, (so this is only suitable for personal amusement)

but I can share how to download and run the simulator in 7 easy steps:

1. Get Linux (any distribution).  Linux is not really required for this, you can use Windows, Mac or even Android, but I cannot give you a tutorial, you'd be on your own.

2. Install a local webserver to host the simulator (for example apache) in ubuntu:
sudo apt install apache2

3. Within the document root, download the ISS-SIM html file and scripts:
wget -r https://iss-sim.spacex.com/index.html

This will download all the code, but not all of the graphics and 3d models, since those are loaded on demand by the javascript code (and different ones for mobile and desktop)

4. Find the URL's for the dynamically loaded textures and graphincs and download them:
wget -r $( for url in $( grep -RoE "(texture|json)Loader.load\([^)]*\)" iss-sim.spacex.com/js/threed.min.js |sed -e 's/^[^"]*"//' -e 's/".*$//' ); do echo https://iss-sim.spacex.com/$url; done; )

5. Find the URL's for the dynamically loaded 3d models and download them;
wget -r $( for url in $( grep -RoE '[^"]*.glb' iss-sim.spacex.com/js/threed.min.js ); do echo https://iss-sim.spacex.com/3d/$url; done; )

6. In your browser, go to http://localhost/iss-sim.spacex.com/index.html

7. Once this is working, you can start editing index.html and  iss-sim.spacex.com/js/threed.min.js and other files to mod the simulator as you please. The javascript is minimized, but you can make it easily editable with jsbeautifier (jsbeautifier.org)

sudo apt install jsbeautifier
js-beautify iss-sim.spacex.com/js/threed.min.js


have fun :-)


« Last Edit: 05/13/2020 06:58 pm by CorvusCorax »

Offline Rzeppa

  • Member
  • Posts: 30
  • Colorado
    • American 3D Printing
  • Liked: 39
  • Likes Given: 4936
Re: Dragon 2 ISS docking simulator
« Reply #19 on: 05/13/2020 07:02 pm »
OMG what a wonderful sim! As others reported above, I nailed it on my first try. I found it easy to get yaw, pitch and roll down to 0.0°/s at 0.1 and 0.0° from nominal, and found that I could get y translation to 0.0, however z translation needed constant station keeping. My initial approach for the first 190 meters or so I was going a little fast at -0.045m/s, but for the final 10 meters or so I slowed down to 0.025/s.

I decided the next time I try it I might try coming in even hotter than 0.045m/s, it really took a long time for the approach. And, if I still have issues with Z translation, just not worry about it as much until I get closer to docking. It occurred to me I'd probably end up wasting propellant al la Dreamliner if I spent too much time worrying about keeping it at or below 0.2 meters off nominal.

I'll have to check out that Roadster too! Thanks for sharing that!
Jeff Zepp

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #20 on: 05/13/2020 07:14 pm »
OMG what a wonderful sim! As others reported above, I nailed it on my first try. I found it easy to get yaw, pitch and roll down to 0.0°/s at 0.1 and 0.0° from nominal, and found that I could get y translation to 0.0, however z translation needed constant station keeping. My initial approach for the first 190 meters or so I was going a little fast at -0.045m/s, but for the final 10 meters or so I slowed down to 0.025/s.

I decided the next time I try it I might try coming in even hotter than 0.045m/s, it really took a long time for the approach. And, if I still have issues with Z translation, just not worry about it as much until I get closer to docking. It occurred to me I'd probably end up wasting propellant al la Dreamliner if I spent too much time worrying about keeping it at or below 0.2 meters off nominal.

I'll have to check out that Roadster too! Thanks for sharing that!

The roadster is a bit tricky, its only visible when you look at it from the right direction and completely despawns when you try to look at it from the other side (you can then even fly through the empty space where it used to be). Even its 3d model is only downloaded once you look at it from the correct angle, so if you have a slow connection, it might pop up a bit delayed.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #21 on: 05/13/2020 07:52 pm »
After looking at the source code for a bit, I found the following list of cheatcodes:

If you type the following during the game, it will have the following effects:

"5512" -- engage auto-docking sequence - for those who are lazy

"flatearth" }
"earth"      }  toggle flat earth ( also accessible from the configuration menu )

I'm actually a bit disappointed that they didn't use the Konami code anywhere ;)

Does anyone know what 5512 refers to? That must be some sort of reference, but to what? Is that a verb or address in the Apollo computer by any chance?


Edit: "5512" only works when typed on the main keyboard number keys, not on the numpad. The numpad is being used for attitude control, either mirroring the cursor keys or with 4,5,6,8,7,9 for ←,↓,→,↑,↶,↷ depending on NumLock status
« Last Edit: 05/20/2020 03:06 am by CorvusCorax »

Offline snotis

Re: Dragon 2 ISS docking simulator
« Reply #22 on: 05/13/2020 08:19 pm »
Have you found any keyboard shortcuts for toggling the precision for translation and rotation?

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #23 on: 05/13/2020 09:01 pm »
Have you found any keyboard shortcuts for toggling the precision for translation and rotation?

Yes. There is none.

There is a toggle function and the only places where its being called is from the "click" and "touch" events of the HUD touch element. It's not connected to any keyboard events.

Kinda makes sense, considering this whole interface is to emulate touchscreen-control in Dragon2 ;)

I am writing on a greasemonkey script to add some customizations. I will add shortcuts for toggling precision modes.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #24 on: 05/14/2020 01:29 am »
And here it is:

https://gist.github.com/CorvusCorax/d6e6e98c946b8bfad56563b514df23a9

Tested with GreaseMonkey for Firefox.

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/


edit: with the extension loaded, toggling the precision mode is possible with "x" and "y" keys
« Last Edit: 05/14/2020 01:52 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #25 on: 05/14/2020 01:52 am »
Just tested, works in Chromium (open source Chrome) (Edit: and Google Chrome, just tested) as well - it doesn't even need an extension, it works out of the box.

but the installation is a bit tricky since Chrom(e/ium) doesn't want to install script from elsewhere but the chrome web store. (no github)

1. first download the raw .user.js file (link in previous post, click on "raw")

2. open chrome://extensions/ in chromium

edit: 2.5 enable "developer mode" in chrome, to allow step 3 to work

3. open a file manager of some sort and drag+drop the user script into the extensions tab

4. go to https://iss-sim.spacex.com

5. fun

« Last Edit: 05/14/2020 02:03 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #26 on: 05/14/2020 02:59 am »
I just noticed that the graphical arrow-circles that display the rotational speed - which don't work in Firefox - but do work in Chrome - were not being hidden by turning HUD off.

I fixed that now. All HUD effects - including feedback about thruster-activiy are now disabled when HUD is turned off. There still is feedback of touch-events.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #27 on: 05/14/2020 09:02 am »
According to

https://raw.githubusercontent.com/virtualagc/virtualagc/master/Colossus249/ASSEMBLY_AND_OPERATION_INFORMATION.agc

The 5512 cheat code might indeed be an Apollo guidance computer reference.

55 is the option verb for "increment agc time" and 12 is the noun for "option code" - looks like this would be used to fast foward the mission time by an arbitrary amount.

That can be interpreted as "time skip" in the sim ... but it could also be seen as a little stab to Boeing ;)

Edit: after looking at the AGC code listing for verb 55, 5512 doesn't really make sense, as verb 55 doesn't really take a noun. Instead it runs V25N24 to load a time into register R1-3 and then adjusts the AGC clock accordingly. - So while 5512 **CAN** be used to set the AGC time, the "12" part of it is effectively ignored

http://www.ibiblio.org/apollo/listings/Colossus237/EXTENDED_VERBS.agc.html

Edit edit: You can test that out under http://svtsim.com/moonjs/agc.html
Current AGC time can be displayed with Verb 16 Noun 65 Enter
try the following sequence:

 V16N65E
 V55N12E
 +00011E
 +00000E
 +00000E
 V16N65E

You now advanced the Apollo guidance computers clock by 11 hours prior to launch ;)
--

So maybe 5512 means something else after all. Any ideas?
« Last Edit: 05/14/2020 10:42 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #28 on: 05/14/2020 05:34 pm »
I was trying to figure out what other docking options exist.

On the real ISS, PMA-3 with IDA-3 is at the Zenith port of the Harmony module, and should allow an alternate approach corridor to Harmony.

Not so in the ISS model in the simulator. While IDA-2 is attached to PMA-2 on the forward port of Harmony, PMA-3 is on the port side of Tranquility and has no IDA attached.

IDA-2 was installed on PMA-2 on August 19 2016 . At that point PMA-3 as on Tranquility as depicted
PMA-3 was moved from there to Harmony on  March 26, 2017

Furthermore in the ISS-SIM, The Leonardo cargo module is connected to the Nadir port of Unity. It was moved from there to the forward facing port of Tranquility on May 27, 2015

There is also no BEAM in the simulator, which would have been installed on April 16 2016

As such the depicted ISS configuration never happened. The modules seem to be in a configuration prior to May 27, 2015, yet with IDA-2 installed on PMA-2 for docking. This could have been a configuration used internally to practice docking at SpaceX, as IDA-1 was originally planned to arrive in 2015 (however on the ill-fated CRS-7) to be installed on PMA-2 - but even then Leonardo would already have been on Harmony.

This makes it a bit tricky.  There is really only one compatible docking adapter on the ISS model - on PMA-2 on Harnmony's forward port.  PMA-3 on Tranquility cannot be used for 2 reasons:
1. It has no IDA installed and
2. the port  is blocked by one of the ISS' heat radiators, Not only does that block the approach vector, there isn't even enough room to squeeze dragon and its trunk in there.

One typical berthing port for Dragon-1 - Unity-Nadir is also blocked by Leonardo, although one could technically approach the other ports of Harmony, implementing that would be relatively boring.

 - This leaves the Russian ports as potential docking targets. There's 4 of them. Aft port of Zvesda, Nadir of Pirs, Zenith of Poisk and Nadir of Rassvet.

I'll see what I can do.








Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #29 on: 05/14/2020 08:37 pm »
On other news, the ISS-SIM currently requires all angles to be within 0.2 ° - this can be relaxed. At the same time the 0.2 m spacial deviation is actually too much, the docking adapter requires +-0.1m

According to the spec of the international docking adapter

https://www.internationaldockingstandard.com/download/IDSS_IDD_Revision_D_043015.pdf - table TABLE3.3.1.1-2INITIAL CONTACT CONDITIONS the following motion tolerances are allowed:

Position:
X: contact
Y,Z: 0.10 m

Translation:
X: 0.05 to 0.10 m/sec   (must not be too slow!)
Y,Z : 0.04 m/sec max

Orientation:
X (roll): 4 deg
Y,Z (vector sum): 4 deg

Rotation:
X (roll): 0.20 deg/sec
Y,Z (vector sum): 0.20 deg/sec

I'm gonna change the tolerances accordingly :)

Offline Rzeppa

  • Member
  • Posts: 30
  • Colorado
    • American 3D Printing
  • Liked: 39
  • Likes Given: 4936
Re: Dragon 2 ISS docking simulator
« Reply #30 on: 05/14/2020 08:45 pm »
The roadster is a bit tricky, its only visible when you look at it from the right direction and completely despawns when you try to look at it from the other side (you can then even fly through the empty space where it used to be). Even its 3d model is only downloaded once you look at it from the correct angle, so if you have a slow connection, it might pop up a bit delayed.

I found it pretty easily, just yaw 180° and then maneuver as required once it's in sight. I flew over it, around it etc. I also tried docking at over 2m/s. FAIL! LOL! Still couldn't zero out z translation, it always drifts one way or the other.
Jeff Zepp

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #31 on: 05/15/2020 01:42 am »
New version 0.00003 with new features!

https://gist.github.com/CorvusCorax/d6e6e98c946b8bfad56563b514df23a9

User script -- Install as extension in Chrome (needs dev moe or TamperMonkey) or via Greasemonkey in Firefox

New features:
1. More reailistic docking constraints based on actual docking adapter specs ( great for NO-HUD manual docking)
2. Selectable docking port: Available ports:
* IDA-2 on PMA-2
* Harmony Zenith
* Harmony Nadir
* PMA-3 (just squeeze in from underneath and push against that radiator)
* Zvezda
* Poisk
* Pirs
* Rassvet

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #32 on: 05/15/2020 10:17 am »
The roadster is a bit tricky, its only visible when you look at it from the right direction and completely despawns when you try to look at it from the other side (you can then even fly through the empty space where it used to be). Even its 3d model is only downloaded once you look at it from the correct angle, so if you have a slow connection, it might pop up a bit delayed.

I found it pretty easily, just yaw 180° and then maneuver as required once it's in sight. I flew over it, around it etc. I also tried docking at over 2m/s. FAIL! LOL! Still couldn't zero out z translation, it always drifts one way or the other.

Nah, the way collisions and docking success have been implemented there's only ever a single valid docking target. running into anything else simply counts as a collision, so unfortunately you can't dock with the roadster. Even with my userscript that doesn't really change, I basically move the entire ISS relative to the docking coordinate, and then adjust the required approach vector & orientation.

As such when you spawn, the docking target is always in front of you (coordinate [0,0,-150], and the roadster always behind you at [12,42,80])

Since the roadster is not part of the ISS model, it can't be made a valid docking target without some further code changes, as moving the ISS components relative to the docking target coordinate (0,0,0 on the ISS model) won't suddenly move the roadster there.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #33 on: 05/15/2020 01:24 pm »
Demo + Speedrun - no HUD - Zvezda - 1:30


Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #34 on: 05/15/2020 03:53 pm »
After a quick check - with the "warp to start after 500m" disabled - you can indeed descend all the way down to the earth surface - which is either 1500m away if "flat earth" is selected, or 450 km downwards if normal earth is used.

A "deorbit burn" won't work, since GRAVITY - despite the setting - isn't really doing anything but add a bit of a noise offset to dragons velocity. As such, if you want to go to the surface, you need to thrust straight down, then wait for a while (even at 100m/s 450 km will take a while)

If I feel like it, I might tweak this to implement proper orbital mechanics. It's a bit tricky, since the coordinate frame is relative to earth, and internally the game calculates velocities and accelerations "per frame" - not "per second" -- even though the framerate is browser dependent.

that's also why the displayed "0.1 °/s" rotation rate isn't really 0.1 °/s -- it would be if your game runs at only 5 fps, but if you run at 100 fps, then everything becomes quicker. The only place where the ISS-SIM calculates proper velocity  in m/s is the displayed "approach rate" - and that's extremely hacky - using averaging over the last 20 frames which is quite noisy and buggy.

I have the feeling they let an Intern code that entire thing at SpaceX, and he didn't take longer than a day for it.

Probably Elon asked if he could do it until the end of the day, he said yes, then added the entire night and had it the next morning. Some parts of the code feel like they were coded at 4am ;)

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #35 on: 05/16/2020 10:57 pm »
After a quick check - with the "warp to start after 500m" disabled - you can indeed descend all the way down to the earth surface - which is either 1500m away if "flat earth" is selected, or 450 km downwards if normal earth is used.

But NOW you can!!!
https://gist.github.com/CorvusCorax/d6e6e98c946b8bfad56563b514df23a9

The lack of proper orbital mechanics bugged me,

To the point, I decided to add it. The ISS-SIM-Customizer mod NOW included the option to simulate GRAVITY as "PROPER ORBITAL MECHANICS"!!!

Selecting this will also display some orbital parameters on the HUD (I don't know where they are displayed on the real dragon, will gladly incorporate input, for now they are cluttering the top right sector)

Any thruster activity will change your orbit, as such, if you wait long enough, you will now encounter an intricate orbital dance in front and around the ISS if you wait long enough - just like the real thing. You can even orbit the ISS that way.

And to make that not take hours, I implemented a time warp feature, people from KSP will remember. Unlike KSP it does not go on rails though, so you can still fire thrusters and rotate around in timewarp (rotation speed remains unaffected though, to not get you dizzy)

Yes, you can now deorbit dragon. A retrograde thrust of around 100 m/s does the trick. Just get the Periapsis under 80km.

You can also go to completely different orbits and then try to re-sync with the ISS -- a completely new challenge.

(Make sure to set SPACE to "INFINITY" - or you get GAME OVER if you are more than 500m from ISS)


Changing ISS orbit - or that of the Tesla is not supported yet. Also there are no other celestial bodies. Play KSP or Orbiter if you want those, or add them yourself ;)

Offline ChrisC

  • Veteran
  • Senior Member
  • *****
  • Posts: 2305
  • Liked: 1695
  • Likes Given: 1923
Re: Dragon 2 ISS docking simulator
« Reply #36 on: 05/17/2020 02:41 am »
This is all incredible.  Can't wait for someone to put it online, somehow :)  (Yeah, I could set up my own local server, but I don't do that stuff anymore.) Thank you CC!
PSA #1:  Suppress forum auto-embed of Youtube videos by deleting leading 'www.' (four characters) in YT URL; useful when linking text to YT, or just to avoid bloat.
PSA #2:  Users who particularly annoy you can be suppressed in forum view via Modify Profile -> Buddies / Ignore List.  *** See profile for two more NSF forum tips. ***

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #37 on: 05/17/2020 08:23 am »
This is all incredible.  Can't wait for someone to put it online, somehow :)  (Yeah, I could set up my own local server, but I don't do that stuff anymore.) Thank you CC!

But it IS On-line.

The simulator itself is online and can be played on iss-sim.spacex com, where it always was.

The modification is implemented as a "user script".

User scripts are a sort of mini-browser extension. They are a snippet of Javascript, which typically modify the way a particular web-site looks or is working. When you have them installed, they get loaded whenever you visit that web-page and have the ability to modify the way the page is displayed to you. This includes overriding Javascript functions. Since SpaceX ISS-SIM is entirely written in Javascript, a user-script can as such modify the game mechanics arbitrarily.

How you install a user script depends on the Browser. Google Chrome, and its derivatives (Chromium, etc...) support user scripts directly. Assuming you have downloaded and saved the extension as a file (download from
https://gist.github.com/CorvusCorax/d6e6e98c946b8bfad56563b514df23a9/raw/04dae005ce65481285e31d6ad32d4d935bac2ef5/ISS-SIM-Customizer.user.js
or click the "RAW" button on the link in the post above for the newest version)

You can go to the URL " chome://extensions " - enable "dev mode" (there's a slider at the top right) which allows you to install scripts from elsewhere than google store, then simply drag and drop SIM-Customizer.user.js from your downloads folder unto google chrome. It will asks you whether you want to install that, and that's it.

The next time you go to https://iss-sim.spacex.com the user script will load and give you the modded version.

On Firefox, you need an extension to load user scripts. One of them is called "Greasemonkey"

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/?src=search

When you have that installed clicking on the "RAW" link (URL above) Greasemonkey will automatically ask you if you want to install that script. All user scripts are managed (and can be enabled and disabled) through the greasemonkey extension.

To make the management for user scripts more user-friendly and offer similar capabilities like Greasemonky, there's also Tamper-monkey for Chrome. With that installed, you also only need to click on the "RAW" button and it will ask you if you want to install it.

https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

(
To make matters more complicated, there's also a "Tampermonkey" extension for Firefox, which does the same thing, but the orbital mechanics wont work ;) So don't use Tampermonkey on Firefox until I fixed that.

Edit: fixed it. Now works with Tampermonkey, too.  Welcome back Browser hell - now called Extension hell ;)
)


« Last Edit: 05/17/2020 10:13 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #38 on: 05/18/2020 04:05 am »
Version 0.000006 is out.  After previously fixing the orbits, I now fixed the navball. That was surprisingly hard. It's supposed to both show direction of Down as well as where North is. Down is easy (big blue ball) but North is tricky, considering the rotating inclined reference frame. Especially now that people can be in orbits different than the orbit of the reference frame.

And on top of that, earth also rotates around itself. So there's actually 3 axis involved: Earth axis, the ISS orbit axis, and the players orbit.

The HUD attitude indicator still displays the attitude relative to ISS. After all, Dragon is in Docking mode, that's probably what it would do ;)

So when switching to "Proper Orbital Mechanics" now, the orbit is now pro-grade at 51° inclination, while the earth rotates eastwards, and the attitude indicator nav-ball will point to proper North, so you can actually see the inclination.

By the way: if you have a javascript console open, the interesting values to edit are:
* camera.position
* motionVector
Both are 3d vectors. motionVector is a bit tricky, its not in m/s but in meter per frame - so it depends on your framerate - and relative to the rotating reference frame - so 0,0,0 will be stationary relative to ISS. You can find out how many meters per frame corresponds to your orbital velocity by putting negative values into motionVector.z  simply type
motionVector.z = -200  -- if you get the right value, your orbital speed becomes zero and you fall straight down. Then simply set it to - two times that, and you end up in a retrograde orbit (ISS will remain prograde though)

Or motionVector.z=-200; motionVector.x=200 - (or whatever the value corresponding to your orbital speed is) - you are now on an orbit perpendicular to that of the ISS. You can also change camera.position to directly go into higher or lower orbits (but they will be eccentric unless you also change the speed to match)

For stable orbits, the "frame rate" is measured during the first 1000 frames, then assumed constant, but every time you re-start the sim you get slightly different values.

ah by the way - to change ISS orbit, you need to rotate the earth:
earthObject.rotation.fromArray([0,0,(-90-10)*Math.PI/180])
would put ISS (and you) into a 10 degree inclination pro grade orbit
earthObject.rotation.fromArray([0,0,51*Math.PI/180]) will put you into a retrograde orbit similar to ISS-SIM's default

(that's definitely a bug. It was supposed to be 51, but whoever coded it didn't realize that his object is oriented with the north pole towards the ISS at 0,0,0)


Offline Rzeppa

  • Member
  • Posts: 30
  • Colorado
    • American 3D Printing
  • Liked: 39
  • Likes Given: 4936
Re: Dragon 2 ISS docking simulator
« Reply #39 on: 05/18/2020 08:32 pm »
"5512" -- engage auto-docking sequence - for those who are lazy

When I tried this it didn't work as intended. First I tried 5512 and then <Enter>, then I tried plain old 5512 without <Enter>. Both times yaw, pitch and roll all started drifting farther and farther from zero. Translation stays where it started with no change.
Jeff Zepp

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #40 on: 05/19/2020 12:11 am »
"5512" -- engage auto-docking sequence - for those who are lazy

When I tried this it didn't work as intended. First I tried 5512 and then <Enter>, then I tried plain old 5512 without <Enter>. Both times yaw, pitch and roll all started drifting farther and farther from zero. Translation stays where it started with no change.

In the original sim with no mod/user script installed?  Do you have any other extensions (addblockers, no-script, ...) that could be messing with it?

Which browser are you using?

The way SpaceX implemented that, the simulator is constantly monitoring key presses while its running and the window is active. Most actions are single key:

[w],[a],[ s ],[d] and [q],[e]  activate translational thrusters

cursor keys and [,],[.] activate rotational thrusters
so do [8],[4],[5],[6],[7],[9] on the number block with numlock enabled

but they also keep a history of last n keypresses if those are
5,5,1,2  then it would auto-warp to the docking port
e,a,r,t,h would toggle the earth shape
f,l,a,t,e,a,r,t,h would do the same, but since it ends in "earth" that's pretty redundant, dunno why that's in there

my mod added additional keys for functions you'd normally need a mouse click:
[y] or [z]  - toggle fine/course thrusts for translational thrusts
[x] - toggle fine/course thrust for attitude

and the following new functions:

[c] - reset timewarp factor to 1 (realtime)
[v] - reduce timewarp factor by 1/10 (no less than 1)
[ b ] - increase timewarp factor by 10 (no more than 1000)

Edit: Maybe I read your post wrong. The 5512 sequence does not zero your rotation vector. It puts you in the right place and orientation and will zero translation, but not rotation. Make sure you are not rotating before using that ;)
« Last Edit: 05/20/2020 03:13 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #41 on: 05/19/2020 02:56 pm »
Meanwhile at version 0.000008

New features:
- Navball now works properly
- When docking to PMA-3 the radiator goes into a configuration that allows colission-free access to the port ;)
- In "Proper Orbital Dynamics" mode, ISS Solar panel now track sun over the course of one orbit. Also ISS reaches night side (previously the light was in a fixed position relative to ISS)

Unfortunately I didn't get earth shadow to work correctly yet, so ISS remains somewhat illuminated even during the night. That remains a TODO. But at least the earth below is dark.




« Last Edit: 05/19/2020 02:57 pm by CorvusCorax »

Offline Rzeppa

  • Member
  • Posts: 30
  • Colorado
    • American 3D Printing
  • Liked: 39
  • Likes Given: 4936
Re: Dragon 2 ISS docking simulator
« Reply #42 on: 05/19/2020 07:28 pm »
In the original sim with no mod/user script installed?  Do you have any other extensions (addblockers, no-script, ...) that could be messing with it?

Which browser are you using?

Edit: Maybe I read your post wrong. The 5512 sequence does not zero your rotation vector. It puts you in the right place and orientation and will zero translation, but not rotation. Make sure you are not rotating before using that ;)

Yes, original sim with no mods. Firefox 76.0.1, only add-ons are Adobe Flash, Acrobat Reader and Ad Block Plus. Since I'm not an L2 member I whitelist this site. I do use private browsing most of the time, I can't think that that should make any difference to java.

I wasn't rotating prior to keying in the 5512, roll = 15.0°, pitch -20.0° and yaw = -10.0°, all static until I keyed in 5512 which caused all 3 to start increasing farther from zero.

The sim seems to work as-intended when docking manually. [shrugs shoulders]
Jeff Zepp

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #43 on: 05/20/2020 02:49 am »
In the original sim with no mod/user script installed?  Do you have any other extensions (addblockers, no-script, ...) that could be messing with it?

Which browser are you using?

Edit: Maybe I read your post wrong. The 5512 sequence does not zero your rotation vector. It puts you in the right place and orientation and will zero translation, but not rotation. Make sure you are not rotating before using that ;)

Yes, original sim with no mods. Firefox 76.0.1, only add-ons are Adobe Flash, Acrobat Reader and Ad Block Plus. Since I'm not an L2 member I whitelist this site. I do use private browsing most of the time, I can't think that that should make any difference to java.

I wasn't rotating prior to keying in the 5512, roll = 15.0°, pitch -20.0° and yaw = -10.0°, all static until I keyed in 5512 which caused all 3 to start increasing farther from zero.

The sim seems to work as-intended when docking manually. [shrugs shoulders]

Hmm then the only thing I could think of is that you used the numpad keys (attached image, section 2). These are interpreted as "arrow keys" and will trigger attitude thrusters, only 5512 typed on the regular number keys (attached image, section 1) will trigger the feature - without accidently triggering any thrusters in the process.

by the way the other codes "earth" and "flatearth" will trigger translational thrusters (w,a,s,d) while being typed in, so if you wanna switch back and forth from conspiracy mode without changing your trajectory, you should do it via the settings menu ;)

This is just a guess. I was doing all my tests on the laptop, and it doesnt even have a numpad like that, so I actually don't know what happens when one uses it.

and I managed to confirm this using a dekstop PC

With "numlock" OFF, the number pad will work like regular arrow keys, and produce the same key codes. So
"2" will pitch down
"4" will yaw left"
"6" will yaw right
"8" will pitch up

but the comma has no effect, only regular "," and "." on the main keyboard will adjust roll
typing "5512" on the number pad as such will cause the vehicle to pitch downwards due to "2" being pressed

with "numlock" ON, the number pad works slightly differnt. The attitude control keys now become
"4" will yaw left"
"5" will pitch down
"6" will yaw right
"7" will roll left
"8" will pitch up
"9" will roll right

typing "5512" now will cause a stronger pitch down since "5" is pressed twice

the "auto dock" is only ever triggered by pressing keys on the main keyboard.
« Last Edit: 05/20/2020 03:03 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #44 on: 05/20/2020 10:47 pm »
Check this out : https://gist.github.com/CorvusCorax/d6e6e98c946b8bfad56563b514df23a9

Version 0.000009:

With the new "Challenge" feature (defaults to "Dock") you can now select "Rendezvous + Dock"

If you select this, Dragon will be placed in a circular deployment orbit, at 198 km above sea level, with a not insignificant phase angle to ISS.

This ups the ante, now you need to use the maneuvering Thrusters in manual mode for more or less all orbital operations - including ISS rendezvous (and you can also do de-orbit later, if you like ;) )

But don't panic - there is now additional data displayed on the HUD, which allows you to get to ISS in a near optimal way.

I am pretty sure the real Dragon interface displays the relevant data somewhere as well. Probably not on the docking HUD overlay, but without a template how SpaceX displays that, I couldn't make it any more realistic than that.

By the way, I also fixed the bug in the sim with the high speed attitude thrusters messing up the HUD display. They now work correctly.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #45 on: 05/20/2020 10:54 pm »
Before I forget, some fine tuning is possible in the Javascript Console of your browser.
The following variables can be interesting:

GMPhase - phase angle for rendezvous spawn position - in degrees - defaults to 11 - negative values put Dragon in front of ISS
GMOrbit - orbital altitude for the rendezvous spawn position - defaults to 198 - don't go below 80 though ;) setting to orbits higher than ISS (450) is also fun.
GMPerigee - perigee and apogee for initial rendezvous spawn position - defaults to 190x205 now
GMApogee
GMInclination - side offset to the ISS orbit - in meters. Defaults to 300 - ish.  For significant inclinations, can be set to millions of meters. Might make the orbit wonky if you do, which won't make rendezvous easier.


Edit:  And I fixed the bug with the attitude thrusters in coarse-control mode breaking the HUD displayed rotation speed. That works correctly now.
« Last Edit: 05/21/2020 05:14 pm by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #46 on: 05/21/2020 05:15 pm »
updated to version 0.000010 - changed initial spawn orbit for "rendezvous" challenge to a very slightly eccentric 190x205 km

Edit: which makes it much harder the displayed parameters for a Hohman transfer assume a circular initial orbit. It will work if initiated at Perigee or Apogee, but will miss the ISS when used in between. So the best solution is to circularize the orbit first before going for the actual rendezvous transfer. But if you wait for apogee in the 190x205 deployment orbit, you'll have overshot ISS and need to wait quite a number of orbits - which makes it a several day transfer.

The way I manage the transfer quickest is by burning prograde right after spawn for an apogee between 375-400km circularize that at apogee, then do the rendezvous burn when the rndvz planner says with the displayed deltaV.

I could try to upgrade the rndvz planner to work with eccentric starting orbits but I don't have a formula for the resulting phase, nor is it trivial to find which direction to burn towards in the sim,
« Last Edit: 05/22/2020 07:27 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #47 on: 05/23/2020 02:40 am »
Updated mod to version 0.000011.

I fixed the RNDVZ planner. It now calculates transfers from eccentric orbits correctly. In fact so accurately that if you follow it exactly you run the risk of crashing into ISS roughly 45 minutes after a single transfer burn.

Shoutout to http://www.braeunig.us/space/orbmech.htm - that page had all the formulas I needed for the transfer computer implementation ;)

Offline sevenperforce

  • Full Member
  • ****
  • Posts: 1474
  • Liked: 969
  • Likes Given: 599
Re: Dragon 2 ISS docking simulator
« Reply #48 on: 05/23/2020 01:20 pm »
How hard would it be to add a variable that increments expended dV and notes how much you have remaining? You could then add an output at the end (post-successful docking) to grade the user on how much dV they expended in comparison to auto-docking.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #49 on: 05/23/2020 10:46 pm »
How hard would it be to add a variable that increments expended dV and notes how much you have remaining? You could then add an output at the end (post-successful docking) to grade the user on how much dV they expended in comparison to auto-docking.

Pretty trivial to do.

Only issue is that the amount of deltaV you get per thruster pulse - because of the way the (presumed) SpaceX intern originally implemented it - is dependend on your system speed / framerate. The only place where they calculate anything with realtime is in the "approach rate" display (red number bottom right in HUD). I added proper velocity calculation to the orbital mechanics, but I so far didn't touch the propulsion code.  This puts people with fast systems at a disadvantage. A thruster pulse adds 0.5 meters per frame of velocity, but with more frames per second, they spend more meters per second on small, unavadable course corrections - up to the point where they might exceed the docking limits even at minimum speed (1 single thruster pulse)

I might have to change that too.

Edit: Apropos "remaining deltaV" -- for that I'd need to know Dragon2's deltaV budget to begin with. Whats a DeltaV of a fully laden Crew Dragon?
« Last Edit: 05/23/2020 10:48 pm by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #50 on: 05/24/2020 02:48 am »
How hard would it be to add a variable that increments expended dV and notes how much you have remaining? You could then add an output at the end (post-successful docking) to grade the user on how much dV they expended in comparison to auto-docking.

Implemented. DeltaV budget is now monitored and reported during and after each flight in version v0.000013
In the settings you can chose wether the budget is soft or hard.

The budget is 25 m/s for docking operations and 175 m/s for the entire phasing, rendezvous + docking thing.

25 m/s for docking only is plenty if one isn't in a hurry, but could get some speed-runners into trouble if they want to dock to the harder to get to docking ports. 175 m/s for rendezvous is pretty tight. When I tried it, I had only 20m/s left - and that was with a single transfer - no intermediate orbit and no fly-around (Although you can "orbit" the ISS with a very tiny deltaV budget if done right)

Obviously the real Dragon would have propellant margins beyond the budget. But NASA would start complaining if you go into those ;) How large that budget highly depends on the amount of payload carried by dragon. Little to no cargo payload would almost double Dragon's total budget. I did some quick calculations and got to a minimum of ~ 250m/s (full dragon) and a maximum of around 400 m/s. (empty dragon) - mileage of real vehicle might vary.





Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #51 on: 05/24/2020 01:12 pm »
After playing around with this for a bit, I think we can put a lower bound on the DeltaV budget Crew Dragon must have for ISS operations.

To get from the deployment orbit to the ISS requires on the magnitude of 155 m/s deltaV - with a direct Hohmann transfer.
Adding a phasing orbit round 400 km adds around 5 m/s.

Proximity operations around ISS are surprisingly cheap. The hold points are all in front of the ISS on the exact same orbit, just phased, so they can be held with basically 0 propellant usage.
Adding a bit of eccentricity to that orbit without changing the period will get Dragon on a pseudo-orbit around the ISS. So the circle around the space station, or traversing from the rendezvous point below the ISS nadir to the hold point in front of the ISS only takes around 0.1-0.2 m/s.

Coming in to dock would be a bit more expensive just because of the tight position constraints. It's hard to tell how much propellant Dragon will burn but it should be less than 5 m/s for all ISS proximity operations combined.

Deorbiting - again with a circular phasing orbit below ISS - took me around 120 m/s.

All in all I get to 280 m/s minimum DeltaV to get to the ISS and back -- add some margin for failed ISS approaches and manual flight experiments, and we can conclude Dragon should have at least 300 m/s.

Is there any official number? (It's of course mission specific. More payload = less deltaV)

Offline Kaputnik

  • Extreme Veteran
  • Senior Member
  • *****
  • Posts: 3091
  • Liked: 727
  • Likes Given: 840
Re: Dragon 2 ISS docking simulator
« Reply #52 on: 05/24/2020 07:36 pm »
Is it meaningful to compare our best docking times, or does it depend on your system clock speed?
(FWIW I can do it in about three and a half minutes...)
"I don't care what anything was DESIGNED to do, I care about what it CAN do"- Gene Kranz

Offline Tommyboy

  • Full Member
  • ***
  • Posts: 307
  • The Netherlands
  • Liked: 374
  • Likes Given: 598
Re: Dragon 2 ISS docking simulator
« Reply #53 on: 05/24/2020 08:14 pm »
Is it meaningful to compare our best docking times, or does it depend on your system clock speed?
(FWIW I can do it in about three and a half minutes...)
Amateur. Somebody did it in 16 seconds:

Offline Lars-J

  • Senior Member
  • *****
  • Posts: 6809
  • California
  • Liked: 8487
  • Likes Given: 5385
Re: Dragon 2 ISS docking simulator
« Reply #54 on: 05/24/2020 08:22 pm »
Is it meaningful to compare our best docking times, or does it depend on your system clock speed?
(FWIW I can do it in about three and a half minutes...)
Amateur. Somebody did it in 16 seconds:

Neat! But it could still be faster... note that the script does keep toggling reverse and forward thrust during the final approach.

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #55 on: 05/24/2020 09:40 pm »
Is it meaningful to compare our best docking times, or does it depend on your system clock speed?
(FWIW I can do it in about three and a half minutes...)

The way SpaceX implemented it, the simulator runs at whatever framerate the webbrowser (in GL) mode can support. This is the window redraw rate, often limited by the graphics driver (it won't trigger a redraw at more than your monitor fps) but it can be slower than that on a slow system if graphics can't keep up.

They also made it so that the velocity is internally measured in "meters per frame" - and each thruster pulse will add or substract a small value from that.

The same is true for rotations - even though it says "°/s" in the display - for most people rotations are a lot faster than that.

so when the sim displays 0.1 °/s rotation speed it actually means 0.005 ° per frame
This matches if, and only if your system runs graphics at exactly 20 frames per second - which is actually often not too far off, especially with a slow browser (javascript wise) such as Firefox

But with a fast Browser (Chrome) and GPU, some systems easily reach 60 fps, so they will rotate and translate 3 times as fast.

To make things worse, the actual framerate isn't constant. It varies considerably whether you have ISS in your view, earth, or only the stars.

What might make sense for a speedrun is a frame counter.

Or... maybe I should go to the trouble and actually fix the fps control of the simulator and enforce the sim to run at clock speed instead of animation speed.

Not completely trivial though. It gets to the point where I'd have more or less rewritten the entire game ;)

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #56 on: 05/24/2020 09:46 pm »
Is it meaningful to compare our best docking times, or does it depend on your system clock speed?
(FWIW I can do it in about three and a half minutes...)
Amateur. Somebody did it in 16 seconds:

Well, with my twiddly fingers I never got beyond 25 m/s , but with the computer in charge, as in that video, it might be possible to go through all 200 m/s deltaV Dragon2 has left in the last 200 meters to the space station and run out of propellant ;)

I'd love to see the same script run with my mod installed ;) just to see how much juice that burnt through ;)

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #57 on: 05/25/2020 01:40 am »
Hey look, NASA put their own docking simulator on-line:


https://rocketsciencec2e.ksc.nasa.gov/

it's kinda "pre-school-style" compared with the SpaceX one though.

and even though they use Unity, their model of the ISS kinda sucks.

but you can "fly" "around" with both Dragon and CST-100.

(Edit: except you can't do exactly that. They don't let you fly "around" the ISS - it restarts if you leave the approach vector)
« Last Edit: 05/25/2020 01:46 am by CorvusCorax »

Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #58 on: 05/25/2020 03:11 pm »
I added a frame - simtime and mission time counter to the Customize ISS-SIM Userscript. This should make comparison of speed runs easier. Rotation and translation speed is now independent of FPS.

This is the complete changelog:


    v 0.000001 2020-05-13 Initial Customize ISS-SIM Script
        Toggle permanent Tesla visibility
        Toggle 500m distance restriction
        Toggle HUD Online/Offline
        Toggle Docking constraints - original versus IDA specs
        Toggle precision rotation/translation per via keyboard
    v 0.000002 2020-05-14 Bugfix
        Bugfix to work with different browsers / extension loaders (Greasemonkey, Chrome native, Tampermonkey, Violent Monkey, ...)
    v 0.000003 2020-05-14 Docking Ports
        Support for all the ISS docking ports
        Improved greeter and intro
    v 0.000004 2020-05-16 Proper Orbital Mechanics
        Support for time warp
        Support for realistic orbital mechanics instead of simplified "gravity" - allows altering orbit around earth arbitrarily
    v 0.000005 2020-05-17 Bugfix
        Fixed bug in Tampermonkey/Chrome where some menu entries weren't functional
    v 0.000006 2020-05-18 Fix the Earth
        In Proper Orbital Mechanics, ISS is now in correct 51° inclined prograde Orbit, earth rotates correctly around itself
        Navigation ball displays orientation relative to earth.
    v 0.000007 2020-05-19 Navball Bugfix
        Corrected an error in the nav ball orientation
    v 0.000008 2020-05-19 Follow the sun
        In Proper Orbital Mechanics mode, the sun no longer orbits with the ISS but stays stationary relative to earth. ISS enters earth shadow
        ISS Solar panels track and follow the sun
        ISS radiators move out of the way, when the obstructed PMA-3 docking port is selected
    v 0.000009 2020-05-20 A New Challenge
        Orbital rendezvous calculator display added to Proper Orbital Mechanics mode
        Added new Objective/Spawn position to allow player to begin in deployment LEO and sync to the ISS themselves
        Bugfix of rotation-precision-mode bug in the original ISS-SIM
    v 0.000010 2020-05-21 DM-2 Dragon Deploy
        Dragon now deployed in eccentric 190km x 205km orbit - matching DM-2 deployment orbit
    v 0.000011 2020-05-23 Eccentric Rendezvous
        Updated rendezvous calculator to work and predict correctly when Dragon is initially in an arbitrary eccentric orbit (aka any orbit)
    v 0.000012 2020-05-23 Un-Phased
        Updated initial orbit of the rendezvous challenge to be phased 1/3 orbit behind ISS - as it would be on May 27 planned DM-2 launch
    v 0.000013 2020-05-24 Sparse resources
        Keep track and display used DeltaV and DeltaV budget
        Added limited propellant to the optional docking constraints. Exceeding the DeltaV budget for the mission phase means GAME OVER.
    v 0.000014 2020-05-25 It's Time
        Added mission- and game- elapsed time counter to allow comparison of speed-run challenges
        Added fps display
        Fixed velocity and rotational velocity calculation to be correct and independent of system fps


Offline CorvusCorax

  • Full Member
  • ****
  • Posts: 1922
  • Germany
  • Liked: 4154
  • Likes Given: 2825
Re: Dragon 2 ISS docking simulator
« Reply #59 on: 05/27/2020 12:40 am »
Check out the free drift orbital trajectory preview.

We saw SpaceX have that it in the DM-1 webcast for the 2d navigation side view, but I figured having a preview where you're capsule's going might be quite useful. Especialy if orbital mechanics come into play and the exact shape of the trajectory might become a bit non-intuitive ;)



This is version 0.000015

Offline NH22077

  • Full Member
  • *
  • Posts: 119
  • Watched Apollo Live
  • Maryland, USA
  • Liked: 107
  • Likes Given: 1095
Re: Dragon 2 ISS docking simulator
« Reply #60 on: 09/21/2021 01:01 pm »
Thank you for all your work on the sim CorvusCorax. This is GREAT! I am late to the party, but I only just came across a link to this thread.

Ned
« Last Edit: 09/21/2021 01:16 pm by NH22077 »

Tags:
 

Advertisement NovaTech
Advertisement Northrop Grumman
Advertisement
Advertisement Margaritaville Beach Resort South Padre Island
Advertisement Brady Kenniston
Advertisement NextSpaceflight
Advertisement Nathan Barker Photography
0