Orbiter-Forum  

Go Back   Orbiter-Forum > Far Side of the Moon > Math & Physics
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Math & Physics Mathematical and physical problems of space flight and astronomy.

Reply
 
Thread Tools
Old 03-01-2018, 10:20 PM   #1
Topper
Addon Developer

Default Formula to get required vertical acceleration for landing

I've got this method in my code to get the reqired vertical acceleration for landing for my baseland autopilot, but I can't remember what k1 and k2 are...?
Are this values good? The code is working well, but I'm not sure how i came to this values and this formular... :-(
I hope it's possible to understand the code...

"interceptAlt" is the minimum altitude between ship and ground.

Getting "HorizontalSpeed" looks like this:

v->GetHorizonAirspeedVector(horizonAirspeedVector)
HorizontalSpeed = sqrt((horizonAirspeedVector.x*horizonAirspeedVecto r.x) + (horizonAirspeedVector.z * horizonAirspeedVector.z))

Code:
double autopilot::getRequiredVerticalAcceleration(double interceptAlt)    //VERTICAL ACCELERATION PROGRAMM
{
    double t = (distanceToMaxElevation * 2) / (HorizontalSpeed);  // Time to the point with maximum elevation angle
    double k1 = 0.75;
    double k2 = -8;
    double dh = v->GetAltitude(AltitudeMode::ALTMODE_MEANRAD) - maxElevation; //Current delta between altitude and maximum elevation
    return  k2 * (k1 * t * horizonAirspeedVector.y - interceptAlt + dh) / (t*t);
}

Last edited by Topper; 03-01-2018 at 10:57 PM.
Topper is offline   Reply With Quote
Old 03-01-2018, 10:48 PM   #2
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

You mean form "Formular DIN 13312-X20 Antrag auf Bewilligung einer amtlichen Auskunft auf Geschwindigkeitsskalare entlang der lokalen Vertikalen (SI)"?



Actually, its just some sort of PI guidance with two suitably chosen arbitrary constants.

k1 is used to scale the distance travelled at the current velocity.
k2 is used to scale the acceleration needed for slowing down.
Urwumpe is offline   Reply With Quote
Thanked by:
Old 03-01-2018, 11:00 PM   #3
Topper
Addon Developer

Default

Quote:
Originally Posted by Urwumpe View Post
 You mean form "Formular DIN 13312-X20 Antrag auf Bewilligung einer amtlichen Auskunft auf Geschwindigkeitsskalare entlang der lokalen Vertikalen (SI)"?



Actually, its just some sort of PI guidance with two suitably chosen arbitrary constants.

k1 is used to scale the distance travelled at the current velocity.
k2 is used to scale the acceleration needed for slowing down.

And are this values good? How can I optimize them? Just by "Try and error"? I gues they are depending on the gravity force, the maximum hover engine acceleration and on the maximum angular acceleration of the ship... (= the ability to change the vertical acceleration) but I don't know how... Maybe it's to complate to optimize it and I let it as it is...

Last edited by Topper; 03-01-2018 at 11:11 PM.
Topper is offline   Reply With Quote
Old 03-01-2018, 11:17 PM   #4
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

They look good enough to work. Of course, there could be some clean up or switching to a better algorithm.
Urwumpe is offline   Reply With Quote
Reply

  Orbiter-Forum > Far Side of the Moon > Math & Physics


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 05:47 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.