MFD Mission Elapsed Time MFD

Pipcard

mikusingularity
Addon Developer
Donator
Joined
Nov 7, 2009
Messages
3,709
Reaction score
38
Points
88
Location
Negishima Space Center
This would be pretty nice to have if you want to keep track of how much time has gone by after you've launched.
 

Beavis

New member
Joined
Sep 5, 2014
Messages
14
Reaction score
0
Points
0
Apologies to everyone else if this is a "necropost," but this request hasn't received any responses and I only joined this board very recently.

[A mission elapsed timer MFD] would be pretty nice to have if you want to keep track of how much time has gone by after you've launched.

Seems straightforward enough ... do you still need this?
 

Aeadar

Lurker Representitive
Donator
Joined
Apr 30, 2009
Messages
456
Reaction score
3
Points
18
Well, I wouldn't mind seeing one!
 

Beavis

New member
Joined
Sep 5, 2014
Messages
14
Reaction score
0
Points
0
Well, I wouldn't mind seeing one!

OK, let me run some design ideas by you (and anyone else who wants to chime in) and get your suggestions, comments, improvements, etc.

Obviously, the timer will show elapsed time between whatever the sim's “now” is and some other “mission start” time. For example, if the sim's now is MJD 60001.50 and the mission start time is 60000.00, the timer will show “+1.500 days” or “+1:12:00:00.00” or some equivalent format. Let's call the mission start variable “met_ref_mjd” (“mission elapsed timer reference, MJD”) – in the above example, met_ref_mjd = 60000.0.

So how about this? The timer has three states:

MET_OFF: timer is inactive.

MET_ARMED: timer is off, but the moment any thrust is detected on any thruster the state is set to MET_ON and met_ref_mjd is set to the current MJD. (The timer can also be manually started in two other ways.)

MET_ON: timer is active, met_ref_mjd is set, screen displays met_ref_mjd and time since met_ref_mjd.

BUTTONS/KEY COMMANDS:

ARM: Has no effect in MET_ON state. Toggles between MET_OFF and MET_ARMED.

ON: Has no effect in MET_ON state. In MET_OFF or MET_ARMED state this will set the state to MET_ON (i.e., overrides the armed state) and sets met_ref_mjd to current MJD.

MJD: Has no effect in MET_ON state. In MET_OFF or MET_ARMED state, this prompts the user with a popup data entry window; the user enters the reference date (met_ref_mjd) and the state is set to MET_ON. An invalid entry results in no change. Setting met_ref_mjd to a future time is a valid entry.

OFF: Has no effect in MET_OFF state. In MET_ARMED state this sets the state to MET_OFF. (Redundant with the ARM button in this case; should this be changed?) The purpose of this button is to enable the user to cancel an active timer, but I'm thinking that's something the user should be able to do easily but not accidentally; so, in MET_ON state the user is given a random 4 digit number and a popup box in which to enter that number to confirm. Correctly entering the confirmation number sets the state to MET_OFF; an incorrect entry results in no action (state stays at MET_ON, alarm still runs).

DSP: Toggles the format in which mission elapsed time is displayed between “day/hour/minute/second” and “days” – with the earlier example (current MJD = 60001.50, met_ref_mjd = 60000.00), the displayed MET would be either something like “+1:12:00:00.00” or “+1.500 days.”

So to sum up the basic operation of the timer, let's say you're on the runway ready to take off and the timer is off. There are three ways you can turn the timer on. You can arm it (ARM button), in which case it will automatically start when you apply any thrust to the craft. You can manually enter the mission start time (MJD button) and set the timer that way. Or you can hit the ON button and start the timer at whatever that moment happens to be. While the timer is off you can arm and disarm it or turn it on with simple button clicks, but once the timer is on there's an extra step for turning it off to avoid accidents.

MFD SCREEN:

Text colors – green in MET_OFF state; bright red in MET_ARMED; yellow in MET_ON.

Text – something like this:

“Timer is ON [or “ARMED” or “OFF” as applicable]
Mission start MJD #####.#### [this line only appears in MET_ON state]
[blank line]
[blank line]
MET is +/-######:##:##:##.## [this line only appears in MET_ON state; can also be displayed as “+/-######.###### days”]
[blank line]
[blank line]
[informational message line]
[additional informational message lines as needed]

The MET line is the main output the user is interested in, so I've set that off with blank lines to make it easier to see.

Informational messages would be things like, “Timer is armed and will start when thrust is detected”; “Confirm cancellation of timer by entering 4837”; etc.

Anyway, that's it … your thoughts? The above is a first draft and while I don't want to get into feature creep, I'm sure there's room for improvement.
 
Last edited:

Beavis

New member
Joined
Sep 5, 2014
Messages
14
Reaction score
0
Points
0
You have some great ideas, thank you.

Thanks. After writing that, I saw one problem that needed to be changed, so I've gone ahead and done that.

The problem is that MJD is an absolute reference, not a relative one. So to refer to the MET (the difference between two times) as “MJD ####” is wrong. To give an analogy, the twenty-fourth day of the year is January 24, but that doesn't mean there are “January 24 days” between July 3 and July 27. So I've changed that output to read “(+/-)######.###### days” instead of “MJD (+/-)######.######”

Anyway, I'll wait a day or so for more comments, then start working on this. It'll be for Orbiter 2010; I could write the code to be compatible with 2006, but I've got no way to compile and test that.
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
How about a "display" button, similar to [ame="http://orbithangar.com/searchid.php?ID=5435"]LoadMFD[/ame] ?
By pressing the DSP/HUD/(whatever you want to call it) button, you get the timer info on the HUD and then you can switch off the MFD or change it to another mode.
This way you don't have to take up a whole MFD simply to look at the MET.

The addition of "waypoints" might be a nice feature. The user presses the "WAY" button and the MFD pops up a dialog box:

"Please enter waypoint MJD, title"

The user enters "55674.345, MCC1"

The MFD then displays " Time to MCC1: dd:hh:mm:ss (or day format, which ever the user had chosen for the whole mfd).
 

Aeadar

Lurker Representitive
Donator
Joined
Apr 30, 2009
Messages
456
Reaction score
3
Points
18
I don't even know if it's possible, but something I've always wanted is an MET that records or logs certain events that could be referenced later in a mission or post-mission.

Events such as Start/Stop times for Main/Hover and Retro engines, wheels up/down times, UMMU ingress/egress times. Possibly Payload Bay Door open/close times and/or Cargo release times.

(Don't want much, do I?):)

Actually, thinking about it, even if the events were recorded to a file that could be opened and viewed (or printed) post simulation session would be fantastic!
 

Beavis

New member
Joined
Sep 5, 2014
Messages
14
Reaction score
0
Points
0
Hi, thanks for the input. Sorry for the delay in responding; some IRL stuff got in the way.

Display on screen: I like that idea, but I think I'm going to leave it until version 0.2. I've been doing C in some way or another for about 25 years, but I'm still pretty new to C++, DLLs, and the Orbiter API. One of the reasons I jumped into this was because what I described above are things I already know how to do; I've been writing some weird MFDs for my own use (starting and stopping burns under different criteria to check against models of ejection burns). But I didn't even know it was possible for an MFD to print to the main screen until you pointed me to Load MFD. I suspect it's probably not terribly difficult to do, but I'd like to look into it a little further.

Incidentally, not to get nitpicky, but I looked at Load MFD and it doesn't actually write to the HUD, just to the screen. For example, its numbers are still visible when you switch to external view.

Waypoints: Easy enough. Just means multiple reference dates and text labels to go with 'em ...

Logging UMMU, payload door, and cargo events: Sorry, I'm not the right person for that. With my relative lack of experience, I think I'd better stick with things that work with the generic Orbiter vessel, i.e., the Delta Glider. These things are all from addons and/or specific vessels.

I'm not even sure if those things are possible at all, at least not from an MFD. I haven't studied them in depth, but it looks to me like the VESSEL(#) classes don't allow a lot of access to the vessel functions from outside those classes. For example, while you can manipulate the engine thrust levels and turn the standard autopilots on/off from an MFD, I don't think it's possible to write an MFD that will drop and retract the landing gear.

Logging engine start/stop times: There have been times I'd like to have that as well. I'm gonna put that off until 0.2 as well, though.
 

meson800

Addon Developer
Addon Developer
Donator
Joined
Aug 6, 2011
Messages
405
Reaction score
2
Points
18
that records or logs certain events that could be referenced later in a mission or post-mission.

Events such as Start/Stop times for Main/Hover and Retro engines, wheels up/down times, UMMU ingress/egress times. Possibly Payload Bay Door open/close times and/or Cargo release times.
Logging UMMU, payload door, and cargo events: Sorry, I'm not the right person for that. With my relative lack of experience, I think I'd better stick with things that work with the generic Orbiter vessel, i.e., the Delta Glider. These things are all from addons and/or specific vessels.
It would be possible to log UMMU entries through some astue hacking-watching for vessel creation/deletion events. Unfortunately, anything else is not possible (looking for landing gear, etc), unless specifically tailored to a vessel.

It would be possible to intercept panel-click events and interpret based on vessel class.

For example, while you can manipulate the engine thrust levels and turn the standard autopilots on/off from an MFD, I don't think it's possible to write an MFD that will drop and retract the landing gear.
I don't think Aeadar was looking to activate certain actions (drop/lower landing gear), but it doesn't matter anyway because it is moot.
 
Top