Several changes - updated string to route to include coordinates - updated model for flight sim to only contain the closest point - User model now tracks route status... departure etc
This commit is contained in:
@ -28,11 +28,13 @@ namespace EFB.Controllers
|
||||
if(user == null) return RedirectToAction("Index", "Home");
|
||||
|
||||
//Retrieve the user's latest sim position and construct it into FlightsimModel
|
||||
if (user.Route == null) return RedirectToAction("Index", "Route");
|
||||
|
||||
SimPositionModel latestPosition = await Mongo.GetLatestData(user.EMail);
|
||||
// RouteModel route = RouteModel.StringToRoute();
|
||||
RouteModel route = await RouteModel.StringToRoute(user.Departure, user.Arrival, user.Cruise, user.Route);
|
||||
|
||||
return View(new FlightsimModel(latestPosition, null));
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
|
@ -144,7 +144,7 @@ namespace EFB.Controllers
|
||||
|
||||
foreach (var item in responsePoll.Result)
|
||||
{
|
||||
if (item.Command == "fpl" || item.Command == "solution")
|
||||
if (item.Command == "notvalid" || item.Command == "solution")
|
||||
{
|
||||
collected = true;
|
||||
routeString = item.FlightPlan;
|
||||
@ -177,6 +177,7 @@ namespace EFB.Controllers
|
||||
user.Route = finalRoute;
|
||||
user.Departure = departure;
|
||||
user.Arrival = arrival;
|
||||
user.Cruise = cruise;
|
||||
HttpContext.Session.SetObject("User", user);
|
||||
|
||||
return RedirectToAction("Index", "Route");
|
||||
|
Reference in New Issue
Block a user