Board index FlightGear Development Spaceflight

Space Shuttle - Bugfixes

Discussion about development and usage of spacecraft

Re: Space Shuttle - Bugfixes

Postby eatdirt » Sun Jan 24, 2021 8:43 am

my guess is that the state vector is slightly off at the end of TAEM


It is, but by not much; I am always compensating by the same shift I see between the real runway and the hud (TACAN and Air Data in the state vector, MLS works as expected). Something else seems to be going on!

I have tested 3 landings, TAEM scenario, with Navigation=Perfect now, and I've let the AP doing the HAC for me. The wind was 0 knot.
For 3/4 of the HAC, the circle predictors on SPEC 50 are always significantly outside the circle, so the AP does not seem to follow the SPEC 50 circle. But, in the last 1/4, they are significantly inside, as if the AP was trying to compensate later on. At all times, the diamond tracking remains good, most of the time inside the cage. Therefore, it looks like the diamond does not match the HAC drawn on SPEC50? At last, when the AP force me to take CSS on final, I am completely off the runway, the runway is on my left. And the final is far too fast, I am still arriving over the runway at more than 320 knots, as if I had a 30 knots wind from my back (and speed brake retracting).

Other very weird things I've observed. In the "fly-by" view, within the HAC, it looks like the sideslip angle (beta?) is also completely off. The nose of the Shuttle points well outside the trajectory, it looks like it flies the HAC while crabbing outside. And also, on the runway, I have to push the rudder quite a lot to the right, as if some crosswinds were present. I have checked a few times, the live weather reports 0 knot, and my joysticks are all trimmed to a good 0.00.

On the other hand, for the Shuttle-approach scenario at KTTS, everything seem to work fine! I am a bit lost :-/


Edit: On the bright side, I am getting exactly the same behaviour with Milestone-12, so none of your changes are the culprit here!
Last edited by eatdirt on Sun Jan 24, 2021 11:00 am, edited 1 time in total.
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Sun Jan 24, 2021 10:50 am

Could you try the same with the stable release with the exact same parameters ?

I don’t know what to think about it, as I can’t reproduce it with the current dev version and the latest stable fg release .
For CSS, you should take it earlier than when the AP leaves it to you ( below Mach 1 usually )

For the sideslip, could you provide more useful informations than just a feeling with the external view.
Like in debug/Jsbsim/Fdm /aero : there is the instantaneous sideslip value in it.


You might experienced some weather related thing, as it appears that you have some tailwindand cross wind ( the crabbing feeling in final is more related to the shuttle pointing into the wind with a zero sideslip)
You might try basic weather and the fair weather metar from the launch window.
Be sure that nothing is running under the hood weather wise
Last edited by GinGin on Mon Jan 25, 2021 7:00 am, edited 1 time in total.
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Sun Jan 24, 2021 11:05 am

Bloody hell, look at that!! --->


Image


Do you see the bug? The weather reports 0knot of wind, the HUD report 70knots. The Shuttle front gear is not even touching the ground and got flipped by 180 degrees at the end of the runway... You're right, the weather is screwed!!! It explains everything, the overspeed at landing time, including the crabbing during the HAC. Lol, 70 knots.... :)

I'll dig into the bug...
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Sun Jan 24, 2021 11:15 am

70 kts of tailwind explains everything indeed.
Just remove Live data , I remember bugs as been reported in the past .
And there is something to dig with live data setting .
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Sun Jan 24, 2021 11:32 am

For CSS, you should take it earlier than when the AP leaves it to you ( below Mach 1 usually )


Yes, I did that just for being sure that my CSS flying was not inducing the overshot of the HAC.

just remove Live data , I remember bugs as been reported in the past .


All right, tested with High Pressure Core scenario, everything works as expected. I'll report the pb with Live Data on the mailing list!

Thanks for the helping!
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Mon Jan 25, 2021 7:03 am

eatdirt wrote in Sun Jan 24, 2021 11:32 am:
Thanks for the helping!


Glad to help.
No breakage in dev version then ... ;)
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby Thorsten » Mon Jan 25, 2021 7:24 am

And there is something to dig with live data setting .


I commented an analysis on the mailing list - it's a bit exotic...
Thorsten
 
Posts: 11876
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Bugfixes

Postby eatdirt » Wed Jan 27, 2021 10:15 pm

All right, further tests, I crashed the DPS in trying to cancel an OMS-2 burn in OPS 105 (devel HEAD). This one might be link to some DPS logic changes?

---

Code: Select all
 ITEM 22
 1603.79 [INFO]:nasal      Current state vector:
 1603.79 [INFO]:nasal      x: 13908901.57322282 y: 2409127.269718381 z: 16268488.06817857
 1603.79 [INFO]:nasal      vx: 2228.760476757521 vy: 24998.94232652134 vz: -4999.159538266322
 1603.79 [INFO]:nasal      t: 0
 1603.79 [INFO]:nasal      Current position:
 1603.79 [INFO]:nasal      lat: 49.05216122431504 lon: 3.892833575539558
 1603.79 [INFO]:nasal
 1603.79 [ALRT]:nasal      Nasal runtime error: floating point error in math.sqrt()
 1603.79 [ALRT]:nasal        at /home/chris/.Aircraft/SpaceShuttle/Nasal/orbital_targeting.nas, line 217
 1603.79 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/oms_burn_logic.nas, line 265
 1603.79 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/oms_burn_logic.nas, line 226
 1603.79 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/dps_command_parser.nas, line 2201
 1603.79 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/dps_command_parser.nas, line 1163
 1603.79 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/dps_command_parser.nas, line 738
 1603.79 [ALRT]:nasal        called from: , line 5



PS: I have opened a bug report for the wind when livedata fails: https://sourceforge.net/p/flightgear/codetickets/2537/
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Thu Jan 28, 2021 9:22 am

@EatDirt:

That might be coming from that commit :

https://sourceforge.net/p/fgspaceshuttledev/code/ci/6eb9f4eb6481390f0b434f1d71d581f212924706/#diff-2

At first glance, I don’t think it is linked to your error.


Ops105, I assume you where working on the PASS DPS and that you loaded a peg 7 target ?
Did you enter a TIG or did you leave it to zero for an instantaneous burn ? ( item 10)
Could you try again to load /unload to reproduce the error ?

While doing that, could you monitor the state of the following value in the debug menu :

Fdm/jsbsim/systems/ap/oms-plan/burn-plan-available

When you load the first time with item 22, it should go from zero to one
When you cancel , it should go from one to zero.
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Thu Jan 28, 2021 11:57 am

Hi Gingin,
thanks, I'll have a careful look to it and the commits to sort out a method to reproduce.

But I am wondering if this is not related to the resetting of DeltaV to 0.0 when you cancel? This is new, but is it justified? The previous behavior was to let the former loaded values in the field (which I kind of remember this is also mentioned in the SCOM). Now as soon as you press ITEM 22 for cancelling, it goes to 0. Do you observe this as well?

PS: Completely different thing, I did play some aborts as well yesterday, and on BFS OPS 104, I was unable to change the roll (ITEM 5) from 180 degrees to 0. Could someone confirm this as well?

Cheers,
Chris.
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Thu Jan 28, 2021 1:37 pm

@EatDirt

I don’t know if this is justified but the real logic is quite complex and not too much detailed concerning that specific point .
I chose to reset peg4/7 global hash variables to zero when item 22 cancelled is depressed to avoid some mess with older values when new solution is loaded .
Better starting from scratch bug wise, and it is not in my opinion too demanding to re enter one item.
It is easy to change that in the future if the current logic is bug free.


For the rest, the logic is exact.
Quickly ( full logic is detailed through dictionary and Scom ) :

Either peg 7 or 4 values are displayed ( mutually exclusive )
If peg 4 is entered and converged, peg 7 values are then visible.

Target values are displayed when solution is loaded for peg 7 and /or converged for peg 4
Delta velocities stay at the end of burn until an ops or mm change /recall or another solution is loaded.

Load is blinking when no solution is loaded .
It does not blink when loaded or burn is finished.
And some other details like those.



Concerning the bfs thing, Thorsten coded it as intended .
No item 5 change is allowed in bfs mm 104 ( DPS dictionary 3-7)
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Thu Jan 28, 2021 7:27 pm

All right, thanks for the explanations, also for BFS mm104, I don't use that one often :)

chose to reset peg4/7 global hash variables to zero when item 22 cancelled is depressed to avoid some mess with older values when new solution is loaded .


Ah ah, in fact, that is the indirect cause of the bug, I can reproduce, it is funny :)

I am not running LEO so I am iterating a few times the LOAD to get good TIG. Before the PEG-7 parameters were not resetted. What happened is that, by cancelling my burn, DeltaVx went to 0, I changed TIG and loaded a burn with 0 velocity (did not check DeltaVx as it used to remain at the previous entered value). This triggers the Nasal error and crashes the DPS.

I'll try to see what the SCOM is saying about resetting or not, but the null case should be dealt with. Personally, I think that was more user friendly before, especially if you iterate a few times over 1 or 2 variables, It is quite a pain and time consuming to re-enter all the PEG-7 each time :-/

Edit: Yes, it is not reset! The fields should remain at their previous entered values.

The more complicated logic if we want to be exactly like the real thing is that there is not such an option as "Cancel". As soon as you entered a new data, the load button flashes, and pressing it again once is enough.
In fact, what it does is taking the entered data and send them to GNC. The flashing simply helps (rather forces) you to see that some input has been changed and that a new LOAD is required to send updated data.

From 359895main_DPS_G_K_7.pdf

Any data being displayed in the PEG 7 slots will
then be replaced with the entered data, and/or the latest previous PEG 7 target data (Not
supported by BFS). All targeting inputs are sent to guidance upon execution of LOAD (item 22).
After the LOAD item has been executed, any data changed which require the LOAD to be
executed for recognition causes the word ‘LOAD’ to flash. The burn is not enabled until item 22
is executed again and ‘LOAD’ stops flashing.


Cheers,
Chris.

PS: One page got me to learn that the IDP were running on 386, I though it would have been some hardened whatever microprocessor of that time, but no, stock CPU (https://en.wikipedia.org/wiki/Intel_80386)
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby GinGin » Thu Jan 28, 2021 8:21 pm

Let’s try with no reset like before when item 22 is cancelled first .
I am aware for the real logic with flashing/ steady . That will be for later :)
I will fix the division by zero also.
GinGin
 
Posts: 1251
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Bugfixes

Postby eatdirt » Thu Jan 28, 2021 8:34 pm

Cool, thanks!!!
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Bugfixes

Postby eatdirt » Thu Jan 28, 2021 11:33 pm

I am flying the monster these days, trying to visit ISS. So, I've encountered another issue crashing the DPS, just after reconfiguring the GPC to transit to MM201 (I am doing the realistic version).

Code: Select all
 Nasal runtime error: non-objects have no members
 5103.26 [ALRT]:nasal        at /home/chris/.Aircraft/SpaceShuttle/Nasal/PFD/p_meds_autonomous.nas, line 24
 5103.26 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/PFD/MFD_Generic.nas, line 92
 5103.26 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/PFD/MFD_Generic.nas, line 292
 5103.26 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/PFD/PFD_main.nas, line 996
 5103.26 [ALRT]:nasal        called from: /home/chris/.Aircraft/SpaceShuttle/Nasal/PFD/PFD_main.nas, line 1233


This was happening at the end, I've moded GPC 3 to halt, and just switched off IDP3. The usual thing that used to happen is that the commander left-most and pilot right-most MEDS go black with the IDP3. Changing the port on each of them bring them back.
What happened now was that the commander left-most MED was still on, but the pilot right-most MED was off. So I went to change the port on the pilot MED, and got the crash displayed above! So maybe something got screwed in the port or the FC?

I'll try to reproduce, but that is not an easy one :)

PS: Does the command GPC/CRC X 0 exist? Edit, moron me, that is GPC/CRC 0 X, not flying the Shuttle for 2 months, and that's it, Grandpa goes on board :)
Last edited by eatdirt on Fri Jan 29, 2021 12:43 pm, edited 3 times in total.
eatdirt
 
Posts: 772
Joined: Wed Aug 15, 2018 2:06 pm

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 2 guests