New feature : flightId

Information about the VA integration pack
Post Reply
Zissiz Zekapten
Ticket Agent
Posts: 28
Joined: Thu May 18, 2023 6:16 pm

New feature : flightId

Post by Zissiz Zekapten » Sun Aug 27, 2023 8:26 am

It would be nice if we could have the flightId in the API /getActiveFlights and /getFlightReports.

We could create a link to the flight report on the FSAIrlines website from our VA websites with the url : https://www.fsairlines.net/crewcenter/i ... id=3500043

We have to be logged in but it would still be an handy feature.

User avatar
joefremont
FSAirlines Developer
Posts: 3697
Joined: Tue May 16, 2006 5:46 am
Location: KSFO

Re: New feature : flightId

Post by joefremont » Mon Aug 28, 2023 5:41 pm

By flightID I assume you mean the report id.

For getting a singe report there is already a function for getReportDetail where you pass a report_id parameter to get a single report.

But the report ID is not assigned until the flight is actually recorded at the end of the flight, so it would not really be useful the getActiveFlights function since the report ID is not assigned until the end, by then it is no longer active.
Image
I've sworn an oath of solitude until the pestilence is purged from the lands.

Zissiz Zekapten
Ticket Agent
Posts: 28
Joined: Thu May 18, 2023 6:16 pm

Re: New feature : flightId

Post by Zissiz Zekapten » Wed Aug 30, 2023 10:00 pm

In my use case it does because it's easier to link different tracking system while pilot is flying. If I'm waiting after the flight, I need to iterate flights in all the tracking systems and correlate by date, id, destination... Whereas when I'm detecting while the pilot is flying, there is no ambiguity that all the tracker are following the same flight and thus, I can link them together. Currently doing this with FSHub and IVAO, very close to do it with FSAirlines : http://www.laridia-airlines.com

Moreover, re-using the active flight id and keep it for the report is not a silly idea either.

User avatar
joefremont
FSAirlines Developer
Posts: 3697
Joined: Tue May 16, 2006 5:46 am
Location: KSFO

Re: New feature : flightId

Post by joefremont » Thu Aug 31, 2023 3:57 pm

I never said it was a silly idea, just trying to point out the way we are currently architected its not quite so simple. Currently the way the system works a booking record or log record is created when a flight is booked, this is used internally to control the flight, but it is temporary and is generally referenced by pilot_id or user_id as a single pilot can have only one active flight booked at a time. Once the flight is complete a report record is created and this is the permanent record of the flight, at that point the log is kept for a few weeks in case the flight needs to be reviewed, but then it is deleted and the id of the log record is not exposed.

So the closest thing we have to a 'flightId', is the ID of the report record, which is not created until the flight ends.

So getFlightReports and getActiveFlights work on totally different records that have different ID schemes. If we were to do anything we would need a different function, say getRecentFlights that can act on those log records that are recorded but where the log records have not been purged yet.
Image
I've sworn an oath of solitude until the pestilence is purged from the lands.

Post Reply