917 downloads
Auto Credit Based on Jrhartle87's Luna Lander -- Auto Program

Hello!

This is my most refined Auto Luna lander. The program has been meticulously written over the course of several months. I've added a lot of immersive features to the vizzy, including texts to display mission status, and a few cameras to see the mission from different angles. The biggest change is a program to reliably launch at the correct time, and perform a TLI at the appropriate time so that the craft always gets to Luna on the first attempt. Previous uploads of this craft would just launch and perform the TLI at random times, causing the craft to sometimes have to orbit several times before it was caught by lunas gravity. All you have to do is select activation group 1 to start the program, and the vizzy program will take you all the way to the Luna surface. The craft has two Astronauts on board to explore the surface of Luna. Lastly, the small satellite on the end of the Luna Lander was not made by me. The credit goes to @Rizkyman. It's just a neat little addition, and doesn't effect the program.

This program will automatically-
1. Find an optimal launch window
2. Launch the craft
3. Establish a circular orbit around Droo
4. Perform a Trans lunar Injection
5. Detect luna SOI
6. Establish orbit around Luna
7. Perform a Deorbit burn
8. Land luna, at random site

Bugs-

Even though I've tested the program several times, every once in a while random bugs occur. It happens about 5-10% of the time. I've refined this as best I can, and I dont think there are reliable solutions to some of these bugs. I think it's mostly because of quirks of the game engine. If there are things that you think I could improve, please feel free to leave a comment and let me know.

Known, but rare issues-
1. Upon establishing a trans luna injection, the program mistakes which side of Luna the approach is on.
2. Upon reaching the first burn node to orbit Luna, the time warp doesn't change to normal time. This causes the burn to not occur, due to engines not firing while game is warping. Fix: Hopefully you catch it in time to select normal game speed, otherwise just restart.
3. During the primary retrograde burn to land on Luna, the first burn checkpoint isnt registered, causing the craft to crash into the ground.
4. Since the surface of Luna is not flat, the AGL (above ground level) detection during landing gets confused. This is due to the fact that I didn't write the landing program as an algorithm, and instead opted to just fire the engines at specific times. If the craft is landing on a mountain side, or a deep valley, the program will sometimes fail to detect the surface and the engines won't shut off, or shut off too early. I originally wanted to import @Rizkyman's suicide burn program, but I wanted to keep the whole vizzy program original. This is the only bug that there is likely a better solution for, I just haven't thought of it.

I hope you enjoy this program!

GENERAL INFO

PERFORMANCE

  • Total Delta V: 6.0km/s
  • Total Thrust: 8.1MN
  • Engines: 14
  • Wet Mass: 2.94E+5kg
  • Dry Mass: 29,443kg

STAGES

Stage Engines Delta V Thrust Burn Mass
1 1 1.2km/s 2.1MN 2.3m 2.94E+5kg
2 2 1.4km/s 5.2MN 57s 2.94E+5kg
4 4 2.4km/s 189kN 3.9m 28,663kg
5 2 1.0km/s 57kN 2.0m 7,886kg

10 Comments

  • Log in to leave a comment
  • Profile image

    I’ve never given a bad review before, but I have launched this craft many times and it lifts off before the clock says so, it separates the side boosters literally 1 second after liftoff, doesn’t provide enough thrust to even gain more altitude after launch. I’m not saying the craft is bad it’s awesome it really is, it’s just the vizzy program that needs some work. Keep up all the hard works you’ve been doing!

    11 months ago
  • Profile image

    Woah dude, this is some serious programming! Great job.

    +1 3.9 years ago
  • Profile image

    @gamerhater dont worry too much. Look at the vizzy I wrote. I wrote it with a complete lack of understanding of the system. So what you'll see is a program that was written solely for one purpose. As such, the coding is pretty straightforward. Step by step instructions for a craft specifically designed for going to the moon. But, without complicated maths and such. I think that if you look at what I wrote, it'll give you a good understanding of what I tried to do.

    3.9 years ago
  • Profile image

    @Patelsh24 my best advice is to either download crafts from more studied users, or rely on simple trial and error. Vizzy requires you to have at least a basic understanding of both coding, and orbital mechanics. I'm sorry that's not exactly what you asked, but it's the best I can do. What i will say is that the program that i wrote was based solely on trial and error. I built the craft, and then wrote the vizzy step by step. I modified the craft as necessary to do certain tasks I codee into the vizzy. Some pretty good users to look into for inspiration and guidance on to how to write a vizzy program are @kel and @rizkyman

    +1 3.9 years ago
  • Profile image
    6,715 Patelsh24

    @Jrhartle87 so if I were to just target Luna and then lock heading to target. Then I would wait until my pitch is under 3 or -3. And then either burn until my orbit height is correct or calculate the height of lunas orbit once be orbit aligns to tell my craft when to stop burning, do you think that would work?

    +1 3.9 years ago
  • Profile image

    You just made vizzy seem like an easy concept but I still don’t understand vizzy in the slightest xD @Jrhartle87

    +1 3.9 years ago
  • Profile image

    @Patelsh24 so this one is a bit tricky. At first, I was using a preset code that measures the angle between the craft, and the target. In this case the target would be Luna. Using this, I could tell the program to begin the TLI burn once Luna is at a specific angle on the horizon relative to the craft. Depending on the craft, this angle would be about 125 degrees. I chose not to use this method however because two problems occurred. First, there seems to be a bug in the game that when you use that piece of block coding, it screws up several blocks of code following it, especially wait times and time warps. Second, the degrees the game calculates only go up to 180, and then back down to zero. So there are two instances of every degree, except for 0 and 180. This causes issues since I cannot predict which degree will occur first.

    So, instead, I aligned Luna to be directly overhead at the start of the mission before launch. And since the craft always orbits in the same direct, and then establishes a near circular orbit, I can predict where Luna will be upon establishing that orbit. Then it was just a matter of warping and then waiting a specific number of minutes (around 27). Since the game doesn't let me write time down in minutes, I had to calculate the time in seconds. So, 27x60, which equals 1620. Once that time elapses, luna will be in pretty the same spot every time on the horizon every time. Then the TLI burn happens.

    Sorry that was alot, but that's how I do it.

    +1 3.9 years ago
  • Profile image
    6,715 Patelsh24

    @Jrhartle87 also can you explain in layman’s terms, how to calculate the transfer window for a TLI?

    +1 3.9 years ago
  • Profile image

    @Patelsh24 it calculates the percent at which the current apogee is compared to the apogee needed to reach Luna. Its sole purpose is to display the progress for the TLI.

    +1 3.9 years ago
  • Profile image
    6,715 Patelsh24

    What does TLi apogee indicator do?

    3.9 years ago

5 Upvotes

Log in in to upvote this post.