Add Pilots endpoint - connected pilots on VATSIM/IVAO#96
Open
ZeroKaa wants to merge 6 commits intoflybywiresim:stagingfrom
Open
Add Pilots endpoint - connected pilots on VATSIM/IVAO#96ZeroKaa wants to merge 6 commits intoflybywiresim:stagingfrom
ZeroKaa wants to merge 6 commits intoflybywiresim:stagingfrom
Conversation
nistei
requested changes
Jun 23, 2021
Member
nistei
left a comment
There was a problem hiding this comment.
package-lock.json file should not be removed.
Comment on lines
+12
to
+27
| const arr: PilotInfo[] = []; | ||
| for (const p of data.pilots) { | ||
| arr.push({ | ||
| callsign: p.callsign, | ||
| aircraft: p.flight_plan?.aircraft, | ||
| arrival: p.flight_plan?.arrival, | ||
| departure: p.flight_plan?.departure, | ||
| heading: p.heading, | ||
| altitude: p.altitude, | ||
| groundspeed: p.groundspeed, | ||
| name: p.name, | ||
| latitude: p.latitude, | ||
| longitude: p.longitude, | ||
| }); | ||
| } | ||
| return arr; |
Member
There was a problem hiding this comment.
Try to use the Array.map() method.
Comment on lines
+32
to
+53
| const arr: PilotInfo[] = []; | ||
| for (const c of data) { | ||
| if (c.indexOf(':PILOT:') > -1) { | ||
| const split = c.split(':'); | ||
| arr.push( | ||
| { | ||
| callsign: split[0], | ||
| aircraft: split[9], | ||
| arrival: split[13], | ||
| departure: split[11], | ||
| heading: parseInt(split[45]), | ||
| altitude: parseInt(split[7]), | ||
| groundspeed: parseInt(split[8]), | ||
| name: '', | ||
| latitude: parseFloat(split[5]), | ||
| longitude: parseFloat(split[6]), | ||
| }, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| return arr; |
Member
There was a problem hiding this comment.
Try to use the Array.map() method.
This reverts commit cd6840f.
Member
|
@ZeroKaa Do you plan on returning to this? If not I can step in and look into finishing this PR |
Contributor
Author
Hello. No plan for the moment. Go ahead. Thanks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.