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