forked from ddrilling/AsbCloudServer
#8636739 Визуализация траектории 3D
This commit is contained in:
parent
7127dfd9bb
commit
4192254072
@ -21,13 +21,13 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
public async Task<IEnumerable<TrajectoryVisualizationDto>> GetTrajectoryAsync(int idWell, CancellationToken token)
|
public async Task<IEnumerable<TrajectoryVisualizationDto>> GetTrajectoryAsync(int idWell, CancellationToken token)
|
||||||
{
|
{
|
||||||
var result = new List<TrajectoryVisualizationDto>();
|
var result = new List<TrajectoryVisualizationDto>();
|
||||||
var dto = (await repository.GetAsync(idWell, token)).ToArray();
|
var dtos = (await repository.GetAsync(idWell, token)).ToArray();
|
||||||
|
|
||||||
var prevData = dto[0];
|
var prevData = dtos[0];
|
||||||
var prevCoordinates = new TrajectoryVisualizationDto();
|
var prevCoordinates = new TrajectoryVisualizationDto();
|
||||||
for (var i = 1; i < dto.Length; i++)
|
for (var i = 1; i < dtos.Length; i++)
|
||||||
{
|
{
|
||||||
var data = dto[i];
|
var data = dtos[i];
|
||||||
var flat = GetFlat(data.WellboreDepth, prevData.WellboreDepth, data.ZenithAngle);
|
var flat = GetFlat(data.WellboreDepth, prevData.WellboreDepth, data.ZenithAngle);
|
||||||
var x = prevCoordinates.X = GetX(data.AzimuthGeo, flat, prevCoordinates.X);
|
var x = prevCoordinates.X = GetX(data.AzimuthGeo, flat, prevCoordinates.X);
|
||||||
var y = prevCoordinates.Y = GetY(data.AzimuthGeo, flat, prevCoordinates.Y);
|
var y = prevCoordinates.Y = GetY(data.AzimuthGeo, flat, prevCoordinates.Y);
|
||||||
|
Loading…
Reference in New Issue
Block a user