Weltklasse24 Posted May 23, 2018 Report Posted May 23, 2018 Hello, I write my bacheor thesis now and for that I have to do some flight tests in an simulator (P3Dv4) which I have to analyse. Therefor I need the Altitude, Longitude and Latitude at the highest sample rate that is possible. There is running FSUIPC on the computer. Is it possible to get this data via FSUIPC? Or to write an little tool which can record this data via FSUIPC? That I can get an .txt-file or an .csv-file out of that. Thanks in advance! Robert
Pete Dowson Posted May 23, 2018 Report Posted May 23, 2018 6 minutes ago, Weltklasse24 said: Therefor I need the Altitude, Longitude and Latitude at the highest sample rate that is possible. There is running FSUIPC on the computer. Is it possible to get this data via FSUIPC? Or to write an little tool which can record this data via FSUIPC? That I can get an .txt-file or an .csv-file out of that. There is already a lua plug-in supplied as an example which does that and more. Please see the Example plug-ins ZIP file you your FSUIPC Documents folder (in the Modules folder) where you will see one called "RecordToCSV.lua". It is currently set to record time (local and Zulu), lat, lon, alt, pitch, bank, hdgTrue and hdgMag at 20 times per second (approx -- depends on P3d loading of course). It would be easy to edit it to reduce the amount logged, and maybe increase the rate. Pete
Weltklasse24 Posted May 23, 2018 Author Report Posted May 23, 2018 That are great news! What is to do that "RecordToCSV.lua" runs and record the data? Or is there an instruction how to implement this? Robert
Pete Dowson Posted May 23, 2018 Report Posted May 23, 2018 1 hour ago, Weltklasse24 said: What is to do that "RecordToCSV.lua" runs and record the data? Or is there an instruction how to implement this? The FSUIPC Lua documentation is in the same folder! Just place the Lua into the Modules folder, and assign a button or keypress to that ("Lua recordtocsv"). Or you can make it run automatically in one of several ways as documented. Pete
Weltklasse24 Posted May 24, 2018 Author Report Posted May 24, 2018 Great! Thank you for your fast replies! Robert
Weltklasse24 Posted May 24, 2018 Author Report Posted May 24, 2018 Hello, we implement the lua programme in the "modules" folder where critical files are located (configuration files for FSUIPC?). The programme worked well and reached an frequence of 66 Hz. Great performance! But it loads the .csv-files in the modules folder. My mentor which is the administrator of the simulator said that it would be great if it is possible to safe the .csv-files in an other defined folder (to not crash the definition files). Is it possible to define that in the lua file? And if yes how is the code or where do I get an instruction for that? An other question ... is there an overview which parameters are able to display about this recording file? That I can maybe add some new parameters? EDIT: All Parameters which can be displayed are those in the file "FSUIPC4 Offsets Status"? Thanks in advance! Greets Robert
Pete Dowson Posted May 24, 2018 Report Posted May 24, 2018 1 hour ago, Weltklasse24 said: But it loads the .csv-files in the modules folder. My mentor which is the administrator of the simulator said that it would be great if it is possible to safe the .csv-files in an other defined folder (to not crash the definition files). Just edit the Lua file. It is a simple text file. you'll see quite easily where it opens file file. Just specify the whole path as well as the filename you wish! The only thing you need to know is that for each \ charater you need two 9i.e. \\) because in Lua as in many programming languages, \ is an "escape" character, used to prefix control codes. Do not be so afraid of Lua. it is a simple scripting system. Just look at the file, in an editor like Notepad. You will see how easy it all is! Documentation is in your FSUIPC documents folder. Pete
Pete Dowson Posted May 24, 2018 Report Posted May 24, 2018 1 hour ago, Weltklasse24 said: An other question ... is there an overview which parameters are able to display about this recording file? That I can maybe add some new parameters? EDIT: All Parameters which can be displayed are those in the file "FSUIPC4 Offsets Status"? All those which can be read using the ipc library facilities to read offsets, yes. It does cover all the things FSUIPC can read for oyu! Pete
Weltklasse24 Posted May 25, 2018 Author Report Posted May 25, 2018 Okay thanks ! So if I´m right I have to wrote in the lua: f = assert(io.open("C:\\....\\File_Name","a+")) to choose location and file name. Robert
Pete Dowson Posted May 25, 2018 Report Posted May 25, 2018 2 hours ago, Weltklasse24 said: So if I´m right I have to wrote in the lua: f = assert(io.open("C:\\....\\File_Name","a+")) to choose location and file name. Yes, adjusting the existing line as you need. All that is standard Lua as documented in the Lua website and books. Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now