Jump to content

maisvendoo

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by maisvendoo

  1. This is a good idea, it'll work with Solar System, if kerbal.xml to edit. But this program work with Kerbal's calendar only: 6 hours in day and 426 days in year are hard-coded in current version. This code Calendar.cs public class KCalendar { public const int Days = 426; public const int Hours = 6; public const int Mins = 60; public const int Secs = 60; public static double date_to_sec(int year, int day, int hour, int min, int sec) { return 9201600.0 * (year - 1) + 21600.0 * (day - 1) + 3600.0 * hour + 60.0 * min + sec; } public static void sec_to_date(double t, ref KDate date) { int sYear = Days * Hours * Mins * Secs; int sDay = Hours * Mins * Secs; int sHour = Mins * Secs; int sMin = Secs; date.year = Convert.ToInt32(Math.Truncate(t / sYear)) + 1; date.day = Convert.ToInt32(Math.Truncate( (t - (date.year-1)*sYear) / sDay)) + 1; date.hour = Convert.ToInt32(Math.Truncate((t - (date.year - 1) * sYear - (date.day - 1) * sDay) / sHour)); date.min = Convert.ToInt32(Math.Truncate((t - (date.year - 1) * sYear - (date.day - 1) * sDay - date.hour * sHour) / sMin)); date.sec = Convert.ToInt32(Math.Truncate(t - (date.year - 1) * sYear - (date.day - 1) * sDay - date.hour * sHour - date.min * sMin)); } public static void DeltaDate(double t, ref KDate date) { int sYear = Days * Hours * Mins * Secs; int sDay = Hours * Mins * Secs; int sHour = Mins * Secs; int sMin = Secs; date.year = Convert.ToInt32(Math.Truncate(t / sYear)); date.day = Convert.ToInt32(Math.Truncate((t - (date.year) * sYear) / sDay)); date.hour = Convert.ToInt32(Math.Truncate((t - (date.year) * sYear - (date.day ) * sDay) / sHour)); date.min = Convert.ToInt32(Math.Truncate((t - (date.year) * sYear - (date.day) * sDay - date.hour * sHour) / sMin)); date.sec = Convert.ToInt32(Math.Truncate(t - (date.year) * sYear - (date.day) * sDay - date.hour * sHour - date.min * sMin)); } } must be changed to Solar system transfer calculations
  2. Which orbit you mean? All bodies data are in file cfg/kerbal.xml. You can change it, if you want manualy. This file is generated from game by my small plugin, because there are no config file with bodies data in game.
  3. Today I can introduce new version of Strargazer interplanetary calculator. Changes in version 0.1.0 1. Greek letters in user interface 2. Calculation of launch data and launch azimuth for assent to low orbit. You can set coordinates of launchpad (KSC launchpad as default) 3. Fixed some small bugs in user interface and calculation algorithm You can download it here Screenshot
  4. Hello! I want introduce the first beta-version of the program for interplanetary transfer trajectory calculation. It can: 1. Orbital position of the panet or moon for any time moment 2. Elliptic (parabolic and hyperbolic for external planets or moons) transfer trajectory between planets or two moons 3. Eject manuever from departure planet/moon from low orbit 4. Low orbit parameters (inclination, longtitude of ascending node, argument of periapsis) Today all calculation are executed for celestial bodies with same reference body Screenshot You can dowload this utility here Source code awayable at GitHub Short manual 1. Change depature and arrival celestial bodies. Warning: both bodies must have same reference body (from Kerbin to Duna, or from Mun to Minmus, for example). Transfer from planet to it's moon is imposible now. 2. Change time interval for transfer window search. 3. Set low orbit altitude near departure body. 4. Click "Search" button. 5. Set Psi angle for reach minimal delta V. You can increment and decrement Psi by "+" and "-" buttons with custom step. You trajectory is recalculated automaticaly Scheme of interpanetary trajectory calculation Green plane - departure planet orbit Yellow plane - arrival planet orbit Red plane - transfer orbit Lambda_err - error of ecliptic longtiture at arrival time. If transref orbit is good, Lambda_err = 0 vK - departure planet velocity veclor vA - transfer trajectory velocity vector at departure time v_rho - departure body SOI escape velocity It is only beta-version for first testing. Today it is a external program, but it will be developed as mode for KSP. P.S.: Sorry my very bad english
×
×
  • Create New...