skylines
skylines copied to clipboard
Bad labels when aircraft model is not set
If aircraft model is not set, use aircraft model written in the IGC file. If nothing, use a letter or a number (especially when the map display several flights) ?
The IGC file's model, competition ID and registration are only used on upload to initialize the flight object. If we would use them as a "fallback", the user would not have the possibility to delete the competition ID or registration. See #511.
The IGC file's model, competition ID and registration are only used on upload to initialize the flight object.
Really? Theses values are provided by the API 😉
http://localhost:5000/api/flights/2
{
"flight": {
"id": 2,
"timeCreated": "2016-11-14T13:27:21.682483+00:00",
"pilot": null,
"pilotName": "",
"copilot": null,
"copilotName": null,
"club": null,
"model": null,
"registration": null,
"competitionId": null,
"scoreDate": "2016-09-28",
"takeoffTime": "2016-09-28T15:10:00.519000+00:00",
"scoreStartTime": "2016-09-28T15:15:00.909000+00:00",
"scoreEndTime": "2016-09-28T15:33:33.282000+00:00",
"landingTime": "2016-09-28T15:41:04.440000+00:00",
"takeoffAirport": null,
"landingAirport": null,
"distance": 6606,
"triangleDistance": 976,
"rawScore": 6.89971560747524,
"score": 6.89971560747524,
"speed": 3.02749770852429,
"privacyLevel": 0,
"igcFile": {
"owner": {
"id": 1,
"name": "Example Manager"
},
"filename": "2016-09-28-15-06.igc",
"registration": null,
"competitionId": null,
"model": "whizz 22",
"date": "2016-09-28"
}
}
}
Yes, if you have a look at the IGC file's data (last part of your JSON), you can see, that the competitionID
and registration
are null
, there. So the flight's competitionID
and registration
are initialized with null
, too.
Hm okay, it seems, that the IGC file's model is used, if the user did not select a model from the list. But the model has nothing to do with your label problem, the labels are only about the competition ID and the registration.
the labels are only about the competition ID and the registration.
Currently yes 😄
But if the pilots don't provide competitionID
, registration
and model, what should we display ?
I suggest to use igcFile.model
or
If nothing, use a letter or a number (especially when the map display several flights) ?
Paragliders don't have competitionID and registration in France. And currently there isn't any paragliders models in the DB.
And what to do, if you have other pilots with the same model? What do you think about displaying the pilot's initials or the name's first 3 or 4 letters? I think, this is a better identifier than the model.
And what to do, if you have other pilots with the same model?
We could use a letter or a number, or even a symbol (◻︎ ◁ ✤ ✩ ❉ ❄︎ ☁︎ …) 😉
I think, this is a better identifier than the model.
👍
We could use a letter or a number, or even a symbol (◻︎ ◁ ✤ ✩ ❉ ❄︎ ☁︎ …) 😉
if the callsign is explicitly empty then we should not show any callsign. in that case the flight should be identifiable by its color only.
What do you think about displaying the pilot's initials or the name's first 3 or 4 letters? I think, this is a better identifier than the model.
that might be a good default value upon flight upload if no competition ID was set. then again what if the pilot never wants a competition ID, he would have to remove it again and again if we use this as the default. (this is the default for live tracking btw)
in that case the flight should be identifiable by its color only.
See Color-blindness
then again what if the pilot never wants a competition ID, he would have to remove it again and again if we use this as the default.
The idea is to set a default label, not to set the competition ID 😉
The idea is to set a default label, not to set the competition ID
the label is specifically showing the competition ID. if you want a label, set a competition ID. I'm not a fan of making it any more complicated than that.
the label is specifically showing the competition ID
Sorry, but the current code display competition_id
, if not, it display registration
.
The initial purpose of my comment was to avoid displaying null
.
if you want a label, set a competition ID
The label is interesting when we displaying many flights at the same time to distinguish them. See flights/48503
hmm, that's not quite how it should be. it was supposed to display only competition ID or "nothing" if none is set for the flight. since the registration has different length limits it shouldn't be displayed at that location.
displaying null
is obviously a bug, but IMHO the registration shouldn't be displayed either