weglide / bugtracker

WeGlide platform bug tracker.
https://www.weglide.org
11 stars 0 forks source link

Wrong aircraft type after uploading igc #177

Closed tomascern closed 2 years ago

tomascern commented 2 years ago

Describe the bug Hi, I am using your API to upload IGC logs. Every time after upload I see in the log on the webpage incorrect aircraft type. I tried to use various gliders, but every time I see Duo Discus. It happened also when uploading directly in your webpage.

To Reproduce Steps to reproduce the behavior:

  1. Upload IGC log via API or webpage
  2. Login to your account
  3. Open uploaded log detail
  4. Check aircraft type

Expected behavior Correct aircraft type is set in log detail.

Example IGC Lufty-08_38 13.05.22.igc.zip

flyingjoe commented 2 years ago

WeGlide remembers logger ids and will only guess the glider from HFGTYGLIDERTYPE once, when the logger has not been seen yet. When a logger is already known, we'll always set the last used glider.

This works 95% of the time since most loggers stay in the gliders. Lufty doesn't seem to write use a distinct logger id but only calls itself AXLF001. In comparison a Flarm writes AFLAIF6, IF6 being the ID

tomascern commented 2 years ago

Ok, so what´s the sense of having aircraft_id parameter in /v1/igcfile API call?

flyingjoe commented 2 years ago

Ah, I thought you were just changing the aircraft in the IGC-file - Could you post a sample of the requests you are posting?

tomascern commented 2 years ago

I am using Alamofire iOS SDK, the transcript of the request is:

curl https://api.weglide.org/v1/igcfile 
    -X POST 
    -H 'Authorization: Bearer xxx' 
    -H 'Content-Type: multipart/form-data; boundary=alamofire.boundary.50ba7c6f73a26434' 
    -d 'aircarft_id=549'
flyingjoe commented 2 years ago

Maybe it's the typo in aircraft_id?

tomascern commented 2 years ago

OMG, I feel embarrassed - that's it, now it works. Thank you for your help and I apologize for wasting your time.

flyingjoe commented 2 years ago

No worries, happens to all of us :)