添加数字变焦比例

main
陈伟 3 weeks ago
parent 2e691b358f
commit 947a781e1b

@ -298,6 +298,7 @@ public class ConfigSubscribe : IJob
int offset = 0, length = 0;
string model = "";
float? gimbalRoll= 0, gimbalPitch=0;
float? digitalZoomRatio = 1;
var fileUrl = "http://" + _minioService.endPoint + "/" + _minioService._bucketName +
"/" + objectKey;
using (var httpClient = new HttpClient())
@ -335,10 +336,14 @@ public class ConfigSubscribe : IJob
{
switch (keyValuePair.Key)
{
case "GimbalPitchDegree":
// // drone-dji:GimbalPitchDegree: -90.00
//drone-dji:GimbalReverse: 0
//drone-dji:GimbalRollDegree: +180.00
//drone-dji:GimbalYawDegree: -96.40
case "drone-dji:GimbalPitchDegree":
gimbalPitch = float.Parse(keyValuePair.Value);
break;
case "GimbalRollDegree":
case "drone-dji:GimbalRollDegree":
gimbalRoll = float.Parse(keyValuePair.Value);
break;
}
@ -349,6 +354,7 @@ public class ConfigSubscribe : IJob
{
if (directory is ExifDirectoryBase)
{
if (directory.Name.Equals("Exif IFD0"))
{
foreach (var tag in directory.Tags)
@ -362,8 +368,13 @@ public class ConfigSubscribe : IJob
if (directory.Name.Equals("Exif SubIFD"))
{
// Digital Zoom Ratio: 1 Exif SubIFD
foreach (var tag in directory.Tags)
{
if (tag.Name.Equals("Digital Zoom Ratio"))
{
digitalZoomRatio = float.Parse(tag.Description);
}
if (tag.Name.Equals("Exif Image Width"))
{
width = int.Parse(tag.Description.Replace("pixels", "")
@ -468,7 +479,8 @@ public class ConfigSubscribe : IJob
PayloadModelName = model,
Type = type,
GimbalPitchDegree = gimbalPitch,
GimbalRollDegree = gimbalRoll
GimbalRollDegree = gimbalRoll,
DigitalZoomRatio = digitalZoomRatio
};
// 添加事务
await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync();

@ -50,15 +50,22 @@ public class LasaMediaFile
/// 云台偏航角
/// </summary>
public float? GimbalYawDegree { get; set; }
/// <summary>
/// 云台横滚角
/// </summary>
public float? GimbalRollDegree { get; set; }
/// <summary>
/// 云台俯仰角
/// </summary>
public float? GimbalPitchDegree { get; set; }
/// <summary>
/// 数字变焦比例
/// </summary>
public float? DigitalZoomRatio { get; set; }
/// <summary>
/// 拍摄相对高度
/// </summary>
@ -124,13 +131,12 @@ public class LasaMediaFile
public int? FlightType { get; set; }
[SugarColumn(IsIgnore = true)]
public string PicLink { get; set; }
[SugarColumn(IsIgnore = true)] public string PicLink { get; set; }
public string minipic { get; set; }
public double? FocalLength { get; set; }
public string PayloadModelName { get; set; }
public int? Type { get; set; }

Loading…
Cancel
Save