Meadville Space Center
Welcome, Guest. Please login or register.
August 08, 2020, 01:47:33 AM

Login with username, password and session length
Search:     Advanced search
25068 Posts in 2094 Topics by 2266 Members
Latest Member: twa517
* Home Help Search Login Register
+  Meadville Space Center
|-+  Project Apollo - NASSP
| |-+  Project Apollo - NASSP Development
| | |-+  Programming (Moderators: movieman, dseagrav, Swatch, lassombra)
| | | |-+  Docking probe docked state not saved
« previous next »
Pages: [1] Print
Author Topic: Docking probe docked state not saved  (Read 2849 times)
movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« on: January 17, 2008, 01:18:08 AM »

Is there a good reason why we don't save the docked state of the docking probe in the scenario file? The connector code gets triggered by a docking event where Docked is true, but the docking probe ignores the initial docking events on startup when it's docked with a vessel already, and that means the connectors are never connected so we can't extract the payload.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #1 on: January 17, 2008, 07:44:10 AM »

I'm not sure if I understand you correctly, as far as I remember the docked state is saved by Orbiter itself, the connector is initialized in DockingProbe::DoFirstTimeStep(). Or do you mean the IgnoreNextDockEvent handling in the DockingProbe, which is related to the LM (or S-IVB payload) creation?

Cheers
Tschachim
Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #2 on: January 17, 2008, 08:45:41 AM »

The Docked variable is set too late, so the docking event comes in, the docking probe ignores it, and then the connector code doesn't try to connect because the docking probe isn't Docked.

If the timestep code is doing the setup then I could add connector setup code to that too.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #3 on: January 17, 2008, 11:49:09 AM »

I still don't understand, Docked is set to true in void DockingProbe::DoFirstTimeStep() and Saturn::HaveHardDocked(), which connects the connectors, is called in the same function, so the connectors get connected during the first time step. Is that already too late and if yes can you explain why? I don't like to change that without understanding the problem, because that part was quite tricky to get working with LM creation.

EDIT: Also it not sufficient to have something docked in the Orbiter sense to connect the connectors, but also the docking probe needs to be retracted (hard dock), which is handled correctly by the current implementation, but perhaps I just don't see the problem?

Cheers
Tschachim
« Last Edit: January 17, 2008, 11:54:26 AM by Tschachim » Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #4 on: January 17, 2008, 12:02:30 PM »

Is that already too late and if yes can you explain why?

Yes. If you're docked in the scenario then the docking event on startup occurs _before_ the first timestep call, so Docked is always false when the docking event happens and the connectors are never docked because HardDocked() returns false.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #5 on: January 17, 2008, 12:21:05 PM »

Yes, the connectors aren't connected/docked during the docking event on startup, but they _are_ connected/docked during the first time step, so they are _not_ never connected/docked, but only not connected/docked between the docking event on startup and the first time step. I still don't understand why this is a problem, does something important happen between the docking event on startup and the first time step?

Cheers
Tschachim
Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #6 on: January 17, 2008, 12:42:01 PM »

Weird. Yesterday I was seeing messages vanish between the CSM and SIVB when they were docked in the scenario file, because the connectors weren't connected. But after I made a change to save and load the Docked state in the scenario it worked.

So something odd is happening.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #7 on: January 17, 2008, 12:51:16 PM »

Are you sure you actually retracted the docking probe after capture (= Orbiter's dock handling) to achieve hard dock? Or did you use Quickstart mode, then the probe is retracted automatically.

EDIT: If you still have the scenario you mentioned, feel free to post, then I'll take a look.

Cheers
Tschachim
« Last Edit: January 17, 2008, 12:53:25 PM by Tschachim » Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #8 on: January 17, 2008, 01:03:04 PM »

Yes. The HardDock() call would have failed otherwise.

Basically I saved a scenario hard-docked with the ASTP, then reloaded it and couldn't separate from the SIVB. I modified the code to save and load the Docked state, saved that scenario and reloaded it (DOCKED set to 1 in the scenario file), and then I could separate from the SIVB.

That said, I've been having odd problems loading scenarios in the last few days: if I load an old scenario from a few weeks ago and go to the control panel my monitor goes black until I switch back from the control panel, even if I'm running Orbiter in a window. So maybe something we've added recently has a bad default state that's accidentally overwriting random bits of memory; if I save the scenario and reload it, then I can switch to the control panel with no problem.
Logged
Tschachim
Project Apollo - NASSP
Administrator
Hero Member
*****
Posts: 3700


nassp.sf.net


View Profile WWW
« Reply #9 on: January 17, 2008, 01:36:12 PM »

Besides from memory corruption I just checked the connectors and the separation with the LM and it's working fine, but to check that with ASTP would take some time, so if you still have that scenario and/or can reproduce the problem feel free to post it.

Cheers
Tschachim
Logged

movieman
Moderator
Hero Member
****
Posts: 1710



View Profile
« Reply #10 on: January 17, 2008, 07:59:22 PM »

Weird, the scenario which wasn't working yesterday is working today; the only thing I've changed is to put in a couple of hacks for the EMS bugs (setting variables to zero by default).
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!