修改双频不能发送rtk的bug,原因是用的新打包方式发送,暂时改回180字节单独发送模式
This commit is contained in:
parent
3aa4879511
commit
8facb729f7
@ -267,7 +267,10 @@ namespace Plane.FormationCreator.Formation
|
||||
{
|
||||
int reconnecttimeout = 10;
|
||||
DateTime lastrecv = DateTime.MinValue;
|
||||
await _commModuleManager.StartRtcmLoop();
|
||||
|
||||
//新版本打包发送模式
|
||||
//await _commModuleManager.StartRtcmLoop();
|
||||
|
||||
while (Rtcmthreadrun)
|
||||
{
|
||||
try
|
||||
@ -310,11 +313,11 @@ namespace Plane.FormationCreator.Formation
|
||||
if ((seenmsg = rtcm.Read(buffer[a])) > 0)
|
||||
{
|
||||
bpsusefull += rtcm.length;
|
||||
//用于双频RTK发送
|
||||
// await _commModuleManager.InjectGpsRTCMDataAsync(rtcm.packet, rtcm.length);
|
||||
//用于单频rtk发送
|
||||
_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
||||
await _commModuleManager.InjectGpsDataAsync(rtcm.packet, (ushort)rtcm.length);
|
||||
//用于双频RTK发送
|
||||
await _commModuleManager.InjectGpsRTCMDataAsync(rtcm.packet, rtcm.length);
|
||||
//老的单频rtk发送
|
||||
//await _commModuleManager.InjectGpsDataAsync(rtcm.packet, (ushort)rtcm.length);
|
||||
|
||||
string msgname = "Rtcm" + seenmsg;
|
||||
|
||||
|
@ -885,7 +885,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
{
|
||||
//Message.Show($"{DateTime.Now.ToString("HH:mm:ss fff")}---packet.length = {packet.Length}");
|
||||
//新方案的RTK发送,用于双频
|
||||
/*
|
||||
|
||||
int read = packet.Length;
|
||||
if (read > 0)
|
||||
{
|
||||
@ -900,10 +900,12 @@ namespace Plane.FormationCreator.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//稳定方案的rtk发送,用于单频
|
||||
_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
||||
await _commModuleManager.InjectGpsDataAsync(packet, (ushort)packet.Length);
|
||||
//_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
||||
//await _commModuleManager.InjectGpsDataAsync(packet, (ushort)packet.Length);
|
||||
}
|
||||
await Task.Delay(10).ConfigureAwait(false);
|
||||
|
||||
@ -1018,6 +1020,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
rtcm3 rtcm3 = new rtcm3();
|
||||
private async Task AnalysisRendRrcmData(byte[] buffer, int length)
|
||||
{
|
||||
@ -1032,6 +1035,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
private ICommand _LandCommand;
|
||||
|
@ -27,17 +27,17 @@
|
||||
<Border Margin="10,5" BorderBrush="#FFB9B8B8" BorderThickness="1">
|
||||
<StackPanel Margin="5" Orientation="Vertical">
|
||||
<StackPanel Margin="5" Orientation="Horizontal">
|
||||
<TextBlock Text="Input data rate "/>
|
||||
<TextBlock Text="接收速率: "/>
|
||||
<TextBlock TextAlignment="Right" Width="30"
|
||||
Text="{Binding RtcmManager.Bps}"/>
|
||||
<TextBlock Text=" bps: put data rate "/>
|
||||
<TextBlock Text=" bps;发送速率:"/>
|
||||
<TextBlock TextAlignment="Right" Width="30"
|
||||
Text="{Binding RtcmManager.Bpsusefull}"/>
|
||||
<TextBlock Text=" bps sent"/>
|
||||
<TextBlock Text=" bps"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="5" Orientation="Horizontal">
|
||||
<TextBlock Text="Messages seen "/>
|
||||
<TextBlock Text="消息: "/>
|
||||
<TextBlock Text="{Binding RtcmManager.Messages_seen}"
|
||||
/>
|
||||
</StackPanel>
|
||||
@ -49,7 +49,7 @@
|
||||
<Border Margin="10,5" BorderBrush="#FFB9B8B8" BorderThickness="1">
|
||||
<StackPanel Margin="5" Width="488">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="5" Text="Base"/>
|
||||
<TextBlock Margin="5" Text="基站位置"/>
|
||||
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
|
||||
Fill="{Binding RtcmManager.BaseState,Converter={StaticResource ColorConverter}}"/>
|
||||
<TextBlock Margin="5" Text="Gps"/>
|
||||
@ -58,12 +58,12 @@
|
||||
<TextBlock Margin="5" Text="Glonass"/>
|
||||
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
|
||||
Fill="{Binding RtcmManager.GpsState,Converter={StaticResource ColorConverter}}"/>
|
||||
<TextBlock Margin="5" Text="Beidou"/>
|
||||
<TextBlock Margin="5" Text="北斗"/>
|
||||
<Rectangle Margin="0,0,15,0" Width="20" Height="20"
|
||||
Fill="{Binding RtcmManager.BeidouState,Converter={StaticResource ColorConverter}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<TextBlock Margin="5" Text="RTCM Base"/>
|
||||
<TextBlock Margin="5" Text="RTCM 位置"/>
|
||||
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationLat}"/>
|
||||
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationLng}"/>
|
||||
<TextBlock Margin="2,5" Text="{Binding RtcmManager.StationAlt}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user