bug-gama
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gama] <observations-summary> does not seem to agree with input data


From: Steve Champion
Subject: [Bug-gama] <observations-summary> does not seem to agree with input data
Date: Thu, 15 Sep 2016 09:34:42 +0000

Hello. I am a new GNU Gama User and I am not sure if this is the right place to 
discuss my difficulty, so apologies in advance if this posting is 
inappropriate. As requested, I am erring on the side of giving too much 
information rather than too little.

I am using GNU Gama 1.15, which is the latest pre-compiled Windows binary that 
I could find.

My application is as follows.

I work with an indoor radar ranging product which locates transmitting beacons 
in space by measuring the angles-of-arrival and time-distance-of-arrival of 
their signals at sensors mounted around the monitored space. The exact 
locations of the sensors once installed must, of course, be known.

Normally, the positions of the sensors are surveyed using a Total Station in a 
similar way that it would be used out on a building site - just at a much 
smaller scale.

I thought that it might be possible (for small projects with only, say, 4 
sensors) to survey using distances only (using a laser distance measurer such 
as Bosch PLR15 instead of a Total Station). This would require coordinates to 
be calculated with Gama from lots of s-distance measurements and a couple of 
angles (generally speaking these would be assumed right-angles from reference 
points on perpendicular walls)

I have generated test data by taking the actual xyz coordinates of four sensors 
and three reference points. From these I have calculated all the possible 
horizontal distances and slope distances using Pythagoras. From these distances 
alone it should be possible to calculate the original xyz coordinates. In 
practice a subset of all the possible s-distances would be measured. 

When my test file contains all of the possible horizontal distances and slope 
distances then Gama calculates the xyz coordinates correctly. When I omit some 
or all of the horizontal distances (which would not normally be available using 
this technique) then Gama cannot calculate all of the xyz coordinates. 
Moreover, the <observations-summary> section in the output file does not report 
the correct number of distances and slope distances in the input file. It seems 
to me that it should be possible to calculate the xyz coordinates from 
s-distances alone.

This, with s-distances and horizontal distances, works fine:
----------------------------------------------
<?xml version="1.0" ?>

<gama-local xmlns="http://www.gnu.org/software/gama/gama-local";>
<network axes-xy="en"> <!-- x axis is East, y axis is North -->         

<description>
Conference room sensor data for GNU gama, values calculated from positions 
(i.e. not actually surveyed)
</description>

<!-- parameters are expressed with empty-element tag -->

<parameters sigma-act = "aposteriori" />

<points-observations direction-stdev ="10"
distance-stdev = "5 3 1">          

<!-- fixed point, constrained point -->

<point id="R1" x="0.000" y="0.000" z="1.596" fix="xyz" />
<point id="R2" x="0.000" y="5.243" z="1.558" adj="XYZ" /> 

<!-- computed / adjusted points -->

<point id="R3" adj="xyz" z="1.500" />
<point id="S1" adj="xyz" z="2.385" />
<point id="S2" adj="xyz" z="2.393" />
<point id="S3" adj="xyz" z="2.383" />
<point id="S4" adj="xyz" z="2.387" />

<obs from="R1">
     <!-- North (Y axis) is  0 degrees,   0 gons/grads.
              East  (X axis) is 90 degrees, 100 gons/grads.
              Angles _may_ be given is sexagecimal degrees,
          e.g. 90-00-00, but this will give slightly
                  different results due to rounding          -->         
     <direction  to="R2" val= "  0"/>
     <direction  to="R3" val= "100"/>
     <!--s-distance to="R2" val= "5.243" /-->
     <s-distance to="R3" val= "5.001" />
     <s-distance to="S1" val= "0.879" />
     <s-distance to="S2" val= "4.443" />
     <s-distance to="S3" val= "5.144" />
     <s-distance to="S4" val= "6.663" />
     <distance to="R2" val= "5.243" />
     <distance to="R3" val= "5.000" />
     <distance to="S1" val= "0.387" />
     <distance to="S2" val= "4.371" />
     <distance to="S3" val= "5.083" />
     <distance to="S4" val= "6.616" />
</obs>

<obs from="R2">
     <!--s-distance to="R3" val= "7.245" /-->
     <s-distance to="S1" val= "4.955" />
     <s-distance to="S2" val= "6.028" />
     <s-distance to="S3" val= "0.855" />
     <s-distance to="S4" val= "4.341" />
     <distance to="R3" val= "7.245" />
     <distance to="S1" val= "4.885" />
     <distance to="S2" val= "5.969" />
     <distance to="S3" val= "0.225" />
     <distance to="S4" val= "4.261" />
</obs>            
                     
<obs from="R3">  
     <s-distance to="S1" val= "4.950" />
     <s-distance to="S2" val= "1.569" />
     <s-distance to="S3" val= "7.075" />
     <s-distance to="S4" val= "5.195" />
     <distance to="S1" val= "4.870" />
     <distance to="S2" val= "1.290" />
     <distance to="S3" val= "7.020" />
     <distance to="S4" val= "5.118" />
</obs>            
                     
<obs from="S1">  
     <!--s-distance to="S2" val= "4.158" />
     <s-distance to="S3" val= "4.721" />
     <s-distance to="S4" val= "6.249" /-->
     <distance to="S2" val= "4.158" />
     <distance to="S3" val= "4.721" />
     <distance to="S4" val= "6.249" />
</obs>            
                     
<obs from="S2">  
     <!--s-distance to="S3" val= "5.745" />
     <s-distance to="S4" val= "4.019" /-->
     <distance to="S3" val= "5.745" />
     <distance to="S4" val= "4.019" />
</obs>            
                     
<obs from="S3">  
     <!--s-distance to="S4" val= "4.101" /-->
     <distance to="S4" val= "4.101" />
</obs>            
                     

</points-observations>

</network>
</gama-local>
----------------------------------------------
The correct xyz coordinates are calculated.

Gama reports:

<observations-summary>
   <distances>21</distances>
   <directions>2</directions>
   <angles>0</angles>
   <xyz-coords>0</xyz-coords>
   <h-diffs>0</h-diffs>
   <z-angles>0</z-angles>
   <s-dists>13</s-dists>
   <vectors>0</vectors>
   <azimuths>0</azimuths>
</observations-summary>

And the <adjusted> report makes total sense:

<adjusted>
   <point> <id>R2</id> <X>0.0000000000000004</X> <Y>5.2429215108132290</Y> 
<Z>1.5569658859519144</Z> </point>
   <point> <id>R3</id> <x>5.0000239092260212</x> <y>0.0000000106983902</y> 
<z>1.4997280446580850</z> </point>
   <point> <id>S1</id> <x>0.1432141204543060</x> <y>0.3598494925910169</y> 
<z>2.3851129372524533</z> </point>
   <point> <id>S2</id> <x>4.2442163812260931</x> <y>1.0451472459281550</y> 
<z>2.3931803624247823</z> </point>
   <point> <id>S3</id> <x>0.1560066894908164</x> <y>5.0809084785210477</y> 
<z>2.3818778964535854</z> </point>
   <point> <id>S4</id> <x>4.2570592820385240</x> <y>5.0640669720740412</y> 
<z>2.3883249051136191</z> </point>
</adjusted> 

But this, with only the s-distances, does not work:
----------------------------------------------
<?xml version="1.0" ?>

<gama-local xmlns="http://www.gnu.org/software/gama/gama-local";>
<network axes-xy="en"> <!-- x axis is East, y axis is North -->         

<description>
Conference room sensor data for GNU gama, values calculated from positions 
(i.e. not actually surveyed)
</description>

<!-- parameters are expressed with empty-element tag -->

<parameters sigma-act = "aposteriori" />

<points-observations>          

<!-- fixed point, constrained point -->

<point id="R1" x="0.000" y="0.000" z="1.596" fix="xyz" />
<point id="R2" x="0.000" y="5.243" z="1.558" adj="XYZ" /> 

<!-- computed / adjusted points -->

<point id="R3" adj="xyz" z="1.500" />
<point id="S1" adj="xyz" z="2.385" />
<point id="S2" adj="xyz" z="2.393" />
<point id="S3" adj="xyz" z="2.383" />
<point id="S4" adj="xyz" z="2.387" />

<obs from="R1">
     <!-- North (Y axis) is  0 degrees,   0 gons/grads.
              East  (X axis) is 90 degrees, 100 gons/grads.
              Angles _may_ be given is sexagecimal degrees,
          e.g. 90-00-00, but this will give slightly
                  different results due to rounding          -->         
     <direction  to="R2" val= "  0" stdev="10.0" />
     <direction  to="R3" val= "100" stdev="10.0" />
     <s-distance to="R2" val= "5.243" stdev="5.0"  />
     <s-distance to="R3" val= "5.001" stdev="5.0"  />
     <s-distance to="S1" val= "0.879" stdev="5.0"  />
     <s-distance to="S2" val= "4.443" stdev="5.0"  />
     <s-distance to="S3" val= "5.144" stdev="5.0"  />
     <s-distance to="S4" val= "6.663" stdev="5.0"  />
</obs>

<obs from="R2">
     <s-distance to="R3" val= "7.245" stdev="5.0"  />
     <s-distance to="S1" val= "4.955" stdev="5.0"  />
     <s-distance to="S2" val= "6.028" stdev="5.0"  />
     <s-distance to="S3" val= "0.855" stdev="5.0"  />
     <s-distance to="S4" val= "4.341" stdev="5.0"  />
</obs>            
                     
<obs from="R3">  
     <s-distance to="S1" val= "4.950" stdev="5.0"  />
     <s-distance to="S2" val= "1.569" stdev="5.0"  />
     <s-distance to="S3" val= "7.075" stdev="5.0"  />
     <s-distance to="S4" val= "5.195" stdev="5.0"  />
</obs>            
                     
<obs from="S1">  
     <s-distance to="S2" val= "4.158" stdev="5.0"  />
     <s-distance to="S3" val= "4.721" stdev="5.0"  />
     <s-distance to="S4" val= "6.249" stdev="5.0"  />
</obs>            
                     
<obs from="S2">  
     <s-distance to="S3" val= "5.745" stdev="5.0"  />
     <s-distance to="S4" val= "4.019" stdev="5.0"  />
</obs>            
                     
<obs from="S3">  
     <s-distance to="S4" val= "4.101" stdev="5.0"  />
</obs>            
                     

</points-observations>

</network>
</gama-local>
----------------------------------------------

Gama reports:

<observations-summary>
   <distances>0</distances>
   <directions>0</directions>
   <angles>0</angles>
   <xyz-coords>0</xyz-coords>
   <h-diffs>0</h-diffs>
   <z-angles>0</z-angles>
   <s-dists>1</s-dists>
   <vectors>0</vectors>
   <azimuths>0</azimuths>
</observations-summary>

If I start to put the horizontal distances in one by one some of the xyz 
coordinates get calculated. However, the <observations-summary> report in the 
output file generally does not agree with the number of observations in the 
input data. Once there are sufficient horizontal distances, I believe the 
<observations-summary> report to be correct.

Do you have any idea what is happening here? Also, is a more recent pre-built 
windows executable than 1.15 available that I could try?

Thanks for any pointers you can give and, again, apologies if this is not the 
correct place to ask these questions.

Steve Champion






reply via email to

[Prev in Thread] Current Thread [Next in Thread]