• 大小: 107KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-14
  • 语言: Matlab
  • 标签: GPS  

资源简介

GPS接收机采集卫星星历数据和伪距观察信息,结合CORS站的伪距观察值和真实位置,计算伪距修正参数进行伪距修正,从而实现单点定位。(请将ECEF2ENU函数注释)

资源截图

代码片段和文件信息

% function: pesudorange difference positioning
clear
% close all
clc
tic
load 2018090301GPSCORS.mat
PositioningResultECEF = [];
PositioningResult = [];
PositioningResultCartesian = [];
centerLLH = [29.5356087972239;106.603976292981;407.150738388300];
centerXYZ = [-1587130.712661975322574.903550253125890.16305581];
ENU = [];
MAXITER = 20;
realStamp = 1;
corsRealRecord = [];
pesudorangeDiffRecord = [];
diffRealReceCORS = [];

for timestamp = 1 : length(Receiver)
    % get current observation data
    currentReceiverData = cell2mat(Receiver(timestamp));
    currentCORSData = cell2mat(CORS(timestamp));
    ReceID = currentReceiverData(: 2);
    GPSID = SatelliteData(: 3);
    CORSID = currentCORSData(: 2);
    currentTime = currentReceiverData(1 1);
    x_hat = zeros(4 1);
    
    resultFlag = 1;
    
    for iter = 1:MAXITER
        
        actualLength = 0;
        dataLength = size(currentReceiverData 1);
                
        b_data = zeros(dataLength 1);
        H_data = zeros(dataLength 4);
        cov_data = zeros(dataLength 1);
        
        for index = 1:dataLength
            resultRece = currentReceiverData(index 2);
            resultGPS = find(SatelliteData(: 3) == resultRece);
            resultCORS = find(currentCORSData(: 2) == resultRece);
            
            if (isempty(resultGPS) || isempty(resultCORS))
                continue;
            end
            
            actualLength = actualLength + 1;
            % calculate initial distance
            currentSatellitePosition = parseSatellitePosition(currentTime SatelliteData(resultGPS :));
            distance = norm(currentSatellitePosition - x_hat(1:3)‘);
            
            %  --------compute H design matrix --------
            H_data(actualLength 1) = - (currentSatellitePosition(1) - x_hat(1)) / distance;
            H_data(actualLength 2) = - (currentSatellitePosition(2) - x_hat(2)) / distance;
            H_data(actualLength 3) = - (currentSatellitePosition(3) - x_hat(3)) / distance;
            H_data(actualLength 4) = 1.0;
            
            % calcuate pseudorange fix data deltaP
            realDistance = norm(currentSatellitePosition - ReferenceStation);
            deltaP = currentCORSData(resultCORS 3) - realDistance;
            
            
            % compute psudorange
            pseudorange = currentReceiverData(index 5);
            std = currentReceiverData(index 8);
            cov_data(actualLength 1) = std * std;
            b_data(actualLength 1) = pseudorange - deltaP -  distance - x_hat(4);
            
           if resultRece == 5
                temp = [currentTime resultRece pseudorange - currentCORSData(resultCORS 3)];
                pesudorangeDiff = temp;
            end
        end
        
        if ( actualLength < 4 )
           fprintf(‘observation number is less than 4\n‘);
           resultFlag = 0;
       

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      106550  2018-08-24 17:01  2018082401GPSCORS.mat
     文件        5798  2018-09-11 15:30  main.m
     文件        5366  2018-07-30 15:55  parseSatellitePosition.m
     文件        1379  2018-09-10 17:27  wgs84_ecef2llh.m

评论

共有 条评论