Skip to content

Commit 3af583b

Browse files
authored
Merge pull request #95 from ISSUIUC/bugfix/gps-ground-fix
Tanish GPS ground station fix
2 parents 1a3e7af + 824f3f2 commit 3af583b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ground/src/feather/main.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ struct FullTelemetryData {
136136
bool is_sustainer;
137137
float kf_vx;
138138
bool kf_reset;
139-
uint16_t kf_vx;
140139
};
141140

142141

@@ -176,13 +175,9 @@ int decodeLastTwoBits(uint16_t ax, uint16_t ay, uint16_t az) {
176175
return tilt;
177176
}
178177

178+
179179
double ConvertGPS(int32_t coord) {
180-
double mins = fmod(static_cast<double>(std::abs(coord)), 10000000) / 100000.;
181-
double degs = floor(static_cast<double>(std::abs(coord)) / 10000000.);
182-
double complete = (degs + (mins / 60.));
183-
if (coord < 0) {
184-
complete *= -1.;
185-
}
180+
double complete = static_cast<double>(coord) / 10000000.0;
186181
return complete;
187182
}
188183

0 commit comments

Comments
 (0)