[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [4226] add test geodetic on doubles
From: |
Pascal Brisset |
Subject: |
[paparazzi-commits] [4226] add test geodetic on doubles |
Date: |
Fri, 02 Oct 2009 17:22:17 +0000 |
Revision: 4226
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4226
Author: hecto
Date: 2009-10-02 17:22:17 +0000 (Fri, 02 Oct 2009)
Log Message:
-----------
add test geodetic on doubles
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/test/test_geodetic.c
Modified: paparazzi3/trunk/sw/airborne/test/test_geodetic.c
===================================================================
--- paparazzi3/trunk/sw/airborne/test/test_geodetic.c 2009-10-02 17:21:33 UTC
(rev 4225)
+++ paparazzi3/trunk/sw/airborne/test/test_geodetic.c 2009-10-02 17:22:17 UTC
(rev 4226)
@@ -22,6 +22,7 @@
#define RAD_OF_EM7RAD(_r) (_r/1e7)
static void test_floats(void);
+static void test_doubles(void);
static void test_enu_of_ecef_int(void);
static void test_ned_to_ecef_to_ned(void);
static void test_enu_to_ecef_to_enu( void );
@@ -32,11 +33,12 @@
int main(int argc, char** argv) {
- // test_floats();
+ test_floats();
+ test_doubles();
// test_enu_of_ecef_int();
// test_ned_to_ecef_to_ned();
- test_enu_to_ecef_to_enu();
+ // test_enu_to_ecef_to_enu();
return 0;
}
@@ -69,6 +71,33 @@
}
+static void test_doubles(void) {
+
+ printf("\n--- enu_of_ecef double ---\n");
+ // struct LlaCoor_f ref_coor;
+ // ref_coor.lat = RAD_OF_DEG(43.605278);
+ // ref_coor.lon = RAD_OF_DEG(1.442778);
+ // ref_coor.alt = 180.0;
+
+ struct EcefCoor_d ref_coor = { 4624497.0 , 116475.0, 4376563.0};
+ printf("ecef0 : (%.02f,%.02f,%.02f)\n", ref_coor.x, ref_coor.y, ref_coor.z);
+
+ struct LtpDef_d ltp_def;
+ ltp_def_from_ecef_d(<p_def, &ref_coor);
+
+ printf("lla0 : (%f,%f,%f)\n", DegOfRad(ltp_def.lla.lat),
DegOfRad(ltp_def.lla.lon), ltp_def.lla.alt);
+
+ struct EcefCoor_d my_ecef_point = ref_coor;
+ struct EnuCoor_d my_enu_point;
+ enu_of_ecef_point_d(&my_enu_point, <p_def, &my_ecef_point);
+
+ printf("ecef to enu : (%f,%f,%f) -> (%f,%f,%f)\n",
+ my_ecef_point.x, my_ecef_point.y, my_ecef_point.z,
+ my_enu_point.x, my_enu_point.y, my_enu_point.z );
+ printf("\n");
+}
+
+
static void test_enu_of_ecef_int(void) {
printf("\n--- enu_of_ecef int ---\n");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [4226] add test geodetic on doubles,
Pascal Brisset <=