Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Common: Location: move offset method implem. to header #20846

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions libraries/AP_Common/Location.cpp
Expand Up @@ -303,12 +303,6 @@ void Location::offset_latlng(int32_t &lat, int32_t &lng, ftype ofs_north, ftype
lng = wrap_longitude(dlng+lng);
}

// extrapolate latitude/longitude given distances (in meters) north and east
void Location::offset(ftype ofs_north, ftype ofs_east)
{
offset_latlng(lat, lng, ofs_north, ofs_east);
}

/*
* extrapolate latitude/longitude given bearing and distance
* Note that this function is accurate to about 1mm at a distance of
Expand Down
4 changes: 3 additions & 1 deletion libraries/AP_Common/Location.h
Expand Up @@ -74,7 +74,9 @@ class Location

// extrapolate latitude/longitude given distances (in meters) north and east
static void offset_latlng(int32_t &lat, int32_t &lng, ftype ofs_north, ftype ofs_east);
void offset(ftype ofs_north, ftype ofs_east);
void offset(ftype ofs_north, ftype ofs_east) {
offset_latlng(lat, lng, ofs_north, ofs_east);
}

// extrapolate latitude/longitude given bearing and distance
void offset_bearing(ftype bearing_deg, ftype distance);
Expand Down