3737#include < string>
3838
3939void NavsatConversionsTest (const double lat, const double lon,
40- const double UTMNorthing, const double UTMEasting, const std::string UTMZone)
40+ const double UTMNorthing, const double UTMEasting,
41+ const std::string UTMZone, const double gamma)
4142{
4243 double UTMNorthing_new;
4344 double UTMEasting_new;
4445 std::string UTMZone_new;
45- RobotLocalization::NavsatConversions::LLtoUTM (lat, lon, UTMNorthing_new, UTMEasting_new, UTMZone_new);
46+ double gamma_new;
47+ RobotLocalization::NavsatConversions::LLtoUTM (lat, lon, UTMNorthing_new, UTMEasting_new, UTMZone_new, gamma_new);
4648 EXPECT_NEAR (UTMNorthing, UTMNorthing_new, 1e-2 );
4749 EXPECT_NEAR (UTMEasting, UTMEasting_new, 1e-2 );
4850 EXPECT_EQ (UTMZone, UTMZone_new);
51+ EXPECT_NEAR (gamma, gamma_new, 1e-2 );
4952 double lat_new;
5053 double lon_new;
5154 RobotLocalization::NavsatConversions::UTMtoLL (UTMNorthing, UTMEasting, UTMZone, lat_new, lon_new);
@@ -55,8 +58,8 @@ void NavsatConversionsTest(const double lat, const double lon,
5558
5659TEST (NavsatConversionsTest, UtmTest)
5760{
58- NavsatConversionsTest (51.423964 , 5.494271 , 5699924.709 , 673409.989 , " 31U" );
59- NavsatConversionsTest (-43.530955 , 172.636645 , 5178919.718 , 632246.802 , " 59G" );
61+ NavsatConversionsTest (51.423964 , 5.494271 , 5699924.709 , 673409.989 , " 31U" , 1.950 );
62+ NavsatConversionsTest (-43.530955 , 172.636645 , 5178919.718 , 632246.802 , " 59G" , - 1.127 );
6063}
6164
6265int main (int argc, char **argv)
0 commit comments