Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1915 | - | 1 | /* |
2 | * tracking.h |
||
3 | * |
||
4 | * Created on: 13.02.2012 |
||
5 | * Author: cebra |
||
6 | */ |
||
7 | |||
8 | #ifndef TRACKING_H_ |
||
9 | #define TRACKING_H_ |
||
10 | |||
11 | #define REPEAT 1 |
||
12 | #define REPEAT_MIN 1 |
||
13 | #define REPEAT_MAX 100 |
||
14 | #define PAUSE 10 |
||
15 | #define PAUSE_MIN 4 // mindestens 400ms, da mechanischer Servo-Lauf zur Position berücksichtigt werden muss |
||
16 | #define PAUSE_MAX 20 // Pause pro Links-, Mittel- und Rechtsposition 10*100ms |
||
17 | #define PAUSE_STEP 0 |
||
18 | #define PAUSE_STEP_MIN 0 // Pause bei jeden Servoschritt in ms |
||
19 | #define PAUSE_STEP_MAX 200 |
||
20 | /* Antennen-Nachführung */ |
||
21 | #define TRACKING_MIN 0 // aus, TRACKING_RSSI, TRACKING_GPS, TRACKING_MKCOCKPIT, TRACKING_NMEA |
||
22 | #define TRACKING_MAX 4 |
||
23 | /* Antennen-Nachführung per RSSI */ |
||
24 | #define TRACKING_HYSTERESE 40 // Hysterese bevor Tracking bei Richtungswechsel anspricht |
||
25 | #define TRACKING_HYST_MIN 0 |
||
26 | #define TRACKING_HYST_MAX 100 |
||
27 | |||
28 | #define FC_FLAG_MOTOR_RUN 0x01 |
||
29 | #define FC_FLAG_FLY 0x02 |
||
30 | #define FC_FLAG_CALIBRATE 0x04 |
||
31 | #define FC_FLAG_MOTOR_START 0x08 |
||
32 | |||
33 | //#define NC_FLAG_GPS_OK 0 |
||
34 | |||
35 | |||
36 | typedef struct { |
||
37 | int32_t distance; |
||
38 | int16_t bearing; |
||
39 | }geo_t; |
||
40 | |||
41 | typedef struct { |
||
42 | int32_t Home_Lon; // in 1E-7 degrees |
||
43 | int32_t Home_Lat; // in 1E-7 degrees |
||
44 | int32_t Home_Alt; // in mm |
||
45 | int16_t direction; // ermittelte Konstante aus Mittelposition Antenne geo.bearing - navi_data.CompassHeading |
||
46 | }__attribute__((packed)) HomePos_t; |
||
47 | |||
48 | |||
49 | |||
50 | extern uint8_t NMEAsatsInUse; // Number of satelites currently in use |
||
51 | extern int32_t NMEAlatitude, NMEAlongitude; |
||
52 | extern uint8_t posfix; // GPS Fix, 0 = Fix not available or invalid,1 = GPS SPS Mode, fix valid, |
||
53 | // 2 = Differential GPS, SPS Mode, fix valid, 6 = Dead Reckoning Mode, fix valid |
||
54 | extern int16_t HDOP; // Horizontal Dilution of Precision, 1.1 -xx.x, niederiger = besser |
||
55 | extern int16_t NMEAaltitude; // Höhe in Meter |
||
56 | extern char NMEAtime[9]; |
||
57 | |||
58 | extern uint8_t coldstart; // Flag erstmaliger MK-Start(Motore) nur nach GPS-Fix |
||
59 | |||
60 | void Tracking_NMEA(void); |
||
61 | uint8_t decodeNMEA(void); |
||
62 | void PKT_tracking(void); |
||
63 | |||
64 | |||
65 | |||
66 | |||
67 | #endif /* TRACKING_H_ */ |