Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello!

First let me start off by saying I have a level of xml scripting that's acceptable enough for me to be able to do this with just a little guidance (I hope).

I'd like to first know if there is any other documentation for the "record to csv.lua" example other than opening the lua itself? I looked through most of the FSUIPC document PDFs and wasn't able to find much. I understand how to find the offset data so I don't need to be pointed to that, but I'm trying to make a CSV that records the P3D ZULU time when an event occurs. I noticed so far that the lua reads data at a specified interval in fractions of a second. My goal is to only record event times (when the parking brake is released, stamp the flight sim zulu time and record total fuel; when radio altitude is greater than 50ft, stamp the zulu time and record total fuel, etc.). 

I don't wan't to make someone do all the work for me, I'd just like to be pointed on more documentation or a quick example.

Thanks!

Posted
17 hours ago, atav757 said:

'Id like to first know if there is any other documentation for the "record to csv.lua" example other than opening the lua itself?

No. All the examples are there for users to open and learn from. Each function used is either documented in the Lua Library document, or is a main Lua function documented on their website.

I don't know XML scripting -- my only contact with XML is just for parameter files, i.e. an alternative to CFG and INI files.

17 hours ago, atav757 said:

I noticed so far that the lua reads data at a specified interval in fractions of a second. My goal is to only record event times

The Record to CSV example isn't like that. It records a list of values at fixed time intervals, which is why it isn't event driven, though it could be by using event.timer.

In your case it seems you just need to have events for each of the values you want to record and timestamp. If these are all offsets then use event.offset (or event.offsetmask to select a flag in a byte of flags). Each function would test the value received and if it is to be logged, read the current timestamp using ipc.elapsedtime, or reading one of the offsets providing different time values from the sim (for the sim Zulu time, as you say).

An event-driven plug-in is best loaded by an entry in the [Auto] section of the FSUIPC INI file.

Pete

 

Posted

Thanks for your reply! I may be in over my head here and will have to do without, but your reply will help me figure it out.

Thanks Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.