Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

API has different return values with statistics center


Qiushi Jin
 Share

Recommended Posts

Qiushi Jin
Posted
Posted

I just found that the Rating Times API(https://api.vatsim.net/api/ratings/{id}/rating_times/) and the statistics center (https://stats.vatsim.net/) have different return values.

For example, the Controller time is 3667:59 while the API returns the atc time 3546.72, so I'm wondering is the rating time api have some latency on updating times?

api_datainconformity.thumb.jpeg.6d8976afc06d7c8f5fcadfd23ee635e6.jpeg

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to comment
Share on other sites

George Enciu
Posted
Posted

I see the same issue on my cid: 1364858

it's a differece of about 40 atc hours and the last time I was online was on 11/apr/2020

Call me clear of weather!

ACCRO2 - ROvACC Deputy DIrector

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted

There's currently an issue where the appropriate hours are not being correctly attributed. The stats website gathers this data in a different way, which is why there is a discrepancy. 

I've raised this issue with the appropriate folks, I will post an update in the API changelog thread when it has been resolved. If you follow the thread, you will receive an e-mail notification.

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Qiushi Jin
Posted
Posted
1 hour ago, Ryan Bentley said:

There's currently an issue where the appropriate hours are not being correctly attributed. The stats website gathers this data in a different way, which is why there is a discrepancy. 

I've raised this issue with the appropriate folks, I will post an update in the API changelog thread when it has been resolved. If you follow the thread, you will receive an e-mail notification.

😄Got it! Thanks again for the new APIs, really help us a lot for our web services 

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to comment
Share on other sites

Nick Harasym
Posted
Posted

Started working on fixing this. The way its currently calculated isn't really going to work going forward. Expect an update soon.

Nick Harasym
VATSIM Senior Developer
Team Lead, Infrastructure
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Raihan Shahzad
Posted
Posted

I have implemented the API for rating_times and found that the hrs logged are not same, having some slightly difference, though the hrs logged as SUP are showing of the ATC section only, instead of Total hrs logged as SUP, screenshot attached.

hrs difference.png

Raihan Shahzad
Division Director VATWA1
VATSIM West Asia
vatwa.net | director[at]vatwa.net

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted

Yep, if you read the discussion above, we are already aware of the issue.

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Raihan Shahzad
Posted
Posted
8 hours ago, Ryan Bentley said:

Yep, if you read the discussion above, we are already aware of the issue.

Hi Ryan, thank you for your reply, yes i have been through the above posts, however i posted the screenshot as to look into the SUP hrs too which i circled in the screenshot.

Will be waiting for an update, thanks

Raihan Shahzad
Division Director VATWA1
VATSIM West Asia
vatwa.net | director[at]vatwa.net

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted

This issue has now been resolved.

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Qiushi Jin
Posted
Posted
14 hours ago, Ryan Bentley said:

This issue has now been resolved.

Hi Ryan,

It seems I still get the wrong data after the update today, is that not deployed to the server now?

Cheers, Alan

image.thumb.png.56582b9d9c7e3414ed22af32dce9f111.png

 

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to comment
Share on other sites

Ryan Bentley
Posted
Posted
8 hours ago, Qiushi Jin said:

Hi Ryan,

It seems I still get the wrong data after the update today, is that not deployed to the server now?

Cheers, Alan

image.thumb.png.56582b9d9c7e3414ed22af32dce9f111.png

 

 

Hi, can you give it another shot now? 

Ryan Bentley
VATSIM Senior Developer
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Wenlue Zhang
Posted
Posted
3 hours ago, Ryan Bentley said:

 

Hi, can you give it another shot now? 

Unfortunately the number returned by the API is still not correct as the stats.vatsim.net... In the stats website, his ATC time is 585+ hours, which is apparently not matching what has been returned.

screenshot.jpg.ad3a6f88efd1b6fd68d38d29540f8987.jpg

 

 

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to comment
Share on other sites

Nick Harasym
Posted
Posted

Hey there!

This issue has been resolved either way. Legacy code was using poor calculations. The new method is more accurate. If any major discrepancies are found we will review them.

Nick Harasym
VATSIM Senior Developer
Team Lead, Infrastructure
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Wenlue Zhang
Posted
Posted (edited)
26 minutes ago, Nick Harasym said:

Hey there!

This issue has been resolved either way. Legacy code was using poor calculations. The new method is more accurate. If any major discrepancies are found we will review them.

Hi Nick,

Not sure if this API is using the new method to calculate time, but I found the API seems tend to delay calculating the time. We have just found an example for this by chance just yesterday.  The user applied for ATC training so we tried to see if the pilot has met the requirement of online flying hours. When we compare the time from this API and the stats website, we noticed the API returned 5h and the stats returned 51h. We almost rejected the application if we were not use the stats website for a double check.

Then, we tried to dig down into the statistics. We found the pilot gained 6h in 2017, 45h on the past 2 months. What the API returned is exactly what the pilot previously gained in 2017. By this observation, I guess the API here failed/delayed to count the time that a user recently gained. 

If there is another API using the new method you mentioned, is it possible to integrate it into this API here? Thanks in advance.

api.thumb.jpg.9a2a86d4e0ae9b133c74afe73e5cfb58.jpgstats.jpg.6f7c0cb02a9bcab79aa2f1458fa5f200.jpg 

Edited by Wenlue Zhang

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to comment
Share on other sites

Nick Harasym
Posted
Posted

Hey there,

This user looks to have been missed in the last run of the CIDs. I've ran this one and the hours now reflect properly. 

Nick Harasym
VATSIM Senior Developer
Team Lead, Infrastructure
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

Qiushi Jin
Posted
Posted
2 minutes ago, Nick Harasym said:

Hey there,

This user looks to have been missed in the last run of the CIDs. I've ran this one and the hours now reflect properly. 

Hi

Thanks for your reply:) I found that the user Wenlue just mentioned has correct hours now, but some user (including me, 1356779) still got the controller's hour months ago (In fact, if you check my atc hours, you can find I got correct S2 and S3 hours but incorrect C1 hours because I haven't login as S2/S3 anymore). Is that possible to run the script to correct everyone's hour? thx

Alan

Qiushi "Alan" Jin

VATSIM P. R. China Division Assistant Webmaster (VATPRC8A)

VATSIM Online Pilot (P1), VATPRC En-route Controller (C1)

&style=for-the-badge&suffix=h

spacer.png

Link to comment
Share on other sites

Wenlue Zhang
Posted
Posted
13 minutes ago, Nick Harasym said:

Hey there,

This user looks to have been missed in the last run of the CIDs. I've ran this one and the hours now reflect properly. 

My data has not been updated as well... I gained 96h of flying and 20h of controlling time in the last two months and they didn't get added. Seems many users have been missed in the run.

Wenlue Zhang | Contact me

Senior Controller (C3)
P.R.China Division Webmaster (VATPRC8) 

spacer.png

Link to comment
Share on other sites

Nick Harasym
Posted
Posted

Give it up to 48 hours then we will revisit this.

Nick Harasym
VATSIM Senior Developer
Team Lead, Infrastructure
## [email protected]
Facebook Twitter Instagram
VATSIM Logo
Link to comment
Share on other sites

 Share