Feature Request: Recording Flight Data

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Message
Author
Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Feature Request: Recording Flight Data

#1 Post by Tetrachromat »

I would like to suggest a new simple feature for recording flight data.

Purpose/Justification
When I get a new airplane for my simulator, first thing I do is taking it up for some performance evaluation flights. I have created some instruments that display the performance data I want to record.

Example (Engine Manifold Pressure)
preview.png
preview.png (29.46 KiB) Viewed 1059 times
After changing a flight parameter (e.g. increase throttle lever) and reaching stable flight, I record the performance data manually in an Excel sheet. Recording the data items while flying is a really time consuming chore and I would rather concentrate on flying and let Air Manager do the recording. I tried to use the log() function but it is awkward to separate the data items from all other log entries for import into EXCEL.

Therfore I suggest to have
- a similar file like the log file (plain text), but only for recording flight data.
- a new API helper function record() similar to log() that writes a data entry into the flight data file.

The API page for 'Record' would look like this:

Record

Code: Select all

Contents

    1 Description
    2 Return value
    3 Arguments
    4 Example
Description

Code: Select all

value = record(message, ...)
value = record(type, message, ...)
record is used to record flight data to the Air Manager or Air Player flight data file

Return value
This function won't return any value.

Arguments

Code: Select all

#	Argument	Type	Description
1	type		String	(Optional) Can be "INFO", "DATA" or "EVNT". Default is set to be an INFO message.
2 .. n 	message		Object	The message to put in the log

Example

Code: Select all

-- Record flight info to the flight data file
record("INFO", "Aircraft", "C172S")

-- Record flight data to the flight data file
record("DATA", "KNOTS", tostring(speed))

-- Record flight event to the flight data file
record("EVNT", "FLAPS_UP")
File format

Code: Select all

2022-07-17 17:20:02.611 INFO Aircraft: C172S
2022-07-17 17:25:14.661 DATA KNOTS 112.3
2022-07-17 17:27:08.467 EVNT FLAPS_UP
It would be the users responsibilty to format the messages such that he can import the data into EXCEL.

File location
C\:User\<user>\Air Manager\data.txt

Paul

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Feature Request: Recording Flight Data

#2 Post by Keith Baxter »

Hi Paul,

I know what the answer is going to be.

Use persistence. NOTE" The file only saves once the instrument is shut down and it can hang AM until it is finished processing
https://siminnovations.com/wiki/index.p ... ersistence

Create a table and add values by time or event. Then save the persistence. It creates a .json file like this
ec6cb54e-4bc8-4a59-3519-89847c2427c6.json
(44.9 KiB) Downloaded 66 times
The file can be used in IIC instruments or you could manually extracted here....
C:\Users\Keith\Air manager BETA\persistence\instrument_plugin

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Feature Request: Recording Flight Data

#3 Post by jph »

Write it to an sd card on a pico ;) . Thats what I plan to do with my setup files.

It would definitely be better to have a simple text file read write option. Csv is fine even, or space delimited.
Just bog standard txt though, would do the job
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Feature Request: Recording Flight Data

#4 Post by Keith Baxter »

Hi,

The big issue is the amount of data added to the table.
I understand that AM has quite a large memory before it CTD. Think about print statements printing millions of times.

So the data would need to have a throttle element and @Corjan did that for us and the code for that is in the community library.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: Feature Request: Recording Flight Data

#5 Post by Tetrachromat »

@Keith Baxter, how do you declare the type in the persist_add() function? Ther are only fixed length tables as far as I remember. I need to continously add table entries without limit.

Bu the biggest issues is that data entries are written by different instruments. Those would go to different persistence files.

Retrieving the persistence file[s] for external postprocessing is not a simple task. And I dont need the persisted data in AM.

I need the data in EXCEL only. And EXCEL does not read JSON but a flat text file is simple.

Paul

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: Feature Request: Recording Flight Data

#6 Post by Tetrachromat »

Recording should be like logging and logging does not require a lot of memory.

By the way AirManager uses the log4j library for logging. I think this should be easy to setup an additional destination for the record() function.

Paul

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Feature Request: Recording Flight Data

#7 Post by Keith Baxter »

Tetrachromat wrote: Thu Oct 06, 2022 8:38 pm @Keith Baxter, how do you declare the type in the persist_add() function? Ther are only fixed length tables as far as I remember. I need to continously add table entries without limit.

Bu the biggest issues is that data entries are written by different instruments. Those would go to different persistence files.

Retrieving the persistence file[s] for external postprocessing is not a simple task. And I dont need the persisted data in AM.

I need the data in EXCEL only. And EXCEL does not read JSON but a flat text file is simple.

Paul
Hi Paul,

You do not need to declare "TYPE" from AM3.6 ->
Example (AM/AP 3.6 and higher)
-- Create a new persistence obeject
persist_id = persist_add("mykey", { 1, 2, 3, 4, 5, 6, 7, 8 })

-- Get the data from the persistence object
mydata = persist_get(persist_id)

-- Put new data into the persistence object
persist_put(persist_id, { 8, 7, 6, 5, 4, 3, 2, 1 } )
Create a table with int's, floats, strings in whatever structure you want.

Table constructors can be found here
http://www.lua.org/manual/5.4/manual.html#3.4.9

And manipulators here..
http://www.lua.org/manual/5.4/manual.html#6.6

Update whatever value in any "record" or create a new timestamp.

Keith

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Feature Request: Recording Flight Data

#8 Post by Keith Baxter »

Hi,

I might be the crazy one, but a few years back I started asking about black boxes and flight voice recorders. I wanted to record the flight parameters and record them to a black box as well as the cockpit and radio voice recordings.

@Corjan quickly pointed me to persistence, hence my reply's. ;)
Si still has no appetite for voice and radio recording and I understand why. It would be a nice addition though...... :cry:

:idea: The Idea was to fly a bird and crash it. Then do an Air Crash investigation. :roll:

Initially for me it was just the data recording. But it could extend to the whole investigation. Finding the mangle parts in a forest or dam. Piecing them together and finding the recording devices etc

A new game??? NO But something better than this....
https://store.steampowered.com/app/1682 ... _Accident/

Just a crazy old man loosing his mind again. :evil:

That is fun and what interests me.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: Feature Request: Recording Flight Data

#9 Post by Tetrachromat »

Yeah, you could use record() to realise a black box. But this is not my use case.

I have a push button 'RECORD' in the panel that I press after reaching stable flight again. It sends a IIC-command 'recordNow' and all instruments that have subscribed to that command, would call record() with their current value as argument (formatted as string).

I could even live without that 'type' keyword, as I have been doing when trying log(). Important to me is the automatic timestamp. I don't want to create such timestamps in every instrument.

E.g. the output from log(index .. ": " .. value) was

Code: Select all

2022-09-30 21:19:17.679 INFO  SiRunner - Recorder - MANIFOLD PRESSURE: 1: 29.92
'INFO' is the default message type
'SiRunner' is probably the log4j subsystem name
'Recorder - MANIFOLD PRESSURE' is the instrument name (provided by AM automatically)
'1' is the engine index
'29.92' is the formatted value

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Feature Request: Recording Flight Data

#10 Post by Sling »

Interesting idea but implementing features for use by the minority makes no sense for an application designed for the majority. There have been many suggestions for the AM roadmap over the years and the ones that are normally incorporated are ones that either a lot of users will use or make benefit from.

Grouping of instruments in folders to make it easier to find and organise a large collection is a prime example of a previous new feature request along similar lines.

Post Reply