Compiling Error with Flight Tracker Tutorial - UE5.3.2

Unreal Engine Version: 5.3.2

Hi! I’m following the “Build a Flight Tracker with Cesium for Unreal” for a school project. I’ve managed to succesfully follow all the steps without errors until Step 4.2. From this point, I’m not able to compile the code and the “Load Spline Track Points” is unavailable in step 4.7. I get the following errors below. I’m really stuck and would appreciate any kind of help! Thank you.

...\FlightTracker\Private\PlaneTrack.cpp(52): error C2039: 'TransformLongitudeLatitudeHeightToUnreal': is not a member of 'ACesiumGeoreference'
...\Public\CesiumGeoreference.h(35): note: see declaration of 'ACesiumGeoreference'
...\FlightTracker\Private\PlaneTrack.cpp(62): warning C4996: 'ACesiumGeoreference::GetGeoTransforms': Use transformation functions on ACesiumGeoreference and UCesiumWgs84Ellipsoid instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.

Image of the Level Blueprint, no “Load Spline Track Points” option:


// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"

// Step 2.3
#include "Components/SplineComponent.h"
#include "CesiumGeoreference.h"

#include "Engine/DataTable.h"

// Step 4.1
#include <glm/vec3.hpp>
#include "CesiumGeospatial/Ellipsoid.h"
#include "CesiumGeospatial/Cartographic.h"

#include "PlaneTrack.generated.h"

// Step 3.1
struct FAircraftRawData : public FTableRowBase

		: Longitude(0.0)
		, Latitude(0.0)
		, Height(0.0)

	UPROPERTY(EditAnywhere, Category = "FlightTracker")
	double Longitude;
	UPROPERTY(EditAnywhere, Category = "FlightTracker")
	double Latitude;
	UPROPERTY(EditAnywhere, Category = "FlightTracker")
	double Height;

class FLIGHTTRACKER_API APlaneTrack : public AActor
	// Sets default values for this actor's properties

	// Spline variable to represent the plane track
	UPROPERTY(BlueprintReadOnly, Category = "FlightTracker")
	USplineComponent* SplineTrack;

	// Cesium class that contain many useful  coordinate conversion functions
	UPROPERTY(EditAnywhere, Category = "FlightTracker")
	ACesiumGeoreference* CesiumGeoreference;

	// An Unreal Engine data table to store the raw flight data
	UPROPERTY(EditAnywhere, Category = "FlightTracker")
	UDataTable* AircraftsRawDataTable;

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Step 4.1
	// Function to parse the data table and create the spline track
	UFUNCTION(BlueprintCallable, Category = "FlightTracker")
	void LoadSplineTrackPoints();



// Fill out your copyright notice in the Description page of Project Settings.

#include "PlaneTrack.h"

// Sets default values
	// Step 2.4
	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	// Initialize the track
	SplineTrack = CreateDefaultSubobject<USplineComponent>(TEXT("SplineTrack"));
	// This lets us visualize the spline in Play mode
	// Set the color of the spline
	SplineTrack->SetUnselectedSplineSegmentColor(FLinearColor(1.f, 0.f, 0.f));


// Called when the game starts or when spawned
void APlaneTrack::BeginPlay()

// Called every frame
void APlaneTrack::Tick(float DeltaTime)


// Step 4.2
void APlaneTrack::LoadSplineTrackPoints()
    if (this->AircraftsRawDataTable != nullptr && this->CesiumGeoreference != nullptr)
        int32 PointIndex = 0;
        for (auto& row : this->AircraftsRawDataTable->GetRowMap())
            FAircraftRawData* Point = (FAircraftRawData*)row.Value;
            // Get row data point in lat/long/alt and transform it into UE4 points
            double PointLatitude = Point->Latitude;
            double PointLongitude = Point->Longitude;
            double PointHeight = Point->Height;

            // Compute the position in UE coordinates
            glm::dvec3 UECoords = this->CesiumGeoreference->TransformLongitudeLatitudeHeightToUnreal(glm::dvec3(PointLongitude, PointLatitude, PointHeight));
            FVector SplinePointPosition = FVector(UECoords.x, UECoords.y, UECoords.z);
            this->SplineTrack->AddSplinePointAtIndex(SplinePointPosition, PointIndex, ESplineCoordinateSpace::World, false);

            // Get the up vector at the position to orient the aircraft
            const CesiumGeospatial::Ellipsoid& Ellipsoid = CesiumGeospatial::Ellipsoid::WGS84;
            glm::dvec3 upVector = Ellipsoid.geodeticSurfaceNormal(CesiumGeospatial::Cartographic(FMath::DegreesToRadians(PointLongitude), FMath::DegreesToRadians(PointLatitude), FMath::DegreesToRadians(PointHeight)));

            // Compute the up vector at each point to correctly orient the plane
            glm::dvec4 ecefUp(upVector, 0.0);
            const GeoTransforms& geoTransforms = this->CesiumGeoreference->GetGeoTransforms();
            const glm::dmat4& ecefToUnreal = geoTransforms.GetEllipsoidCenteredToAbsoluteUnrealWorldTransform();
            glm::dvec4 unrealUp = ecefToUnreal * ecefUp;
            this->SplineTrack->SetUpVectorAtSplinePoint(PointIndex, FVector(unrealUp.x, unrealUp.y, unrealUp.z), ESplineCoordinateSpace::World, false);


Hi @Toby2,

Welcome to the community! Some things have changed since that tutorial was published, and unfortunately we have not had the chance to update it yet. But I can try to help with the errors you’re seeing:

First, TransformLongitudeLatitudeHeightToUnreal has been renamed to TransformLongitudeLatitudeHeightPositionToUnreal. Although GetGeoTransforms has been deprecated, it should still work so don’t worry about the warning.

I’m not sure why the “Load Spline Track Points” function wouldn’t appear. In the header file, can you double check that you have UFUNCTION(BlueprintCallable, Category = "FlightTracker") above the function definition?

Hi @janine,
Thank you for the welcome! I’ve seen in other posts that the tutorials are not up to date, but that they should still technically work in UE5. I could work in UE4, but I would prefer to use UE5 if possible.

I’ll ignore the GetGeoTransforms errors then :slight_smile:

I double checked and I have the UFUNCTION above the “void LoadSplineTrackPoints();”. I still can’t find the “Load Spline Track Points” node from the PlaneTrack actor. Is there something else I can check or another way to load the spline points?