Jump to content

Search the Community

Showing results for tags 'orbtis'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 1
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 1 result

  1. I'm calculating the time from periapsis, but for some reason it always returns me a positive number. So in this case, the calculation results correct, it gives me 5 seconds since rocket passed periapsis. However here: And in this case it also gives me 5 s since we passed periapsis, it should be -5 s ( or orbital period - 5), but no it gives me the absolute value. Here is the code ( C#) GetStaticProperties(); // Calculates all the static parameters, like eccentricity semiMajoraAxis etc double e = _eccentricity; // works fine till here trueAnomalyAtStart = -Math.Acos( Double3.Dot(_eccV, posIn) / (e * Double3.Magnitude(posIn)) ); print ( (Double3.Dot(_eccV, posIn)) / (e * Double3.Magnitude(posIn) ) ); eccentricAnomalyAtStart = 2d * Math.Atan(Math.Tan(trueAnomalyAtStart / 2d) / Math.Sqrt( (1d + e) / (1d - e) )); anomalyToPeriapsis = (eccentricAnomalyAtStart - e * Math.Sin (eccentricAnomalyAtStart)); // ^ this is the anomaly to periapsis, this is what I actually use in the orbit math timeToPeriapsis = anomalyToPeriapsis / meanMotion; // this is used just to show player time to periapsis If anyone know what the problem is, I would really apreciate it.
×
×
  • Create New...