Board index FlightGear Development Spaceflight

Vostok-1 Stuck in Orbit

Discussion about development and usage of spacecraft

Vostok-1 Stuck in Orbit

Postby CosmonautSanchezki » Wed Mar 28, 2018 5:14 pm

I realize I am likely the only person who regularly flies the Vostok-1, but I'm posting this up here in case anyone can help and also just to share.

I've achieved a stable orbit with Vostok-1 on FG several times, but usually, somewhere in the first orbit, FG crashes.

This time, I've achieved a stable orbit, and FG hasn't crashed even after 3 orbits. Sounds great, right?

Well, when I went to ignite the TDU for the first time, just to adjust the orbit slightly, CAPS LOCK. WAS. ON.

That means I separated the TDU while in a stable orbit. I have no idea when this thing is coming down.

I can't imagine there is any way to make this thing deorbit without the TDU. I'm afraid I'm just going to have to wait for the orbit to degrade.

I didn't mean to do this, but I may be the record holder for most orbits in this spacecraft on FG. I'll update with my final orbit count.

Bets on whether FG crashes first or my orbit degrades?
CosmonautSanchezki
 
Posts: 4
Joined: Wed Mar 28, 2018 5:05 pm

Re: Vostok-1 Stuck in Orbit

Postby abassign » Thu Mar 29, 2018 6:49 am

Hello,
your observation is interesting, but the Vostok-1 autopilot I think it needs a deep redefinition. My feeling is that they lack basic parameters on the aerodynamics of the R7 rocket and that I'm trying desperately to find in these.
Certainly the problems you have encountered, and that I have also noticed, are due to an accumulation of errors that lead to more correct values that give rise to variables that are no longer compatible with the system. Honestly, I only simulated years ago, guided missiles (V2 for example), and I noticed the importance of the initial values in order to have a good simulation. Theoretically, the orbital flight is simpler than the one that operates in the atmosphere, but is affected by the accumulation of errors. Probably the use of procedures in NASAL, which has a low refresh rate, equal to the frame rate, can lead to problems. I will try, to understand the origin of the instability, to enhance the frame rate, at least at 60 fps (60 Hz) which is half of the 120 Hz of the Jsbsim used.
I suggest you move the discussion in the development forum in order to have a greater number of interested users who can intervene to give advice and maybe to modify a part of the code.
I have a great desire to help put Vostok-1 in place, as it is the prototype of any rocket flying out of the atmosphere. I took a look at the code of the programs that allow the shuttle that seems to have a good ballistic flight, but it is so chaotic, that it seems easier to do everything in a more orderly, perhaps starting from the Jsbsim that is the key to everything and has a rather high calculation speed that should reduce the problem of simulation stability.

Some test

I wanted to try Vostok-1 at high frame rates (60 Hz) ... my surprise was great when I saw that the carrier rocket (second stage) did not separate from the third stage! While with 20 Hz framerate this detachment takes place regularly!

Image

But after about 20 minutes of regular operation ... a crash interrupted the flight!

Image

I then repeated the test, I removed the orbital rendering and kept the window larger to have a lower frame rate (about 30-45 Hz) in the first phase of flight. In this test there was the regular detachment between the missile stages. This means that if you start with a very high frame rate (50-60 Hz), something in the NASAL program will not work properly.

The moment of the launch (frame rate 30 Hz):

Image

1-2 minute after, the heart is more far .. the frame rate is 45 Hz

Image

When the second stage is flying alone the frame rate is 60 Hz (maximum frame rate for this FGFS configuration):

Image

Toward the end of the combustion of the second stage (maximum acceleration 3.5 G) a strange fact takes place: The missile begins to change attitude and becomes vertical, but not only :shock: ... It becomes negative, as if it were to slow down because of too high orbital speed.

Image

Rocket negative inclination: :(

Image

Then occurs the detachment of the third stage, also here, according to me, now that the speed is orbital, then the third stage is only a hint to start the engine and then disengages the space capsule.

Image

Detachment of the space capsule from the third stage:

Image

Finally the capsule is free, the frame rate is always 60 Hz even with a rather expanded video .... but ... 30 minutes later ...

Code: Select all
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
AI error: Aircraft without traffic record is signing off from approach at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1711


CosmonautSanchezki wrote in Wed Mar 28, 2018 5:14 pm: ...

Do you report the same problem too? I'm curious :roll:
Last edited by abassign on Thu Mar 29, 2018 11:53 am, edited 2 times in total.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Vostok-1 Stuck in Orbit

Postby Thorsten » Thu Mar 29, 2018 7:40 am

I took a look at the code of the programs that allow the shuttle that seems to have a good ballistic flight, but it is so chaotic, that it seems easier to do everything in a more orderly, perhaps starting from the Jsbsim that is the key to everything


Hint: The Shuttle DAP already starts from JSBSIm - and so does the Vostok AP. Seems you need to look harder...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Vostok-1 Stuck in Orbit

Postby wkitty42 » Thu Mar 29, 2018 5:30 pm

abassign wrote in Thu Mar 29, 2018 6:49 am:
Code: Select all
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
AI error: Aircraft without traffic record is signing off from approach at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1711


why are you running AI craft when you're on a space mission?

i've not seen that error with the AI and i run a lot of AI stuffs... i'm not sure what it means other than you apparently have an AI craft that doesn't have, as noted, a "traffic record"... i don't know if that means "flight schedule" or if it is something else...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Vostok-1 Stuck in Orbit

Postby Thorsten » Thu Mar 29, 2018 7:11 pm

Toward the end of the combustion of the second stage (maximum acceleration 3.5 G) a strange fact takes place: The missile begins to change attitude and becomes vertical, but not only :shock: ... It becomes negative, as if it were to slow down because of too high orbital speed.


I guess you're breaking it via g-force overstress... thruster failures, loss of control etc....

Generally, if an AP is trying to kill you - simply don't let it - disengage it before it has a chance to finish you off. I never get why people let autopilots crash their craft and complain rather than do the obvious thing...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Vostok-1 Stuck in Orbit

Postby wkitty42 » Thu Mar 29, 2018 7:30 pm

the obvious thing? do you mean turn off the AP and kill yourself your self while attempting to recover manually? :mrgreen:
Last edited by wkitty42 on Thu Mar 29, 2018 10:40 pm, edited 1 time in total.
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Vostok-1 Stuck in Orbit

Postby abassign » Thu Mar 29, 2018 10:04 pm

Tonight I tried a launch of Vostok 1, the first launch is mysteriously aborted ... it almost always happens when I make the first launch of the evening ... Then at the second launch everything went well, I was in orbit, but 20 minutes. .. here is the error that blocks all processes:

Code: Select all
input is NaN.
input is NaN.
input is NaN.
input is NaN.
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
Nasal getprop: property /fdm[0]/jsbsim[0]/accelerations[0]/Nz[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/atmosphere[0]/P-psf[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/accelerations[0]/Nz[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/mach[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/vt-fps[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/v-down-fps[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/position[0]/h-sl-ft[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/position[0]/h-agl-ft[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/aero[0]/qbar-modified-kgm2[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/p-aero-rad_sec[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/q-aero-rad_sec[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/r-aero-rad_sec[0] is NaN
PT_vs_hpt: ran out of layers for h=-nan
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
input is NaN.
input is NaN.
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
input is NaN.
input is NaN.
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
input is NaN.
input is NaN.
...
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
PT_vs_hpt: ran out of layers for h=-nan
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
input is NaN.
input is NaN.
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
input is NaN.
input is NaN.
PT_vs_hpt: ran out of layers for h=-nan
input is NaN.
input is NaN.
...
input is NaN.
input is NaN.
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
AI error: Aircraft without traffic record is signing off from approach at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1711

Note:
Here the program is permanently blocked,
Nothing can be done except a laconic CTRL-C


The error can be localized from these parts:

File: flightgear/src/ATC/trafficcontrol.cxx:1663

Code: Select all
{
    TrafficVectorIterator i = activeTraffic.begin();
    // Search search if the current id has an entry
    // This might be faster using a map instead of a vector, but let's start by taking a safe route
    TrafficVectorIterator current, closest;
    if (! activeTraffic.empty()) {
        //while ((i->getId() != id) && i != activeTraffic.end()) {
        while (i != activeTraffic.end()) {
            if (i->getId() == id) {
                break;
            }
            i++;
        }
    }
//    // update position of the current aircraft
    if (i == activeTraffic.end() || activeTraffic.empty()) {
        SG_LOG(SG_ATC, SG_ALERT,
               "AI error: updating aircraft without traffic record at " << SG_ORIGIN);
    } else {
        i->setPositionAndHeading(lat, lon, heading, speed, alt);
        current = i;
    ...


and in this area:

File: flightgear/src/ATC/trafficcontrol.cxx:1711

Code: Select all
void FGApproachController::signOff(int id)
{
    TrafficVectorIterator i = activeTraffic.begin();
    // Search search if the current id alread has an entry
    // This might be faster using a map instead of a vector, but let's start by taking a safe route
    if (! activeTraffic.empty()) {
        //while ((i->getId() != id) && i != activeTraffic.end()) {
        while (i != activeTraffic.end()) {
            if (i->getId() == id) {
                break;
            }
            i++;
        }
    }
    if (i == activeTraffic.end() || activeTraffic.empty()) {
        SG_LOG(SG_ATC, SG_ALERT,
               "AI error: Aircraft without traffic record is signing off from approach at " << SG_ORIGIN);
    } else {
        i = activeTraffic.erase(i);
    }
}


The trafficcontrol.cxx module has undergone a relatively recent update: 2018-01-15 and it would not surprise me that this may be an error resulting from the changes it makes, of course it is only a consideration, but it seems that in that area the problem occurs.

I was then about an hour with the Vostok 1 program active, but on the ground, nothing happened.

I started the rocket, as usual when it is near the orbit the rocket is placed vertically and the altitude increases dramatically, at about 500 km altitude is finally released the third stage but does not turn on, and is directly released the capsule. It always happens so with the automatic control inserted!
I decide to continue the orbit, but after about 20 minutes crash the system.

Code: Select all
Starting auto-launch guidance
Autopilot signing off, have a nice flight!
AI error: updating aircraft without traffic record at /media/pc-lab01/Salvataggi/backup/fgfs/flightgear/src/ATC/GroundController.cxx:241
Segmentation fault (core dumped)


The program that release the last log is:

Code: Select all
    // update position of the current aircraft
    if (i == activeTraffic.end() || (activeTraffic.size() == 0)) {
        SG_LOG(SG_GENERAL, SG_ALERT,
               "AI error: updating aircraft without traffic record at " << SG_ORIGIN);
    } else {
        i->setPositionAndHeading(lat, lon, heading, speed, alt);
        current = i;
    }


It always seems to me the same mistake ... according to me something went "wrong" when the ATC code was changed.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Vostok-1 Stuck in Orbit

Postby Thorsten » Fri Mar 30, 2018 6:53 am

I'd do another obvious thing and switch Terrasync, AW and AI traffic off when doing orbital flights - neither system is designed for that use case and they can't be reasonably expected to handle it properly.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Vostok-1 Stuck in Orbit

Postby abassign » Fri Mar 30, 2018 9:01 pm

The missile, when the maximum acceleration has suddenly modifies its trajectory to be tangent to the orbit expected to become vertical to the orbit, having little fuel missile it is feasible, the mass to be spin is not much (Something like that does Space-X for the recovery of the first stage)

Image (This image is of a recent flight, in the example I send you, I have enabled Earthview) in this flight, but the behavior is always the same)

At this point the missile begins a vertiginous climb that leads to transfer all its kinetic energy into potential energy, reaching almost 950 Km of altitude!

Image

But then it falls back converting the potential energy into kinetic energy, in this way it approaches the earth at a speed of 8-9 Km / s

Image

At about 200 km altitude the sphere starts to become "red" and the system crashes, this time it has the crash has given more information:

Code: Select all
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
calc_bearing is not a finite number : Speed -nanpos : input is NaN.
-naninput is NaN.
input is NaN.
, -nan, waypoint: input is NaN.
45.7619input is NaN.
input is NaN.
, 9.42264
waypoint name: 'turn-123'
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
input is NaN.
AI error: updating aircraft without traffic record at /home/abassign/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1663
Nasal getprop: property /accelerations[0]/pilot-gdamped[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/accelerations[0]/Nz[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/mach[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/vt-fps[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/v-down-fps[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/position[0]/h-sl-ft[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/position[0]/h-agl-ft[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/aero[0]/qbar-modified-kgm2[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/p-aero-rad_sec[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/q-aero-rad_sec[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/velocities[0]/r-aero-rad_sec[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/accelerations[0]/Nz[0] is NaN
Nasal getprop: property /fdm[0]/jsbsim[0]/atmosphere[0]/P-psf[0] is NaN
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at pitch and gain
AL Error (sound manager): Invalid Value at position and orientation
AL Error (sound manager): Invalid Value at update
AI error: Aircraft without traffic record is signing off from approach at /home/abassign/fgfs/flightgear/src/ATC/trafficcontrol.cxx:1711


The crash could be caused by the fact that the FGFS system is operating with a set of parameters that can not be foreseen by the used NASAL and / or JSBSim programs and therefore the crash can be of two types:

Crash with system stop and exit from the program as reported in this test

Crash with infinite loop that I reported in the previous test, for which, to exit, only the CTRL-Z works

What do you think about it ?
Last edited by bugman on Fri Mar 30, 2018 9:51 pm, edited 1 time in total.
Reason: Please do not quote the entire previous post.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Vostok-1 Stuck in Orbit

Postby abassign » Sat Mar 31, 2018 12:41 am

Hi, I started to do tests making debugging code in the "auto_launch.nas" file, there are several mistakes that lead to the missile launch problems until the entry into orbit.
Now the situation of the automatic launch is improving a lot, but I would need the real parameters of Vostok 1 (thrust of vernier, angles of ascent in the various altitudes) if they exist, otherwise I will have to obtain them experimentally.

Thanks for your help
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Vostok-1 Stuck in Orbit

Postby Thorsten » Sat Mar 31, 2018 10:31 am

Since talking to you always seems to lead to talking past each other for some reason, please just prepare a merge request of whatever you think needs to be altered and I'll review that.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 2 guests