This commit is contained in:
ai.astrakhantsev 2023-02-16 11:54:05 +05:00
parent 5070863ed4
commit bd5260edd1
2 changed files with 6 additions and 3 deletions

View File

@ -20,11 +20,14 @@ namespace AsbCloudInfrastructure.Services
public async Task<IEnumerable<TrajectoryVisualizationDto>> GetTrajectoryAsync(int idWell, CancellationToken token)
{
var result = new List<TrajectoryVisualizationDto>();
var result = new List<TrajectoryVisualizationDto> {
new ()
};
var dtos = (await repository.GetAsync(idWell, token)).ToArray();
var prevData = dtos[0];
var prevCoordinates = new TrajectoryVisualizationDto();
for (var i = 1; i < dtos.Length; i++)
{
var data = dtos[i];
@ -38,7 +41,7 @@ namespace AsbCloudInfrastructure.Services
{
X = x,
Y = y,
Z = z
Z = z * -1
};
result.Add(coordinates);

View File

@ -73,7 +73,7 @@ namespace AsbCloudWebApi.Tests.ServicesTests
{
new() { AzimuthGeo = 0d, ZenithAngle = 0d, WellboreDepth = 0d},
new() { AzimuthGeo = 30d, ZenithAngle = 30d, WellboreDepth = 10d},
new() { AzimuthGeo = 0d, ZenithAngle = 0d, WellboreDepth = 20d},
new() { AzimuthGeo = 20d, ZenithAngle = 20d, WellboreDepth = 20d},
};
var mock = MakePlannedTrajectoryRepositoryMock(plannedTrajectory);