Board index FlightGear Development Spaceflight

Space Shuttle - Bugfixes

Discussion about development and usage of spacecraft

Re: Space Shuttle - Bugfixes

Postby GinGin » Mon Sep 09, 2019 12:16 pm

Dont be :)

Be sure to use the exact same mission file than when you saved and start with «  ready for a mission «  scenario
Orbit put you just after Meco , I never use that one to resume a previous save


I will load again the saved I made for Hubble and have a look .
But it was working rock solid ( expect for the visuals ) concerning relative position , saved state vector and subsequent targeting
GinGin
 
Posts: 780
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby Thorsten » Mon Sep 09, 2019 12:46 pm

Would you mind to write explicitly the command you typed for starting the fgfs instance used when you did resume the previous state?


Code: Select all
./fgfs --fg-root=/home/fgfs/fgdata --fg-scenery=/home/fgfs/FGScenery/Scenery --fg-aircraft=/home/fgfs/FGAircraft --prop:/sim/rendering/multi-sample-buffers=1  --prop:/sim/rendering/multi-samples=4  --disable-real-weather-fetch --geometry=1200x900 --disable-terrasync --timeofday=afternoon  --airport=KTTS --log-level=warn --prop:/sim/config/shuttle/mdu-groups=1 --aircraft=SpaceShuttle-mission


And look what I got here - the state I test-resumed (if you promise not to comment on the trajectory...) :D

Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <valid-flag type="bool">false</valid-flag>
  <latitude-deg type="double">43.73474168</latitude-deg>
  <longitude-deg type="double">-57.03487537</longitude-deg>
  <altitude-ft type="double">1070826.393</altitude-ft>
  <pitch-deg type="double">-3.408760232</pitch-deg>
  <heading-deg type="double">358.6283087</heading-deg>
  <roll-deg type="double">-6.484422236</roll-deg>
  <uBody-fps type="double">12433.27589</uBody-fps>
  <vBody-fps type="double">20855.02973</vBody-fps>
  <wBody-fps type="double">1644.649373</wBody-fps>
  <description type="string">Rendezvous 30 minutes out
</description>
  <timestring type="string">2019-3-21-15:39</timestring>
  <tank1-level-lbs type="double">0</tank1-level-lbs>
  <tank2-level-lbs type="double">0</tank2-level-lbs>
  <tank3-level-lbs type="double">0</tank3-level-lbs>
  <tank4-level-lbs type="double">0</tank4-level-lbs>
  <tank5-level-lbs type="double">7354.165</tank5-level-lbs>
  <tank6-level-lbs type="double">4463.745</tank6-level-lbs>
  <tank7-level-lbs type="double">7354.165</tank7-level-lbs>
  <tank8-level-lbs type="double">4463.745</tank8-level-lbs>
  <tank9-level-lbs type="double">1465.396125</tank9-level-lbs>
  <tank10-level-lbs type="double">920.5593476</tank10-level-lbs>
  <tank11-level-lbs type="double">1463.487089</tank11-level-lbs>
  <tank12-level-lbs type="double">919.3352328</tank12-level-lbs>
  <tank13-level-lbs type="double">1461.25745</tank13-level-lbs>
  <tank14-level-lbs type="double">917.9019487</tank14-level-lbs>
  <tank15-level-lbs type="double">350</tank15-level-lbs>
  <tank16-level-lbs type="double">350</tank16-level-lbs>
  <tank17-level-lbs type="double">350</tank17-level-lbs>
  <tank18-level-lbs type="double">0</tank18-level-lbs>
  <tank19-level-lbs type="double">0</tank19-level-lbs>
  <tank20-level-lbs type="double">0</tank20-level-lbs>
  <tank21-level-lbs type="double">0</tank21-level-lbs>
  <throttle type="double">0</throttle>
  <throttle n="1" type="double">0</throttle>
  <throttle n="2" type="double">0</throttle>
  <engine-run type="double">0</engine-run>
  <engine-run n="1" type="double">0</engine-run>
  <engine-run n="2" type="double">0</engine-run>
  <MET type="double">200485.1</MET>
  <state type="double">4</state>
  <umbilical-state type="double">1</umbilical-state>
  <radiator-state type="double">1</radiator-state>
  <hydraulics-state type="double">0</hydraulics-state>
  <OMS-kit-config type="string">none</OMS-kit-config>
  <area-nav-state type="double">0</area-nav-state>
  <air-data-state type="double">0</air-data-state>
  <control-mode type="double">20</control-mode>
  <orbital-dap-sel type="double">0</orbital-dap-sel>
  <css-pitch type="double">1</css-pitch>
  <css-roll type="double">1</css-roll>
  <ops type="double">2</ops>
  <major-mode type="double">201</major-mode>
  <major-mode-sm type="double">201</major-mode-sm>
  <ops-bfs type="double">1</ops-bfs>
  <major-mode-bfs type="double">104</major-mode-bfs>
  <control-string type="string">RCS ROT DAP-A</control-string>
  <guidance-mode type="double">0</guidance-mode>
  <landing-site type="string">Vandenberg Air Force Base</landing-site>
  <runway type="string">12</runway>
  <auto-launch type="double">0</auto-launch>
  <auto-launch-stage type="double">0</auto-launch-stage>
  <idp1-switch-pos type="double">1</idp1-switch-pos>
  <idp1-bfs-major-function type="double">1</idp1-bfs-major-function>
  <idp2-switch-pos type="double">1</idp2-switch-pos>
  <idp2-bfs-major-function type="double">1</idp2-bfs-major-function>
  <idp3-switch-pos type="double">1</idp3-switch-pos>
  <idp3-bfs-major-function type="double">1</idp3-bfs-major-function>
  <idp4-switch-pos type="double">1</idp4-switch-pos>
  <idp4-bfs-major-function type="double">1</idp4-bfs-major-function>
  <gpc1-mcc type="double">2</gpc1-mcc>
  <gpc2-mcc type="double">2</gpc2-mcc>
  <gpc3-mcc type="double">2</gpc3-mcc>
  <gpc4-mcc type="double">4</gpc4-mcc>
  <gpc5-mcc type="double">10</gpc5-mcc>
  <gpc1-mode type="double">2</gpc1-mode>
  <gpc2-mode type="double">2</gpc2-mode>
  <gpc3-mode type="double">2</gpc3-mode>
  <gpc4-mode type="double">2</gpc4-mode>
  <gpc5-mode type="double">2</gpc5-mode>
  <gpc1-mode-switch type="double">1</gpc1-mode-switch>
  <gpc2-mode-switch type="double">1</gpc2-mode-switch>
  <gpc3-mode-switch type="double">1</gpc3-mode-switch>
  <gpc4-mode-switch type="double">1</gpc4-mode-switch>
  <gpc5-mode-switch type="double">1</gpc5-mode-switch>
  <nbat-string1 type="double">1</nbat-string1>
  <nbat-string2 type="double">2</nbat-string2>
  <nbat-string3 type="double">3</nbat-string3>
  <nbat-string4 type="double">1</nbat-string4>
  <nbat-launch1 type="double">0</nbat-launch1>
  <nbat-launch2 type="double">2</nbat-launch2>
  <nbat-pl1 type="double">0</nbat-pl1>
  <nbat-pl2 type="double">0</nbat-pl2>
  <nbat-mm1 type="double">1</nbat-mm1>
  <nbat-mm2 type="double">2</nbat-mm2>
  <nbat-crt1 type="double">1</nbat-crt1>
  <nbat-crt2 type="double">2</nbat-crt2>
  <nbat-crt3 type="double">3</nbat-crt3>
  <nbat-crt4 type="double">2</nbat-crt4>
  <nbat-crt-sm1 type="double">4</nbat-crt-sm1>
  <nbat-crt-sm2 type="double">4</nbat-crt-sm2>
  <nbat-crt-sm3 type="double">4</nbat-crt-sm3>
  <nbat-crt-sm4 type="double">4</nbat-crt-sm4>
  <bfs-in-control type="double">0</bfs-in-control>
  <temperature type="double">282.9218703</temperature>
  <temperature n="1" type="double">282.0358178</temperature>
  <temperature n="2" type="double">284.5643348</temperature>
  <temperature n="3" type="double">281.4088343</temperature>
  <temperature n="4" type="double">279.8357042</temperature>
  <temperature n="5" type="double">277.4144984</temperature>
  <temperature n="6" type="double">283.8505305</temperature>
  <temperature n="7" type="double">284.7218479</temperature>
  <temperature n="8" type="double">282.3522785</temperature>
  <temperature n="9" type="double">300.8301418</temperature>
  <temperature n="10" type="double">292.615448</temperature>
  <temperature n="11" type="double">276.5957269</temperature>
  <temperature n="12" type="double">300.0164033</temperature>
  <temperature n="13" type="double">300.0209396</temperature>
  <temperature n="14" type="double">300.0254738</temperature>
  <hyd-circ-pump1 type="double">0</hyd-circ-pump1>
  <hyd-circ-pump2 type="double">0</hyd-circ-pump2>
  <hyd-circ-pump3 type="double">0</hyd-circ-pump3>
  <heater-fwd-A type="double">1</heater-fwd-A>
  <heater-fwd-B type="double">0</heater-fwd-B>
  <heater-oms-left-A type="double">1</heater-oms-left-A>
  <heater-oms-left-B type="double">0</heater-oms-left-B>
  <heater-oms-right-A type="double">1</heater-oms-right-A>
  <heater-oms-right-B type="double">0</heater-oms-right-B>
  <heater-oms-xfeed-A type="double">1</heater-oms-xfeed-A>
  <heater-oms-xfeed-B type="double">0</heater-oms-xfeed-B>
  <valve-helium-left-oms-A type="double">1</valve-helium-left-oms-A>
  <valve-helium-left-oms-B type="double">1</valve-helium-left-oms-B>
  <valve-helium-right-oms-A type="double">1</valve-helium-right-oms-A>
  <valve-helium-right-oms-B type="double">1</valve-helium-right-oms-B>
  <valve-helium-kit-oms-A type="double">1</valve-helium-kit-oms-A>
  <valve-helium-kit-oms-B type="double">1</valve-helium-kit-oms-B>
  <valve-tank-left-oms-A type="double">1</valve-tank-left-oms-A>
  <valve-tank-left-oms-B type="double">1</valve-tank-left-oms-B>
  <valve-tank-right-oms-A type="double">1</valve-tank-right-oms-A>
  <valve-tank-right-oms-B type="double">1</valve-tank-right-oms-B>
  <valve-tank-kit-oms-A type="double">0</valve-tank-kit-oms-A>
  <valve-tank-kit-oms-B type="double">0</valve-tank-kit-oms-B>
  <valve-xfeed-left-oms-A type="double">0</valve-xfeed-left-oms-A>
  <valve-xfeed-left-oms-B type="double">0</valve-xfeed-left-oms-B>
  <valve-xfeed-right-oms-A type="double">0</valve-xfeed-right-oms-A>
  <valve-xfeed-right-oms-B type="double">0</valve-xfeed-right-oms-B>
  <otgt-elapsed-time type="double">485.1</otgt-elapsed-time>
  <otgt-anomaly type="double">1.0819327</otgt-anomaly>
  <otgt-initial-node-lon type="double">4.464552227</otgt-initial-node-lon>
  <otgt-initial-anomaly type="double">0.5235987756</otgt-initial-anomaly>
  <otgt-node-lon type="double">255.7707676</otgt-node-lon>
  <otgt-delta-lon type="double">2.029335</otgt-delta-lon>
  <heater-left-A type="double">0</heater-left-A>
  <heater-left-B type="double">0</heater-left-B>
  <heater-right-A type="double">0</heater-right-A>
  <heater-right-B type="double">0</heater-right-B>
</PropertyList>
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby Thorsten » Mon Sep 09, 2019 12:50 pm

expect for the visuals


I got a

Code: Select all
Coordinate differences proximity:
-398.6763646055295 -3965.795526785438 -2572.437191433273
ISS alt2 before: 330230.3696541601 prox_z: -2572.437191433273
ISS alt2 aft: 332802.8068455942
Nasal runtime error: setprop() passed a NaN
  at /home/fgfs/FGAircraft/SpaceShuttle/Nasal/rel_orbital.nas, line 392
  called from: /home/fgfs/FGAircraft/SpaceShuttle/Nasal/rel_orbital.nas, line 973
  called from: /home/fgfs/FGAircraft/SpaceShuttle/Nasal/rel_orbital.nas, line 994


in the log when I didn't see ISS (but everything else worked). The model then disappears because the model manager node gets a NaN written to and does not re-appear when valid coordinates are inserted later.

Weirdly enough, the parameter containing the NaN is coordinate longitude which is derived from a coord object. The individual coordinates seem to be okay (see the proximity coordinate differences above which do not contain NaN, so I am somewhat at a loss how the coord object can fail to derive a longitude from a triplet of cartesian coordinates, that should be a no-fail process...
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby eatdirt » Mon Sep 09, 2019 2:58 pm

Ok, so I am lost, like a tourist back from a too long break in fg.

Sorry in advance for the naive questions, but:

What is this (I don't have it?)
--aircraft=SpaceShuttle-mission


I am used to:
--prop:/mission/filename=hst.xml

Is this obsoleted by something else?

and then, saved/resumed from the menu "save/resume" (I am ignoring the new "scenario" menu option)

Be sure to use the exact same mission file than when you saved and start with « ready for a mission « scenario

Thanks Gingin, I am always using that "hst.xml" for save and resume, what do you mean by "ready for a mission"?
eatdirt
 
Posts: 374
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby Thorsten » Mon Sep 09, 2019 4:02 pm

Well, these two statements are at odds, so we need clarification:

What is this (I don't have it?)


I am just running latest fgspaceshuttle snaphost with 2019.1.2


SpaceShuttle-mission is the former SpaceShuttle-ISS from which we removed ISS and added it back in via the scenario manager - so for consistency it means Space Shuttle is doing a mission, and you get to select which one via scenario.
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby GinGin » Mon Sep 09, 2019 4:49 pm

@Thorsten: Nice catch
Did you see that on Nasal consol ?

@EatDirt: Indeed, new scenario Name
That one, without going through command line


Image


Tried to load the 5 different states I have
It works fine for me, with a NaN though for Speed on spec 33 ( R dot and velocity in filter)
But targeting was working and value coherent between spec 34 / 33 and canvas plus Eileen AP holding the position where Hubble was supposed to be after RDV :)

Image
GinGin
 
Posts: 780
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby Thorsten » Mon Sep 09, 2019 5:34 pm

It works fine for me, with a NaN though for Speed on spec 33 ( R dot and velocity in filter)


That occurs often enough that I should be able to find it...
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby eatdirt » Mon Sep 09, 2019 10:06 pm

Thanks guys for the help. That is so big that it drives me mad:

I used to install fgspaceshuttle-dev snaphots as

Code: Select all
.fgfs/Aircraft/org.flightgear.fgaddon.trunk/Aircraft/SpaceShuttle


namely, as a replacement of the milestone version provided by fgaddon (erase and replace the directory). I had to check 10x, but the content of SpaceShuttle/ is really matching the current development one, I can even see the file SpaceShuttle-mission-set.xml inside.

Look at this, I start fgfs with:
Code: Select all
fgfs --aircraft=SpaceShuttle-mission

I get this:
Code: Select all
FlightGear:  Version 2019.1.2
    0.00 [INFO]:general    FlightGear:  Build Type Release
    0.00 [INFO]:general    Built with GNU C++ version 8.3
    0.00 [INFO]:general    Jenkins number/ID 0:none
    0.01 [WARN]:gui        Failed to load default (en) translations
    0.01 [INFO]:general    platform default fg_root = Path "/usr/share/games/flightgear"
    0.01 [INFO]:general    Reading global defaults
    0.03 [INFO]:input      Reading user settings from Path "/home/chris/.fgfs/autosave_2019_1.xml"
    0.03 [INFO]:general    init package root at:Path "/home/chris/.fgfs/Aircraft"
    0.06 [INFO]:input      aircraft = SpaceShuttle-mission
    0.06 [ALRT]:general    Cannot find the specified aircraft: 'SpaceShuttle-mission'


If I start with the old scenarios, as SpaceShuttle-orbit, that works!

Now, starting with:
Code: Select all
fgfs --fg-aircraft=.fgfs/Aircraft/org.flightgear.fgaddon.trunk/Aircraft  --aircraft=SpaceShuttle-mission


it works:
Code: Select all
 0.00 [INFO]:general    FlightGear:  Version 2019.1.2
    0.00 [INFO]:general    FlightGear:  Build Type Release
    0.00 [INFO]:general    Built with GNU C++ version 8.3
    0.00 [INFO]:general    Jenkins number/ID 0:none
    0.01 [WARN]:gui        Failed to load default (en) translations
    0.01 [INFO]:general    platform default fg_root = Path "/usr/share/games/flightgear"
    0.01 [INFO]:general    Reading global defaults
    0.03 [INFO]:input      Reading user settings from Path "/home/chris/.fgfs/autosave_2019_1.xml"
    0.03 [INFO]:general    init package root at:Path "/home/chris/.fgfs/Aircraft"
    0.06 [INFO]:input      aircraft = SpaceShuttle-mission
    0.06 [INFO]:general    Loading aircraft -set file from:Path "/home/chris/.fgfs/Aircraft/org.flightgear.fgaddon.trunk/Aircraft/SpaceShuttle/SpaceShuttle-mission-set.xml"


This does not fix my Lambert targetting issue, but certainly it means that for a reason I don't understand, the fgaddon version of the Shuttle gets mixed with the devel branch, even though I cannot find any spurious SpaceShuttle/ codes. I'll start from scratch, with the SpaceShuttle dev branch installed in a proper directory!

Thanks all,
Cheers.
eatdirt
 
Posts: 374
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby Thorsten » Tue Sep 10, 2019 9:57 am

Yes, perhaps that should be out of the way first...

Also, investigating the content of your saved file might be interesting, as the offsets stored for targeting might reveal something. Last but not least checking the log whether the state has been restored properly might find something as well
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby eatdirt » Tue Sep 10, 2019 9:03 pm

A bit of spam to advertise the Lambert targetter! Fresh install, proper SpaceShuttle directory.


Image


It is so good that I don't even use anything else for targetting. Just a piece of paper for getting the order of magnitude with spherical gravity first, and then a few iterations on SPEC 34 to minimize DeltaVZ. Bang! Let's see if the burn will bring me here.

PS: That's before a save/resume though!

Edit: The lambert worked fine ---> met the lady at MET: 4 hours-ish

Image
Last edited by eatdirt on Wed Sep 11, 2019 3:32 pm, edited 1 time in total.
eatdirt
 
Posts: 374
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Wed Sep 11, 2019 8:35 am

Awesome Chris.
Keep us informed with save /resume.

Just a piece of paper for getting the order of magnitude with spherical gravity first, and then a few iterations on SPEC 34 to minimize DeltaVZ



Did the same for Bubble :)

Image
GinGin
 
Posts: 780
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Wed Sep 11, 2019 8:58 am

Ah ah, lol Gingin, excellent!
It could even be a SOTM "Rdv mission with the SpaceShuttle".

Mmmm, that might scare newcomers to try the Shuttle though :D
eatdirt
 
Posts: 374
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby Thorsten » Wed Sep 11, 2019 9:00 am

Hm, i've tried to trigger the rdot -= NaN bug by using a scenario and by loading a saved state - neither caused that for me. The logic surely runs crazy for a time after a teleport, but eventually it goes back to a sane number for me.

So I guess I need more info...
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby GinGin » Wed Sep 11, 2019 6:56 pm

The logic surely runs crazy for a time after a teleport


For how long?
I will try with a scenario, I had that from a straight resume with the " ready for a mission" thing, no scenario loaded then


@EatDirt: Nice COAS picture, and no trouble with Hubble visuals :)
GinGin
 
Posts: 780
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby Thorsten » Thu Sep 12, 2019 4:46 am

30 seconds or so? There's a filter to suppress spurious jittering (is the position evalued inside the frame before the target is moved or after - since the target code is not part of the Shuttle sensor code, we can't guarantee...) - that filter of course initially suppresses a teleport and needs to be convinced that what it sees is real.
Thorsten
 
Posts: 11136
Joined: Mon Nov 02, 2009 8:33 am

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest