27 lines
732 B
Go
27 lines
732 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.intra.yksa.space/gsn/predictor/internal/pkg/ds"
|
|
)
|
|
|
|
func (s *Service) PerformPrediction(ctx context.Context, params ds.PredictionParameters) ([]ds.PredicitonResult, error) {
|
|
// Extract wind data at launch point
|
|
wind, err := s.ExtractWind(ctx, params.LaunchLatitude, params.LaunchLongitude, params.LaunchAltitude, params.LaunchDatetime)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// TODO: Implement full prediction logic
|
|
result := ds.PredicitonResult{
|
|
Latitude: params.LaunchLatitude,
|
|
Longitude: params.LaunchLongitude,
|
|
Altitude: params.LaunchAltitude,
|
|
Timestamp: params.LaunchDatetime,
|
|
WindU: wind[0],
|
|
WindV: wind[1],
|
|
}
|
|
|
|
return []ds.PredicitonResult{result}, nil
|
|
}
|