I’m using the sample SimVars program and finding most of the variables I need, but one thing I can’t find yet - the sim’s local and/or UTC time stamp. I’m trying to track block times - the duration of time between parking brake release and when the parking brake is set for the last time. Any thoughts?
Thanks!
Mark
1 Like
Hi,
did you take a look into the SDK? There, in the SimConnect_Status_of_Simulation_Variables.html at the bottom you also have variables like “ZULU TIME” and “LOCAL TIME”.
Greets,
Ben
1 Like
Hi Ben,
Thank you! Last night I was focusing on the SimVars program and pulling data out of there, and didn’t see those. However, that’s exactly what I was looking for - I’ll check that out tonight. I have been reading through the SDK but hadn’t run across that yet.
Mark
Please can somebody help me get this into a c# Timespan. I get the ‘simtime’ as a ‘number’ into a float64/double. I am converting it with … TimeSpan time = TimeSpan.FromSeconds(_simdata.LocalTime /or ZuluTime/) but it’s coming out the wrong time.
Steve.
How wrong is it?
I was just looking at this myself for a thing I’m building and I found that it seems to be one day off. Here’s how I’m doing it though:
public DateTime ZuluDateTime
{
get
{
DateTime result = new DateTime(Year, 1, 1, 0, 0, 0, DateTimeKind.Utc); // Year == ZULU YEAR
result = result.AddSeconds(Time); // Time == ZULU TIME
result = result.AddDays(DayOfYear); // DayOfYear == ZULU DAY OF YEAR
return result;
}
}
It seems like the ZULU DAY OF YEAR
might be 0-indexed though, as it’s exactly 1 day ahead of today.
I hope this helps you!
Apologies for bring this to life again, but I can’t find “ZULU TIME” and “LOCAL TIME” on the list of simulation variables. Are they gone??
https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Simulation_Variables.htm
I’m trying to create flight logging tool and right now I have no way to know when the plane is taking off or landing because I can’t see anything about reading the time, only setting the time via events.
Any idea where to find those?
Same here, couldn’t even find with SimVar Watcher. This is really frustrating.
Searching somewhat more, it is still listed in the SDK Doc section “Prgramming APIs” under “Environment Variables”.
https://docs.flightsimulator.com/html/Programming_Tools/Programming_APIs.htm
Seems however, as if this entire list has been lost from the SDK implementation.
Update: After patching “SimVar Watcher” by adding “ABSOLUTE TIME” to “Names” and “seconds” to “DefaultUnits”, “ABSOLUTE TIME” could be indeed read from the API, so it is not really missing.
Other environment data is probably also present, but just missing in the SimVar Index and the sample code.