opensky-to / api Goto Github PK
View Code? Open in Web Editor NEWOpenSky core API
Home Page: https://opensky.to
License: MIT License
OpenSky core API
Home Page: https://opensky.to
License: MIT License
So players can buy addon aircraft
The reason for this is that some users prefer using VPNs and switch countries on a regular basis and don't want to have to login again over and over
This will obviously not be the default and there should be a disclaimer in the settings section on the website/clients explaining that this degrades the security of the account
The idea of the service is to keep counts even when items like jobs get deleted and to prevent race conditions by isolating it into a standalone sql connection with mutex
Add mariadb/mysql provider
Test connection to mariadb docker container
Best way to have local developer database?
Test code first with migrations is working just like in the full .net framework
Check for others too
We need to implement a job-populator worker that generates jobs.
All distances are in nautical miles
These jobs can either be created "on demand" or whenever a import / job has finished.
Major issues that need to be solved when implementing this feature is:
Initial idea for categories were:
<50, 50-249 , 250-499, 500-999 , 1000-3000, > 3000
Last position report > X hours? and not paused? abort the flight
After a new client package is successfully uploaded, only it needs to remain, all older ones can safely be deleted
This will cause a json serialization loop and break the type system
Create worker and add various clean up jobs over time
First one to add right now: Clean up expired OpenSky tokens
No financial records yet, just so players can remove aircraft from their fleet
Based on airport size, number of parking spots and gates
Pick from available vanilla (for now) aircraft types and based on the airport location generate registrations based on icao naming rules with a few percent chosen randomly
Basic features for alpha, so players can find and buy planes to fly with
World populator is working fine but needs two small extensions:
Classify aiports from 0 (tiny) to 5 (international hub)
Based on airport / runway / approaches / ??? data imported from simulator
We can then stop populating the world with variants and only have the base version present
When purchasing the player picks what variant he/she wants but can also freely edit this later in the my fleet section
DB model
Jobs controller
Flight controller
Rounding up the costs to make it bit cleaner ,less "random" .
Analyze the request headers to find the real client IP
And use them in the agent to disable the auto "setting" options if the flag is set
There are a few piston aircraft, especially from Diamond that use JetFuel instead of AvGas
Only admins/moderators should be allowed to call it
On the client side we need to add a tools section for quickly managing aircraft types too (minus the simulator specific stuff, so no adding of aircraft?)
Guid
UserID/AirlineID(todo)
Flight number(random default)
AircraftID(can be null initially, so flights can be planned starting from aircrafts, jobs, etc.)
CrewIDs(players only for now, n:m table), add AI n:m table(s) later
CargoIDs(todo)
Origin
Destination
Alternate(todo how determine?)
Link to create Simbrief flight plan (airports, cargo etc.), maybe even download generated flight plan back into flight, so dispatchers can generate and attach flight plans(mega later todo)
Status -> Planning (initially), then follow the status reports from the agent (match with existing enum, or move server side so included in service contract)
started datetime, ground handling complete datetime (or minutes, check agent code for that)
Once flight is active save some additional fields:
lat/lon
radioheight
heading
airspeedtrue
onground
and for player flights also add these (for slew into position):
pitchangle
bankangle
verticalspeedseconds
also need to figure out efficient/elegant way of saving fuel tank levels, the sim has 11 tanks, would be best of we save/restore exactly back into the tanks. Or would be enough to just have the total gallons in a single field, in case of agent crash resume
Don't enforce this at all anymore
Use instead small XP loss if TimeInSimChanged event is contained in flight log
When flight was in progress in agent and ground handling was completed, aborted
Restarted and fuel loading restarted/resumed ... but should have been finished
Add initial versions of those entities - enough to get to alpha
Design a basic "world aircraft population" worker that can (re)generate aircraft
fail: OpenSky.API.Controllers.AuthenticationController[0]
Error exchanging OpenSky token.
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithoutPropagationAsync(Int32 commandIndex, RelationalDataReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at OpenSky.API.OpenSkyDbContext.SaveDatabaseChangesAsync(ILogger logger, String errorMessage) in /src/OpenSky.API/OpenSkyDbContext.cs:line 194
Basic list with all airports
For drawing on the map, also for client-side distance calculations
Server creates this package either on request or after data import or some other logic?
Package then gets incremental version number or update timestamp.... client checks if new download is required during startup of application
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.