Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2212 → Rev 2215

/Transportables_Koptertool/PKT/branches/branch_FollowMeStep2Merge/followme/followme.c
37,9 → 37,10
//# HISTORY followme.c
//#
//#
//# 14.10.2015 Starter
//# - Added Offset to FollowMe
//# - Stuff in FollowMeStep2 only for debug!
//#
//#
//#
//# 22.09.2015 Starter
//# - FollowMeStep2 erweitert mit Kreisberechnung und test auf PKT
//# - PKT-Pos von lat lon auf latitude und longitude umbenannt
208,8 → 209,9
Point_t FollowMe;
uint8_t mktimeout = false;
 
nmeaPOS NMEApos;
nmeaPOS NMEAtarget;
 
 
GPS_PosDev_t targetdev;
 
 
494,13 → 496,17
//Config.FM_Refresh
 
// FollowMeStep2
followMeOffset.latitude = 2000;
followMeOffset.longitude = 2000;
followme_add_offset(&NMEA, &NMEA, &followMeOffset);
followMeOffset.latitude = Config.FM_Offest_Latitude;
followMeOffset.longitude = Config.FM_Offset_Longitude;
 
NMEApos.latitude = NMEA.Latitude;
NMEApos.longitude = NMEA.Longitude;
 
followme_add_offset(&NMEApos, &NMEAtarget, &followMeOffset);
 
FollowMe.Position.Status = NEWDATA;
FollowMe.Position.Longitude = NMEA.Longitude;
FollowMe.Position.Latitude = NMEA.Latitude;
FollowMe.Position.Longitude = NMEAtarget.longitude;
FollowMe.Position.Latitude = NMEAtarget.latitude;
FollowMe.Position.Altitude = 1; // 20.7.2015 CB
// FollowMe.Position.Altitude = NMEA.Altitude; // ist das wirklich ok? NEIN C.B.
 
640,11 → 646,11
writex_gpspos( 1, 2, NMEApos.latitude, MNORMAL, 0,0 ); // GPS-Maus: Latitude
writex_gpspos(10, 2, NMEApos.longitude, MNORMAL, 0,0 ); // GPS-Maus: Longitude
 
followme_calculate_offset(Config.FM_Distance, Config.FM_Azimuth, &followMeOffset);
followme_calculate_offset(Config.FM_Offset_Longitude, Config.FM_Offest_Latitude, &followMeOffset);
 
#ifdef DEBUG
writex_gpspos( 1, 6, (int32_t)Config.FM_Azimuth*100, MNORMAL, 0, 0 );
writex_gpspos( 10, 6, (int32_t)Config.FM_Distance*100, MNORMAL, 0, 0 );
writex_gpspos( 1, 6, (int32_t)Config.FM_Offest_Latitude*100, MNORMAL, 0, 0 );
writex_gpspos( 10, 6, (int32_t)Config.FM_Offset_Longitude*100, MNORMAL, 0, 0 );
writex_gpspos( 1, 7, (int32_t)followMeOffset.latitude*100, MNORMAL, 0, 0 );
writex_gpspos( 10, 7, (int32_t)followMeOffset.longitude*100, MNORMAL, 0, 0 );
#endif
673,12 → 679,12
 
if( get_key_press(1 << KEY_MINUS) )
{
Config.FM_Azimuth -= 10;
Config.FM_Offest_Latitude -= 10;
redraw = true;
}
if( get_key_press(1 << KEY_PLUS) )
{
Config.FM_Azimuth += 10;
Config.FM_Offest_Latitude += 10;
redraw = true;
}
}