public BurnEditor() { Δv_tangent_ = new DifferentialSlider(label : "Δv tangent", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate); Δv_normal_ = new DifferentialSlider(label : "Δv normal", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate); Δv_binormal_ = new DifferentialSlider(label : "Δv binormal", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate); initial_time_ = new DifferentialSlider( label : "t initial", unit : null, log10_lower_rate : Log10TimeLowerRate, log10_upper_rate : Log10TimeUpperRate, min_value : 0, max_value : double.PositiveInfinity, formatter : value => FormatTimeSpan( TimeSpan.FromSeconds(value))); }
public BurnEditor(PrincipiaPluginAdapter adapter, Vessel vessel, double initial_time, int index, Func <int, BurnEditor> get_burn_at_index) { adapter_ = adapter; vessel_ = vessel; initial_time_ = initial_time; this.index = index; get_burn_at_index_ = get_burn_at_index; Δv_tangent_ = new DifferentialSlider( label: L10N.CacheFormat("#Principia_BurnEditor_ΔvTangent"), unit: L10N.CacheFormat("#Principia_BurnEditor_SpeedUnit"), log10_lower_rate: log10_Δv_lower_rate, log10_upper_rate: log10_Δv_upper_rate, text_colour: Style.Tangent); Δv_normal_ = new DifferentialSlider( label: L10N.CacheFormat("#Principia_BurnEditor_ΔvNormal"), unit: L10N.CacheFormat("#Principia_BurnEditor_SpeedUnit"), log10_lower_rate: log10_Δv_lower_rate, log10_upper_rate: log10_Δv_upper_rate, text_colour: Style.Normal); Δv_binormal_ = new DifferentialSlider( label: L10N.CacheFormat("#Principia_BurnEditor_ΔvBinormal"), unit: L10N.CacheFormat("#Principia_BurnEditor_SpeedUnit"), log10_lower_rate: log10_Δv_lower_rate, log10_upper_rate: log10_Δv_upper_rate, text_colour: Style.Binormal); previous_coast_duration_ = new DifferentialSlider( label: L10N.CacheFormat("#Principia_BurnEditor_InitialTime"), unit: null, log10_lower_rate: log10_time_lower_rate, log10_upper_rate: log10_time_upper_rate, // We cannot have a coast of length 0, so let's make it very // short: that will be indistinguishable. zero_value: 0.001, min_value: 0, formatter: FormatPreviousCoastDuration, parser: TryParsePreviousCoastDuration, field_width: 7) { value = initial_time_ - time_base }; reference_frame_selector_ = new ReferenceFrameSelector( adapter_, ReferenceFrameChanged, L10N.CacheFormat("#Principia_BurnEditor_ManœuvringFrame")); reference_frame_selector_.SetFrameParameters( adapter_.plotting_frame_selector_.FrameParameters()); ComputeEngineCharacteristics(); }
public BurnEditor(PrincipiaPluginAdapter adapter, Vessel vessel, double initial_time, int index, BurnEditor previous_burn) { adapter_ = adapter; vessel_ = vessel; initial_time_ = initial_time; index_ = index; previous_burn_ = previous_burn; Δv_tangent_ = new DifferentialSlider(label: "Δv tangent", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: Style.Tangent); Δv_normal_ = new DifferentialSlider(label: "Δv normal", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: Style.Normal); Δv_binormal_ = new DifferentialSlider(label: "Δv binormal", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: Style.Binormal); previous_coast_duration_ = new DifferentialSlider( label: "t initial", unit: null, log10_lower_rate: Log10TimeLowerRate, log10_upper_rate: Log10TimeUpperRate, // We cannot have a coast of length 0, so let's make it very // short: that will be indistinguishable. zero_value: 0.001, min_value: 0, formatter: FormatPreviousCoastDuration, parser: TryParsePreviousCoastDuration, field_width: 7) { value = initial_time_ - time_base }; reference_frame_selector_ = new ReferenceFrameSelector( adapter_, ReferenceFrameChanged, "Manœuvring frame"); reference_frame_selector_.SetFrameParameters( adapter_.plotting_frame_selector_.FrameParameters()); ComputeEngineCharacteristics(); }
public FlightPlanner(PrincipiaPluginAdapter adapter) : base(adapter) { adapter_ = adapter; final_time_ = new DifferentialSlider( label: "Plan length", unit: null, log10_lower_rate: log10_time_lower_rate_, log10_upper_rate: log10_time_upper_rate_, min_value: 10, max_value: double.PositiveInfinity, formatter: FormatPlanLength, parser: TryParsePlanLength); }
public BurnEditor(PrincipiaPluginAdapter adapter, IntPtr plugin, Vessel vessel, double initial_time) { Δv_tangent_ = new DifferentialSlider(label : "Δv tangent", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate, text_colour : XKCDColors.NeonYellow); Δv_normal_ = new DifferentialSlider(label : "Δv normal", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate, text_colour : XKCDColors.AquaBlue); Δv_binormal_ = new DifferentialSlider(label : "Δv binormal", unit : "m / s", log10_lower_rate : Log10ΔvLowerRate, log10_upper_rate : Log10ΔvUpperRate, text_colour : XKCDColors.PurplePink); initial_time_ = new DifferentialSlider( label : "t initial", unit : null, log10_lower_rate : Log10TimeLowerRate, log10_upper_rate : Log10TimeUpperRate, min_value : 0, max_value : double.PositiveInfinity, formatter : value => FlightPlanner.FormatTimeSpan( TimeSpan.FromSeconds( Planetarium.GetUniversalTime() - value))); initial_time_.value = initial_time; reference_frame_selector_ = new ReferenceFrameSelector( adapter, plugin, ReferenceFrameChanged, "Manœuvring frame"); plugin_ = plugin; vessel_ = vessel; adapter_ = adapter; reference_frame_selector_.Reset( adapter_.plotting_frame_selector_.get().FrameParameters()); ComputeEngineCharacteristics(); }
public BurnEditor(PrincipiaPluginAdapter adapter, IntPtr plugin, Vessel vessel, double initial_time) { Δv_tangent_ = new DifferentialSlider(label: "Δv tangent", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: XKCDColors.NeonYellow); Δv_normal_ = new DifferentialSlider(label: "Δv normal", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: XKCDColors.AquaBlue); Δv_binormal_ = new DifferentialSlider(label: "Δv binormal", unit: "m / s", log10_lower_rate: Log10ΔvLowerRate, log10_upper_rate: Log10ΔvUpperRate, text_colour: XKCDColors.PurplePink); initial_time_ = new DifferentialSlider( label: "t initial", unit: null, log10_lower_rate: Log10TimeLowerRate, log10_upper_rate: Log10TimeUpperRate, min_value: 0, max_value: double.PositiveInfinity, formatter: value => FlightPlanner.FormatTimeSpan( TimeSpan.FromSeconds( Planetarium.GetUniversalTime() - value))); initial_time_.value = initial_time; reference_frame_selector_ = new ReferenceFrameSelector( adapter, plugin, ReferenceFrameChanged, "Manœuvring frame"); plugin_ = plugin; vessel_ = vessel; adapter_ = adapter; reference_frame_selector_.Reset( adapter_.plotting_frame_selector_.get().FrameParameters()); ComputeEngineCharacteristics(); }
public FlightPlanner(PrincipiaPluginAdapter adapter, PredictedVessel predicted_vessel) : base(adapter, predicted_vessel) { adapter_ = adapter; predicted_vessel_ = predicted_vessel; final_time_ = new DifferentialSlider( label: "Plan length", unit: null, log10_lower_rate: log10_time_lower_rate_, log10_upper_rate: log10_time_upper_rate_, min_value: 10, max_value: double.PositiveInfinity, formatter: FormatPlanLength, parser: TryParsePlanLength, field_width: 7); final_trajectory_analyser_ = new PlannedOrbitAnalyser(adapter, predicted_vessel); }
public FlightPlanner(PrincipiaPluginAdapter adapter, IntPtr plugin) : base(adapter) { adapter_ = adapter; plugin_ = plugin; window_rectangle_.x = UnityEngine.Screen.width / 2; window_rectangle_.y = UnityEngine.Screen.height / 3; final_time_ = new DifferentialSlider( label: "Plan length", unit: null, log10_lower_rate: Log10TimeLowerRate, log10_upper_rate: Log10TimeUpperRate, min_value: 10, max_value: double.PositiveInfinity, formatter: value => FormatPositiveTimeSpan( TimeSpan.FromSeconds( value - plugin_.FlightPlanGetInitialTime( vessel_.id.ToString())))); }
public FlightPlanner(PrincipiaPluginAdapter adapter, IntPtr plugin) : base(adapter) { adapter_ = adapter; plugin_ = plugin; window_rectangle_.x = UnityEngine.Screen.width / 2; window_rectangle_.y = UnityEngine.Screen.height / 3; final_time_ = new DifferentialSlider( label : "Plan length", unit : null, log10_lower_rate : Log10TimeLowerRate, log10_upper_rate : Log10TimeUpperRate, min_value : 10, max_value : double.PositiveInfinity, formatter : value => FormatPositiveTimeSpan( TimeSpan.FromSeconds( value - plugin_.FlightPlanGetInitialTime( vessel_.id.ToString())))); }