[Top][All Lists]

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

Re: [Paparazzi-devel] problem with ground altitude

From: alonso acuña
Subject: Re: [Paparazzi-devel] problem with ground altitude
Date: Wed, 18 Sep 2013 11:15:35 -0600

Sorry I didn't think of that case with the hill. I've been focused on my simple case which is a level field with no good srtm data.  

The hill case got me thinking about how would the aircraft know about the hill so I have been looking at the code trying to find where the airborne code ground alt is set and the only one I could find was the initial NavSetGroundReferenceHere(). I hope I am missing something because otherwise the ground is fixed for the aircraft always and trying to land at a different altitude would not work.
Is there any documentation on how all of this works? I found this but still don't fully understand.

I also found that a few modules like the photogrammetry calculator use the GROUND_ALT which is the static value set at the top of the flight plan file. Is that ok or should they use the updated ground_alt? Also GROUND_ALT seems to be used only as an initial value in the navigation code, is that the case and should it be documented as just an initial reference at

Finally at it says "E.g. if in your flight plan you have alt="50" ground_alt="0", your default waypoint altitude (above mean sea level, not above ground) is set to 50m and your ground altitude to 0m. Now, if your ground altitude is actually 65m above sea level, the geo_init will set this. But your waypoints are still set to the 50m above sea level, so they will be -15m from your current altitude".  In sw/airborne/subsystems/navigation/common_nav.h  I found 
   #define NavSetGroundReferenceHere() ({ nav_reset_reference(); nav_update_waypoints_alt(); FALSE; })  
so it appears that waypoint alt is in fact updated?   But then I also found in  sw/airborne/firmwares/rotorcraft/navigation.h 
   #define NavSetGroundReferenceHere() ({ nav_reset_reference(); FALSE; })
   #define NavSetAltitudeReferenceHere() ({ nav_reset_alt(); FALSE; })   
and these work completely different with no waypoint update.  I wonder why they are 2 of these. Is the documentation correct in saying that waypoint alt is not updated ? Does it work different in rotorcrafts?

I appreciate your attention. Thanks

On Wed, Sep 18, 2013 at 8:05 AM, AJ Kochevar <address@hidden> wrote:

How would your solution handle terrain like sermon days does currently.  Like your aircraft flying over a large say 100 foot hill.  Your way would say you are 100 above ground but in fact you are 0.  There is a reason its called " Above ground". 

On Sep 17, 2013 11:43 PM, "alonso acuña" <address@hidden> wrote:
I still would think that it is better to provide a fixed altitude in the flight plan and not check by GPS because the GPS reading might be different each day according to weather conditions, antenna position etc. But anyway perhaps the problem is that the GCS continues to use the original ground_level even after the aircraft has corrected its value by GPS. I think it should be the same in both regardless of how the ground level is determined.

On Wed, Sep 18, 2013 at 12:23 AM, Hector Garcia de Marina <address@hidden> wrote:

Because it is a static error, just an offset. Ground level is just a relative reference, the important point for almost all applications is to know where the ground is wrt the plane, and not wrt the mean sea level (what you are asking for). If you need to know precisely the later, then indeed you need to do something else.

On 18 Sep 2013 07:33, "alonso acuña" <address@hidden> wrote:
I have learned a few things tonight:
- in order to not use SRTM data the files in data/srtm need to be deleted. Simply running the gcs without the -strm option is not enough as the data still gets used.
- the ground level as shown in GCS has no relation to ground level as known to the airborne code. To see or change airborne code's ground level add <dl_setting MAX="4000" MIN="0" STEP="1" VAR="ground_alt"/> to conf/settings/fixedwing_basic.xml or similar file you are using.
- there is no warning when the airborne ground level is very different to the SRTM or to GCS ground level. So for example when the aircraft goes into this part of the flight plan:
   <block name="final">
      <exception cond="ground_alt + 10 > GetPosAlt()" deroute="flare"/>
  it will be doing the flare at the wrong altitude.

If several people are telling me that GPS given altitude is not accurate then why is the airborne code ground level set from GPS at the beggining of the flight plan? Why not use the ground_level value from the flight plan?

On Tue, Sep 17, 2013 at 7:13 PM, Eduardo lavratti <address@hidden> wrote:
SRTM and google have the same error. GPS vertical error is 3 times greater than horizontal error.

You get correct altitude using precision gps or altimetric map + geoidal correction.

Date: Tue, 17 Sep 2013 18:26:27 -0600
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] problem with ground altitude

Hello. I have checked once again today. We had 3m GPS accuracy and double checked with a portable GPS and we continue to be standing about 10m above what SRTM data and Google Earth think is the ground level. I hope someone can help me to see what options I have and answer the questions in my original email. Will be much appreciated.

On Tue, Sep 17, 2013 at 12:58 AM, alonso acuña <address@hidden> wrote:

This is what I thought but the difference between SRTM and GPS has remained around 10 to 13m on the 4 days over the past weeks that we have been on the field. GCS indicates precision of about 5m. I suspect this is not going to change and might be an error in the SRTM data.

On Sep 17, 2013 12:47 AM, "Hector Garcia de Marina" <address@hidden> wrote:

Hi Alonso,

This behavior is completely normal. Your GPS has an static error. That depends on how is the signal (weather, solar activity, number of satellites, their position...) at the moment of the reception. Also it depends on the receiver itself.

The receiver uses to tell you how good is its estimation with the HDOP, VDOP and other information, check these acronyms in wikipedia for more information.

The same case is for the 2D position.


On 17 Sep 2013 07:29, "alonso acuña" <address@hidden> wrote:
Hello. It appears that there is a difference of about 10 meters in the reported ground altitude in SRTM date and google earth with the altitude reported by GPS at this location. So when the aircraft is on the ground it says AGL 10 and exported kml shows the path 10 meters above ground in Google Earth. 
I have read the code for NavSetGroundReferenceHere flight plan command and it seems it makes the aircraft take the current GPS altitude as ground level which seems a good thing. However this does not fix things in the GCS.
How is the AGL shown in GPS calculated? 
How can I make it not use SRTM data? 
How can I can I tell what the aircraft thinks the ground level is ?
And what is the ground_level parameter in flight plan for?

Thanks for the help.


Paparazzi-devel mailing list

Paparazzi-devel mailing list

_______________________________________________ Paparazzi-devel mailing list address@hidden

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

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