Thank you Michael and John,<div><br></div><div>Michael&#39;s solution is quite good, I think that&#39;s how Trimble Office software &quot;planning&quot; do for the prediction of the available satellites, but I think it will influence the compute efficiency in real time algorithm. And also, John told me the method to shift one reference satellite to another, and I will try to use single difference observation to create equations like Ax=b, and try fix double difference ambiguities when I need the fixed solution. </div>
<div><br></div><div>Regards and Thank you again.</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(136, 136, 136); "><div>
Shaocheng Zhang</div><div>School of Geodesy and Geomatics, Wuhan University, P.R.China</div><div>Email: <a href="mailto:gnss.zhangsc@gmail.com" target="_blank" style="color: rgb(0, 0, 204); ">gnss.zhangsc@gmail.com</a></div>
</span></div><div><br></div><div><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 2:01 AM, John Morris <span dir="ltr">&lt;<a href="mailto:john@coyotebush.net">john@coyotebush.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
For long measurements, you will want to shift from one reference satellite<br>
to another.<br>
<br>
As an analogy, double differencing is similar to a surveyor comparing<br>
altitudes between a set of hills.  You don&#39;t know the absolute altitudes,<br>
but you can figure out how high each hill is relative to the others. To get<br>
the job done, you pick one hill as your benchmark and define the variables<br>
       Hill(1)-Hill(benchmark) = x1<br>
       Hill(2)-Hill(benchmark) = x2<br>
            ...<br>
        Hill(benchmark)-Hill(benchmark) = xbenchmark = 0<br>
Based on your survey measurements you create a set of equations:    Ax = b<br>
which solves for the relative altitudes.  (Since xbenchmark is zero,  you<br>
don&#39;t include xbenchmark in the equations.)<br>
<br>
Now, you decide you want to use a different hill as your benchmark.  You<br>
need to redefine your variables and find an equivalent set of equations<br>
based on the new benchmark. It takes some figuring out, but you end up with<br>
a fairly simple procedure based on the following:<br>
     xi&#39; = Hill(i) - Hill(newbenchmark)<br>
            =   [  Hill(i) - Hill(oldbenchmark) ] - [ Hill(new) -<br>
Hill(oldbenchmark) ]<br>
            =      xi - xnew<br>
<br>
If you are more mathematically inclined than I am, you would see the new set<br>
of equations as a linear transform of the old ones, and you would express it<br>
as matrix multiplication.<br>
<br>
A second problem you will encounter with long measurements is the repeated<br>
gain and loss of satellites. One solution is to assign a separate ambiguity<br>
variable to each period of time you track a satellite, but over time you<br>
will create an unlimited number of variables.  To prevent unlimited growth,<br>
you will need to &quot;eliminate&quot;  lost satellites from the equations.<br>
<font color="#888888"><br>
<br>
  - John<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:foss-gps-bounces@lists.osgeo.org">foss-gps-bounces@lists.osgeo.org</a><br>
[mailto:<a href="mailto:foss-gps-bounces@lists.osgeo.org">foss-gps-bounces@lists.osgeo.org</a>] On Behalf Of Michael Tandy<br>
Sent: Monday, March 15, 2010 4:06 AM<br>
To: Open Source GPS-related discussion and support<br>
Subject: Re: [FOSS-GPS] Question of reference satellite selection<br>
<br>
Well, you have the almanac and ephemeris for all the satellites you can see,<br>
so you can calculate each satellite&#39;s future elevations, right? So you could<br>
do something along these lines:<br>
<br>
for x = each satellite visible<br>
  for time = now to (now+6 hours)<br>
    calculate satellite x&#39;s elevation at time<br>
    if elevation &lt; 10 degrees<br>
      print &quot;Satellite x visible until time&quot;<br>
      break<br>
    end if<br>
  end for<br>
end for<br>
<br>
Let&#39;s say you started your survey today, at midnight UTC time, that you were<br>
at my location, and that you apply an elevation mask of 10 degrees.<br>
<br>
You would see the following satellites, at that time:<br>
SV 2, elevation 28.76<br>
SV 4, elevation 13.53<br>
SV 12, elevation 49.46<br>
SV 14, elevation 36.90<br>
SV 29, elevation 51.25<br>
SV 30, elevation 84.05<br>
SV 31, elevation 38.94<br>
<br>
Those satellites would be above the 10 degree elevation cutoff for:<br>
SV 2: 1 hour 57 mins<br>
SV 4: 16 mins<br>
SV 12: 1 hour 40 mins<br>
SV 14: 1 hour 7 mins<br>
SV 29: 4 hours 11 mins<br>
SV 30: 2 hours 52 mins<br>
SV 31: 3 hours 53 mins<br>
<br>
Hence, if you simply chose the highest elevation satellite (SV 30) it would<br>
be visible for over two and a half hours, but if you select the right<br>
satellite it can be visible for longer.<br>
<br>
I use the highest elevation satellite because my initializations never take<br>
anything like two and a half hours!<br>
<br>
Hope this helps!<br>
<br>
<br>
On 15 March 2010 09:26, Shaocheng Zhang &lt;<a href="mailto:gnss.zhangsc@gmail.com">gnss.zhangsc@gmail.com</a>&gt; wrote:<br>
&gt; Dear GPS Developers<br>
&gt; I am a Ph.D student working on real-time GPS algorithms. Currently I<br>
&gt; have a problem about the reference satellite selection.<br>
&gt; As we know, most of the RTK algorithm choose the highest elevation<br>
&gt; satellite as reference satellite, but when the baseline is quite long(eg.<br>
&gt; network-rtk), it may take quite long time (may be more than half<br>
&gt; hours) to get the ambiguity initialized, and during the initialization<br>
&gt; we don&#39;t want the reference satellite changes, otherwise we may need<br>
&gt; to restart the initialization.<br>
&gt; So if at the very beginning, we could find the longest session<br>
&gt; satellite as the reference satellite, it will help us to guarantee the<br>
&gt; reference satellite will not change before the initialization<br>
&gt; finished. I read GPStk&#39;s source code of &quot;vecsol&quot;, it give a solution<br>
&gt; of project the satellite&#39;s velocity &quot;V&quot; to the U direction of the<br>
&gt; local NEU coordinate &quot;Vu&quot;, and take the biggest &quot;Vu&quot; satellite as the<br>
&gt; reference satellite. I check this method and find it indeed give us a<br>
&gt; longer session satellite, however, when I check this method for all<br>
&gt; the available satellite at that epoch, It doesn&#39;t conclude that &quot;the<br>
&gt; bigger the Vu, the longer the following observed session&quot;.<br>
&gt; I am very interested in this method because It&#39;s easy to implement and<br>
&gt; can be use in real-time algorithm. So I am wondering if someone can<br>
&gt; explain this method in a mathematical way, or give a better solution.<br>
&gt; Thanks in advance.<br>
&gt; Regards.<br>
&gt; Shaocheng Zhang<br>
&gt; School of Geodesy and Geomatics, Wuhan University, P.R.China<br>
&gt; Email: <a href="mailto:gnss.zhangsc@gmail.com">gnss.zhangsc@gmail.com</a><br>
&gt; _______________________________________________<br>
&gt; This message is sent to you from <a href="mailto:FOSS-GPS@lists.osgeo.org">FOSS-GPS@lists.osgeo.org</a> mailing list.<br>
&gt; Visit <a href="http://lists.osgeo.org/mailman/listinfo/foss-gps" target="_blank">http://lists.osgeo.org/mailman/listinfo/foss-gps</a> to manage your<br>
&gt; subscription For more information, check<br>
&gt; <a href="http://wiki.osgeo.org/wiki/FOSS-GPS" target="_blank">http://wiki.osgeo.org/wiki/FOSS-GPS</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
This message is sent to you from <a href="mailto:FOSS-GPS@lists.osgeo.org">FOSS-GPS@lists.osgeo.org</a> mailing list.<br>
Visit <a href="http://lists.osgeo.org/mailman/listinfo/foss-gps" target="_blank">http://lists.osgeo.org/mailman/listinfo/foss-gps</a> to manage your<br>
subscription For more information, check <a href="http://wiki.osgeo.org/wiki/FOSS-GPS" target="_blank">http://wiki.osgeo.org/wiki/FOSS-GPS</a><br>
<br>
_______________________________________________<br>
This message is sent to you from <a href="mailto:FOSS-GPS@lists.osgeo.org">FOSS-GPS@lists.osgeo.org</a> mailing list.<br>
Visit <a href="http://lists.osgeo.org/mailman/listinfo/foss-gps" target="_blank">http://lists.osgeo.org/mailman/listinfo/foss-gps</a> to manage your subscription<br>
For more information, check <a href="http://wiki.osgeo.org/wiki/FOSS-GPS" target="_blank">http://wiki.osgeo.org/wiki/FOSS-GPS</a><br>
</div></div></blockquote></div><br></div>